diff --git a/app/src/main/kotlin/com/zjutjh/ijh/ui/component/CampusCardInfoCard.kt b/app/src/main/kotlin/com/zjutjh/ijh/ui/component/CampusCardInfoCard.kt index f03073a..c628a69 100644 --- a/app/src/main/kotlin/com/zjutjh/ijh/ui/component/CampusCardInfoCard.kt +++ b/app/src/main/kotlin/com/zjutjh/ijh/ui/component/CampusCardInfoCard.kt @@ -72,7 +72,7 @@ fun CampusCardInfoCard( modifier = Modifier.padding(vertical = 8.dp), color = MaterialTheme.colorScheme.primary, text = text, - style = MaterialTheme.typography.displaySmall, + style = MaterialTheme.typography.headlineLarge, textAlign = TextAlign.Center, maxLines = 1, ) diff --git a/app/src/main/kotlin/com/zjutjh/ijh/ui/component/ElectricityStatusCard.kt b/app/src/main/kotlin/com/zjutjh/ijh/ui/component/ElectricityStatusCard.kt index b828236..cfc5a08 100644 --- a/app/src/main/kotlin/com/zjutjh/ijh/ui/component/ElectricityStatusCard.kt +++ b/app/src/main/kotlin/com/zjutjh/ijh/ui/component/ElectricityStatusCard.kt @@ -11,7 +11,7 @@ import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext @@ -33,8 +33,11 @@ fun ElectricityStatusCard( balance: LoadResult, ) { val context = LocalContext.current - val subtitle = remember(balance) { - prompt(context, if (balance is LoadResult.Loading) null else LocalDateTime.now()) + val subtitle = rememberSaveable(balance) { + prompt( + context, + if (balance is LoadResult.Ready && balance.data != null) LocalDateTime.now() else null + ) } GlanceCard( @@ -73,7 +76,7 @@ fun ElectricityStatusCard( modifier = Modifier.padding(vertical = 8.dp), color = MaterialTheme.colorScheme.primary, text = text, - style = MaterialTheme.typography.displaySmall, + style = MaterialTheme.typography.headlineLarge, textAlign = TextAlign.Center, ) } diff --git a/app/src/main/kotlin/com/zjutjh/ijh/ui/component/GlanceCard.kt b/app/src/main/kotlin/com/zjutjh/ijh/ui/component/GlanceCard.kt index ca3c42b..73505c4 100644 --- a/app/src/main/kotlin/com/zjutjh/ijh/ui/component/GlanceCard.kt +++ b/app/src/main/kotlin/com/zjutjh/ijh/ui/component/GlanceCard.kt @@ -51,12 +51,12 @@ internal fun GlanceCard( IconText( icon = icon, text = " | $title", - style = MaterialTheme.typography.headlineMedium, + style = MaterialTheme.typography.headlineSmall, fontWeight = FontWeight.Bold, ) else Text( text = title, - style = MaterialTheme.typography.headlineMedium, + style = MaterialTheme.typography.headlineSmall, fontWeight = FontWeight.Bold, maxLines = 1, ) @@ -65,7 +65,6 @@ internal fun GlanceCard( Text( text = subtitle, style = MaterialTheme.typography.titleSmall, - color = MaterialTheme.colorScheme.outline, maxLines = 1, ) } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 8bf2dc5..00594f0 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -65,7 +65,7 @@ 图书馆账号 易校园账号 关于 - 客户端由 [dev] 开发,服务由 [serv] 提供。 + [dev] 开发,并基于 [serv] 服务。 今日课程 更多 余额 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8092c72..5c34283 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -64,7 +64,7 @@ Library Account YXY Account About - Client is developed by [dev], \nService is provided by [serv]. + Developer: [dev];\nServices provider: [serv]. IInfo WeJH https://github.com/I-Info