Compare commits
2
Commits
76990f2c41
...
d317ede90d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d317ede90d | ||
|
|
c326b11163 |
@@ -86,6 +86,15 @@ fun AboutScreen(
|
||||
|
||||
Spacer(modifier = Modifier.height(48.dp))
|
||||
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(R.string.author_homepage)) },
|
||||
supportingContent = { Text(stringResource(R.string.author_handle)) },
|
||||
modifier = Modifier.clickable {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://airnan.cn"))
|
||||
context.startActivity(intent)
|
||||
}
|
||||
)
|
||||
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(R.string.source_code)) },
|
||||
supportingContent = { Text(stringResource(R.string.view_on_gitea)) },
|
||||
@@ -97,6 +106,7 @@ fun AboutScreen(
|
||||
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(R.string.open_source_licenses)) },
|
||||
supportingContent = { Text(stringResource(R.string.licenses_desc)) },
|
||||
modifier = Modifier.clickable { onNavigateToLicenses() }
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
package cn.airnan.a2fair.ui.settings
|
||||
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
|
||||
@@ -137,12 +137,7 @@ fun TokensScreen(
|
||||
)
|
||||
} else {
|
||||
MediumFlexibleTopAppBar(
|
||||
title = { Text(stringResource(R.string.tokens)) },
|
||||
actions = {
|
||||
IconButton(onClick = { isSearchExpanded = true }) {
|
||||
Icon(Icons.Default.Search, contentDescription = stringResource(R.string.search))
|
||||
}
|
||||
},
|
||||
title = { Text(stringResource(R.string.app_name)) },
|
||||
scrollBehavior = scrollBehavior
|
||||
)
|
||||
}
|
||||
@@ -158,6 +153,33 @@ fun TokensScreen(
|
||||
.fillMaxSize()
|
||||
.padding(padding)
|
||||
) {
|
||||
if (!isSearchExpanded) {
|
||||
Surface(
|
||||
shape = MaterialTheme.shapes.extraLarge,
|
||||
color = MaterialTheme.colorScheme.surfaceContainerHigh,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp, vertical = 4.dp)
|
||||
.clickable { isSearchExpanded = true }
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 14.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.Search,
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
)
|
||||
Spacer(modifier = Modifier.width(12.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.search_tokens),
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
val latestUiState by rememberUpdatedState(uiState)
|
||||
if (uiState.groupedTokens.isEmpty()) {
|
||||
if (uiState.searchQuery.isBlank()) {
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
<string name="backup_restore">备份与恢复</string>
|
||||
<string name="theme">主题</string>
|
||||
<string name="about">关于</string>
|
||||
<string name="author_homepage">作者主页</string>
|
||||
<string name="author_handle">@码农阿楠</string>
|
||||
|
||||
<!-- Security Settings -->
|
||||
<string name="app_lock_pin">应用锁 PIN 码</string>
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
<string name="backup_restore">Backup & Restore</string>
|
||||
<string name="theme">Theme</string>
|
||||
<string name="about">About</string>
|
||||
<string name="author_homepage">Author homepage</string>
|
||||
<string name="author_handle">@Airnan</string>
|
||||
|
||||
<!-- Security Settings -->
|
||||
<string name="app_lock_pin">App Lock PIN</string>
|
||||
|
||||
Reference in New Issue
Block a user