Load layouts and optional features from staged asset caches

This commit is contained in:
Jonathan Sykes
2026-10-08 01:29:50 +08:00
parent d98d444552
commit 5d6a1545df
30 changed files with 512 additions and 146 deletions

View File

@@ -165,8 +165,9 @@
// legacy refresh followed by a reload into the old persistent manifest.
if (worker && !status) throw new Error('Worker update status unavailable; try again');
if (status && status.assetSync) {
const result = await core.syncAssets(m,{cache,fetchFn:opts.fetchFn});
if (!reg.waiting) await core.commit(m,cache);
const activeLayout = root.Lazy?.layout || 'classic';
const result = await core.syncAssets(m,{cache,fetchFn:opts.fetchFn,activeLayout});
if (!reg.waiting) await core.commit(m,cache,{activeLayout});
return result;
}
}
@@ -210,7 +211,7 @@
try {
const ch = new Ctor();
ch.port1.onmessage = (ev) => finish(ev && ev.data ? ev.data : null);
worker.postMessage({ type: 'CACHE_STATUS' }, [ch.port2]);
worker.postMessage({ type: 'CACHE_STATUS', activeLayout: root.Lazy?.layout }, [ch.port2]);
} catch { finish(null); return; }
if (schedule) schedule(() => finish(null), timeoutMs);
});