feat(web): close settings navigation and page lifecycle

This commit is contained in:
abaishu0730 committed 2026-10-19 12:41:51 +08:00
1 parent 539b33cd42
commit 37b4a156c9
19 files changed
+182 -101

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ const vm=require('node:vm');
test('late overview response cannot overwrite a newly opened settings form',async()=>{
let resolve;
const container={innerHTML:'unsaved template draft'};
const context=vm.createContext({document:{querySelector:()=>({})},Intl,setTimeout,window:{addEventListener(){}},fetch(){throw Error('unexpected fetch');}});
const context=vm.createContext({document:{querySelector:()=>({}),addEventListener(){}},Intl,setTimeout,window:{addEventListener(){}},fetch(){throw Error('unexpected fetch');}});
const source=fs.readFileSync(require.resolve('../../web/app.js'),'utf8').replace(/boot\(\)\.catch[\s\S]*$/,'');
vm.runInContext(source,context);
context.pending=new Promise(r=>{resolve=r;});context.container=container;