Merge pull request #19 from ShirkNeko/dev

Dev
This commit is contained in:
ShirkNeko
2025-04-03 23:34:01 +08:00
committed by GitHub
4 changed files with 49 additions and 20 deletions

View File

@@ -210,9 +210,20 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
} }
} }
var isExpanded by remember { mutableStateOf(false) }
ListItem(
leadingContent = { Icon(Icons.Filled.FormatPaint, null) },
headlineContent = { Text(stringResource(R.string.more_settings_simplicity_mode)) },
modifier = Modifier.clickable {
isExpanded = !isExpanded
}
)
if (isExpanded) {
// 添加简洁模块开关 // 添加简洁模块开关
SwitchItem( SwitchItem(
icon = Icons.Filled.FormatPaint, icon = Icons.Filled.Brush,
title = stringResource(R.string.simple_mode), title = stringResource(R.string.simple_mode),
summary = stringResource(R.string.simple_mode_summary), summary = stringResource(R.string.simple_mode_summary),
checked = isSimpleMode checked = isSimpleMode
@@ -222,13 +233,14 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
// 隐藏内核部分版本号 // 隐藏内核部分版本号
SwitchItem( SwitchItem(
icon = Icons.Filled.FormatPaint, icon = Icons.Filled.VisibilityOff,
title = stringResource(R.string.hide_kernel_kernelsu_version), title = stringResource(R.string.hide_kernel_kernelsu_version),
summary = stringResource(R.string.hide_kernel_kernelsu_version_summary), summary = stringResource(R.string.hide_kernel_kernelsu_version_summary),
checked = isHideVersion checked = isHideVersion
) { ) {
onHideVersionChange(it) onHideVersionChange(it)
} }
}
// region SUSFS 配置(仅在支持时显示) // region SUSFS 配置(仅在支持时显示)
val suSFS = getSuSFS() val suSFS = getSuSFS()

View File

@@ -19,6 +19,9 @@ import shirkneko.zako.sukisu.ui.util.listModules
import shirkneko.zako.sukisu.ui.util.withNewRootShell import shirkneko.zako.sukisu.ui.util.withNewRootShell
import org.json.JSONArray import org.json.JSONArray
import org.json.JSONObject import org.json.JSONObject
import shirkneko.zako.sukisu.ui.util.KsuCli
import shirkneko.zako.sukisu.ui.util.controlKpmModule
import shirkneko.zako.sukisu.ui.util.listKpmModules
import java.io.File import java.io.File
import java.util.concurrent.CompletableFuture import java.util.concurrent.CompletableFuture
@@ -197,6 +200,18 @@ class WebViewInterface(
} }
return currentModuleInfo.toString() return currentModuleInfo.toString()
} }
// =================== KPM支持 =============================
@JavascriptInterface
fun listAllKpm() : String {
return listKpmModules()
}
@JavascriptInterface
fun controlKpm(name: String, args: String) : Int {
return controlKpmModule(name, args)
}
} }
fun hideSystemUI(window: Window) = fun hideSystemUI(window: Window) =

View File

@@ -246,5 +246,6 @@
<string name="kernel_not_enabled">内核未配置</string> <string name="kernel_not_enabled">内核未配置</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 未来将会成为一个相对独立的 KernelSU 分支,但是依然感谢官方 KernelSUMKSU 等做出的贡献</string> <string name="home_click_to_ContributionCard_kernelsu">SukiSU Ultra未来将会成为一个相对独立的KSU分支但是依然感谢官方KernelSUMKSU等做出的贡献</string>
<string name="more_settings_simplicity_mode">简洁模式</string>
</resources> </resources>

View File

@@ -250,4 +250,5 @@
<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>
<string name="more_settings_simplicity_mode">simplicity mode</string>
</resources> </resources>