ui: optimize service worker cache load

This commit is contained in:
undefined committed 2025-10-27 16:35:23 +08:00
1 parent 2e9e93c9e1
commit 9226b26fa7
8 files changed
+34 -23

No files matched your search

+4 -1
View File
@@ -177,6 +177,7 @@ class SystemConfigHandler extends SystemHandler {
let value = this.ctx.setting.configSource;
const processNode = (node: any, schema: Schema<any, any>, parent?: any, accessKey?: string) => {
if (!node) return;
if (['union', 'intersect'].includes(schema.type)) {
for (const item of schema.list) processNode(node, item, parent, accessKey);
}
@@ -193,7 +194,9 @@ class SystemConfigHandler extends SystemHandler {
const temp = yaml.load(this.ctx.setting.configSource);
for (const schema of this.ctx.setting.settings) processNode(temp, schema);
value = yaml.dump(temp);
} catch (e) { }
} catch (e) {
logger.error('Failed to process config', e.message);
}
this.response.body = {
schema: Schema.intersect(this.ctx.setting.settings).toJSON(),
value,