Skip to content

Commit

Permalink
feat: change desc
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Nov 3, 2024
1 parent 044ef9c commit db3be41
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
27 changes: 19 additions & 8 deletions app/src/main/kotlin/li/songe/gkd/ui/AdvancedPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,15 @@ fun AdvancedPage() {
color = MaterialTheme.colorScheme.primary,
)

SettingItem(
title = "快照记录" + (if (snapshotCount > 0) "-$snapshotCount" else ""),
onClick = {
navController.toDestinationsNavigator().navigate(SnapshotPageDestination)
}
)
if (snapshotCount > 0) {
SettingItem(
title = "快照记录",
subtitle = "存在 $snapshotCount 条记录",
onClick = {
navController.toDestinationsNavigator().navigate(SnapshotPageDestination)
}
)
}

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
val screenshotRunning by ScreenshotService.isRunning.collectAsState()
Expand Down Expand Up @@ -582,8 +585,16 @@ fun AdvancedPage() {
color = MaterialTheme.colorScheme.primary,
)

TextSwitch(title = "前台悬浮窗",
subtitle = "添加透明悬浮窗,关闭可能导致不点击/点击缓慢",
TextSwitch(
title = "前台悬浮窗",
subtitle = "添加透明悬浮窗",
suffix = "查看作用",
onSuffixClick = {
context.mainVm.dialogFlow.updateDialogOptions(
title = "悬浮窗作用",
text = "1.提高 GKD 前台优先级, 降低被系统杀死概率\n2.提高点击响应速度, 关闭后可能导致点击缓慢或不点击",
)
},
checked = store.enableAbFloatWindow,
onCheckedChange = {
storeFlow.value = store.copy(
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/kotlin/li/songe/gkd/ui/SlowGroupPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ fun SlowGroupPage() {
)
}
},
title = { Text(text = if (ruleSummary.slowGroupCount > 0) "缓慢查询-${ruleSummary.slowGroupCount}" else "缓慢查询") },
title = { Text(text = "缓慢查询") },
actions = {
IconButton(onClick = throttle {
context.mainVm.dialogFlow.updateDialogOptions(
title = "缓慢查询",
text = "任意单个规则同时满足以下 3 个条件即判定为缓慢查询\n\n1. 选择器右侧无法快速查询且不是主动查询, 或内部使用<<且无法快速查询\n2. preKeys 为空\n3. matchTime 为空或大于 10s",
text = "任意单个规则同时满足以下 3 个条件即判定为缓慢查询\n\n1. 选择器右侧无法快速查询且不是主动查询, 或内部使用<<且无法快速查询\n2. preKeys 为空\n3. matchTime 为空或大于 10s\n\n缓慢查询可能导致触发缓慢或更多耗电",
)
}) {
Icon(Icons.Outlined.Info, contentDescription = null)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/kotlin/li/songe/gkd/ui/SnapshotPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ fun SnapshotPage() {
)
}
},
title = { Text(text = if (snapshots.isEmpty()) "快照记录" else "快照记录-${snapshots.size}") },
title = { Text(text = "快照记录") },
actions = {
if (snapshots.isNotEmpty()) {
IconButton(onClick = throttle(fn = vm.viewModelScope.launchAsFn(Dispatchers.IO) {
context.mainVm.dialogFlow.waitResult(
title = "删除记录",
text = "确定删除全部快照记录?",
text = "确定删除全部 ${snapshots.size} 条快照记录?",
error = true,
)
snapshots.forEach { s ->
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/kotlin/li/songe/gkd/ui/home/ControlPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ fun useControlPage(): ScaffoldExt {

if (ruleSummary.slowGroupCount > 0) {
SettingItem(
title = "耗时查询-${ruleSummary.slowGroupCount}",
subtitle = "可能导致触发缓慢或更多耗电",
title = "缓慢查询",
subtitle = "存在 ${ruleSummary.slowGroupCount} 条记录",
onClick = {
navController.toDestinationsNavigator().navigate(SlowGroupPageDestination)
}
Expand Down

0 comments on commit db3be41

Please sign in to comment.