MCPcopy Create free account
hub / github.com/massCodeIO/massCode / getSpaceDefinitions

Function getSpaceDefinitions

src/renderer/spaceDefinitions.ts:49–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47}
48
49export function getSpaceDefinitions(): SpaceDefinition[] {
50 return [
51 {
52 id: 'code',
53 label: i18n.t('spaces.code.label'),
54 tooltip: i18n.t('spaces.code.tooltip'),
55 icon: Code2,
56 to: { name: RouterName.main },
57 isActive: routeName => routeName === RouterName.main,
58 },
59 {
60 id: 'notes',
61 label: i18n.t('spaces.notes.label'),
62 tooltip: i18n.t('spaces.notes.tooltip'),
63 icon: Notebook,
64 to: { name: getSavedNotesRouteName() },
65 isActive: routeName =>
66 isRouteNameInSpace(routeName, RouterName.notesSpace),
67 },
68 {
69 id: 'http',
70 label: i18n.t('spaces.http.label'),
71 tooltip: i18n.t('spaces.http.tooltip'),
72 icon: Send,
73 to: { name: RouterName.httpSpace },
74 isActive: routeName =>
75 isRouteNameInSpace(routeName, RouterName.httpSpace),
76 },
77 {
78 id: 'math',
79 label: i18n.t('spaces.math.label'),
80 tooltip: i18n.t('spaces.math.tooltip'),
81 icon: Calculator,
82 to: { name: RouterName.mathNotebook },
83 isActive: routeName => routeName === RouterName.mathNotebook,
84 },
85 {
86 id: 'drawings',
87 label: i18n.t('spaces.drawings.label'),
88 tooltip: i18n.t('spaces.drawings.tooltip'),
89 icon: PenTool,
90 to: { name: RouterName.drawingsSpace },
91 isActive: routeName => routeName === RouterName.drawingsSpace,
92 },
93 {
94 id: 'tools',
95 label: i18n.t('spaces.tools.label'),
96 tooltip: i18n.t('spaces.tools.tooltip'),
97 icon: Blocks,
98 to: { name: RouterName.devtools },
99 isActive: routeName =>
100 isRouteNameInSpace(routeName, RouterName.devtools),
101 },
102 ]
103}
104
105export function isSpaceRouteName(
106 routeName: RouteRecordName | null | undefined,

Callers 7

getSpaceIconFunction · 0.90
getSpaceLabelFunction · 0.90
openSpaceFunction · 0.90
isSpaceRouteNameFunction · 0.85
getActiveSpaceIdFunction · 0.85

Calls 2

getSavedNotesRouteNameFunction · 0.85
isRouteNameInSpaceFunction · 0.85

Tested by

no test coverage detected