侧栏的重启确认文案改成和仪表盘同一句
同一个动作两处入口不该说两种话。上一提交按配置动态措辞的那套撤掉。
This commit is contained in:
+2
-16
@@ -100,17 +100,6 @@ const busyAct = ref(false)
|
||||
const historyOpen = ref(false)
|
||||
const askRestart = ref(false)
|
||||
|
||||
/**
|
||||
* 重启后各组选中的线路能不能找回来:内核把选中记在缓存文件里,由
|
||||
* profile.store-selected 控制,默认开(config.go:576),显式写 false 才会丢。
|
||||
* 按用户的配置说话,不把配置项名字甩给他。
|
||||
*/
|
||||
const keepsSelection = computed(() => {
|
||||
const profile = snapshot.value?.data.profile
|
||||
if (typeof profile !== 'object' || profile === null || Array.isArray(profile)) return true
|
||||
return (profile as Record<string, unknown>)['store-selected'] !== false
|
||||
})
|
||||
|
||||
async function undo() {
|
||||
if (busyAct.value) return
|
||||
busyAct.value = true
|
||||
@@ -388,13 +377,10 @@ const current = computed(() => NAV.find((n) => n.key === active.value))
|
||||
|
||||
<HistoryDialog :open="historyOpen" @close="historyOpen = false" @restored="load" />
|
||||
|
||||
<!-- 文案与仪表盘的重启确认一致,同一件事不说两种话 -->
|
||||
<ConfirmDialog
|
||||
:open="askRestart"
|
||||
:message="
|
||||
keepsSelection
|
||||
? '重启内核进程?所有连接会断开,几秒后自动恢复;各组选中的线路由内核记住,重启后不变。'
|
||||
: '重启内核进程?所有连接会断开,几秒后自动恢复;这份配置关闭了记住选中(store-selected: false),各组会回到默认成员。'
|
||||
"
|
||||
message="重启内核会断开它当前的所有连接,几秒后自动恢复。"
|
||||
action="重启"
|
||||
@close="askRestart = false"
|
||||
@confirm="restartConfirmed"
|
||||
|
||||
Reference in New Issue
Block a user