Optimize the display logic of reboot drop down menu items

This commit is contained in:
ShirkNeko
2025-06-01 02:27:55 +08:00
parent 3c353e8f88
commit dd1d17d2cf
3 changed files with 6 additions and 13 deletions

View File

@@ -277,16 +277,9 @@ fun UpdateCard() {
@Composable @Composable
fun RebootDropdownItem(@StringRes id: Int, reason: String = "") { fun RebootDropdownItem(@StringRes id: Int, reason: String = "") {
DropdownMenuItem( DropdownMenuItem(
text = { Text(stringResource(id)) }, text = {Text(stringResource(id))},
onClick = { reboot(reason) }, onClick = {reboot(reason)})
leadingIcon = {
Icon(
imageVector = Icons.Filled.Refresh,
contentDescription = null,
)
} }
)
}
@OptIn(ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)
@Composable @Composable

View File

@@ -276,7 +276,7 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
text = { Text(stringResource(R.string.backup_modules)) }, text = { Text(stringResource(R.string.backup_modules)) },
leadingIcon = { leadingIcon = {
Icon( Icon(
imageVector = Icons.Outlined.Download, imageVector = Icons.Outlined.Save,
contentDescription = stringResource(R.string.backup), contentDescription = stringResource(R.string.backup),
) )
}, },
@@ -289,7 +289,7 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
text = { Text(stringResource(R.string.restore_modules)) }, text = { Text(stringResource(R.string.restore_modules)) },
leadingIcon = { leadingIcon = {
Icon( Icon(
imageVector = Icons.Outlined.Refresh, imageVector = Icons.Outlined.RestoreFromTrash,
contentDescription = stringResource(R.string.restore), contentDescription = stringResource(R.string.restore),
) )
}, },

View File

@@ -247,7 +247,7 @@
<string name="home_click_to_ContributionCard_kernelsu">SukiSU Ultra will be a relatively independent branch of KSU in the future, but we still appreciate the official KernelSU and MKSU etc. for their contributions!</string> <string name="home_click_to_ContributionCard_kernelsu">SukiSU Ultra will be a relatively independent branch of KSU in the future, but we still appreciate the official KernelSU and MKSU etc. for their contributions!</string>
<string name="not_supported">Unsupported</string> <string name="not_supported">Unsupported</string>
<string name="supported">Supported</string> <string name="supported">Supported</string>
<string name="home_kpm_module">"Number of KPM modules: %d "</string> <string name="home_kpm_module">"Number of KPMs: %d "</string>
<string name="kpm_invalid_file">Invalid KPM file</string> <string name="kpm_invalid_file">Invalid KPM file</string>
<string name="kernel_patched">Kernel not patched</string> <string name="kernel_patched">Kernel not patched</string>
<string name="kernel_not_enabled">Kernel not configured</string> <string name="kernel_not_enabled">Kernel not configured</string>