@@ -210,24 +210,36 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加简洁模块开关
|
var isExpanded by remember { mutableStateOf(false) }
|
||||||
SwitchItem(
|
|
||||||
icon = Icons.Filled.FormatPaint,
|
|
||||||
title = stringResource(R.string.simple_mode),
|
|
||||||
summary = stringResource(R.string.simple_mode_summary),
|
|
||||||
checked = isSimpleMode
|
|
||||||
) {
|
|
||||||
onSimpleModeChange(it)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 隐藏内核部分版本号
|
ListItem(
|
||||||
SwitchItem(
|
leadingContent = { Icon(Icons.Filled.FormatPaint, null) },
|
||||||
icon = Icons.Filled.FormatPaint,
|
headlineContent = { Text(stringResource(R.string.more_settings_simplicity_mode)) },
|
||||||
title = stringResource(R.string.hide_kernel_kernelsu_version),
|
modifier = Modifier.clickable {
|
||||||
summary = stringResource(R.string.hide_kernel_kernelsu_version_summary),
|
isExpanded = !isExpanded
|
||||||
checked = isHideVersion
|
}
|
||||||
) {
|
)
|
||||||
onHideVersionChange(it)
|
|
||||||
|
if (isExpanded) {
|
||||||
|
// 添加简洁模块开关
|
||||||
|
SwitchItem(
|
||||||
|
icon = Icons.Filled.Brush,
|
||||||
|
title = stringResource(R.string.simple_mode),
|
||||||
|
summary = stringResource(R.string.simple_mode_summary),
|
||||||
|
checked = isSimpleMode
|
||||||
|
) {
|
||||||
|
onSimpleModeChange(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 隐藏内核部分版本号
|
||||||
|
SwitchItem(
|
||||||
|
icon = Icons.Filled.VisibilityOff,
|
||||||
|
title = stringResource(R.string.hide_kernel_kernelsu_version),
|
||||||
|
summary = stringResource(R.string.hide_kernel_kernelsu_version_summary),
|
||||||
|
checked = isHideVersion
|
||||||
|
) {
|
||||||
|
onHideVersionChange(it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// region SUSFS 配置(仅在支持时显示)
|
// region SUSFS 配置(仅在支持时显示)
|
||||||
|
|||||||
@@ -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) =
|
||||||
|
|||||||
@@ -244,7 +244,8 @@
|
|||||||
<string name="kpm_invalid_file">KPM 文件无效</string>
|
<string name="kpm_invalid_file">KPM 文件无效</string>
|
||||||
<string name="kernel_patched">内核未进行补丁</string>
|
<string name="kernel_patched">内核未进行补丁</string>
|
||||||
<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 分支,但是依然感谢官方 KernelSU 和 MKSU 等做出的贡献</string>
|
<string name="home_click_to_ContributionCard_kernelsu">SukiSU Ultra未来将会成为一个相对独立的KSU分支,但是依然感谢官方KernelSU和MKSU等做出的贡献</string>
|
||||||
|
<string name="more_settings_simplicity_mode">简洁模式</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user