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

Function insertLayoutItem

frontend/src/stores/useLayoutConfig.ts:31–41  ·  view source on GitHub ↗
(pageName: string, card: LayoutCard, index?: number)

Source from the content-addressed store, hash-verified

29 };
30
31 const insertLayoutItem = (pageName: string, card: LayoutCard, index?: number) => {
32 if (!pageName) pageName = currentRoutePath.value;
33 const items = getPageLayoutConfig(pageName);
34 if (items) {
35 if (index != null) {
36 items.splice(index, 0, card);
37 } else {
38 items.push(card);
39 }
40 }
41 };
42
43 const moveCardItem = (pageName: string, sourceId: string, targetId: string) => {
44 if (!pageName) pageName = currentRoutePath.value;

Callers 1

moveCardItemFunction · 0.85

Calls 2

getPageLayoutConfigFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected