diff --git a/web/App.vue b/web/App.vue index d1c1b21..bab9f07 100644 --- a/web/App.vue +++ b/web/App.vue @@ -100,6 +100,17 @@ 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)['store-selected'] !== false +}) + async function undo() { if (busyAct.value) return busyAct.value = true @@ -379,7 +390,11 @@ const current = computed(() => NAV.find((n) => n.key === active.value))