fix(ui): 页内确认框替代阻塞式 window.confirm(设置/备份/诊断 6 处);打包前强制 lint(防未定义变量再溜进包)
Verify (Gitea) / gate (build · unit · facts) (push) Successful in 1m29s
Verify (Gitea) / gate (build · unit · facts) (push) Successful in 1m29s
This commit is contained in:
1 parent
a625faab17
commit
dd15a7d45f
11 files changed
+108
-18
No files matched your search
@@ -70,6 +70,7 @@
|
||||
"workspace-purge.js",
|
||||
"generation-provider-ping.js",
|
||||
"ui-canvas-view.js",
|
||||
"ui-confirm.js",
|
||||
"ui-settings-sections.js",
|
||||
"ui-settings-tab-diag.js",
|
||||
"ui-settings-modal.js",
|
||||
|
||||
@@ -2780,7 +2780,8 @@ const nodeXY = (el0) => {
|
||||
&& missPaths.some((m) => /口令|Token/.test(m.label || ''))
|
||||
&& missPaths.every((m) => typeof m.path === 'string' && m.path && typeof m.label === 'string' && m.label)
|
||||
&& /cfgMissingKeep = \(r && r\.missingKeep\) \|\| \[\]/.test(appAllSrc)
|
||||
&& /window\.confirm\(keepWarn/.test(appAllSrc)
|
||||
// 2026-11-17:keepWarn 提示改走页内确认(askConfirm);桌面端不再用阻塞式 window.confirm
|
||||
&& /askConfirm\(keepWarn/.test(appAllSrc)
|
||||
&& /keepWarn \? 3000 : 900/.test(appAllSrc))
|
||||
// --- 150-13 "设置还原不回来"的**第二个**独立根因:normalizeBackup 白名单式拷贝 items.*,
|
||||
// items.config 从来没被带进 out.items ⇒ 还原界面根本解析不出「设置」,
|
||||
|
||||
@@ -34,7 +34,8 @@ assert.strictEqual(registry.register(manifest({ id: 'bad-caps', capabilities: ['
|
||||
assert.strictEqual(registry.register(manifest({ id: 'bad-caps2', capabilities: 'panels' }), () => ({})).ok, false, 'capabilities 必须是数组')
|
||||
assert.strictEqual(registry.register(manifest({ id: 'no-factory' }), 'nope').ok, false, '工厂必须是函数')
|
||||
assert.strictEqual(registry.list().length, 1, '被拒绝的注册不得进入注册表')
|
||||
assert.strictEqual(registry.isEnabled('demo-plugin'), false)
|
||||
// 2026-11-17:默认启用(插件随市场安装即可用;只有用户显式关掉才写 enabled:false)
|
||||
assert.strictEqual(registry.isEnabled('demo-plugin'), true)
|
||||
|
||||
let persisted = { 'demo-plugin': { enabled: true, settings: { theme: 'dark' }, data: {} } }
|
||||
const writes = []
|
||||
|
||||
Reference in new issue
Block a user