Skip to content

Commit 5ec6c8b

Browse files
authored
Merge branch 'master' into dev
2 parents 8a42845 + c73b27f commit 5ec6c8b

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

components/LeftSidebar.vue

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const appStore = useAppStore()
2020
const nodeStore = useNodeStore()
2121
const modalsStore = useModalsStore()
2222
23+
const developerMode = useCookie("developerMode", { default: () => false })
24+
2325
const head = computed(() => appStore.lastHead)
2426
2527
const mainLinks = reactive([
@@ -153,6 +155,7 @@ const toolsLinks = reactive([
153155
path: "https://terminal.celenium.io",
154156
external: true,
155157
new: true,
158+
hide: !developerMode.value,
156159
},
157160
{
158161
icon: "drop",
@@ -183,6 +186,15 @@ const toolsLinks = reactive([
183186
},
184187
])
185188
189+
/** TEMP */
190+
watch(
191+
() => developerMode.value,
192+
() => {
193+
const terminalLinkIdx = toolsLinks.findIndex((l) => l.name === "Terminal")
194+
toolsLinks[terminalLinkIdx].hide = !developerMode.value
195+
},
196+
)
197+
186198
const handleNavigate = (url) => {
187199
window.location.replace(url)
188200
}
@@ -221,7 +233,7 @@ const handleOnClose = () => {
221233
</Flex>
222234

223235
<Flex direction="column" gap="2">
224-
<NavLink v-for="link in mainLinks" :link="link" @onClose="handleOnClose" />
236+
<NavLink v-for="link in mainLinks.filter((l) => !l.hide)" :link="link" @onClose="handleOnClose" />
225237
</Flex>
226238

227239
<Flex direction="column" gap="2">
@@ -236,7 +248,7 @@ const handleOnClose = () => {
236248
</Flex>
237249

238250
<Flex v-if="!isModularLinksCollapsed" direction="column" gap="2">
239-
<NavLink v-for="link in modularLinks" :link="link" @onClose="handleOnClose" />
251+
<NavLink v-for="link in modularLinks.filter((l) => !l.hide)" :link="link" @onClose="handleOnClose" />
240252
</Flex>
241253
</Flex>
242254

@@ -252,7 +264,7 @@ const handleOnClose = () => {
252264
</Flex>
253265

254266
<Flex v-if="!isToolsLinkCollapsed" direction="column" gap="2">
255-
<NavLink v-for="link in toolsLinks" :link="link" @onClose="handleOnClose" />
267+
<NavLink v-for="link in toolsLinks.filter((l) => !l.hide)" :link="link" @onClose="handleOnClose" />
256268
</Flex>
257269
</Flex>
258270

components/cmd/CommandMenu.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const notificationsStore = useNotificationsStore()
3838
3939
const appConfig = useAppConfig()
4040
41+
const developerMode = useCookie("developerMode", { default: () => false })
4142
const theme = useCookie("theme", { default: () => "dark" })
4243
const showPromoBackground = useCookie("showPromoBackground", { default: () => true })
4344
@@ -60,7 +61,6 @@ const searchTerm = ref("")
6061
6162
const bounce = ref(false)
6263
63-
const developerMode = ref(false)
6464
const featurePreviewMode = ref(false)
6565
6666
const mode = ref(null)
@@ -847,7 +847,6 @@ const rawOtherActions = [
847847
subtitle: "Command",
848848
runText: "Toggle",
849849
callback: () => {
850-
localStorage.developer = !localStorage.developer
851850
developerMode.value = !developerMode.value
852851
853852
notificationsStore.create({
@@ -1067,7 +1066,6 @@ const handleShareCopyData = (data) => {
10671066
}
10681067
10691068
onMounted(() => {
1070-
developerMode.value = localStorage.developer
10711069
featurePreviewMode.value = localStorage.featurePreview
10721070
10731071
root = document.querySelector("html")

0 commit comments

Comments
 (0)