提取应用颜色
This commit is contained in:
@@ -33,7 +33,7 @@ import kotlin.coroutines.suspendCoroutine
|
||||
object AppState {
|
||||
var UserId: Int? = null
|
||||
var profile :AccountProfileEntity? = null
|
||||
|
||||
var darkMode = false
|
||||
suspend fun initWithAccount(scope: CoroutineScope, context: Context) {
|
||||
val accountService: AccountService = AccountServiceImpl()
|
||||
// 获取用户认证信息
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.aiosman.riderpro
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
var AppColors = LightThemeColors()
|
||||
//var AppColors = DarkThemeColors()
|
||||
//var AppColors = LightThemeColors()
|
||||
var AppColors = if (AppState.darkMode) DarkThemeColors() else LightThemeColors()
|
||||
|
||||
open class AppThemeData(
|
||||
var main: Color,
|
||||
@@ -17,13 +17,15 @@ open class AppThemeData(
|
||||
var loadingText: Color,
|
||||
var disabledBackground: Color,
|
||||
var background: Color,
|
||||
var decentBackground: Color,
|
||||
var divider: Color,
|
||||
var inputBackground: Color,
|
||||
var inputHint: Color,
|
||||
var error : Color,
|
||||
var error: Color,
|
||||
var checkedBackground: Color,
|
||||
var checkedText: Color,
|
||||
)
|
||||
var chatActionColor: Color,
|
||||
)
|
||||
|
||||
class LightThemeColors : AppThemeData(
|
||||
main = Color(0xffda3832),
|
||||
@@ -43,6 +45,9 @@ class LightThemeColors : AppThemeData(
|
||||
error = Color(0xffFF0000),
|
||||
checkedBackground = Color(0xff000000),
|
||||
checkedText = Color(0xffFFFFFF),
|
||||
decentBackground = Color(0xfff5f5f5),
|
||||
chatActionColor = Color(0xffe0e0e0)
|
||||
|
||||
)
|
||||
|
||||
class DarkThemeColors : AppThemeData(
|
||||
@@ -63,4 +68,6 @@ class DarkThemeColors : AppThemeData(
|
||||
error = Color(0xffFF0000),
|
||||
checkedBackground = Color(0xffffffff),
|
||||
checkedText = Color(0xff000000),
|
||||
decentBackground = Color(0xFF171717),
|
||||
chatActionColor = Color(0xFF3D3D3D)
|
||||
)
|
||||
@@ -4,7 +4,7 @@ import android.content.Context
|
||||
|
||||
object ConstVars {
|
||||
// api 地址
|
||||
// const val BASE_SERVER = "http://192.168.31.130:8088"
|
||||
// const val BASE_SERVER = "http://192.168.31.131:8088"
|
||||
// const val BASE_SERVER = "http://192.168.142.140:8088"
|
||||
// const val BASE_SERVER = "https://8.137.22.101:8088"
|
||||
const val BASE_SERVER = "https://rider-pro.aiosman.com/beta_api"
|
||||
|
||||
@@ -17,7 +17,9 @@ import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.compose.animation.AnimatedContentScope
|
||||
import androidx.compose.animation.ExperimentalSharedTransitionApi
|
||||
import androidx.compose.animation.SharedTransitionScope
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.compositionLocalOf
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.lifecycle.ProcessLifecycleOwner
|
||||
@@ -32,6 +34,7 @@ import com.aiosman.riderpro.ui.Navigation
|
||||
import com.aiosman.riderpro.ui.NavigationRoute
|
||||
import com.aiosman.riderpro.ui.navigateToPost
|
||||
import com.aiosman.riderpro.ui.post.NewPostViewModel
|
||||
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
||||
import com.google.firebase.analytics.FirebaseAnalytics
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -91,6 +94,9 @@ class MainActivity : ComponentActivity() {
|
||||
|
||||
JPushInterface.init(this)
|
||||
|
||||
if (AppState.darkMode) {
|
||||
window.decorView.setBackgroundColor(android.graphics.Color.BLACK)
|
||||
}
|
||||
enableEdgeToEdge()
|
||||
|
||||
// 初始化腾讯云通信 SDK
|
||||
@@ -107,6 +113,7 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
|
||||
setContent {
|
||||
|
||||
Navigation(startDestination) { navController ->
|
||||
// 处理带有 postId 的通知点击
|
||||
val postId = intent.getStringExtra("POST_ID")
|
||||
|
||||
@@ -23,6 +23,15 @@ object AppStore {
|
||||
.requestEmail()
|
||||
.build()
|
||||
googleSignInOptions = gso
|
||||
// apply dark mode
|
||||
if (sharedPreferences.getBoolean("darkMode", false)) {
|
||||
AppState.darkMode = true
|
||||
}
|
||||
AppColors = if (AppState.darkMode) {
|
||||
DarkThemeColors()
|
||||
}else{
|
||||
LightThemeColors()
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun saveData() {
|
||||
@@ -38,4 +47,12 @@ object AppStore {
|
||||
token = sharedPreferences.getString("token", null)
|
||||
rememberMe = sharedPreferences.getBoolean("rememberMe", false)
|
||||
}
|
||||
|
||||
fun saveDarkMode(darkMode: Boolean) {
|
||||
sharedPreferences.edit().apply {
|
||||
putBoolean("darkMode", darkMode)
|
||||
}.apply()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.data.AccountService
|
||||
@@ -75,7 +76,7 @@ fun ChangePasswordScreen() {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color.White),
|
||||
.background(AppColors.background),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
StatusBarSpacer()
|
||||
|
||||
@@ -82,7 +82,7 @@ fun AccountEditScreen2() {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color.White),
|
||||
.background(color = AppColors.background),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
StatusBarSpacer()
|
||||
|
||||
@@ -11,7 +11,6 @@ import androidx.compose.animation.core.animateDpAsState
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.gestures.awaitFirstDown
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
@@ -54,6 +53,8 @@ import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.focus.onFocusChanged
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.graphics.SolidColor
|
||||
import androidx.compose.ui.input.pointer.pointerInput
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
@@ -70,6 +71,7 @@ import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.entity.ChatItem
|
||||
@@ -80,7 +82,6 @@ import com.aiosman.riderpro.ui.composables.MenuItem
|
||||
import com.aiosman.riderpro.ui.composables.StatusBarSpacer
|
||||
import com.aiosman.riderpro.ui.modifiers.noRippleClickable
|
||||
import com.tencent.imsdk.v2.V2TIMMessage
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
|
||||
@@ -159,7 +160,7 @@ fun ChatScreen(userId: String) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(Color.White)
|
||||
.background(AppColors.background)
|
||||
) {
|
||||
StatusBarSpacer()
|
||||
Row(
|
||||
@@ -176,14 +177,16 @@ fun ChatScreen(userId: String) {
|
||||
.noRippleClickable {
|
||||
navController.popBackStack()
|
||||
},
|
||||
contentDescription = null
|
||||
contentDescription = null,
|
||||
colorFilter = ColorFilter.tint(
|
||||
AppColors.text)
|
||||
)
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
Text(
|
||||
text = viewModel.userProfile?.nickName ?: "",
|
||||
modifier = Modifier.weight(1f),
|
||||
style = TextStyle(
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
fontSize = 18.sp,
|
||||
fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
|
||||
)
|
||||
@@ -197,7 +200,9 @@ fun ChatScreen(userId: String) {
|
||||
.noRippleClickable {
|
||||
isMenuExpanded = true
|
||||
},
|
||||
contentDescription = null
|
||||
contentDescription = null,
|
||||
colorFilter = ColorFilter.tint(
|
||||
AppColors.text)
|
||||
)
|
||||
DropdownMenu(
|
||||
expanded = isMenuExpanded,
|
||||
@@ -236,7 +241,8 @@ fun ChatScreen(userId: String) {
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(1.dp)
|
||||
.background(Color(0xfff7f7f7))
|
||||
.background(
|
||||
AppColors.decentBackground)
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
ChatInput(
|
||||
@@ -254,7 +260,7 @@ fun ChatScreen(userId: String) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color(0xfff7f7f7))
|
||||
.background(AppColors.decentBackground)
|
||||
.padding(paddingValues)
|
||||
) {
|
||||
LazyColumn(
|
||||
@@ -273,7 +279,7 @@ fun ChatScreen(userId: String) {
|
||||
Text(
|
||||
text = calendar.time.formatChatTime(context), // Format the timestamp
|
||||
style = TextStyle(
|
||||
color = Color.Gray,
|
||||
color = AppColors.secondaryText,
|
||||
fontSize = 14.sp,
|
||||
textAlign = TextAlign.Center
|
||||
),
|
||||
@@ -298,7 +304,7 @@ fun ChatScreen(userId: String) {
|
||||
.padding(bottom = 16.dp, end = 16.dp)
|
||||
.shadow(4.dp, shape = RoundedCornerShape(16.dp))
|
||||
.clip(RoundedCornerShape(16.dp))
|
||||
.background(Color.White)
|
||||
.background(AppColors.background)
|
||||
.padding(8.dp)
|
||||
.noRippleClickable {
|
||||
coroutineScope.launch {
|
||||
@@ -310,7 +316,7 @@ fun ChatScreen(userId: String) {
|
||||
Text(
|
||||
text = "${goToNewCount} New Message",
|
||||
style = TextStyle(
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
fontSize = 16.sp,
|
||||
),
|
||||
)
|
||||
@@ -430,7 +436,7 @@ fun ChatOtherItem(item: ChatItem) {
|
||||
max = (if (item.messageType == V2TIMMessage.V2TIM_ELEM_TYPE_TEXT) 250.dp else 150.dp)
|
||||
)
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(Color(0xffFFFFFF))
|
||||
.background(AppColors.background)
|
||||
.padding(
|
||||
vertical = (if (item.messageType == V2TIMMessage.V2TIM_ELEM_TYPE_TEXT) 8.dp else 0.dp),
|
||||
horizontal = (if (item.messageType == V2TIMMessage.V2TIM_ELEM_TYPE_TEXT) 16.dp else 0.dp)
|
||||
@@ -442,7 +448,7 @@ fun ChatOtherItem(item: ChatItem) {
|
||||
Text(
|
||||
text = item.message,
|
||||
style = TextStyle(
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
fontSize = 16.sp,
|
||||
),
|
||||
textAlign = TextAlign.Start
|
||||
@@ -461,7 +467,7 @@ fun ChatOtherItem(item: ChatItem) {
|
||||
Text(
|
||||
text = "Unsupported message type",
|
||||
style = TextStyle(
|
||||
color = Color.White,
|
||||
color = AppColors.text,
|
||||
fontSize = 16.sp,
|
||||
)
|
||||
)
|
||||
@@ -539,9 +545,9 @@ fun ChatInput(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.clip(RoundedCornerShape(16.dp))
|
||||
.background(Color(0xffe5e5e5))
|
||||
.background(AppColors.background)
|
||||
.padding(horizontal = 16.dp),
|
||||
contentAlignment = androidx.compose.ui.Alignment.CenterStart,
|
||||
contentAlignment = Alignment.CenterStart,
|
||||
) {
|
||||
BasicTextField(
|
||||
value = text,
|
||||
@@ -549,9 +555,10 @@ fun ChatInput(
|
||||
text = it
|
||||
},
|
||||
textStyle = TextStyle(
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
fontSize = 16.sp
|
||||
),
|
||||
cursorBrush = SolidColor(AppColors.text),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 8.dp)
|
||||
@@ -590,7 +597,7 @@ fun ChatInput(
|
||||
)
|
||||
)
|
||||
},
|
||||
tint = Color(0xffe0e0e0)
|
||||
tint = AppColors.chatActionColor
|
||||
)
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
Crossfade(
|
||||
@@ -608,7 +615,7 @@ fun ChatInput(
|
||||
text = ""
|
||||
}
|
||||
},
|
||||
tint = if (isNotEmpty) Color.Red else Color(0xffe0e0e0)
|
||||
tint = if (isNotEmpty) AppColors.main else AppColors.chatActionColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ import androidx.lifecycle.viewModelScope
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import androidx.paging.LoadState
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.entity.CommentEntity
|
||||
@@ -63,7 +64,7 @@ fun CommentNoticeScreen() {
|
||||
var comments = dataFlow.collectAsLazyPagingItems()
|
||||
val navController = LocalNavController.current
|
||||
Column(
|
||||
modifier = Modifier.fillMaxSize().background(color = Color(0xFFFFFFFF))
|
||||
modifier = Modifier.fillMaxSize().background(color = AppColors.background)
|
||||
) {
|
||||
StatusBarSpacer()
|
||||
Box(
|
||||
@@ -109,7 +110,7 @@ fun CommentNoticeScreen() {
|
||||
) {
|
||||
LinearProgressIndicator(
|
||||
modifier = Modifier.width(160.dp),
|
||||
color = Color(0xFFDA3832)
|
||||
color = AppColors.main
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -128,6 +129,7 @@ fun CommentNoticeScreen() {
|
||||
) {
|
||||
Text(
|
||||
text = "Load comment error, click to retry",
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -183,7 +185,8 @@ fun CommentNoticeItem(
|
||||
Text(
|
||||
text = commentItem.name,
|
||||
fontSize = 18.sp,
|
||||
modifier = Modifier
|
||||
modifier = Modifier,
|
||||
color = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.height(4.dp))
|
||||
Row {
|
||||
@@ -195,7 +198,7 @@ fun CommentNoticeItem(
|
||||
text = text,
|
||||
fontSize = 14.sp,
|
||||
maxLines = 1,
|
||||
color = Color(0x99000000),
|
||||
color = AppColors.secondaryText,
|
||||
modifier = Modifier.weight(1f),
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
@@ -203,7 +206,7 @@ fun CommentNoticeItem(
|
||||
Text(
|
||||
text = commentItem.date.timeAgo(context),
|
||||
fontSize = 14.sp,
|
||||
color = Color(0x66000000)
|
||||
color = AppColors.secondaryText,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -228,7 +231,7 @@ fun CommentNoticeItem(
|
||||
if (commentItem.unread) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.background(Color(0xFFE53935), CircleShape)
|
||||
.background(AppColors.main, CircleShape)
|
||||
.size(12.dp)
|
||||
.align(Alignment.TopEnd)
|
||||
)
|
||||
|
||||
@@ -13,6 +13,7 @@ import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
|
||||
@OptIn(ExperimentalAnimationApi::class)
|
||||
@Composable
|
||||
@@ -36,6 +37,6 @@ fun AnimatedCounter(count: Int, modifier: Modifier = Modifier, fontSize: Int = 2
|
||||
)
|
||||
}
|
||||
) { targetCount ->
|
||||
Text(text = "$targetCount", modifier = modifier, fontSize = fontSize.sp)
|
||||
Text(text = "$targetCount", modifier = modifier, fontSize = fontSize.sp, color = AppColors.text)
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.modifiers.noRippleClickable
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -65,6 +66,7 @@ fun AnimatedFavouriteIcon(
|
||||
modifier = modifier.graphicsLayer {
|
||||
rotationZ = animatableRotation.value
|
||||
},
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,10 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.modifiers.noRippleClickable
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -65,6 +67,7 @@ fun AnimatedLikeIcon(
|
||||
modifier = modifier.graphicsLayer {
|
||||
rotationZ = animatableRotation.value
|
||||
},
|
||||
colorFilter = if (!liked) ColorFilter.tint(AppColors.text) else null
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontVariation.width
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.NavigationRoute
|
||||
import com.aiosman.riderpro.ui.modifiers.noRippleClickable
|
||||
@@ -53,7 +54,7 @@ fun DropdownMenu(
|
||||
.let {
|
||||
if (width != null) it.width(width.dp) else it
|
||||
}
|
||||
.background(Color.White)
|
||||
.background(AppColors.background)
|
||||
) {
|
||||
for (item in menuItems) {
|
||||
Box(
|
||||
@@ -67,7 +68,8 @@ fun DropdownMenu(
|
||||
) {
|
||||
Text(
|
||||
item.title,
|
||||
fontWeight = FontWeight.W500
|
||||
fontWeight = FontWeight.W500,
|
||||
color = AppColors.text,
|
||||
)
|
||||
if (width != null) {
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
@@ -78,7 +80,8 @@ fun DropdownMenu(
|
||||
Icon(
|
||||
painter = painterResource(id = item.icon),
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(24.dp)
|
||||
modifier = Modifier.size(24.dp),
|
||||
tint = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.SolidColor
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
@@ -43,6 +44,7 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.entity.CommentEntity
|
||||
import com.aiosman.riderpro.ui.modifiers.noRippleClickable
|
||||
@@ -64,7 +66,7 @@ fun EditCommentBottomModal(
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(Color(0xfff7f7f7))
|
||||
.background(AppColors.background)
|
||||
.padding(horizontal = 16.dp, vertical = 16.dp)
|
||||
) {
|
||||
Row(
|
||||
@@ -76,9 +78,11 @@ fun EditCommentBottomModal(
|
||||
fontWeight = FontWeight.W600,
|
||||
modifier = Modifier.weight(1f),
|
||||
fontSize = 20.sp,
|
||||
fontStyle = FontStyle.Italic
|
||||
fontStyle = FontStyle.Italic,
|
||||
color = AppColors.text
|
||||
)
|
||||
Crossfade(targetState = text.isNotEmpty(), animationSpec = tween(500),
|
||||
Crossfade(
|
||||
targetState = text.isNotEmpty(), animationSpec = tween(500),
|
||||
label = ""
|
||||
) { isNotEmpty ->
|
||||
Icon(
|
||||
@@ -87,13 +91,13 @@ fun EditCommentBottomModal(
|
||||
modifier = Modifier
|
||||
.size(32.dp)
|
||||
.noRippleClickable {
|
||||
if (text.isNotEmpty()){
|
||||
if (text.isNotEmpty()) {
|
||||
onSend(text)
|
||||
text = ""
|
||||
}
|
||||
|
||||
},
|
||||
tint = if (isNotEmpty) Color.Red else Color(0xffe0e0e0)
|
||||
tint = if (isNotEmpty) AppColors.main else AppColors.nonActive
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -115,7 +119,12 @@ fun EditCommentBottomModal(
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
Text(replyComment.name, fontWeight = FontWeight.Bold, fontSize = 16.sp)
|
||||
Text(
|
||||
replyComment.name,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 16.sp,
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(4.dp))
|
||||
Text(
|
||||
@@ -124,7 +133,8 @@ fun EditCommentBottomModal(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(start = 32.dp),
|
||||
overflow = TextOverflow.Ellipsis
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
color = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
}
|
||||
@@ -138,7 +148,7 @@ fun EditCommentBottomModal(
|
||||
.fillMaxWidth()
|
||||
.weight(1f)
|
||||
.clip(RoundedCornerShape(20.dp))
|
||||
.background(Color(0xffe5e5e5))
|
||||
.background(AppColors.inputBackground)
|
||||
.padding(horizontal = 16.dp, vertical = 16.dp)
|
||||
) {
|
||||
BasicTextField(
|
||||
@@ -146,11 +156,12 @@ fun EditCommentBottomModal(
|
||||
onValueChange = {
|
||||
text = it
|
||||
},
|
||||
cursorBrush = SolidColor(AppColors.text),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.focusRequester(focusRequester),
|
||||
textStyle = TextStyle(
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
fontWeight = FontWeight.Normal
|
||||
),
|
||||
minLines = 5
|
||||
|
||||
@@ -24,11 +24,13 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.SolidColor
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.R
|
||||
|
||||
@Composable
|
||||
@@ -46,10 +48,10 @@ fun FormTextInput(
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
.clip(RoundedCornerShape(16.dp))
|
||||
.background(Color(0xfff8f8f8))
|
||||
.background(AppColors.inputBackground)
|
||||
.let {
|
||||
if (error != null) {
|
||||
it.border(1.dp, Color(0xFFE53935), RoundedCornerShape(24.dp))
|
||||
it.border(1.dp, AppColors.error, RoundedCornerShape(24.dp))
|
||||
} else {
|
||||
it
|
||||
}
|
||||
@@ -65,7 +67,7 @@ fun FormTextInput(
|
||||
style = TextStyle(
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = Color(0xFF333333)
|
||||
color = AppColors.text
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -80,7 +82,7 @@ fun FormTextInput(
|
||||
style = TextStyle(
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.Normal,
|
||||
color = Color(0xFFCCCCCC)
|
||||
color = AppColors.inputHint
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -94,8 +96,10 @@ fun FormTextInput(
|
||||
singleLine = true,
|
||||
textStyle = TextStyle(
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.Normal
|
||||
fontWeight = FontWeight.Normal,
|
||||
color = AppColors.text
|
||||
),
|
||||
cursorBrush = SolidColor(AppColors.text),
|
||||
)
|
||||
|
||||
}
|
||||
@@ -123,7 +127,7 @@ fun FormTextInput(
|
||||
)
|
||||
Spacer(modifier = Modifier.size(4.dp))
|
||||
AnimatedContent(targetState = error) { targetError ->
|
||||
Text(targetError ?: "", color = Color(0xFFE53935), fontSize = 12.sp)
|
||||
Text(targetError ?: "", color = AppColors.error, fontSize = 12.sp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.aiosman.riderpro.ui.favourite
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.aspectRatio
|
||||
@@ -25,6 +26,7 @@ import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.NavigationRoute
|
||||
@@ -50,7 +52,7 @@ fun FavouriteListPage() {
|
||||
refreshPager()
|
||||
}
|
||||
Column(
|
||||
modifier = Modifier.fillMaxSize()
|
||||
modifier = Modifier.fillMaxSize().background(AppColors.background)
|
||||
) {
|
||||
StatusBarSpacer()
|
||||
Box(
|
||||
@@ -71,7 +73,7 @@ fun FavouriteListPage() {
|
||||
}
|
||||
LazyVerticalGrid(
|
||||
columns = GridCells.Fixed(3),
|
||||
modifier = Modifier.fillMaxSize()
|
||||
modifier = Modifier.fillMaxSize().padding(horizontal = 16.dp)
|
||||
) {
|
||||
items(moments.itemCount) { idx ->
|
||||
val momentItem = moments[idx] ?: return@items
|
||||
|
||||
@@ -14,6 +14,8 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.comment.NoticeScreenHeader
|
||||
import com.aiosman.riderpro.ui.composables.StatusBarMaskLayout
|
||||
@@ -34,7 +36,7 @@ fun FavouriteNoticeScreen() {
|
||||
model.updateNotice()
|
||||
}
|
||||
StatusBarMaskLayout(
|
||||
darkIcons = true,
|
||||
darkIcons = !AppState.darkMode,
|
||||
maskBoxBackgroundColor = Color(0xFFFFFFFF)
|
||||
) {
|
||||
Column(
|
||||
|
||||
@@ -28,6 +28,7 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
@@ -46,9 +47,9 @@ import kotlinx.coroutines.launch
|
||||
fun FollowerNoticeScreen() {
|
||||
val scope = rememberCoroutineScope()
|
||||
StatusBarMaskLayout(
|
||||
modifier = Modifier.background(color = Color(0xFFFFFFFF)).padding(horizontal = 16.dp),
|
||||
darkIcons = true,
|
||||
maskBoxBackgroundColor = Color(0xFFFFFFFF)
|
||||
modifier = Modifier.background(color = AppColors.background).padding(horizontal = 16.dp),
|
||||
darkIcons = !AppState.darkMode,
|
||||
maskBoxBackgroundColor = AppColors.background
|
||||
) {
|
||||
val model = FollowerNoticeViewModel
|
||||
var dataFlow = model.followerItemsFlow
|
||||
@@ -57,7 +58,7 @@ fun FollowerNoticeScreen() {
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 16.dp)
|
||||
.background(color = Color(0xFFFFFFFF))
|
||||
.background(color = AppColors.background)
|
||||
) {
|
||||
NoticeScreenHeader(stringResource(R.string.followers_upper), moreIcon = false)
|
||||
}
|
||||
@@ -67,7 +68,7 @@ fun FollowerNoticeScreen() {
|
||||
}
|
||||
LazyColumn(
|
||||
modifier = Modifier.weight(1f)
|
||||
.background(color = Color(0xFFFFFFFF))
|
||||
.background(color = AppColors.background)
|
||||
) {
|
||||
items(followers.itemCount) { index ->
|
||||
followers[index]?.let { follower ->
|
||||
@@ -125,7 +126,7 @@ fun FollowItem(
|
||||
Column(
|
||||
modifier = Modifier.weight(1f)
|
||||
) {
|
||||
Text(nickname, fontWeight = FontWeight.Bold, fontSize = 16.sp)
|
||||
Text(nickname, fontWeight = FontWeight.Bold, fontSize = 16.sp, color = AppColors.text)
|
||||
}
|
||||
// if (userId != AppState.UserId) {
|
||||
// FollowButton(
|
||||
|
||||
@@ -28,6 +28,8 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.ui.NavigationRoute
|
||||
import com.aiosman.riderpro.ui.index.tabs.add.AddPage
|
||||
@@ -113,7 +115,7 @@ fun IndexScreen() {
|
||||
innerPadding
|
||||
HorizontalPager(
|
||||
state = pagerState,
|
||||
modifier = Modifier.padding(0.dp),
|
||||
modifier = Modifier.background(AppColors.background).padding(0.dp),
|
||||
beyondBoundsPageCount = 5,
|
||||
userScrollEnabled = false
|
||||
) { page ->
|
||||
@@ -132,7 +134,7 @@ fun IndexScreen() {
|
||||
fun Home() {
|
||||
val systemUiController = rememberSystemUiController()
|
||||
LaunchedEffect(Unit) {
|
||||
systemUiController.setStatusBarColor(Color.Transparent, darkIcons = true)
|
||||
systemUiController.setStatusBarColor(Color.Transparent, darkIcons = !AppState.darkMode)
|
||||
}
|
||||
Column(
|
||||
modifier = Modifier
|
||||
@@ -149,7 +151,7 @@ fun Home() {
|
||||
fun Street() {
|
||||
val systemUiController = rememberSystemUiController()
|
||||
LaunchedEffect(Unit) {
|
||||
systemUiController.setStatusBarColor(Color.Transparent, darkIcons = true)
|
||||
systemUiController.setStatusBarColor(Color.Transparent, darkIcons = !AppState.darkMode)
|
||||
}
|
||||
Column(
|
||||
modifier = Modifier
|
||||
@@ -165,7 +167,7 @@ fun Street() {
|
||||
fun Add() {
|
||||
val systemUiController = rememberSystemUiController()
|
||||
LaunchedEffect(Unit) {
|
||||
systemUiController.setStatusBarColor(Color.Black, darkIcons = false)
|
||||
systemUiController.setStatusBarColor(Color.Black, darkIcons = !AppState.darkMode)
|
||||
}
|
||||
Column(
|
||||
modifier = Modifier
|
||||
@@ -199,7 +201,7 @@ fun Video() {
|
||||
fun Profile() {
|
||||
val systemUiController = rememberSystemUiController()
|
||||
LaunchedEffect(Unit) {
|
||||
systemUiController.setStatusBarColor(Color.Transparent, darkIcons = true)
|
||||
systemUiController.setStatusBarColor(Color.Transparent, !AppState.darkMode)
|
||||
}
|
||||
Column(
|
||||
modifier = Modifier
|
||||
@@ -215,7 +217,7 @@ fun Profile() {
|
||||
fun Notifications() {
|
||||
val systemUiController = rememberSystemUiController()
|
||||
LaunchedEffect(Unit) {
|
||||
systemUiController.setStatusBarColor(Color.Transparent, darkIcons = true)
|
||||
systemUiController.setStatusBarColor(Color.Transparent, !AppState.darkMode)
|
||||
}
|
||||
Column(
|
||||
modifier = Modifier
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.aiosman.riderpro.ui.index.tabs.message
|
||||
|
||||
import android.widget.Toast
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
@@ -24,10 +25,15 @@ import androidx.compose.material3.HorizontalDivider
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
@@ -37,6 +43,8 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.AppStore
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.NavigationRoute
|
||||
@@ -189,13 +197,14 @@ fun NotificationIndicator(
|
||||
Image(
|
||||
painter = painterResource(id = iconRes),
|
||||
contentDescription = label,
|
||||
modifier = Modifier.size(24.dp)
|
||||
modifier = Modifier.size(24.dp),
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
)
|
||||
}
|
||||
Box(
|
||||
modifier = Modifier
|
||||
) {
|
||||
Text(label, modifier = Modifier.align(Alignment.Center))
|
||||
Text(label, modifier = Modifier.align(Alignment.Center), color = AppColors.text)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -206,6 +215,8 @@ fun NotificationIndicator(
|
||||
|
||||
@Composable
|
||||
fun NotificationCounterItem(count: Int) {
|
||||
val context = LocalContext.current
|
||||
var clickCount by remember { mutableStateOf(0) }
|
||||
Row(
|
||||
modifier = Modifier.padding(vertical = 16.dp, horizontal = 32.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
@@ -217,13 +228,21 @@ fun NotificationCounterItem(count: Int) {
|
||||
painter = painterResource(id = R.drawable.rider_pro_notification),
|
||||
contentDescription = "",
|
||||
modifier = Modifier
|
||||
.size(24.dp)
|
||||
.size(24.dp).noRippleClickable {
|
||||
clickCount++
|
||||
if (clickCount > 5) {
|
||||
clickCount = 0
|
||||
AppStore.saveDarkMode(!AppState.darkMode)
|
||||
Toast.makeText(context, "Dark mode: ${AppState.darkMode},please restart app", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
},
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
Spacer(modifier = Modifier.width(24.dp))
|
||||
Text(stringResource(R.string.notifications_upper), fontSize = 18.sp)
|
||||
Text(stringResource(R.string.notifications_upper), fontSize = 18.sp, color = AppColors.text)
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
if (count > 0) {
|
||||
Box(
|
||||
@@ -283,7 +302,8 @@ fun ChatMessageList(
|
||||
text = item.nickname,
|
||||
fontSize = 16.sp,
|
||||
modifier = Modifier,
|
||||
fontWeight = FontWeight.Bold
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
Text(
|
||||
|
||||
@@ -56,6 +56,7 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
@@ -65,6 +66,7 @@ import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.entity.MomentEntity
|
||||
@@ -169,7 +171,7 @@ fun MomentCard(
|
||||
var imageIndex by remember { mutableStateOf(0) }
|
||||
val navController = LocalNavController.current
|
||||
Column(
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
modifier = Modifier.fillMaxWidth().background(AppColors.background)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier.padding(start = 16.dp, end = 16.dp, top = 16.dp, bottom = 8.dp)
|
||||
@@ -197,11 +199,6 @@ fun MomentCard(
|
||||
momentEntity = momentEntity,
|
||||
onLikeClick = onLikeClick,
|
||||
onAddComment = onAddComment,
|
||||
onShareClick = {
|
||||
NewPostViewModel.asNewPost()
|
||||
NewPostViewModel.relPostId = momentEntity.id
|
||||
navController.navigate(NavigationRoute.NewPost.route)
|
||||
},
|
||||
onFavoriteClick = onFavoriteClick,
|
||||
imageIndex = imageIndex,
|
||||
onCommentClick = {
|
||||
@@ -267,7 +264,7 @@ fun MomentName(name: String) {
|
||||
modifier = Modifier,
|
||||
textAlign = TextAlign.Start,
|
||||
text = name,
|
||||
color = Color(0f, 0f, 0f),
|
||||
color = AppColors.text,
|
||||
fontSize = 16.sp, style = TextStyle(fontWeight = FontWeight.Bold)
|
||||
)
|
||||
}
|
||||
@@ -298,7 +295,7 @@ fun MomentFollowBtn() {
|
||||
fun MomentPostLocation(location: String) {
|
||||
Text(
|
||||
text = location,
|
||||
color = Color(0f, 0f, 0f, 0.6f),
|
||||
color = AppColors.secondaryText,
|
||||
fontSize = 12.sp
|
||||
)
|
||||
}
|
||||
@@ -307,7 +304,7 @@ fun MomentPostLocation(location: String) {
|
||||
fun MomentPostTime(time: String) {
|
||||
Text(
|
||||
modifier = Modifier,
|
||||
text = time, color = Color(0f, 0f, 0f, 0.6f),
|
||||
text = time, color = AppColors.text,
|
||||
fontSize = 12.sp
|
||||
)
|
||||
}
|
||||
@@ -359,13 +356,12 @@ fun MomentTopRowGroup(momentEntity: MomentEntity) {
|
||||
MomentPostTime(momentEntity.time.timeAgo(context))
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
MomentPostLocation(momentEntity.location)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class, ExperimentalSharedTransitionApi::class)
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
@Composable
|
||||
fun PostImageView(
|
||||
images: List<MomentImageEntity>,
|
||||
@@ -413,7 +409,8 @@ fun MomentContentGroup(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(start = 16.dp, end = 16.dp, bottom = 8.dp),
|
||||
fontSize = 16.sp
|
||||
fontSize = 16.sp,
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
if (momentEntity.relMoment != null) {
|
||||
@@ -442,12 +439,14 @@ fun MomentOperateBtn(@DrawableRes icon: Int, count: String) {
|
||||
modifier = Modifier
|
||||
.size(width = 24.dp, height = 24.dp),
|
||||
painter = painterResource(id = icon),
|
||||
contentDescription = ""
|
||||
contentDescription = "",
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
)
|
||||
Text(
|
||||
text = count,
|
||||
modifier = Modifier.padding(start = 7.dp),
|
||||
fontSize = 12.sp,
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -476,11 +475,9 @@ fun MomentBottomOperateRowGroup(
|
||||
onAddComment: () -> Unit = {},
|
||||
onCommentClick: () -> Unit = {},
|
||||
onFavoriteClick: () -> Unit = {},
|
||||
onShareClick: () -> Unit = {},
|
||||
momentEntity: MomentEntity,
|
||||
imageIndex: Int = 0
|
||||
) {
|
||||
val navController = LocalNavController.current
|
||||
var showCommentModal by remember { mutableStateOf(false) }
|
||||
if (showCommentModal) {
|
||||
ModalBottomSheet(
|
||||
@@ -496,7 +493,6 @@ fun MomentBottomOperateRowGroup(
|
||||
.fillMaxWidth()
|
||||
.height(56.dp)
|
||||
.clip(CircleShape)
|
||||
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.layout.onGloballyPositioned
|
||||
@@ -60,6 +59,7 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.paging.PagingData
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.ConstVars
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
@@ -134,7 +134,7 @@ fun ProfileV3(
|
||||
CollapsingToolbarScaffold(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color(0xfff8f8f8)),
|
||||
.background(AppColors.decentBackground),
|
||||
state = state,
|
||||
scrollStrategy = ScrollStrategy.ExitUntilCollapsed,
|
||||
toolbarScrollable = true,
|
||||
@@ -145,7 +145,7 @@ fun ProfileV3(
|
||||
.fillMaxWidth()
|
||||
.height(miniToolbarHeight.dp)
|
||||
// 保持在最低高度和当前高度之间
|
||||
.background(Color(0xfff8f8f8))
|
||||
.background(AppColors.decentBackground)
|
||||
|
||||
) {
|
||||
}
|
||||
@@ -172,6 +172,7 @@ fun ProfileV3(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(bannerHeight.dp)
|
||||
.background(AppColors.decentBackground)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
@@ -234,7 +235,7 @@ fun ProfileV3(
|
||||
.shadow(
|
||||
elevation = 20.dp
|
||||
)
|
||||
.background(Color.White.copy(alpha = 0.7f))
|
||||
.background(AppColors.background.copy(alpha = 0.7f))
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.rider_pro_more_horizon),
|
||||
@@ -242,7 +243,7 @@ fun ProfileV3(
|
||||
modifier = Modifier.noRippleClickable {
|
||||
expanded = true
|
||||
},
|
||||
tint = Color.Black
|
||||
tint = AppColors.text
|
||||
)
|
||||
}
|
||||
DropdownMenu(
|
||||
@@ -289,7 +290,9 @@ fun ProfileV3(
|
||||
|
||||
}
|
||||
Box(
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(AppColors.decentBackground)
|
||||
) {
|
||||
// user info
|
||||
Column(
|
||||
@@ -350,6 +353,7 @@ fun ProfileV3(
|
||||
.graphicsLayer {
|
||||
alpha = 1 - state.toolbarState.progress
|
||||
}
|
||||
.background(AppColors.decentBackground)
|
||||
.onGloballyPositioned {
|
||||
miniToolbarHeight = with(density) {
|
||||
it.size.height.toDp().value.toInt()
|
||||
@@ -375,7 +379,7 @@ fun ProfileV3(
|
||||
text = profile?.nickName ?: "",
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.W600,
|
||||
color = Color.Black
|
||||
color = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
if (isSelf) {
|
||||
@@ -392,7 +396,7 @@ fun ProfileV3(
|
||||
modifier = Modifier.noRippleClickable {
|
||||
minibarExpanded = true
|
||||
},
|
||||
tint = Color.Black
|
||||
tint = AppColors.text
|
||||
)
|
||||
}
|
||||
DropdownMenu(
|
||||
@@ -442,7 +446,11 @@ fun ProfileV3(
|
||||
}
|
||||
}
|
||||
) {
|
||||
Column {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(AppColors.decentBackground)
|
||||
) {
|
||||
UserContentPageIndicator(
|
||||
pagerState = pagerState,
|
||||
)
|
||||
@@ -470,7 +478,9 @@ fun ProfileV3(
|
||||
.clip(
|
||||
RoundedCornerShape(8.dp)
|
||||
)
|
||||
.background(Color.White)
|
||||
.background(
|
||||
AppColors.background
|
||||
)
|
||||
.padding(8.dp)
|
||||
.noRippleClickable {
|
||||
NewPostViewModel.asNewPost()
|
||||
@@ -483,14 +493,17 @@ fun ProfileV3(
|
||||
.clip(
|
||||
RoundedCornerShape(8.dp)
|
||||
)
|
||||
.background(Color(0xfff5f5f5))
|
||||
.background(
|
||||
AppColors.decentBackground
|
||||
)
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.Add,
|
||||
contentDescription = "",
|
||||
modifier = Modifier
|
||||
.size(32.dp)
|
||||
.align(Alignment.Center)
|
||||
.align(Alignment.Center),
|
||||
tint = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -504,6 +517,7 @@ fun ProfileV3(
|
||||
Spacer(modifier = Modifier.height(120.dp))
|
||||
}
|
||||
}
|
||||
|
||||
1 ->
|
||||
LazyColumn(
|
||||
modifier = Modifier
|
||||
|
||||
@@ -29,6 +29,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.graphics.PathEffect
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.layout.onGloballyPositioned
|
||||
@@ -40,6 +41,7 @@ import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.entity.MomentEntity
|
||||
@@ -158,7 +160,7 @@ fun TimeGroup(time: String = "2024.06.08 12:23") {
|
||||
Text(
|
||||
text = time,
|
||||
fontSize = 16.sp,
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
style = TextStyle(fontWeight = FontWeight.W600)
|
||||
)
|
||||
}
|
||||
@@ -189,7 +191,7 @@ fun ProfileMomentCard(
|
||||
.width(14.dp)
|
||||
) {
|
||||
drawLine(
|
||||
color = Color(0xff899DA9),
|
||||
color = AppColors.divider,
|
||||
start = Offset(0f, 0f),
|
||||
end = Offset(0f, size.height),
|
||||
strokeWidth = 4f,
|
||||
@@ -199,7 +201,8 @@ fun ProfileMomentCard(
|
||||
Spacer(modifier = Modifier.width(10.dp))
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.background(Color.White)
|
||||
.background(
|
||||
AppColors.background)
|
||||
.weight(1f)
|
||||
.onGloballyPositioned { coordinates ->
|
||||
columnHeight = coordinates.size.height
|
||||
@@ -225,7 +228,7 @@ fun MomentCardTopContent(content: String) {
|
||||
) {
|
||||
Text(
|
||||
modifier = Modifier.padding(top = 16.dp, bottom = 0.dp, start = 16.dp, end = 16.dp),
|
||||
text = content, fontSize = 16.sp, color = Color.Black
|
||||
text = content, fontSize = 16.sp, color = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -285,8 +288,9 @@ fun MomentCardOperationItem(@DrawableRes drawable: Int, number: String, modifier
|
||||
) {
|
||||
Image(
|
||||
modifier = Modifier.padding(start = 16.dp, end = 8.dp),
|
||||
painter = painterResource(id = drawable), contentDescription = ""
|
||||
painter = painterResource(id = drawable), contentDescription = "",
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
)
|
||||
Text(text = number)
|
||||
Text(text = number, color = AppColors.text)
|
||||
}
|
||||
}
|
||||
@@ -19,11 +19,13 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.entity.AccountProfileEntity
|
||||
import com.aiosman.riderpro.ui.modifiers.noRippleClickable
|
||||
@@ -43,7 +45,7 @@ fun OtherProfileAction(
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
modifier = Modifier
|
||||
.clip(RoundedCornerShape(32.dp))
|
||||
.background(if (profile.isFollowing) Color(0xffebebeb) else Color(0xffda3833))
|
||||
.background(if (profile.isFollowing) AppColors.main else AppColors.basicMain)
|
||||
.padding(horizontal = 16.dp, vertical = 4.dp)
|
||||
.noRippleClickable {
|
||||
onFollow?.invoke()
|
||||
@@ -54,14 +56,14 @@ fun OtherProfileAction(
|
||||
Icons.Default.Clear,
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(24.dp),
|
||||
tint = Color.Black
|
||||
tint = AppColors.mainText
|
||||
)
|
||||
} else {
|
||||
Icon(
|
||||
Icons.Default.Add,
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(24.dp),
|
||||
tint = Color.White
|
||||
tint = AppColors.mainText
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
@@ -69,7 +71,7 @@ fun OtherProfileAction(
|
||||
text = stringResource(if (profile.isFollowing) R.string.unfollow_upper else R.string.follow_upper),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W600,
|
||||
color = if (profile.isFollowing) Color.Black else Color.White,
|
||||
color = if (profile.isFollowing) AppColors.text else AppColors.mainText,
|
||||
modifier = Modifier.padding(8.dp),
|
||||
)
|
||||
|
||||
@@ -80,7 +82,7 @@ fun OtherProfileAction(
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
modifier = Modifier
|
||||
.clip(RoundedCornerShape(32.dp))
|
||||
.background(Color(0xffebebeb))
|
||||
.background(AppColors.basicMain)
|
||||
.padding(horizontal = 16.dp, vertical = 4.dp)
|
||||
.noRippleClickable {
|
||||
onChat?.invoke()
|
||||
@@ -90,13 +92,14 @@ fun OtherProfileAction(
|
||||
painter = painterResource(id = R.drawable.rider_pro_comment),
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(24.dp),
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
)
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.chat_upper),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W600,
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
modifier = Modifier.padding(8.dp),
|
||||
)
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.modifiers.noRippleClickable
|
||||
|
||||
@@ -34,7 +35,9 @@ fun SelfProfileAction(
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
modifier = Modifier
|
||||
.clip(RoundedCornerShape(32.dp))
|
||||
.background(Color(0xffebebeb))
|
||||
.background(
|
||||
AppColors.basicMain
|
||||
)
|
||||
.padding(horizontal = 16.dp, vertical = 4.dp)
|
||||
.noRippleClickable {
|
||||
onEditProfile()
|
||||
@@ -43,14 +46,15 @@ fun SelfProfileAction(
|
||||
Icon(
|
||||
Icons.Default.Edit,
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(24.dp)
|
||||
modifier = Modifier.size(24.dp),
|
||||
tint = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.edit_profile),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W600,
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
modifier = Modifier.padding(8.dp)
|
||||
)
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.modifiers.noRippleClickable
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -44,7 +45,7 @@ fun UserContentPageIndicator(
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
modifier = Modifier
|
||||
.clip(RoundedCornerShape(32.dp))
|
||||
.background(if (pagerState.currentPage == 0) Color(0xFFFFFFFF) else Color.Transparent)
|
||||
.background(if (pagerState.currentPage == 0) AppColors.background else Color.Transparent)
|
||||
.padding(horizontal = 16.dp, vertical = 4.dp)
|
||||
.noRippleClickable {
|
||||
// switch to gallery
|
||||
@@ -57,8 +58,8 @@ fun UserContentPageIndicator(
|
||||
text = stringResource(R.string.gallery),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W600,
|
||||
color = Color.Black,
|
||||
modifier = Modifier.padding(8.dp)
|
||||
color = AppColors.text,
|
||||
modifier = Modifier.padding(8.dp),
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
@@ -67,7 +68,7 @@ fun UserContentPageIndicator(
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
modifier = Modifier
|
||||
.clip(RoundedCornerShape(32.dp))
|
||||
.background(if (pagerState.currentPage == 1) Color(0xFFFFFFFF) else Color.Transparent)
|
||||
.background(if (pagerState.currentPage == 1) AppColors.background else Color.Transparent)
|
||||
.padding(horizontal = 16.dp, vertical = 4.dp)
|
||||
.noRippleClickable {
|
||||
// switch to moments
|
||||
@@ -80,7 +81,7 @@ fun UserContentPageIndicator(
|
||||
text = stringResource(R.string.moment),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.W600,
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
modifier = Modifier.padding(8.dp)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.entity.AccountProfileEntity
|
||||
@@ -71,11 +72,13 @@ fun UserItem(accountProfileEntity: AccountProfileEntity) {
|
||||
Text(
|
||||
text = accountProfileEntity.followerCount.toString(),
|
||||
fontWeight = FontWeight.W600,
|
||||
fontSize = 16.sp
|
||||
fontSize = 16.sp,
|
||||
color = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.followers_upper),
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
Column(
|
||||
@@ -95,11 +98,13 @@ fun UserItem(accountProfileEntity: AccountProfileEntity) {
|
||||
Text(
|
||||
text = accountProfileEntity.followingCount.toString(),
|
||||
fontWeight = FontWeight.W600,
|
||||
fontSize = 16.sp
|
||||
fontSize = 16.sp,
|
||||
color = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.following_upper),
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
Column(
|
||||
@@ -117,6 +122,7 @@ fun UserItem(accountProfileEntity: AccountProfileEntity) {
|
||||
text = accountProfileEntity.nickName,
|
||||
fontWeight = FontWeight.W600,
|
||||
fontSize = 16.sp,
|
||||
color = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.height(4.dp))
|
||||
// 个人简介
|
||||
@@ -124,13 +130,13 @@ fun UserItem(accountProfileEntity: AccountProfileEntity) {
|
||||
Text(
|
||||
text = accountProfileEntity.bio,
|
||||
fontSize = 14.sp,
|
||||
color = Color.Gray
|
||||
color = AppColors.secondaryText
|
||||
)
|
||||
}else{
|
||||
Text(
|
||||
text = "No bio here.",
|
||||
fontSize = 14.sp,
|
||||
color = Color.Gray
|
||||
color = AppColors.secondaryText
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.NavigationRoute
|
||||
@@ -69,12 +70,12 @@ fun DiscoverScreen() {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color(0xFFF4F5F6))
|
||||
.pullRefresh(state)
|
||||
.padding(bottom = navigationBarPaddings)
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.fillMaxWidth().background(Color.White).padding(bottom = 10.dp)
|
||||
modifier = Modifier.fillMaxWidth().background(
|
||||
AppColors.background).padding(bottom = 10.dp)
|
||||
) {
|
||||
StatusBarSpacer()
|
||||
SearchButton(
|
||||
@@ -107,7 +108,8 @@ fun SearchButton(
|
||||
Box(
|
||||
modifier = modifier
|
||||
.clip(shape = RoundedCornerShape(8.dp))
|
||||
.background(Color(0xFFF4F5F6))
|
||||
.background(
|
||||
AppColors.inputBackground)
|
||||
.padding(horizontal = 16.dp, vertical = 12.dp)
|
||||
.noRippleClickable {
|
||||
clickAction()
|
||||
@@ -119,13 +121,13 @@ fun SearchButton(
|
||||
Icon(
|
||||
Icons.Default.Search,
|
||||
contentDescription = null,
|
||||
tint = Color(0xFF9E9E9E)
|
||||
tint = AppColors.inputHint
|
||||
)
|
||||
Box {
|
||||
Text(
|
||||
text = context.getString(R.string.search),
|
||||
modifier = Modifier.padding(start = 8.dp),
|
||||
color = Color(0xFF9E9E9E),
|
||||
color = AppColors.inputHint,
|
||||
fontSize = 18.sp
|
||||
)
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.SolidColor
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
|
||||
import androidx.compose.ui.res.stringResource
|
||||
@@ -54,6 +55,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
@@ -84,7 +86,7 @@ fun SearchScreen() {
|
||||
val focusRequester = remember { FocusRequester() }
|
||||
val navController = LocalNavController.current
|
||||
LaunchedEffect(Unit) {
|
||||
systemUiController.setStatusBarColor(Color.Transparent, darkIcons = true)
|
||||
systemUiController.setStatusBarColor(Color.Transparent, darkIcons = !AppState.darkMode)
|
||||
}
|
||||
LaunchedEffect(Unit) {
|
||||
if (model.requestFocus) {
|
||||
@@ -96,13 +98,15 @@ fun SearchScreen() {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color(0xFFF0F2F5))
|
||||
.background(AppColors.background)
|
||||
.padding(bottom = navigationBarPaddings)
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(Color.White)
|
||||
.background(
|
||||
AppColors.background
|
||||
)
|
||||
.padding(bottom = 10.dp)
|
||||
) {
|
||||
Spacer(modifier = Modifier.height(statusBarPaddingValues.calculateTopPadding()))
|
||||
@@ -130,7 +134,9 @@ fun SearchScreen() {
|
||||
fontSize = 16.sp,
|
||||
modifier = Modifier.noRippleClickable {
|
||||
navController.popBackStack()
|
||||
})
|
||||
},
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -138,7 +144,8 @@ fun SearchScreen() {
|
||||
if (model.showResult) {
|
||||
TabRow(
|
||||
selectedTabIndex = selectedTabIndex.value,
|
||||
backgroundColor = Color.White,
|
||||
backgroundColor = AppColors.background,
|
||||
contentColor = AppColors.text,
|
||||
) {
|
||||
categories.forEachIndexed { index, category ->
|
||||
Tab(
|
||||
@@ -148,7 +155,7 @@ fun SearchScreen() {
|
||||
pagerState.animateScrollToPage(index)
|
||||
}
|
||||
},
|
||||
text = { Text(category) }
|
||||
text = { Text(category, color = AppColors.text) }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -171,7 +178,9 @@ fun SearchInput(
|
||||
Box(
|
||||
modifier = modifier
|
||||
.clip(shape = RoundedCornerShape(8.dp))
|
||||
.background(Color(0xFFF4F5F6))
|
||||
.background(
|
||||
AppColors.inputBackground
|
||||
)
|
||||
.padding(horizontal = 16.dp, vertical = 12.dp)
|
||||
) {
|
||||
Row(
|
||||
@@ -180,14 +189,14 @@ fun SearchInput(
|
||||
Icon(
|
||||
Icons.Default.Search,
|
||||
contentDescription = null,
|
||||
tint = Color(0xFF9E9E9E)
|
||||
tint = AppColors.inputHint
|
||||
)
|
||||
Box {
|
||||
if (text.isEmpty()) {
|
||||
Text(
|
||||
text = context.getString(R.string.search),
|
||||
modifier = Modifier.padding(start = 8.dp),
|
||||
color = Color(0xFF9E9E9E),
|
||||
color = AppColors.inputHint,
|
||||
fontSize = 18.sp
|
||||
)
|
||||
}
|
||||
@@ -202,7 +211,8 @@ fun SearchInput(
|
||||
.focusRequester(focusRequester),
|
||||
singleLine = true,
|
||||
textStyle = TextStyle(
|
||||
fontSize = 18.sp
|
||||
fontSize = 18.sp,
|
||||
color = AppColors.text
|
||||
),
|
||||
keyboardOptions = KeyboardOptions.Default.copy(
|
||||
imeAction = ImeAction.Search
|
||||
@@ -211,7 +221,8 @@ fun SearchInput(
|
||||
onSearch = {
|
||||
onSearch()
|
||||
}
|
||||
)
|
||||
),
|
||||
cursorBrush = SolidColor(AppColors.text)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -227,7 +238,7 @@ fun SearchPager(
|
||||
) {
|
||||
HorizontalPager(
|
||||
state = pagerState,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
modifier = Modifier.fillMaxSize().background(AppColors.background),
|
||||
|
||||
) { page ->
|
||||
when (page) {
|
||||
@@ -245,7 +256,7 @@ fun MomentResultTab() {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color(0xFFF0F2F5))
|
||||
.background(AppColors.background)
|
||||
) {
|
||||
LazyColumn(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
@@ -323,13 +334,18 @@ fun UserItem(
|
||||
Column(
|
||||
modifier = Modifier.weight(1f)
|
||||
) {
|
||||
Text(text = accountProfile.nickName, fontSize = 16.sp, fontWeight = FontWeight.Bold)
|
||||
Text(
|
||||
text = accountProfile.nickName,
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.width(2.dp))
|
||||
Text(
|
||||
text = stringResource(
|
||||
R.string.search_user_item_follower_count,
|
||||
accountProfile.followerCount
|
||||
), fontSize = 14.sp, color = Color(0xFF9E9E9E)
|
||||
), fontSize = 14.sp, color = AppColors.secondaryText
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
|
||||
@@ -34,6 +34,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
@@ -63,13 +64,13 @@ fun LikeNoticeScreen() {
|
||||
}
|
||||
|
||||
StatusBarMaskLayout(
|
||||
darkIcons = true,
|
||||
maskBoxBackgroundColor = Color(0xFFFFFFFF)
|
||||
darkIcons = !AppState.darkMode,
|
||||
maskBoxBackgroundColor = AppColors.background
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.background(color = Color(0xFFFFFFFF))
|
||||
.background(color = AppColors.background)
|
||||
.padding(horizontal = 16.dp)
|
||||
) {
|
||||
Box(
|
||||
@@ -162,15 +163,15 @@ fun ActionPostNoticeItem(
|
||||
)
|
||||
}
|
||||
) {
|
||||
Text(nickName, fontWeight = FontWeight.Bold, fontSize = 16.sp)
|
||||
Text(nickName, fontWeight = FontWeight.Bold, fontSize = 16.sp, color = AppColors.text)
|
||||
Spacer(modifier = Modifier.height(2.dp))
|
||||
when (action) {
|
||||
"like" -> Text(stringResource(R.string.like_your_post))
|
||||
"favourite" -> Text(stringResource(R.string.favourite_your_post))
|
||||
"like" -> Text(stringResource(R.string.like_your_post), color = AppColors.text)
|
||||
"favourite" -> Text(stringResource(R.string.favourite_your_post), color = AppColors.text)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(2.dp))
|
||||
Row {
|
||||
Text(likeTime.timeAgo(context), fontSize = 12.sp, color = Color(0x99000000))
|
||||
Text(likeTime.timeAgo(context), fontSize = 12.sp, color = AppColors.secondaryText)
|
||||
}
|
||||
}
|
||||
CustomAsyncImage(
|
||||
@@ -224,15 +225,15 @@ fun LikeCommentNoticeItem(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
) {
|
||||
Text(item.user.nickName, fontWeight = FontWeight.Bold, fontSize = 16.sp)
|
||||
Text(item.user.nickName, fontWeight = FontWeight.Bold, fontSize = 16.sp, color = AppColors.text)
|
||||
Spacer(modifier = Modifier.height(2.dp))
|
||||
Text(stringResource(R.string.like_your_comment))
|
||||
Text(stringResource(R.string.like_your_comment), color = AppColors.text)
|
||||
Spacer(modifier = Modifier.height(2.dp))
|
||||
Row {
|
||||
Text(
|
||||
item.likeTime.timeAgo(context),
|
||||
fontSize = 12.sp,
|
||||
color = Color(0x99000000)
|
||||
color = AppColors.secondaryText
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -263,12 +264,13 @@ fun LikeCommentNoticeItem(
|
||||
Text(
|
||||
text = MyProfileViewModel.nickName,
|
||||
fontWeight = FontWeight.W600,
|
||||
fontSize = 14.sp
|
||||
fontSize = 14.sp,
|
||||
color = AppColors.text
|
||||
)
|
||||
Text(
|
||||
text = item.comment?.content ?: "",
|
||||
fontSize = 12.sp,
|
||||
color = Color(0x99000000),
|
||||
color = AppColors.secondaryText,
|
||||
maxLines = 2
|
||||
)
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ fun LoginPage() {
|
||||
val accountService = AccountServiceImpl()
|
||||
val statusBarController = rememberSystemUiController()
|
||||
LaunchedEffect(Unit) {
|
||||
statusBarController.setStatusBarColor(Color.Transparent, darkIcons = true)
|
||||
statusBarController.setStatusBarColor(Color.Transparent, darkIcons = !AppState.darkMode)
|
||||
}
|
||||
|
||||
fun googleLogin() {
|
||||
|
||||
@@ -45,17 +45,22 @@ import androidx.compose.ui.draw.drawBehind
|
||||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.geometry.CornerRadius
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.graphics.PathEffect
|
||||
import androidx.compose.ui.graphics.SolidColor
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.core.content.FileProvider
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.R
|
||||
import com.aiosman.riderpro.ui.NavigationRoute
|
||||
@@ -69,14 +74,11 @@ import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Preview
|
||||
@Composable
|
||||
fun NewPostScreen() {
|
||||
val model = NewPostViewModel
|
||||
val systemUiController = rememberSystemUiController()
|
||||
val navController = LocalNavController.current
|
||||
val context = LocalContext.current
|
||||
LaunchedEffect(Unit) {
|
||||
systemUiController.setNavigationBarColor(color = Color.Transparent)
|
||||
model.init()
|
||||
@@ -84,14 +86,17 @@ fun NewPostScreen() {
|
||||
|
||||
|
||||
StatusBarMaskLayout(
|
||||
darkIcons = true,
|
||||
darkIcons = !AppState.darkMode,
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color.White)
|
||||
.background(
|
||||
AppColors.background
|
||||
)
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(AppColors.background)
|
||||
) {
|
||||
NewPostTopBar {
|
||||
}
|
||||
@@ -139,16 +144,15 @@ fun NewPostTopBar(onSendClick: () -> Unit = {}) {
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.clip(RoundedCornerShape(64.dp)).shadow(elevation = 4.dp)
|
||||
.background(Color.White).padding(16.dp),
|
||||
.background(AppColors.background).padding(16.dp),
|
||||
contentAlignment = Alignment.CenterStart
|
||||
) {
|
||||
|
||||
CircularProgressIndicator(
|
||||
modifier = Modifier.size(24.dp),
|
||||
color = Color(0xffda3832)
|
||||
color = AppColors.main
|
||||
)
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
Text("Uploading", modifier = Modifier.fillMaxWidth(), textAlign = TextAlign.Center)
|
||||
Text("Uploading", modifier = Modifier.fillMaxWidth(), textAlign = TextAlign.Center, color = AppColors.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,12 +174,13 @@ fun NewPostTopBar(onSendClick: () -> Unit = {}) {
|
||||
.size(24.dp)
|
||||
.noRippleClickable {
|
||||
navController.popBackStack()
|
||||
}
|
||||
},
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
)
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.rider_pro_video_share),
|
||||
tint = Color.Black,
|
||||
tint = AppColors.text,
|
||||
contentDescription = "Send",
|
||||
modifier = Modifier
|
||||
.size(32.dp)
|
||||
@@ -219,13 +224,17 @@ fun NewPostTextField(hint: String, value: String, onValueChange: (String) -> Uni
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.heightIn(200.dp)
|
||||
.padding(horizontal = 18.dp, vertical = 10.dp)
|
||||
.padding(horizontal = 18.dp, vertical = 10.dp),
|
||||
cursorBrush = SolidColor(AppColors.text),
|
||||
textStyle = TextStyle(
|
||||
color = AppColors.text,
|
||||
)
|
||||
|
||||
)
|
||||
if (value.isEmpty()) {
|
||||
Text(
|
||||
text = hint,
|
||||
color = Color.Gray,
|
||||
color = AppColors.inputHint,
|
||||
modifier = Modifier.padding(horizontal = 18.dp, vertical = 10.dp)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
@@ -51,6 +50,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalClipboardManager
|
||||
@@ -73,6 +73,7 @@ import androidx.lifecycle.viewModelScope
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import androidx.paging.LoadState
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import com.aiosman.riderpro.AppColors
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.LocalAnimatedContentScope
|
||||
import com.aiosman.riderpro.LocalNavController
|
||||
@@ -85,7 +86,6 @@ import com.aiosman.riderpro.exp.formatPostTime
|
||||
import com.aiosman.riderpro.exp.timeAgo
|
||||
import com.aiosman.riderpro.ui.NavigationRoute
|
||||
import com.aiosman.riderpro.ui.comment.NoticeScreenHeader
|
||||
import com.aiosman.riderpro.ui.composables.ActionButton
|
||||
import com.aiosman.riderpro.ui.composables.AnimatedFavouriteIcon
|
||||
import com.aiosman.riderpro.ui.composables.AnimatedLikeIcon
|
||||
import com.aiosman.riderpro.ui.composables.BottomNavigationPlaceholder
|
||||
@@ -137,7 +137,7 @@ fun PostScreen(
|
||||
onDismissRequest = {
|
||||
showCommentMenu = false
|
||||
},
|
||||
containerColor = Color.White,
|
||||
containerColor = AppColors.background,
|
||||
sheetState = commentModalState,
|
||||
dragHandle = {},
|
||||
shape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp),
|
||||
@@ -193,7 +193,7 @@ fun PostScreen(
|
||||
onDismissRequest = {
|
||||
showCommentModal = false
|
||||
},
|
||||
containerColor = Color.White,
|
||||
containerColor = AppColors.background,
|
||||
sheetState = rememberModalBottomSheetState(
|
||||
skipPartiallyExpanded = true
|
||||
),
|
||||
@@ -271,7 +271,7 @@ fun PostScreen(
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color.White)
|
||||
.background(AppColors.background)
|
||||
) {
|
||||
StatusBarSpacer()
|
||||
if (viewModel.isError) {
|
||||
@@ -293,7 +293,8 @@ fun PostScreen(
|
||||
style = TextStyle(
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 16.sp
|
||||
)
|
||||
),
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
} else {
|
||||
@@ -337,7 +338,6 @@ fun PostScreen(
|
||||
viewModel.moment?.images ?: emptyList(),
|
||||
initialPage = initImagePagerIndex
|
||||
)
|
||||
|
||||
}
|
||||
PostDetails(
|
||||
viewModel.moment
|
||||
@@ -348,7 +348,9 @@ fun PostScreen(
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp)
|
||||
.height(1.dp)
|
||||
.background(Color(0xFFF7F7F7))
|
||||
.background(
|
||||
AppColors.divider
|
||||
)
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -364,7 +366,8 @@ fun PostScreen(
|
||||
text = stringResource(
|
||||
R.string.comment_count,
|
||||
(viewModel.moment?.commentCount ?: 0)
|
||||
), fontSize = 14.sp
|
||||
), fontSize = 14.sp,
|
||||
color = AppColors.text
|
||||
)
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
OrderSelectionComponent() {
|
||||
@@ -553,7 +556,7 @@ fun CommentContent(
|
||||
) {
|
||||
LinearProgressIndicator(
|
||||
modifier = Modifier.width(160.dp),
|
||||
color = Color(0xFFDA3832)
|
||||
color = AppColors.main
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
@@ -573,7 +576,7 @@ fun CommentContent(
|
||||
) {
|
||||
LinearProgressIndicator(
|
||||
modifier = Modifier.width(160.dp),
|
||||
color = Color(0xFFDA3832)
|
||||
color = AppColors.main
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -629,7 +632,7 @@ fun Header(
|
||||
onDismissRequest = {
|
||||
expanded = false
|
||||
},
|
||||
containerColor = Color.White,
|
||||
containerColor = AppColors.background,
|
||||
sheetState = rememberModalBottomSheetState(
|
||||
skipPartiallyExpanded = true
|
||||
),
|
||||
@@ -658,14 +661,15 @@ fun Header(
|
||||
.noRippleClickable {
|
||||
navController.popBackStack()
|
||||
}
|
||||
.size(32.dp)
|
||||
.size(32.dp),
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
)
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(40.dp)
|
||||
.clip(CircleShape)
|
||||
.background(Color.Gray.copy(alpha = 0.1f))
|
||||
.background(AppColors.secondaryText.copy(alpha = 0.1f))
|
||||
) {
|
||||
CustomAsyncImage(
|
||||
context,
|
||||
@@ -692,7 +696,8 @@ fun Header(
|
||||
Text(
|
||||
text = nickname ?: "",
|
||||
fontWeight = FontWeight.Bold,
|
||||
modifier = Modifier.weight(1f)
|
||||
modifier = Modifier.weight(1f),
|
||||
color = AppColors.text,
|
||||
)
|
||||
if (AppState.UserId != userId) {
|
||||
FollowButton(
|
||||
@@ -712,7 +717,8 @@ fun Header(
|
||||
expanded = true
|
||||
},
|
||||
painter = painterResource(id = R.drawable.rider_pro_more_horizon),
|
||||
contentDescription = ""
|
||||
contentDescription = "",
|
||||
colorFilter = ColorFilter.tint(AppColors.text)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -809,9 +815,10 @@ fun PostDetails(
|
||||
text = momentEntity?.momentTextContent ?: "",
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = AppColors.text,
|
||||
)
|
||||
}
|
||||
Text(text = "${momentEntity?.time?.formatPostTime()}")
|
||||
Text(text = "${momentEntity?.time?.formatPostTime()}", color = AppColors.text)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -871,7 +878,7 @@ fun CommentItem(
|
||||
}
|
||||
) {}
|
||||
) {
|
||||
Text(text = commentEntity.name, fontWeight = FontWeight.W600, fontSize = 14.sp)
|
||||
Text(text = commentEntity.name, fontWeight = FontWeight.W600, fontSize = 14.sp, color = AppColors.text)
|
||||
Row {
|
||||
if (isChild) {
|
||||
val annotatedText = buildAnnotatedString {
|
||||
@@ -910,7 +917,7 @@ fun CommentItem(
|
||||
)
|
||||
}
|
||||
},
|
||||
style = TextStyle(fontSize = 14.sp),
|
||||
style = TextStyle(fontSize = 14.sp, color = AppColors.text),
|
||||
onLongPress = {
|
||||
onLongClick(commentEntity)
|
||||
},
|
||||
@@ -923,6 +930,7 @@ fun CommentItem(
|
||||
fontSize = 14.sp,
|
||||
maxLines = Int.MAX_VALUE,
|
||||
softWrap = true,
|
||||
color = AppColors.text,
|
||||
modifier = Modifier.combinedClickable(
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
indication = null,
|
||||
@@ -948,7 +956,7 @@ fun CommentItem(
|
||||
Text(
|
||||
text = stringResource(R.string.reply),
|
||||
fontSize = 12.sp,
|
||||
color = Color.Gray,
|
||||
color = AppColors.secondaryText,
|
||||
modifier = Modifier.noRippleClickable {
|
||||
onReply(
|
||||
commentEntity,
|
||||
@@ -956,7 +964,7 @@ fun CommentItem(
|
||||
commentEntity.replyUserNickname,
|
||||
commentEntity.replyUserAvatar
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -974,7 +982,7 @@ fun CommentItem(
|
||||
},
|
||||
modifier = Modifier.size(20.dp)
|
||||
)
|
||||
Text(text = commentEntity.likes.toString(), fontSize = 12.sp)
|
||||
Text(text = commentEntity.likes.toString(), fontSize = 12.sp, color = AppColors.text)
|
||||
}
|
||||
}
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
@@ -1034,13 +1042,15 @@ fun PostBottomBar(
|
||||
) {
|
||||
|
||||
Column(
|
||||
modifier = Modifier.background(Color.White)
|
||||
modifier = Modifier.background(
|
||||
AppColors.background
|
||||
)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(1.dp)
|
||||
.background(Color(0xFFF7F7F7))
|
||||
.background(AppColors.inputBackground)
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -1048,13 +1058,13 @@ fun PostBottomBar(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 16.dp, vertical = 13.dp)
|
||||
.background(Color.White)
|
||||
.background(AppColors.background)
|
||||
) {
|
||||
// grey round box
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.clip(RoundedCornerShape(16.dp))
|
||||
.background(Color(0xFFF5F5F5))
|
||||
.background(AppColors.inputBackground)
|
||||
.weight(1f)
|
||||
.height(31.dp)
|
||||
.padding(8.dp)
|
||||
@@ -1067,13 +1077,14 @@ fun PostBottomBar(
|
||||
) {
|
||||
Image(
|
||||
ImageVector.vectorResource(R.drawable.rider_pro_new_comment),
|
||||
contentDescription = "Send"
|
||||
contentDescription = "Send",
|
||||
colorFilter = ColorFilter.tint(AppColors.text),
|
||||
)
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.post_comment_hint),
|
||||
fontSize = 12.sp,
|
||||
color = Color(0xFFCCCCCC)
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1084,7 +1095,7 @@ fun PostBottomBar(
|
||||
modifier = Modifier.size(24.dp)
|
||||
)
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
Text(text = momentEntity?.likeCount.toString())
|
||||
Text(text = momentEntity?.likeCount.toString(),color = AppColors.text)
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
AnimatedFavouriteIcon(
|
||||
isFavourite = momentEntity?.isFavorite == true,
|
||||
@@ -1092,11 +1103,11 @@ fun PostBottomBar(
|
||||
modifier = Modifier.size(24.dp)
|
||||
)
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
Text(text = momentEntity?.favoriteCount.toString())
|
||||
Text(text = momentEntity?.favoriteCount.toString(),color = AppColors.text)
|
||||
|
||||
}
|
||||
BottomNavigationPlaceholder(
|
||||
color = Color.White
|
||||
color = AppColors.background
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1110,6 +1121,7 @@ fun PostMenuModal(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(160.dp)
|
||||
.background(AppColors.background)
|
||||
.padding(vertical = 47.dp, horizontal = 20.dp)
|
||||
) {
|
||||
Row(
|
||||
@@ -1132,7 +1144,10 @@ fun PostMenuModal(
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.rider_pro_moment_delete),
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(24.dp)
|
||||
modifier = Modifier.size(24.dp),
|
||||
colorFilter = ColorFilter.tint(
|
||||
AppColors.text
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1140,7 +1155,8 @@ fun PostMenuModal(
|
||||
Text(
|
||||
text = stringResource(R.string.delete),
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1172,7 +1188,7 @@ fun MenuActionItem(
|
||||
painter = painterResource(id = icon),
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(24.dp),
|
||||
tint = Color.Black
|
||||
tint = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1181,7 +1197,8 @@ fun MenuActionItem(
|
||||
Text(
|
||||
text = text,
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1212,15 +1229,17 @@ fun CommentMenuModal(
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(AppColors.background)
|
||||
.padding(vertical = 24.dp, horizontal = 20.dp)
|
||||
) {
|
||||
Text(stringResource(R.string.comment), fontSize = 18.sp, fontWeight = FontWeight.Bold)
|
||||
Text(stringResource(R.string.comment), fontSize = 18.sp, fontWeight = FontWeight.Bold, color = AppColors.text)
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
commentEntity?.let {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(Color(0xffeeeeee))
|
||||
.background(
|
||||
AppColors.nonActive)
|
||||
|
||||
.padding(8.dp)
|
||||
) {
|
||||
@@ -1243,7 +1262,8 @@ fun CommentMenuModal(
|
||||
androidx.compose.material.Text(
|
||||
it.name,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 16.sp
|
||||
fontSize = 16.sp,
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(4.dp))
|
||||
@@ -1253,7 +1273,8 @@ fun CommentMenuModal(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(start = 32.dp),
|
||||
overflow = TextOverflow.Ellipsis
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
@@ -1323,7 +1344,7 @@ fun OrderSelectionComponent(
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(Color(0xFFEEEEEE))
|
||||
.background(AppColors.nonActive)
|
||||
|
||||
) {
|
||||
Row(
|
||||
@@ -1342,13 +1363,13 @@ fun OrderSelectionComponent(
|
||||
.background(
|
||||
if (
|
||||
selectedOrder == order.first
|
||||
) Color.White else Color.Transparent
|
||||
) AppColors.background else Color.Transparent
|
||||
)
|
||||
.padding(vertical = 2.dp, horizontal = 8.dp),
|
||||
) {
|
||||
Text(
|
||||
text = order.second,
|
||||
color = Color.Black,
|
||||
color = AppColors.text,
|
||||
fontSize = 12.sp
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user