MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / initLayoutConfig

Function initLayoutConfig

frontend/src/services/layout.ts:5–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { t } from "@/lang/i18n";
4
5export async function initLayoutConfig() {
6 const { value } = await getLayoutConfig().execute();
7 try {
8 const cfg = JSON.parse(value!);
9 if (cfg instanceof Array) {
10 setAllLayoutConfig(cfg);
11 const settingsConfig = cfg.find((v: any) => v.page === "__settings__");
12 document.title = settingsConfig?.theme?.pageTitle || t("TXT_CODE_47ae8ee6");
13 }
14 } catch (error: any) {
15 console.error("init layout config error:", error);
16 }
17}

Callers 1

initAppFunction · 0.90

Calls 2

setAllLayoutConfigFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected