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

Function setSettingsConfig

frontend/src/stores/useLayoutConfig.ts:77–88  ·  view source on GitHub ↗
(config: IPageLayoutConfig)

Source from the content-addressed store, hash-verified

75 };
76
77 const setSettingsConfig = async (config: IPageLayoutConfig) => {
78 const layout = getAllLayoutConfig();
79 const curIndex = layout.findIndex((v) => v.page === "__settings__");
80 if (curIndex >= 0) {
81 layout[curIndex] = config;
82 } else {
83 layout.push(config);
84 }
85 setAllLayoutConfig(layout);
86 await saveGlobalLayoutConfig();
87 setTimeout(() => window.location.reload(), 200);
88 };
89
90 return {
91 setSettingsConfig,

Callers

nothing calls this directly

Calls 4

getAllLayoutConfigFunction · 0.90
setAllLayoutConfigFunction · 0.90
saveGlobalLayoutConfigFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected