#7358: Added chip in Navbar to show environment #1618

Merged
jon merged 12 commits from 7358-AddChipInNavbar into dev 2025-03-26 11:44:57 +00:00
1 changed files with 6 additions and 6 deletions
Showing only changes of commit d8b9f3467a - Show all commits

View File

@ -1,5 +1,5 @@
<script setup>
import { onMounted, ref } from 'vue';
import { onMounted, ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useState } from 'src/composables/useState';
import { useStateStore } from 'stores/useStateStore';
@ -20,16 +20,16 @@ const appName = 'Lilium';
const pinnedModulesRef = ref();
const env = process.env.NODE_ENV;
function getEnvironment() {
const getEnvironment = computed(() => {
switch (env) {
case 'development':
return 'dev';
return 'DEV';
case 'production':
return;
default:
return env;
}
return env.toUpperCase();
}
});
onMounted(() => stateStore.setMounted());
const refresh = () => window.location.reload();
</script>
@ -62,7 +62,7 @@ const refresh = () => window.location.reload();
</QBtn>
</RouterLink>
<QChip class="q-ml-xs q-mr-xs envChip">
{{ getEnvironment() }}
{{ getEnvironment }}
</QChip>
<VnBreadcrumbs v-if="$q.screen.gt.sm" />
<QSpinner