新增苹果账户登录;新增拉黑功能;UI调整
@@ -16,9 +16,9 @@ sealed class NavigationItem(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
data object Home : NavigationItem("Home",
|
data object Home : NavigationItem("Home",
|
||||||
icon = { R.drawable.rider_pro_nav_home },
|
icon = { R.mipmap.bars_x_buttons_home_n_copy },
|
||||||
selectedIcon = { R.mipmap.bars_x_buttons_home_s },
|
selectedIcon = { R.mipmap.bars_x_buttons_home_n_copy_2 },
|
||||||
label = { stringResource(R.string.main_home) }
|
label = { stringResource(R.string.main_ai) }
|
||||||
)
|
)
|
||||||
|
|
||||||
data object Ai : NavigationItem("Ai",
|
data object Ai : NavigationItem("Ai",
|
||||||
|
|||||||
@@ -0,0 +1,178 @@
|
|||||||
|
package com.aiosman.ravenow.ui.index.tabs.profile
|
||||||
|
|
||||||
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.width
|
||||||
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
import androidx.compose.material3.Icon
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.draw.clip
|
||||||
|
import androidx.compose.ui.layout.ContentScale
|
||||||
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
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.ravenow.LocalAppTheme
|
||||||
|
import com.aiosman.ravenow.R
|
||||||
|
import com.aiosman.ravenow.entity.AccountProfileEntity
|
||||||
|
import com.aiosman.ravenow.ui.composables.CustomAsyncImage
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉黑确认弹窗
|
||||||
|
*/
|
||||||
|
@Composable
|
||||||
|
fun BlockConfirmDialog(
|
||||||
|
userProfile: AccountProfileEntity?,
|
||||||
|
onConfirmBlock: () -> Unit = {},
|
||||||
|
onDismiss: () -> Unit = {}
|
||||||
|
) {
|
||||||
|
val AppColors = LocalAppTheme.current
|
||||||
|
|
||||||
|
Box(
|
||||||
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
contentAlignment = Alignment.BottomCenter
|
||||||
|
) {
|
||||||
|
Column(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.background(
|
||||||
|
color = AppColors.background,
|
||||||
|
shape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp)
|
||||||
|
)
|
||||||
|
.padding(24.dp)
|
||||||
|
) {
|
||||||
|
// 用户头像
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.CenterHorizontally)
|
||||||
|
.padding(bottom = 16.dp)
|
||||||
|
) {
|
||||||
|
CustomAsyncImage(
|
||||||
|
LocalContext.current,
|
||||||
|
userProfile?.avatar,
|
||||||
|
modifier = Modifier
|
||||||
|
.size(60.dp)
|
||||||
|
.clip(CircleShape)
|
||||||
|
.background(
|
||||||
|
color = AppColors.background,
|
||||||
|
shape = CircleShape
|
||||||
|
),
|
||||||
|
contentDescription = "用户头像",
|
||||||
|
contentScale = ContentScale.Crop
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认文本
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.confirm_block_user, userProfile?.nickName ?: "该用户"),
|
||||||
|
|
||||||
|
fontSize = 18.sp,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
color = AppColors.text,
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.CenterHorizontally)
|
||||||
|
.padding(bottom = 24.dp)
|
||||||
|
)
|
||||||
|
|
||||||
|
// 说明信息
|
||||||
|
Column(
|
||||||
|
modifier = Modifier.padding(bottom = 32.dp)
|
||||||
|
) {
|
||||||
|
// 第一条说明
|
||||||
|
Row(
|
||||||
|
modifier = Modifier.padding(bottom = 12.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
painter = painterResource(id = R.mipmap.icons_infor_off_eye),
|
||||||
|
contentDescription = "",
|
||||||
|
tint = AppColors.text,
|
||||||
|
modifier = Modifier.size(20.dp)
|
||||||
|
)
|
||||||
|
Spacer(modifier = Modifier.width(12.dp))
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.block_description_1),
|
||||||
|
fontSize = 14.sp,
|
||||||
|
color = AppColors.text,
|
||||||
|
lineHeight = 20.sp
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第二条说明
|
||||||
|
Row(
|
||||||
|
modifier = Modifier.padding(bottom = 12.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
painter = painterResource(id = R.drawable.rider_pro_notice_mute),
|
||||||
|
contentDescription = "",
|
||||||
|
tint = AppColors.text,
|
||||||
|
modifier = Modifier.size(20.dp)
|
||||||
|
)
|
||||||
|
Spacer(modifier = Modifier.width(12.dp))
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.block_description_2),
|
||||||
|
fontSize = 14.sp,
|
||||||
|
color = AppColors.text,
|
||||||
|
lineHeight = 20.sp
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第三条说明
|
||||||
|
Row(
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
painter = painterResource(id = R.mipmap.icons_infor_off_bell),
|
||||||
|
contentDescription = "",
|
||||||
|
tint = AppColors.text,
|
||||||
|
modifier = Modifier.size(20.dp)
|
||||||
|
)
|
||||||
|
Spacer(modifier = Modifier.width(12.dp))
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.block_description_3),
|
||||||
|
fontSize = 14.sp,
|
||||||
|
color = AppColors.text,
|
||||||
|
lineHeight = 20.sp
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认拉黑按钮
|
||||||
|
androidx.compose.material3.Button(
|
||||||
|
onClick = {
|
||||||
|
onConfirmBlock()
|
||||||
|
onDismiss()
|
||||||
|
},
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.height(48.dp),
|
||||||
|
colors = androidx.compose.material3.ButtonDefaults.buttonColors(
|
||||||
|
containerColor = AppColors.text
|
||||||
|
),
|
||||||
|
shape = RoundedCornerShape(24.dp)
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
stringResource(R.string.block),
|
||||||
|
color = AppColors.background,
|
||||||
|
fontSize = 16.sp,
|
||||||
|
fontWeight = FontWeight.Bold
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -99,6 +99,8 @@ import kotlinx.coroutines.delay
|
|||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
|
import androidx.compose.ui.res.stringResource
|
||||||
|
|
||||||
@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun ProfileV3(
|
fun ProfileV3(
|
||||||
@@ -127,6 +129,8 @@ fun ProfileV3(
|
|||||||
var showAgentMenu by remember { mutableStateOf(false) }
|
var showAgentMenu by remember { mutableStateOf(false) }
|
||||||
var contextAgent by remember { mutableStateOf<AgentEntity?>(null) }
|
var contextAgent by remember { mutableStateOf<AgentEntity?>(null) }
|
||||||
var showDeleteConfirmDialog by remember { mutableStateOf(false) }
|
var showDeleteConfirmDialog by remember { mutableStateOf(false) }
|
||||||
|
var showOtherUserMenu by remember { mutableStateOf(false) }
|
||||||
|
var showBlockConfirmDialog by remember { mutableStateOf(false) }
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val scope = rememberCoroutineScope()
|
val scope = rememberCoroutineScope()
|
||||||
val navController = LocalNavController.current
|
val navController = LocalNavController.current
|
||||||
@@ -154,9 +158,13 @@ fun ProfileV3(
|
|||||||
|
|
||||||
val toolbarAlpha by remember {
|
val toolbarAlpha by remember {
|
||||||
derivedStateOf {
|
derivedStateOf {
|
||||||
val maxScroll = 500f // 最大滚动距离,可调整
|
if (!isSelf) {
|
||||||
val progress = (scrollState.value.coerceAtMost(maxScroll.toInt()) / maxScroll).coerceIn(0f, 1f)
|
1f
|
||||||
progress
|
} else {
|
||||||
|
val maxScroll = 500f // 最大滚动距离,可调整
|
||||||
|
val progress = (scrollState.value.coerceAtMost(maxScroll.toInt()) / maxScroll).coerceIn(0f, 1f)
|
||||||
|
progress
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,7 +486,10 @@ fun ProfileV3(
|
|||||||
isSelf = isSelf,
|
isSelf = isSelf,
|
||||||
profile = profile,
|
profile = profile,
|
||||||
navController = navController,
|
navController = navController,
|
||||||
alpha = toolbarAlpha
|
alpha = toolbarAlpha,
|
||||||
|
onMenuClick = {
|
||||||
|
showOtherUserMenu = true
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
PullRefreshIndicator(
|
PullRefreshIndicator(
|
||||||
@@ -486,8 +497,70 @@ fun ProfileV3(
|
|||||||
refreshState,
|
refreshState,
|
||||||
Modifier.align(Alignment.TopCenter)
|
Modifier.align(Alignment.TopCenter)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 其他用户菜单弹窗
|
||||||
|
if (showOtherUserMenu) {
|
||||||
|
ModalBottomSheet(
|
||||||
|
onDismissRequest = { showOtherUserMenu = false },
|
||||||
|
sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true),
|
||||||
|
containerColor = Color.Transparent, // 设置容器背景透明
|
||||||
|
contentColor = Color.Transparent, // 设置内容背景透明
|
||||||
|
dragHandle = null, // 移除拖拽手柄
|
||||||
|
windowInsets = androidx.compose.foundation.layout.WindowInsets(0) // 移除窗口边距
|
||||||
|
) {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.background(Color.Transparent)
|
||||||
|
) {
|
||||||
|
OtherUserMenuModal(
|
||||||
|
onBlockClick = {
|
||||||
|
showBlockConfirmDialog = true
|
||||||
|
},
|
||||||
|
onReportClick = {
|
||||||
|
// 实现举报逻辑
|
||||||
|
},
|
||||||
|
onCancelClick = {
|
||||||
|
showOtherUserMenu = false
|
||||||
|
},
|
||||||
|
onDismiss = { showOtherUserMenu = false }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 拉黑确认弹窗
|
||||||
|
if (showBlockConfirmDialog) {
|
||||||
|
ModalBottomSheet(
|
||||||
|
onDismissRequest = {
|
||||||
|
showBlockConfirmDialog = false
|
||||||
|
},
|
||||||
|
sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true),
|
||||||
|
containerColor = Color.Transparent,
|
||||||
|
contentColor = Color.Transparent,
|
||||||
|
dragHandle = null,
|
||||||
|
windowInsets = androidx.compose.foundation.layout.WindowInsets(0)
|
||||||
|
) {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.background(Color.Transparent)
|
||||||
|
) {
|
||||||
|
BlockConfirmDialog(
|
||||||
|
userProfile = profile,
|
||||||
|
onConfirmBlock = {
|
||||||
|
// 实现拉黑逻辑
|
||||||
|
},
|
||||||
|
onDismiss = {
|
||||||
|
showBlockConfirmDialog = false
|
||||||
|
showOtherUserMenu = false
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//顶部导航栏组件
|
//顶部导航栏组件
|
||||||
@Composable
|
@Composable
|
||||||
@@ -496,14 +569,14 @@ fun TopNavigationBar(
|
|||||||
isSelf: Boolean,
|
isSelf: Boolean,
|
||||||
profile: AccountProfileEntity?,
|
profile: AccountProfileEntity?,
|
||||||
navController: androidx.navigation.NavController,
|
navController: androidx.navigation.NavController,
|
||||||
|
alpha: Float,
|
||||||
alpha: Float
|
onMenuClick: () -> Unit = {}
|
||||||
) {
|
) {
|
||||||
val appColors = LocalAppTheme.current
|
val appColors = LocalAppTheme.current
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.graphicsLayer { this.alpha = alpha } // 应用透明度
|
.graphicsLayer { this.alpha = alpha }
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -555,6 +628,21 @@ fun TopNavigationBar(
|
|||||||
.size(24.dp)
|
.size(24.dp)
|
||||||
.padding(16.dp)
|
.padding(16.dp)
|
||||||
)
|
)
|
||||||
|
} else if (!isSelf) {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.noRippleClickable {
|
||||||
|
onMenuClick()
|
||||||
|
}
|
||||||
|
.padding(16.dp)
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
painter = painterResource(id = R.drawable.rider_pro_more_horizon),
|
||||||
|
contentDescription = "菜单",
|
||||||
|
tint = appColors.text,
|
||||||
|
modifier = Modifier.size(24.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
@@ -661,7 +749,7 @@ fun AgentMenuModal(
|
|||||||
if (isSelf) {
|
if (isSelf) {
|
||||||
MenuActionItem(
|
MenuActionItem(
|
||||||
icon = R.drawable.rider_pro_moment_delete,
|
icon = R.drawable.rider_pro_moment_delete,
|
||||||
text = "删除"
|
text = stringResource(R.string.delete)
|
||||||
) {
|
) {
|
||||||
onDeleteClick()
|
onDeleteClick()
|
||||||
}
|
}
|
||||||
@@ -737,3 +825,96 @@ fun DeleteConfirmDialog(
|
|||||||
containerColor = AppColors.background
|
containerColor = AppColors.background
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他用户主页菜单弹窗
|
||||||
|
*/
|
||||||
|
@Composable
|
||||||
|
fun OtherUserMenuModal(
|
||||||
|
onBlockClick: () -> Unit = {},
|
||||||
|
onReportClick: () -> Unit = {},
|
||||||
|
onCancelClick: () -> Unit = {},
|
||||||
|
onDismiss: () -> Unit = {}
|
||||||
|
) {
|
||||||
|
val AppColors = LocalAppTheme.current
|
||||||
|
|
||||||
|
Box(
|
||||||
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
contentAlignment = Alignment.BottomCenter
|
||||||
|
) {
|
||||||
|
Column(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(horizontal = 8.dp)
|
||||||
|
.padding(bottom = 11.dp)
|
||||||
|
) {
|
||||||
|
Column(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.background(
|
||||||
|
color = AppColors.background,
|
||||||
|
shape = RoundedCornerShape(8.dp)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
// 拉黑选项
|
||||||
|
androidx.compose.material3.TextButton(
|
||||||
|
onClick = {
|
||||||
|
onBlockClick()
|
||||||
|
},
|
||||||
|
modifier = Modifier.fillMaxWidth()
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
stringResource(R.string.block),
|
||||||
|
color = AppColors.error,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
fontSize = 16.sp
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分割线
|
||||||
|
androidx.compose.material3.HorizontalDivider(
|
||||||
|
color = AppColors.divider,
|
||||||
|
thickness = 0.5.dp
|
||||||
|
)
|
||||||
|
|
||||||
|
// 举报选项
|
||||||
|
androidx.compose.material3.TextButton(
|
||||||
|
onClick = {
|
||||||
|
onReportClick()
|
||||||
|
onDismiss()
|
||||||
|
},
|
||||||
|
modifier = Modifier.fillMaxWidth()
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
stringResource(R.string.report),
|
||||||
|
color = AppColors.error,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
fontSize = 16.sp
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
androidx.compose.material3.TextButton(
|
||||||
|
onClick = {
|
||||||
|
onCancelClick()
|
||||||
|
onDismiss()
|
||||||
|
},
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.background(
|
||||||
|
color = AppColors.background,
|
||||||
|
shape = RoundedCornerShape(8.dp)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
stringResource(R.string.cancel),
|
||||||
|
color = AppColors.text,
|
||||||
|
fontSize = 16.sp
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.util.Log
|
|||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.border
|
||||||
import androidx.compose.foundation.gestures.Orientation
|
import androidx.compose.foundation.gestures.Orientation
|
||||||
import androidx.compose.foundation.gestures.rememberScrollableState
|
import androidx.compose.foundation.gestures.rememberScrollableState
|
||||||
import androidx.compose.foundation.gestures.scrollable
|
import androidx.compose.foundation.gestures.scrollable
|
||||||
@@ -272,16 +273,10 @@ fun LoginPage() {
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(horizontal = 24.dp)
|
.padding(horizontal = 24.dp)
|
||||||
.padding(top = 100.dp),
|
.padding(top = 60.dp),
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.join_party_carnival),
|
|
||||||
fontSize = 14.sp,
|
|
||||||
color = AppColors.text
|
|
||||||
)
|
|
||||||
|
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(30.dp)
|
.size(30.dp)
|
||||||
@@ -302,17 +297,8 @@ fun LoginPage() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Box(
|
|
||||||
modifier = Modifier.fillMaxSize()
|
|
||||||
) {
|
|
||||||
val lottieFile = if (AppState.darkMode) "login.lottie" else "login_light.lottie"
|
|
||||||
LottieAnimation(
|
|
||||||
composition = rememberLottieComposition(LottieCompositionSpec.Asset(lottieFile)).value,
|
|
||||||
iterations = LottieConstants.IterateForever,
|
|
||||||
modifier = Modifier.fillMaxSize()
|
|
||||||
.padding(30.dp)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
Spacer(modifier = Modifier.height(20.dp))
|
Spacer(modifier = Modifier.height(20.dp))
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -321,6 +307,25 @@ fun LoginPage() {
|
|||||||
horizontalAlignment = Alignment.CenterHorizontally
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
) {
|
) {
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.height(400.dp)
|
||||||
|
|
||||||
|
) {
|
||||||
|
val lottieFile = if (AppState.darkMode) "login.lottie" else "login_light.lottie"
|
||||||
|
LottieAnimation(
|
||||||
|
composition = rememberLottieComposition(LottieCompositionSpec.Asset(lottieFile)).value,
|
||||||
|
iterations = LottieConstants.IterateForever,
|
||||||
|
modifier = Modifier.fillMaxSize()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.join_party_carnival),
|
||||||
|
fontSize = 17.sp,
|
||||||
|
fontWeight = FontWeight.W600,
|
||||||
|
color = AppColors.text
|
||||||
|
)
|
||||||
// Image(
|
// Image(
|
||||||
// painter = painterResource(id = R.mipmap.invalid_name),
|
// painter = painterResource(id = R.mipmap.invalid_name),
|
||||||
// contentDescription = "Rave Now",
|
// contentDescription = "Rave Now",
|
||||||
@@ -343,7 +348,7 @@ fun LoginPage() {
|
|||||||
// color = AppColors.text
|
// color = AppColors.text
|
||||||
// )
|
// )
|
||||||
//注册tab
|
//注册tab
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(48.dp))
|
||||||
ActionButton(
|
ActionButton(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
text = stringResource(R.string.sign_up_upper),
|
text = stringResource(R.string.sign_up_upper),
|
||||||
@@ -354,25 +359,32 @@ fun LoginPage() {
|
|||||||
NavigationRoute.EmailSignUp.route,
|
NavigationRoute.EmailSignUp.route,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// if (showGoogleLogin) {
|
//苹果登录tab
|
||||||
// Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
// ActionButton(
|
ActionButton(
|
||||||
// modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier
|
||||||
// text = stringResource(R.string.sign_in_with_google),
|
.fillMaxWidth()
|
||||||
// color = AppColors.text,
|
.border(
|
||||||
// leading = {
|
width = 1.dp,
|
||||||
// Image(
|
color = if (AppState.darkMode) Color.White else Color.Black,
|
||||||
// painter = painterResource(id = R.drawable.rider_pro_google),
|
shape = RoundedCornerShape(24.dp)
|
||||||
// contentDescription = "Google",
|
),
|
||||||
// modifier = Modifier.size(36.dp)
|
text = stringResource(R.string.sign_in_with_apple),
|
||||||
// )
|
color = if (AppState.darkMode) Color.White else Color.Black,
|
||||||
// },
|
backgroundColor = if (AppState.darkMode) Color.Black else Color.White,
|
||||||
// expandText = true,
|
leading = {
|
||||||
// contentPadding = PaddingValues(vertical = 8.dp, horizontal = 8.dp)
|
Image(
|
||||||
// ) {
|
painter = painterResource(id = R.mipmap.apple_logo_medium),
|
||||||
// googleLogin()
|
contentDescription = "Apple",
|
||||||
// }
|
modifier = Modifier.size(36.dp),
|
||||||
// }
|
colorFilter = ColorFilter.tint(if (AppState.darkMode) Color.White else Color.Black)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
expandText = true,
|
||||||
|
contentPadding = PaddingValues(vertical = 8.dp, horizontal = 8.dp)
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
//登录tab
|
//登录tab
|
||||||
Spacer(modifier = Modifier.height(24.dp))
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ fun SignupScreen() {
|
|||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(8.dp))
|
||||||
},
|
},
|
||||||
text = stringResource(R.string.sign_in_with_google),
|
text = stringResource(R.string.sign_in_with_apple),
|
||||||
) {
|
) {
|
||||||
googleLogin()
|
googleLogin()
|
||||||
|
|
||||||
|
|||||||
BIN
app/src/main/res/mipmap-hdpi/apple_logo_medium.png
Normal file
|
After Width: | Height: | Size: 356 B |
BIN
app/src/main/res/mipmap-hdpi/icons_infor_off_bell.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
app/src/main/res/mipmap-hdpi/icons_infor_off_eye.png
Normal file
|
After Width: | Height: | Size: 477 B |
BIN
app/src/main/res/mipmap-mdpi/apple_logo_medium.png
Normal file
|
After Width: | Height: | Size: 291 B |
BIN
app/src/main/res/mipmap-mdpi/icons_infor_off_bell.png
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
app/src/main/res/mipmap-mdpi/icons_infor_off_eye.png
Normal file
|
After Width: | Height: | Size: 396 B |
BIN
app/src/main/res/mipmap-xhdpi/apple_logo_medium.png
Normal file
|
After Width: | Height: | Size: 423 B |
BIN
app/src/main/res/mipmap-xhdpi/icons_infor_off_bell.png
Normal file
|
After Width: | Height: | Size: 374 B |
BIN
app/src/main/res/mipmap-xhdpi/icons_infor_off_eye.png
Normal file
|
After Width: | Height: | Size: 560 B |
BIN
app/src/main/res/mipmap-xxhdpi/apple_logo_medium.png
Normal file
|
After Width: | Height: | Size: 541 B |
BIN
app/src/main/res/mipmap-xxhdpi/icons_infor_off_bell.png
Normal file
|
After Width: | Height: | Size: 510 B |
BIN
app/src/main/res/mipmap-xxhdpi/icons_infor_off_eye.png
Normal file
|
After Width: | Height: | Size: 741 B |
BIN
app/src/main/res/mipmap-xxxhdpi/apple_logo_medium.png
Normal file
|
After Width: | Height: | Size: 620 B |
BIN
app/src/main/res/mipmap-xxxhdpi/icons_infor_off_bell.png
Normal file
|
After Width: | Height: | Size: 623 B |
BIN
app/src/main/res/mipmap-xxxhdpi/icons_infor_off_eye.png
Normal file
|
After Width: | Height: | Size: 897 B |
@@ -33,7 +33,7 @@
|
|||||||
<string name="text_hint_password">パスワードを入力してください</string>
|
<string name="text_hint_password">パスワードを入力してください</string>
|
||||||
<string name="sign_up_upper">サインアップ</string>
|
<string name="sign_up_upper">サインアップ</string>
|
||||||
<string name="sign_in_with_email">メールで接続</string>
|
<string name="sign_in_with_email">メールで接続</string>
|
||||||
<string name="sign_in_with_google">Googleで接続</string>
|
<string name="sign_in_with_apple">Appleで接続</string>
|
||||||
<string name="back_upper">戻る</string>
|
<string name="back_upper">戻る</string>
|
||||||
<string name="text_hint_confirm_password">パスワードを再入力してください</string>
|
<string name="text_hint_confirm_password">パスワードを再入力してください</string>
|
||||||
<string name="login_confirm_password_label">パスワードの確認</string>
|
<string name="login_confirm_password_label">パスワードの確認</string>
|
||||||
@@ -192,6 +192,8 @@
|
|||||||
<string name="agent_createing">作成中…</string>
|
<string name="agent_createing">作成中…</string>
|
||||||
<string name="agent_find">発見</string>
|
<string name="agent_find">発見</string>
|
||||||
<string name="text_error_password_too_long">パスワードは%1$d文字を超えることはできません</string>
|
<string name="text_error_password_too_long">パスワードは%1$d文字を超えることはできません</string>
|
||||||
|
<string name="block">ブロック</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- Create Bottom Sheet -->
|
<!-- Create Bottom Sheet -->
|
||||||
<string name="create_title">作成</string>
|
<string name="create_title">作成</string>
|
||||||
@@ -219,13 +221,19 @@
|
|||||||
<string name="friend_chat_no_network_title">オフラインだ..</string>
|
<string name="friend_chat_no_network_title">オフラインだ..</string>
|
||||||
<string name="friend_chat_no_network_subtitle">ネットワークを確認して、この宇宙に接続してください</string>
|
<string name="friend_chat_no_network_subtitle">ネットワークを確認して、この宇宙に接続してください</string>
|
||||||
<string name="Reload">再ロード</string>
|
<string name="Reload">再ロード</string>
|
||||||
|
|
||||||
<!-- Login page -->
|
<!-- Login page -->
|
||||||
<string name="join_party_carnival">パーティーに参加して、一緒に盛り上がろう</string>
|
<string name="join_party_carnival">パーティーに参加して、一緒に盛り上がろう</string>
|
||||||
|
|
||||||
<!-- Tab labels -->
|
<!-- Tab labels -->
|
||||||
<string name="tab_recommend">おすすめ</string>
|
<string name="tab_recommend">おすすめ</string>
|
||||||
<string name="tab_short_video">ショート動画</string>
|
<string name="tab_short_video">ショート動画</string>
|
||||||
<string name="tab_news">ニュース</string>
|
<string name="tab_news">ニュース</string>
|
||||||
|
|
||||||
|
<!-- Block Confirm Dialog -->
|
||||||
|
<string name="confirm_block_user">%1$sをブロックしますか?</string>
|
||||||
|
<string name="block_description_1">相手はあなたにメッセージを送信したり、あなたのプロフィールやコンテンツを見つけることができなくなります</string>
|
||||||
|
<string name="block_description_2">相手はあなたにブロックされた通知を受け取りません</string>
|
||||||
|
<string name="block_description_3">「設定」でいつでもブロックを解除できます</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<string name="text_hint_password">输入密码</string>
|
<string name="text_hint_password">输入密码</string>
|
||||||
<string name="sign_up_upper">注册</string>
|
<string name="sign_up_upper">注册</string>
|
||||||
<string name="sign_in_with_email">使用邮箱注册</string>
|
<string name="sign_in_with_email">使用邮箱注册</string>
|
||||||
<string name="sign_in_with_google">使用 Google 账号登录</string>
|
<string name="sign_in_with_apple">使用Apple登录</string>
|
||||||
<string name="back_upper">返回</string>
|
<string name="back_upper">返回</string>
|
||||||
<string name="text_hint_confirm_password">再次输入密码</string>
|
<string name="text_hint_confirm_password">再次输入密码</string>
|
||||||
<string name="login_confirm_password_label">再次输入密码</string>
|
<string name="login_confirm_password_label">再次输入密码</string>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
<string name="index_following">关注</string>
|
<string name="index_following">关注</string>
|
||||||
<string name="index_hot">热门</string>
|
<string name="index_hot">热门</string>
|
||||||
<string name="main_home">首页</string>
|
<string name="main_home">首页</string>
|
||||||
<string name="main_ai">智能体</string>
|
<string name="main_ai">AI</string>
|
||||||
<string name="main_message">消息</string>
|
<string name="main_message">消息</string>
|
||||||
<string name="main_profile">我的</string>
|
<string name="main_profile">我的</string>
|
||||||
<string name="agent_mine">我的</string>
|
<string name="agent_mine">我的</string>
|
||||||
@@ -195,6 +195,8 @@
|
|||||||
<string name="agent_find">发现</string>
|
<string name="agent_find">发现</string>
|
||||||
<string name="text_error_password_too_long">密码不能超过 %1$d 个字符</string>
|
<string name="text_error_password_too_long">密码不能超过 %1$d 个字符</string>
|
||||||
<string name="chatting_now">人正在热聊…</string>
|
<string name="chatting_now">人正在热聊…</string>
|
||||||
|
<string name="block">拉黑</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- Create Bottom Sheet -->
|
<!-- Create Bottom Sheet -->
|
||||||
<string name="create_title">创建</string>
|
<string name="create_title">创建</string>
|
||||||
@@ -230,5 +232,11 @@
|
|||||||
<string name="tab_recommend">推荐</string>
|
<string name="tab_recommend">推荐</string>
|
||||||
<string name="tab_short_video">短视频</string>
|
<string name="tab_short_video">短视频</string>
|
||||||
<string name="tab_news">新闻</string>
|
<string name="tab_news">新闻</string>
|
||||||
|
|
||||||
|
<!-- Block Confirm Dialog -->
|
||||||
|
<string name="confirm_block_user">确认拉黑%s?</string>
|
||||||
|
<string name="block_description_1">对方将无法发消息给你,也无法找到你的主页或内容</string>
|
||||||
|
<string name="block_description_2">对方不会收到自己被你拉黑的通知</string>
|
||||||
|
<string name="block_description_3">你可以随时"设置"中取消拉黑TA</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<string name="text_hint_password">Enter your password</string>
|
<string name="text_hint_password">Enter your password</string>
|
||||||
<string name="sign_up_upper">Sign Up</string>
|
<string name="sign_up_upper">Sign Up</string>
|
||||||
<string name="sign_in_with_email">Connect with Email</string>
|
<string name="sign_in_with_email">Connect with Email</string>
|
||||||
<string name="sign_in_with_google">Connect with Google</string>
|
<string name="sign_in_with_apple">Continue with Apple</string>
|
||||||
<string name="back_upper">BACK</string>
|
<string name="back_upper">BACK</string>
|
||||||
<string name="text_hint_confirm_password">Enter your password again</string>
|
<string name="text_hint_confirm_password">Enter your password again</string>
|
||||||
<string name="login_confirm_password_label">Confirm password</string>
|
<string name="login_confirm_password_label">Confirm password</string>
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
<string name="index_following">Following</string>
|
<string name="index_following">Following</string>
|
||||||
<string name="index_hot">Hot</string>
|
<string name="index_hot">Hot</string>
|
||||||
<string name="main_home">Home</string>
|
<string name="main_home">Home</string>
|
||||||
<string name="main_ai">Agent</string>
|
<string name="main_ai">AI</string>
|
||||||
<string name="main_message">Message</string>
|
<string name="main_message">Message</string>
|
||||||
<string name="main_profile">Profile</string>
|
<string name="main_profile">Profile</string>
|
||||||
<string name="agent_mine">Mine</string>
|
<string name="agent_mine">Mine</string>
|
||||||
@@ -191,7 +191,8 @@
|
|||||||
<string name="agent_createing">Creating…</string>
|
<string name="agent_createing">Creating…</string>
|
||||||
<string name="agent_find">Discover</string>
|
<string name="agent_find">Discover</string>
|
||||||
<string name="text_error_password_too_long">Password cannot exceed %1$d characters</string>
|
<string name="text_error_password_too_long">Password cannot exceed %1$d characters</string>
|
||||||
|
<string name="block">Block</string>
|
||||||
|
|
||||||
<!-- Create Bottom Sheet -->
|
<!-- Create Bottom Sheet -->
|
||||||
<string name="create_title">Create</string>
|
<string name="create_title">Create</string>
|
||||||
<string name="create_ai">AI</string>
|
<string name="create_ai">AI</string>
|
||||||
@@ -226,4 +227,10 @@
|
|||||||
<string name="tab_recommend">Recommend</string>
|
<string name="tab_recommend">Recommend</string>
|
||||||
<string name="tab_short_video">Short Video</string>
|
<string name="tab_short_video">Short Video</string>
|
||||||
<string name="tab_news">News</string>
|
<string name="tab_news">News</string>
|
||||||
|
|
||||||
|
<!-- Block Confirm Dialog -->
|
||||||
|
<string name="confirm_block_user">Confirm block %1$s?</string>
|
||||||
|
<string name="block_description_1">They won\'t be able to send you messages or find your profile or content</string>
|
||||||
|
<string name="block_description_2">They won\'t receive a notification that you blocked them</string>
|
||||||
|
<string name="block_description_3">You can unblock them anytime in "Settings"</string>
|
||||||
</resources>
|
</resources>
|
||||||