Add KPM module count display to the main page and update related string resources

This commit is contained in:
ShirkNeko
2025-04-01 17:24:13 +08:00
parent e5f5b8f831
commit a45e0f78ef
3 changed files with 8 additions and 1 deletions

View File

@@ -333,6 +333,12 @@ private fun StatusCard(
text = stringResource(R.string.home_module_count, getModuleCount()), text = stringResource(R.string.home_module_count, getModuleCount()),
style = MaterialTheme.typography.bodyMedium style = MaterialTheme.typography.bodyMedium
) )
Spacer(modifier = Modifier.height(4.dp))
Text(
text = stringResource(R.string.home_kpm_module_count, getKpmModuleCount()),
style = MaterialTheme.typography.bodyMedium
)
Spacer(modifier = Modifier.height(4.dp)) Spacer(modifier = Modifier.height(4.dp))
val suSFS = getSuSFS() val suSFS = getSuSFS()
@@ -556,7 +562,6 @@ private fun InfoCard() {
if (!isSimpleMode){ if (!isSimpleMode){
Spacer(Modifier.height(16.dp))
val kpmVersion = getKpmVersion() val kpmVersion = getKpmVersion()
val displayVersion = if (kpmVersion.isEmpty() || kpmVersion.startsWith("Error")) { val displayVersion = if (kpmVersion.isEmpty() || kpmVersion.startsWith("Error")) {
stringResource(R.string.not_supported) stringResource(R.string.not_supported)

View File

@@ -239,6 +239,7 @@
<string name="kpm_control_success">成功</string> <string name="kpm_control_success">成功</string>
<string name="kpm_control_failed">错误</string> <string name="kpm_control_failed">错误</string>
<string name="not_supported">不支持</string> <string name="not_supported">不支持</string>
<string name="home_kpm_module_count">kpm模块数</string>
<string name="kernel_module_notice">以下内核模块功能由KernelPatch开发经过修改后加入SukiSU Ultra的内核模块功能</string> <string name="kernel_module_notice">以下内核模块功能由KernelPatch开发经过修改后加入SukiSU Ultra的内核模块功能</string>
<string name="home_ContributionCard_kernelsu">SukiSU Ultra展望</string> <string name="home_ContributionCard_kernelsu">SukiSU Ultra展望</string>
<string name="home_click_to_ContributionCard_kernelsu">SukiSU Ultra未来将会成为一个相对独立的KSU分支但是依然感谢官方KernelSU和MKSU等做出的贡献</string> <string name="home_click_to_ContributionCard_kernelsu">SukiSU Ultra未来将会成为一个相对独立的KSU分支但是依然感谢官方KernelSU和MKSU等做出的贡献</string>

View File

@@ -245,4 +245,5 @@
<string name="kpm_control_failed">failed</string> <string name="kpm_control_failed">failed</string>
<string name="home_click_to_ContributionCard_kernelsu">SukiSU Ultra will be a relatively independent branch of KSU in the future, but thanks to 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 thanks to the official KernelSU and MKSU etc. for their contributions!</string>
<string name="not_supported">unsupported</string> <string name="not_supported">unsupported</string>
<string name="home_kpm_module_count">Number of kpm modules</string>
</resources> </resources>