@@ -2,6 +2,7 @@ package com.aiosman.ravenow.ui.about
|
|||||||
|
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
@@ -40,22 +41,21 @@ fun AboutScreen() {
|
|||||||
modifier = Modifier.padding(horizontal = 24.dp, vertical = 16.dp)
|
modifier = Modifier.padding(horizontal = 24.dp, vertical = 16.dp)
|
||||||
) {
|
) {
|
||||||
NoticeScreenHeader(
|
NoticeScreenHeader(
|
||||||
title = stringResource(R.string.about_rave_now),
|
title = stringResource(R.string.about_paipai),
|
||||||
moreIcon = false
|
moreIcon = false
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
.fillMaxWidth()
|
.fillMaxWidth(),
|
||||||
.padding(start = 24.dp),
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
verticalArrangement = Arrangement.Center
|
||||||
) {
|
) {
|
||||||
Spacer(modifier = Modifier.height(48.dp))
|
// app icondww
|
||||||
// app icon
|
|
||||||
Box {
|
Box {
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(id = R.mipmap.rider_pro_color_logo_next),
|
painter = painterResource(id = R.mipmap.invalid_name),
|
||||||
contentDescription = "app icon",
|
contentDescription = "app icon",
|
||||||
modifier = Modifier.size(80.dp)
|
modifier = Modifier.size(80.dp)
|
||||||
)
|
)
|
||||||
@@ -63,7 +63,7 @@ fun AboutScreen() {
|
|||||||
Spacer(modifier = Modifier.height(24.dp))
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
// app name
|
// app name
|
||||||
Text(
|
Text(
|
||||||
text = "Rave Now".uppercase(),
|
text = stringResource(R.string.paipai),
|
||||||
fontSize = 24.sp,
|
fontSize = 24.sp,
|
||||||
color = appColors.text,
|
color = appColors.text,
|
||||||
fontWeight = FontWeight.ExtraBold
|
fontWeight = FontWeight.ExtraBold
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ import kotlinx.coroutines.launch
|
|||||||
import com.aiosman.ravenow.utils.NetworkUtils
|
import com.aiosman.ravenow.utils.NetworkUtils
|
||||||
import com.aiosman.ravenow.ui.network.ReloadButton
|
import com.aiosman.ravenow.ui.network.ReloadButton
|
||||||
@Composable
|
@Composable
|
||||||
fun CommentNoticeScreen() {
|
fun CommentNoticeScreen(includeStatusBarPadding: Boolean = true){
|
||||||
val viewModel = viewModel<CommentNoticeListViewModel>(
|
val viewModel = viewModel<CommentNoticeListViewModel>(
|
||||||
key = "CommentNotice",
|
key = "CommentNotice",
|
||||||
factory = object : ViewModelProvider.Factory {
|
factory = object : ViewModelProvider.Factory {
|
||||||
@@ -252,7 +252,9 @@ fun CommentNoticeItem(
|
|||||||
text = commentItem.name,
|
text = commentItem.name,
|
||||||
fontSize = 18.sp,
|
fontSize = 18.sp,
|
||||||
modifier = Modifier,
|
modifier = Modifier,
|
||||||
color = AppColors.text
|
color = AppColors.text,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
Row {
|
Row {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ fun StatusBarMaskLayout(
|
|||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
darkIcons: Boolean = true,
|
darkIcons: Boolean = true,
|
||||||
useNavigationBarMask: Boolean = true,
|
useNavigationBarMask: Boolean = true,
|
||||||
|
includeStatusBarPadding: Boolean = true,
|
||||||
maskBoxBackgroundColor: Color = Color.Transparent,
|
maskBoxBackgroundColor: Color = Color.Transparent,
|
||||||
content: @Composable ColumnScope.() -> Unit
|
content: @Composable ColumnScope.() -> Unit
|
||||||
) {
|
) {
|
||||||
@@ -50,13 +51,13 @@ fun StatusBarMaskLayout(
|
|||||||
Column(
|
Column(
|
||||||
modifier = modifier.fillMaxSize()
|
modifier = modifier.fillMaxSize()
|
||||||
) {
|
) {
|
||||||
|
if (includeStatusBarPadding) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.height(paddingValues.calculateTopPadding())
|
.height(paddingValues.calculateTopPadding())
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.background(maskBoxBackgroundColor)
|
.background(maskBoxBackgroundColor)
|
||||||
) {
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
content()
|
content()
|
||||||
if (navigationBarPaddings > 24.dp && useNavigationBarMask) {
|
if (navigationBarPaddings > 24.dp && useNavigationBarMask) {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import androidx.compose.runtime.rememberCoroutineScope
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
@@ -48,13 +49,14 @@ import com.aiosman.ravenow.utils.NetworkUtils
|
|||||||
* 关注消息列表
|
* 关注消息列表
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
fun FollowerNoticeScreen() {
|
fun FollowerNoticeScreen(includeStatusBarPadding: Boolean = true) {
|
||||||
val scope = rememberCoroutineScope()
|
val scope = rememberCoroutineScope()
|
||||||
val AppColors = LocalAppTheme.current
|
val AppColors = LocalAppTheme.current
|
||||||
StatusBarMaskLayout(
|
StatusBarMaskLayout(
|
||||||
modifier = Modifier.background(color = AppColors.background).padding(horizontal = 16.dp),
|
modifier = Modifier.background(color = AppColors.background).padding(horizontal = 16.dp),
|
||||||
darkIcons = !AppState.darkMode,
|
darkIcons = !AppState.darkMode,
|
||||||
maskBoxBackgroundColor = AppColors.background
|
maskBoxBackgroundColor = AppColors.background,
|
||||||
|
includeStatusBarPadding = includeStatusBarPadding
|
||||||
) {
|
) {
|
||||||
val model = FollowerNoticeViewModel
|
val model = FollowerNoticeViewModel
|
||||||
var dataFlow = model.followerItemsFlow
|
var dataFlow = model.followerItemsFlow
|
||||||
@@ -199,7 +201,14 @@ fun FollowItem(
|
|||||||
Column(
|
Column(
|
||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
) {
|
) {
|
||||||
Text(nickname, fontWeight = FontWeight.Bold, fontSize = 16.sp, color = AppColors.text)
|
Text(
|
||||||
|
text = nickname,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
fontSize = 16.sp,
|
||||||
|
color = AppColors.text,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis
|
||||||
|
)
|
||||||
}
|
}
|
||||||
if (!isFollowing && userId != AppState.UserId) {
|
if (!isFollowing && userId != AppState.UserId) {
|
||||||
FollowButton(
|
FollowButton(
|
||||||
|
|||||||
@@ -415,64 +415,17 @@ fun MomentResultTab() {
|
|||||||
.background(AppColors.background)
|
.background(AppColors.background)
|
||||||
) {
|
) {
|
||||||
if (moments.itemCount == 0 && model.showResult) {
|
if (moments.itemCount == 0 && model.showResult) {
|
||||||
Column(
|
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
|
||||||
|
SearchPlaceholderContent(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(16.dp),
|
.padding(16.dp),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
isNetworkAvailable = isNetworkAvailable,
|
||||||
verticalArrangement = Arrangement.Center
|
onReload = {
|
||||||
) {
|
|
||||||
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
|
|
||||||
|
|
||||||
if (isNetworkAvailable) {
|
|
||||||
androidx.compose.foundation.Image(
|
|
||||||
painter = painterResource(
|
|
||||||
id = if(AppState.darkMode) R.mipmap.syss_yh_qs_as_img
|
|
||||||
else R.mipmap.invalid_name_1),
|
|
||||||
contentDescription = "No Comment",
|
|
||||||
modifier = Modifier.size(140.dp)
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = "咦,什么都没找到...",
|
|
||||||
color = LocalAppTheme.current.text,
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.W600
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = "换个关键词试试吧,也许会有新发现!",
|
|
||||||
color = LocalAppTheme.current.secondaryText,
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.W400
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
androidx.compose.foundation.Image(
|
|
||||||
painter = painterResource(id = R.mipmap.invalid_name_10),
|
|
||||||
contentDescription = "network error",
|
|
||||||
modifier = Modifier.size(140.dp)
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.friend_chat_no_network_title),
|
|
||||||
color = LocalAppTheme.current.text,
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.W600
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.friend_chat_no_network_subtitle),
|
|
||||||
color = LocalAppTheme.current.secondaryText,
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.W400
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.size(16.dp))
|
|
||||||
ReloadButton(
|
|
||||||
onClick = {
|
|
||||||
SearchViewModel.ResetModel()
|
SearchViewModel.ResetModel()
|
||||||
SearchViewModel.search()
|
SearchViewModel.search()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
@@ -566,64 +519,17 @@ fun UserResultTab() {
|
|||||||
modifier = Modifier.fillMaxSize()
|
modifier = Modifier.fillMaxSize()
|
||||||
) {
|
) {
|
||||||
if (users.itemCount == 0 && model.showResult) {
|
if (users.itemCount == 0 && model.showResult) {
|
||||||
Column(
|
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
|
||||||
|
SearchPlaceholderContent(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(16.dp),
|
.padding(16.dp),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
isNetworkAvailable = isNetworkAvailable,
|
||||||
verticalArrangement = Arrangement.Center
|
onReload = {
|
||||||
) {
|
|
||||||
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
|
|
||||||
|
|
||||||
if (isNetworkAvailable) {
|
|
||||||
androidx.compose.foundation.Image(
|
|
||||||
painter = painterResource(
|
|
||||||
id = if(AppState.darkMode) R.mipmap.syss_yh_qs_as_img
|
|
||||||
else R.mipmap.invalid_name_1),
|
|
||||||
contentDescription = "No Comment",
|
|
||||||
modifier = Modifier.size(140.dp)
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = "咦,什么都没找到...",
|
|
||||||
color = LocalAppTheme.current.text,
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.W600
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = "换个关键词试试吧,也许会有新发现!",
|
|
||||||
color = LocalAppTheme.current.secondaryText,
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.W400
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
androidx.compose.foundation.Image(
|
|
||||||
painter = painterResource(id = R.mipmap.invalid_name_10),
|
|
||||||
contentDescription = "network error",
|
|
||||||
modifier = Modifier.size(140.dp)
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.friend_chat_no_network_title),
|
|
||||||
color = LocalAppTheme.current.text,
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.W600
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.friend_chat_no_network_subtitle),
|
|
||||||
color = LocalAppTheme.current.secondaryText,
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.W400
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.size(16.dp))
|
|
||||||
ReloadButton(
|
|
||||||
onClick = {
|
|
||||||
SearchViewModel.ResetModel()
|
SearchViewModel.ResetModel()
|
||||||
SearchViewModel.search()
|
SearchViewModel.search()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
@@ -734,64 +640,17 @@ fun AiResultTab() {
|
|||||||
.background(AppColors.background)
|
.background(AppColors.background)
|
||||||
) {
|
) {
|
||||||
if (agents.itemCount == 0 && model.showResult) {
|
if (agents.itemCount == 0 && model.showResult) {
|
||||||
Column(
|
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
|
||||||
|
SearchPlaceholderContent(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(16.dp),
|
.padding(16.dp),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
isNetworkAvailable = isNetworkAvailable,
|
||||||
verticalArrangement = Arrangement.Center
|
onReload = {
|
||||||
) {
|
|
||||||
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
|
|
||||||
if (isNetworkAvailable) {
|
|
||||||
androidx.compose.foundation.Image(
|
|
||||||
painter = painterResource(
|
|
||||||
id = if (AppState.darkMode) R.mipmap.syss_yh_qs_as_img
|
|
||||||
else R.mipmap.invalid_name_1
|
|
||||||
),
|
|
||||||
contentDescription = "No Result",
|
|
||||||
modifier = Modifier.size(140.dp)
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = "咦,什么都没找到...",
|
|
||||||
color = LocalAppTheme.current.text,
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.W600
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = "换个关键词试试吧,也许会有新发现!",
|
|
||||||
color = LocalAppTheme.current.secondaryText,
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.W400
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
androidx.compose.foundation.Image(
|
|
||||||
painter = painterResource(id = R.mipmap.invalid_name_10),
|
|
||||||
contentDescription = "network error",
|
|
||||||
modifier = Modifier.size(140.dp)
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.friend_chat_no_network_title),
|
|
||||||
color = LocalAppTheme.current.text,
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.W600
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.friend_chat_no_network_subtitle),
|
|
||||||
color = LocalAppTheme.current.secondaryText,
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.W400
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.size(16.dp))
|
|
||||||
ReloadButton(
|
|
||||||
onClick = {
|
|
||||||
SearchViewModel.ResetModel()
|
SearchViewModel.ResetModel()
|
||||||
SearchViewModel.search()
|
SearchViewModel.search()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
@@ -863,65 +722,17 @@ fun RoomResultTab() {
|
|||||||
.background(AppColors.background)
|
.background(AppColors.background)
|
||||||
) {
|
) {
|
||||||
if (rooms.itemCount == 0 && model.showResult) {
|
if (rooms.itemCount == 0 && model.showResult) {
|
||||||
Column(
|
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
|
||||||
|
SearchPlaceholderContent(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(16.dp),
|
.padding(16.dp),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
isNetworkAvailable = isNetworkAvailable,
|
||||||
verticalArrangement = Arrangement.Center
|
onReload = {
|
||||||
) {
|
|
||||||
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(context)
|
|
||||||
|
|
||||||
if (isNetworkAvailable) {
|
|
||||||
androidx.compose.foundation.Image(
|
|
||||||
painter = painterResource(
|
|
||||||
id = if (AppState.darkMode) R.mipmap.syss_yh_qs_as_img
|
|
||||||
else R.mipmap.invalid_name_1
|
|
||||||
),
|
|
||||||
contentDescription = "No Result",
|
|
||||||
modifier = Modifier.size(140.dp)
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = "咦,什么都没找到...",
|
|
||||||
color = LocalAppTheme.current.text,
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.W600
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = "换个关键词试试吧,也许会有新发现!",
|
|
||||||
color = LocalAppTheme.current.secondaryText,
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.W400
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
androidx.compose.foundation.Image(
|
|
||||||
painter = painterResource(id = R.mipmap.invalid_name_10),
|
|
||||||
contentDescription = "network error",
|
|
||||||
modifier = Modifier.size(140.dp)
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.friend_chat_no_network_title),
|
|
||||||
color = LocalAppTheme.current.text,
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.W600
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.friend_chat_no_network_subtitle),
|
|
||||||
color = LocalAppTheme.current.secondaryText,
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.W400
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.size(16.dp))
|
|
||||||
ReloadButton(
|
|
||||||
onClick = {
|
|
||||||
SearchViewModel.ResetModel()
|
SearchViewModel.ResetModel()
|
||||||
SearchViewModel.search()
|
SearchViewModel.search()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
@@ -944,6 +755,55 @@ fun RoomResultTab() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun SearchPlaceholderContent(
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
|
isNetworkAvailable: Boolean,
|
||||||
|
onReload: () -> Unit
|
||||||
|
) {
|
||||||
|
val appColors = LocalAppTheme.current
|
||||||
|
Column(
|
||||||
|
modifier = modifier,
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
|
verticalArrangement = Arrangement.Center
|
||||||
|
) {
|
||||||
|
if (isNetworkAvailable) {
|
||||||
|
androidx.compose.foundation.Image(
|
||||||
|
painter = painterResource(id = R.mipmap.empty_img),
|
||||||
|
contentDescription = "No Comment",
|
||||||
|
modifier = Modifier.size(168.dp)
|
||||||
|
)
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.null_search),
|
||||||
|
color = appColors.text,
|
||||||
|
fontSize = 16.sp,
|
||||||
|
fontWeight = FontWeight.W600
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
androidx.compose.foundation.Image(
|
||||||
|
painter = painterResource(id = R.mipmap.invalid_name_10),
|
||||||
|
contentDescription = "network error",
|
||||||
|
modifier = Modifier.size(140.dp)
|
||||||
|
)
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.friend_chat_no_network_title),
|
||||||
|
color = appColors.text,
|
||||||
|
fontSize = 16.sp,
|
||||||
|
fontWeight = FontWeight.W600
|
||||||
|
)
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.friend_chat_no_network_subtitle),
|
||||||
|
color = appColors.secondaryText,
|
||||||
|
fontSize = 14.sp,
|
||||||
|
fontWeight = FontWeight.W400
|
||||||
|
)
|
||||||
|
Spacer(modifier = Modifier.size(16.dp))
|
||||||
|
ReloadButton(onClick = onReload)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ReloadButton(
|
fun ReloadButton(
|
||||||
onClick: () -> Unit
|
onClick: () -> Unit
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import androidx.compose.ui.platform.LocalContext
|
|||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
@@ -49,7 +50,7 @@ import com.aiosman.ravenow.utils.NetworkUtils
|
|||||||
import com.aiosman.ravenow.ui.network.ReloadButton
|
import com.aiosman.ravenow.ui.network.ReloadButton
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun LikeNoticeScreen() {
|
fun LikeNoticeScreen(includeStatusBarPadding: Boolean = true) {
|
||||||
val model = LikeNoticeViewModel
|
val model = LikeNoticeViewModel
|
||||||
val listState = rememberLazyListState()
|
val listState = rememberLazyListState()
|
||||||
var dataFlow = model.likeItemsFlow
|
var dataFlow = model.likeItemsFlow
|
||||||
@@ -63,7 +64,8 @@ fun LikeNoticeScreen() {
|
|||||||
|
|
||||||
StatusBarMaskLayout(
|
StatusBarMaskLayout(
|
||||||
darkIcons = !AppState.darkMode,
|
darkIcons = !AppState.darkMode,
|
||||||
maskBoxBackgroundColor = AppColors.background
|
maskBoxBackgroundColor = AppColors.background,
|
||||||
|
includeStatusBarPadding = includeStatusBarPadding
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -219,7 +221,14 @@ fun ActionPostNoticeItem(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
Text(nickName, fontWeight = FontWeight.Bold, fontSize = 16.sp, color = AppColors.text)
|
Text(
|
||||||
|
text = nickName,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
fontSize = 16.sp,
|
||||||
|
color = AppColors.text,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis
|
||||||
|
)
|
||||||
Spacer(modifier = Modifier.height(2.dp))
|
Spacer(modifier = Modifier.height(2.dp))
|
||||||
when (action) {
|
when (action) {
|
||||||
"like" -> Text(stringResource(R.string.like_your_post), color = AppColors.text)
|
"like" -> Text(stringResource(R.string.like_your_post), color = AppColors.text)
|
||||||
@@ -283,7 +292,14 @@ fun LikeCommentNoticeItem(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
) {
|
) {
|
||||||
Text(item.user.nickName, fontWeight = FontWeight.Bold, fontSize = 16.sp, color = AppColors.text)
|
Text(
|
||||||
|
text = item.user.nickName,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
fontSize = 16.sp,
|
||||||
|
color = AppColors.text,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis
|
||||||
|
)
|
||||||
Spacer(modifier = Modifier.height(2.dp))
|
Spacer(modifier = Modifier.height(2.dp))
|
||||||
Text(stringResource(R.string.like_your_comment), color = AppColors.text)
|
Text(stringResource(R.string.like_your_comment), color = AppColors.text)
|
||||||
Spacer(modifier = Modifier.height(2.dp))
|
Spacer(modifier = Modifier.height(2.dp))
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.ColorFilter
|
import androidx.compose.ui.graphics.ColorFilter
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
@@ -89,7 +90,7 @@ fun NotificationScreen() {
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.wrapContentHeight()
|
.wrapContentHeight()
|
||||||
.padding(start = 16.dp, top = 8.dp, bottom = 16.dp),
|
.padding(start = 16.dp, top = 8.dp),
|
||||||
horizontalArrangement = Arrangement.Start,
|
horizontalArrangement = Arrangement.Start,
|
||||||
verticalAlignment = Alignment.Bottom
|
verticalAlignment = Alignment.Bottom
|
||||||
) {
|
) {
|
||||||
@@ -135,9 +136,9 @@ fun NotificationScreen() {
|
|||||||
.weight(1f)
|
.weight(1f)
|
||||||
) { page ->
|
) { page ->
|
||||||
when (page) {
|
when (page) {
|
||||||
0 -> LikeNoticeScreen()
|
0 -> LikeNoticeScreen(includeStatusBarPadding = false)
|
||||||
1 -> FollowerNoticeScreen()
|
1 -> FollowerNoticeScreen(includeStatusBarPadding = false)
|
||||||
2 -> CommentNoticeScreen()
|
2 -> CommentNoticeScreen(includeStatusBarPadding = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -221,6 +221,8 @@
|
|||||||
<string name="add_memory">上部のボタンをクリックしてグループ記憶を追加してください</string>
|
<string name="add_memory">上部のボタンをクリックしてグループ記憶を追加してください</string>
|
||||||
<string name="recent_search">けんさくりれき</string>
|
<string name="recent_search">けんさくりれき</string>
|
||||||
<string name="people">人</string>
|
<string name="people">人</string>
|
||||||
|
<string name="paipai">Paip.ai</string>
|
||||||
|
<string name="null_search">まだここは空です</string>
|
||||||
|
|
||||||
<!-- Create Bottom Sheet -->
|
<!-- Create Bottom Sheet -->
|
||||||
<string name="create_title">作成</string>
|
<string name="create_title">作成</string>
|
||||||
|
|||||||
@@ -222,13 +222,14 @@
|
|||||||
<string name="no_drafts">暂无草稿</string>
|
<string name="no_drafts">暂无草稿</string>
|
||||||
<string name="only_save_the_last_5_drafts">仅保存最近5个草稿</string>
|
<string name="only_save_the_last_5_drafts">仅保存最近5个草稿</string>
|
||||||
<string name="recent_search">历史搜索</string>
|
<string name="recent_search">历史搜索</string>
|
||||||
|
<string name="null_search">这里还空着呢~</string>
|
||||||
<!-- Create Bottom Sheet -->
|
<!-- Create Bottom Sheet -->
|
||||||
<string name="create_title">创建</string>
|
<string name="create_title">创建</string>
|
||||||
<string name="create_ai">AI</string>
|
<string name="create_ai">AI</string>
|
||||||
<string name="create_group_chat_option">群聊</string>
|
<string name="create_group_chat_option">群聊</string>
|
||||||
<string name="create_moment">动态</string>
|
<string name="create_moment">动态</string>
|
||||||
<string name="create_close">关闭</string>
|
<string name="create_close">关闭</string>
|
||||||
|
<string name="paipai">派派</string>
|
||||||
|
|
||||||
<!-- Create Agent Page -->
|
<!-- Create Agent Page -->
|
||||||
<string name="welcome_1">你好呀!今天想创造什么?</string>
|
<string name="welcome_1">你好呀!今天想创造什么?</string>
|
||||||
|
|||||||
@@ -220,6 +220,8 @@
|
|||||||
<string name="add_memory">Click the button above to add group memory</string>
|
<string name="add_memory">Click the button above to add group memory</string>
|
||||||
<string name="recent_search">Recent Search</string>
|
<string name="recent_search">Recent Search</string>
|
||||||
<string name="people">people</string>
|
<string name="people">people</string>
|
||||||
|
<string name="paipai">Paip.ai</string>
|
||||||
|
<string name="null_search">It\'s still empty here</string>
|
||||||
|
|
||||||
<!-- Create Bottom Sheet -->
|
<!-- Create Bottom Sheet -->
|
||||||
<string name="create_title">Create</string>
|
<string name="create_title">Create</string>
|
||||||
@@ -347,7 +349,7 @@
|
|||||||
<!-- Side Menu -->
|
<!-- Side Menu -->
|
||||||
<string name="scan_qr">Scan QR</string>
|
<string name="scan_qr">Scan QR</string>
|
||||||
<string name="edit_profile_info">Edit Profile</string>
|
<string name="edit_profile_info">Edit Profile</string>
|
||||||
<string name="about_paipai">About Paipai</string>
|
<string name="about_paipai">About Paip.ai</string>
|
||||||
<string name="follow_system">Follow System</string>
|
<string name="follow_system">Follow System</string>
|
||||||
<string name="message_notification">Message Notification</string>
|
<string name="message_notification">Message Notification</string>
|
||||||
<string name="logout_confirm">Logout</string>
|
<string name="logout_confirm">Logout</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user