From a74ff042bcc0ad4866a728eb0a0dec25b8c6ab0c Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 21 Mar 2025 11:09:42 +0100 Subject: [PATCH] feat: refs #7358 added chip in navbar to show environment --- src/components/NavBar.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index dbb6f1fe6..605d8786a 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -18,7 +18,18 @@ const state = useState(); const user = state.getUser(); const appName = 'Lilium'; const pinnedModulesRef = ref(); +const env = process.env.NODE_ENV; +function getEnvironment() { + switch (env) { + case 'development': + return 'dev'; + case 'production': + return; + default: + return env; + } +} onMounted(() => stateStore.setMounted()); const refresh = () => window.location.reload(); @@ -50,6 +61,9 @@ const refresh = () => window.location.reload(); + + {{ getEnvironment() }} + window.location.reload(); .q-header { background-color: var(--vn-section-color); } +.envChip { + background-color: $primary; +}