feat(enhance): warn when extensions write app-owned keys

This commit is contained in:
wonfen
2026-09-21 21:22:45 +08:00
parent 07825afb1e
commit 7bf8e1dcf5
23 changed files with 153 additions and 7 deletions
@@ -1,4 +1,5 @@
import {
takeDiscardedKeysNotice,
takeDnsOverrideNotice,
takeServiceFallbackNotice,
} from '@/services/cmds'
@@ -55,6 +56,22 @@ export const handleNoticeMessage = (
console.error('Failed to read the pending DNS override notice', error)
})
},
'enhance::discarded_keys': () => {
void takeDiscardedKeysNotice()
.then((keys) => {
if (keys) {
showNotice.warning('profiles.page.feedback.notices.discardedKeys', {
keys,
})
}
})
.catch((error) => {
console.error(
'Failed to read the pending discarded keys notice',
error,
)
})
},
'tun_mode::auto_disabled': () =>
showNotice.info(
'settings.sections.system.notifications.tunMode.autoDisabled',