pref: 底栏样式统一
This commit is contained in:
parent
b0d67a1b98
commit
717e2c70ba
|
|
@ -291,7 +291,7 @@ private fun getBlackDarkDynamicColor(tonalPalette: TonalPalette): ExtendedColors
|
||||||
onTopBarActive = tonalPalette.neutralVariant100,
|
onTopBarActive = tonalPalette.neutralVariant100,
|
||||||
topBarSurface = tonalPalette.neutralVariant10,
|
topBarSurface = tonalPalette.neutralVariant10,
|
||||||
onTopBarSurface = tonalPalette.neutralVariant70,
|
onTopBarSurface = tonalPalette.neutralVariant70,
|
||||||
bottomBar = tonalPalette.neutralVariant10,
|
bottomBar = tonalPalette.neutralVariant0,
|
||||||
bottomBarSurface = tonalPalette.neutralVariant10,
|
bottomBarSurface = tonalPalette.neutralVariant10,
|
||||||
onBottomBarSurface = tonalPalette.neutralVariant70,
|
onBottomBarSurface = tonalPalette.neutralVariant70,
|
||||||
text = tonalPalette.neutralVariant90,
|
text = tonalPalette.neutralVariant90,
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ import androidx.compose.material.DropdownMenuItem
|
||||||
import androidx.compose.material.Icon
|
import androidx.compose.material.Icon
|
||||||
import androidx.compose.material.IconButton
|
import androidx.compose.material.IconButton
|
||||||
import androidx.compose.material.MaterialTheme
|
import androidx.compose.material.MaterialTheme
|
||||||
import androidx.compose.material.Surface
|
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material.Text
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.rounded.ArrowBack
|
import androidx.compose.material.icons.rounded.ArrowBack
|
||||||
|
|
@ -52,6 +51,7 @@ import com.huanchengfly.tieba.post.arch.onEvent
|
||||||
import com.huanchengfly.tieba.post.arch.pageViewModel
|
import com.huanchengfly.tieba.post.arch.pageViewModel
|
||||||
import com.huanchengfly.tieba.post.arch.wrapImmutable
|
import com.huanchengfly.tieba.post.arch.wrapImmutable
|
||||||
import com.huanchengfly.tieba.post.ui.common.theme.compose.ExtendedTheme
|
import com.huanchengfly.tieba.post.ui.common.theme.compose.ExtendedTheme
|
||||||
|
import com.huanchengfly.tieba.post.ui.common.theme.compose.threadBottomBar
|
||||||
import com.huanchengfly.tieba.post.ui.page.LocalNavigator
|
import com.huanchengfly.tieba.post.ui.page.LocalNavigator
|
||||||
import com.huanchengfly.tieba.post.ui.page.ProvideNavigator
|
import com.huanchengfly.tieba.post.ui.page.ProvideNavigator
|
||||||
import com.huanchengfly.tieba.post.ui.page.destinations.CopyTextDialogPageDestination
|
import com.huanchengfly.tieba.post.ui.page.destinations.CopyTextDialogPageDestination
|
||||||
|
|
@ -307,65 +307,60 @@ internal fun SubPostsContent(
|
||||||
},
|
},
|
||||||
bottomBar = {
|
bottomBar = {
|
||||||
if (account != null && !LocalContext.current.appPreferences.hideReply) {
|
if (account != null && !LocalContext.current.appPreferences.hideReply) {
|
||||||
Surface(
|
Column(
|
||||||
elevation = 16.dp,
|
modifier = Modifier.background(ExtendedTheme.colors.threadBottomBar)
|
||||||
color = ExtendedTheme.colors.bottomBar,
|
|
||||||
contentColor = ExtendedTheme.colors.text,
|
|
||||||
modifier = Modifier.fillMaxWidth()
|
|
||||||
) {
|
) {
|
||||||
Column {
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(horizontal = 16.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
|
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
||||||
|
) {
|
||||||
|
Avatar(
|
||||||
|
data = StringUtil.getAvatarUrl(account.portrait),
|
||||||
|
size = Sizes.Tiny,
|
||||||
|
contentDescription = account.name,
|
||||||
|
)
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.padding(vertical = 8.dp)
|
||||||
.padding(horizontal = 16.dp),
|
.weight(1f)
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
.clip(RoundedCornerShape(6.dp))
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
.background(ExtendedTheme.colors.bottomBarSurface)
|
||||||
) {
|
.clickable {
|
||||||
Avatar(
|
val fid = forum?.get { id } ?: forumId
|
||||||
data = StringUtil.getAvatarUrl(account.portrait),
|
val forumName = forum?.get { name }
|
||||||
size = Sizes.Tiny,
|
if (!forumName.isNullOrEmpty()) {
|
||||||
contentDescription = account.name,
|
navigator.navigate(
|
||||||
)
|
ReplyPageDestination(
|
||||||
Row(
|
forumId = fid,
|
||||||
modifier = Modifier
|
forumName = forumName,
|
||||||
.padding(vertical = 8.dp)
|
threadId = threadId,
|
||||||
.weight(1f)
|
postId = postId,
|
||||||
.clip(RoundedCornerShape(6.dp))
|
|
||||||
.background(ExtendedTheme.colors.bottomBarSurface)
|
|
||||||
.clickable {
|
|
||||||
val fid = forum?.get { id } ?: forumId
|
|
||||||
val forumName = forum?.get { name }
|
|
||||||
if (!forumName.isNullOrEmpty()) {
|
|
||||||
navigator.navigate(
|
|
||||||
ReplyPageDestination(
|
|
||||||
forumId = fid,
|
|
||||||
forumName = forumName,
|
|
||||||
threadId = threadId,
|
|
||||||
postId = postId,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
.padding(8.dp),
|
}
|
||||||
) {
|
.padding(8.dp),
|
||||||
Text(
|
|
||||||
text = stringResource(id = R.string.tip_reply_thread),
|
|
||||||
style = MaterialTheme.typography.caption,
|
|
||||||
color = ExtendedTheme.colors.onBottomBarSurface,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Box(
|
|
||||||
modifier = Modifier
|
|
||||||
.requiredHeightIn(min = if (LocalContext.current.appPreferences.liftUpBottomBar) 16.dp else 0.dp)
|
|
||||||
) {
|
) {
|
||||||
Spacer(
|
Text(
|
||||||
modifier = Modifier
|
text = stringResource(id = R.string.tip_reply_thread),
|
||||||
.windowInsetsBottomHeight(WindowInsets.navigationBars)
|
style = MaterialTheme.typography.caption,
|
||||||
|
color = ExtendedTheme.colors.onBottomBarSurface,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.requiredHeightIn(min = if (LocalContext.current.appPreferences.liftUpBottomBar) 16.dp else 0.dp)
|
||||||
|
) {
|
||||||
|
Spacer(
|
||||||
|
modifier = Modifier
|
||||||
|
.windowInsetsBottomHeight(WindowInsets.navigationBars)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue