mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: ensure ui rebuild after langs load
This commit is contained in:
3 files changed
+3
No files matched your search
@@ -404,6 +404,7 @@ export async function apply(ctx: Context) {
|
|||||||
LangSettingNode.range = range;
|
LangSettingNode.range = range;
|
||||||
ServerLangSettingNode.range = range;
|
ServerLangSettingNode.range = range;
|
||||||
});
|
});
|
||||||
|
ctx.emit('system/setting-loaded');
|
||||||
}
|
}
|
||||||
|
|
||||||
global.Hydro.model.setting = {
|
global.Hydro.model.setting = {
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ export interface EventMap {
|
|||||||
'database/config': () => VoidReturn;
|
'database/config': () => VoidReturn;
|
||||||
|
|
||||||
'system/setting': (args: Record<string, any>) => VoidReturn;
|
'system/setting': (args: Record<string, any>) => VoidReturn;
|
||||||
|
'system/setting-loaded': () => VoidReturn;
|
||||||
'bus/broadcast': (event: keyof EventMap, payload: any, trace?: string) => VoidReturn;
|
'bus/broadcast': (event: keyof EventMap, payload: any, trace?: string) => VoidReturn;
|
||||||
'monitor/update': (type: 'server' | 'judge', $set: any) => VoidReturn;
|
'monitor/update': (type: 'server' | 'judge', $set: any) => VoidReturn;
|
||||||
'monitor/collect': (info: any) => VoidReturn;
|
'monitor/collect': (info: any) => VoidReturn;
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ export async function apply(ctx: Context) {
|
|||||||
debouncedBuildUI();
|
debouncedBuildUI();
|
||||||
};
|
};
|
||||||
ctx.on('system/setting', () => triggerHotUpdate());
|
ctx.on('system/setting', () => triggerHotUpdate());
|
||||||
|
ctx.on('system/setting-loaded', () => triggerHotUpdate());
|
||||||
ctx.on('app/watch/change', triggerHotUpdate);
|
ctx.on('app/watch/change', triggerHotUpdate);
|
||||||
ctx.on('app/watch/unlink', triggerHotUpdate);
|
ctx.on('app/watch/unlink', triggerHotUpdate);
|
||||||
ctx.on('app/i18n/update', debouncedBuildUI);
|
ctx.on('app/i18n/update', debouncedBuildUI);
|
||||||
|
|||||||
Reference in new issue
Block a user