mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: 中二通事
This commit is contained in:
parent
780f3577a5
commit
ae663e6b2e
@ -120,6 +120,7 @@ private fun AppMainView() {
|
||||
val coreVersion = remember { mutableStateOf(getShamrockVersion(context)) }
|
||||
val coreName = remember { mutableStateOf("Xposed") }
|
||||
val voiceSwitch = remember { mutableStateOf(false) }
|
||||
@Suppress("LocalVariableName") val LocalString = LocalString
|
||||
|
||||
if (!AppRuntime.isInit) {
|
||||
AppRuntime.state = remember {
|
||||
@ -140,7 +141,7 @@ private fun AppMainView() {
|
||||
mutableStateOf("2854200454")
|
||||
}
|
||||
it.nick = remember {
|
||||
mutableStateOf("测试昵称")
|
||||
mutableStateOf(LocalString.testName)
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,13 +151,12 @@ private fun AppMainView() {
|
||||
}
|
||||
|
||||
val ctx = LocalContext.current
|
||||
@Suppress("LocalVariableName") val LocalString = LocalString
|
||||
LaunchedEffect(isFined.value) {
|
||||
if (isFined.value) {
|
||||
AppRuntime.log("日志框架激活成功,开放操作许可。")
|
||||
AppRuntime.log(LocalString.logCentralLoadSuccessfully)
|
||||
Toast.makeText(ctx, LocalString.frameworkYes, Toast.LENGTH_SHORT).show()
|
||||
} else {
|
||||
AppRuntime.log("日志框架处于未激活状态,请检查。")
|
||||
AppRuntime.log(LocalString.logCentralLoadFailed)
|
||||
Toast.makeText(ctx, LocalString.frameworkNo, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ import moe.fuqiuluo.shamrock.ui.app.AppRuntime
|
||||
import moe.fuqiuluo.shamrock.ui.app.Level
|
||||
import moe.fuqiuluo.shamrock.ui.app.ShamrockConfig
|
||||
import moe.fuqiuluo.shamrock.ui.theme.GlobalColor
|
||||
import moe.fuqiuluo.shamrock.ui.theme.LocalString
|
||||
import moe.fuqiuluo.shamrock.ui.theme.ThemeColor
|
||||
import moe.fuqiuluo.shamrock.ui.tools.InputDialog
|
||||
|
||||
@ -70,7 +71,7 @@ fun DashboardFragment(
|
||||
AccountCard(nick, uin)
|
||||
InformationCard(ctx)
|
||||
APIInfoCard(ctx)
|
||||
FunctionCard(scope, ctx, "功能设置")
|
||||
FunctionCard(scope, ctx, LocalString.functionSetting)
|
||||
SSLCard(ctx)
|
||||
}
|
||||
}
|
||||
@ -80,7 +81,7 @@ private fun SSLCard(ctx: Context) {
|
||||
ActionBox(
|
||||
modifier = Modifier.padding(top = 12.dp),
|
||||
painter = painterResource(id = R.drawable.baseline_security_24),
|
||||
title = "SSL配置"
|
||||
title = LocalString.sslSetting
|
||||
) {
|
||||
Column {
|
||||
Divider(
|
||||
|
@ -47,10 +47,11 @@ fun LabFragment() {
|
||||
}
|
||||
NoticeTextDialog(
|
||||
openDialog = showNoticeDialog,
|
||||
title = "温馨提示",
|
||||
text = "实验室功能会导致一些奇怪的问题,请谨慎使用!"
|
||||
title = LocalString.warnTitle,
|
||||
text = LocalString.labWarning
|
||||
)
|
||||
|
||||
val LocalString = LocalString
|
||||
ActionBox(
|
||||
modifier = Modifier.padding(top = 12.dp),
|
||||
painter = painterResource(id = R.drawable.baseline_preview_24),
|
||||
@ -64,19 +65,19 @@ fun LabFragment() {
|
||||
)
|
||||
|
||||
Function(
|
||||
title = "中二病模式",
|
||||
desc = "也许会导致奇怪的问题,大抵就是你看不懂罢了。",
|
||||
title = LocalString.b2Mode,
|
||||
desc = LocalString.b2ModeDesc,
|
||||
descColor = it,
|
||||
isSwitch = ShamrockConfig.is2B(ctx)
|
||||
) {
|
||||
ShamrockConfig.set2B(ctx, it)
|
||||
scope.toast(ctx, "重启生效哦!")
|
||||
scope.toast(ctx, LocalString.restartToast)
|
||||
return@Function true
|
||||
}
|
||||
|
||||
Function(
|
||||
title = "显示调试日志",
|
||||
desc = "会导致日志刷屏。",
|
||||
title = LocalString.showDebugLog,
|
||||
desc = LocalString.showDebugLogDesc,
|
||||
descColor = it,
|
||||
isSwitch = ShamrockConfig.isDebug(ctx)
|
||||
) {
|
||||
@ -86,8 +87,8 @@ fun LabFragment() {
|
||||
}
|
||||
|
||||
Function(
|
||||
title = "防止调用栈检测",
|
||||
desc = "防止QQ进行堆栈跟踪检测,需要重新启动QQ。",
|
||||
title = LocalString.antiTrace,
|
||||
desc = LocalString.antiTraceDesc,
|
||||
descColor = it,
|
||||
isSwitch = ShamrockConfig.isAntiTrace(ctx)
|
||||
) {
|
||||
@ -110,6 +111,7 @@ fun LabFragment() {
|
||||
thickness = 0.2.dp
|
||||
)
|
||||
|
||||
/*
|
||||
Function(
|
||||
title = "自动清理QQ垃圾",
|
||||
desc = "也许会导致奇怪的问题(无效)。",
|
||||
@ -119,11 +121,11 @@ fun LabFragment() {
|
||||
ShamrockConfig.setAutoClean(ctx, it)
|
||||
ShamrockConfig.pushUpdate(ctx)
|
||||
return@Function false
|
||||
}
|
||||
}*/
|
||||
|
||||
Function(
|
||||
title = "拦截QQ无用收包",
|
||||
desc = "测试阶段,可能导致网络异常或掉线。",
|
||||
title = LocalString.injectPacket,
|
||||
desc = LocalString.injectPacketDesc,
|
||||
descColor = color,
|
||||
isSwitch = ShamrockConfig.isInjectPacket(ctx)
|
||||
) {
|
||||
@ -156,13 +158,13 @@ fun LabFragment() {
|
||||
ctx.getSharedPreferences("shared_config", Context.MODE_WORLD_READABLE)
|
||||
}.onSuccess {
|
||||
Function(
|
||||
title = "免死金牌",
|
||||
desc = "由系统复活QQ和Shamrock,需要重新启动系统。",
|
||||
title = LocalString.persistentText,
|
||||
desc = LocalString.persistentTextDesc,
|
||||
descColor = color,
|
||||
isSwitch = it.getBoolean("persistent", false)
|
||||
) { v ->
|
||||
it.edit().putBoolean("persistent", v).apply()
|
||||
scope.toast(ctx, "重启系统生效哦!")
|
||||
scope.toast(ctx, LocalString.restartToast)
|
||||
return@Function true
|
||||
}
|
||||
}.onFailure {
|
||||
|
@ -69,6 +69,24 @@ private open class Chūnibyō: Default() {
|
||||
"执明起,至除免于灾祸。\n" +
|
||||
"元冥浩浩,非凡不可动之。"
|
||||
labWarning = "寒酥降矣,梅熟日久,莫不可测。"
|
||||
logTitle = "无极"
|
||||
testName = "未名之人"
|
||||
logCentralLoadSuccessfully = "无极开,天地始纷争。"
|
||||
logCentralLoadFailed = "无极闭,天地始归宁。"
|
||||
functionSetting = "天地法则"
|
||||
sslSetting = "天行御令"
|
||||
warnTitle = "仙人指路"
|
||||
b2Mode = "通仙之路"
|
||||
b2ModeDesc = "凡人勿近"
|
||||
restartToast = "复关喏哉!"
|
||||
showDebugLog = "窥探天机"
|
||||
showDebugLogDesc = "迷失自我,走火入魔"
|
||||
antiTrace = "鬼影迷踪"
|
||||
antiTraceDesc = "唐门绝学,已有取死之道"
|
||||
injectPacket = "遮匿无用之禀"
|
||||
injectPacketDesc = "试于试之,逆则魂飞魄散"
|
||||
persistentText = "丹书铁券"
|
||||
persistentTextDesc = ""
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,7 +102,24 @@ private open class Default: VarString(
|
||||
"同时声明本项目仅用于学习与交流,请于24小时内删除。\n" +
|
||||
"同时开源贡献者均享受免责条例。",
|
||||
labWarning = "实验室功能,可能会导致出乎意料的BUG!",
|
||||
"日志"
|
||||
logTitle = "日志",
|
||||
testName = "测试昵称",
|
||||
logCentralLoadSuccessfully = "日志框架激活成功,开放操作许可。",
|
||||
logCentralLoadFailed = "日志框架处于未激活状态,请检查。",
|
||||
functionSetting = "功能设置",
|
||||
sslSetting = "SSL配置",
|
||||
warnTitle = "温馨提示",
|
||||
b2Mode = "中二病模式",
|
||||
b2ModeDesc = "也许会导致奇怪的问题,大抵就是你看不懂罢了。",
|
||||
restartToast = "重启生效哦!",
|
||||
showDebugLog = "显示调试日志",
|
||||
showDebugLogDesc = "会导致日志刷屏。",
|
||||
antiTrace = "防止调用栈检测",
|
||||
antiTraceDesc = "防止QQ进行堆栈跟踪检测,需要重新启动QQ。",
|
||||
injectPacket = "拦截QQ无用收包",
|
||||
injectPacketDesc = "测试阶段,可能导致网络异常或掉线。",
|
||||
persistentText = "免死金牌",
|
||||
persistentTextDesc = "由天地之起也,须复动之。"
|
||||
)
|
||||
|
||||
open class VarString(
|
||||
@ -99,5 +134,32 @@ open class VarString(
|
||||
|
||||
var labWarning: String,
|
||||
|
||||
var logTitle: String
|
||||
var logTitle: String,
|
||||
|
||||
var testName: String,
|
||||
|
||||
var logCentralLoadSuccessfully: String,
|
||||
var logCentralLoadFailed: String,
|
||||
|
||||
var functionSetting: String,
|
||||
var sslSetting: String,
|
||||
|
||||
var warnTitle: String,
|
||||
|
||||
var b2Mode: String,
|
||||
var b2ModeDesc: String,
|
||||
|
||||
var restartToast: String,
|
||||
|
||||
var showDebugLog: String,
|
||||
var showDebugLogDesc: String,
|
||||
|
||||
var antiTrace: String,
|
||||
var antiTraceDesc: String,
|
||||
|
||||
var injectPacket: String,
|
||||
var injectPacketDesc: String,
|
||||
|
||||
var persistentText: String,
|
||||
var persistentTextDesc: String
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user