11<template >
22 <NamespaceAdd v-model =" showAddDialog" />
3- <NamespaceInstructions v-model =" showAddNamespaceInstructions " />
3+ <NamespaceInstructions v-model =" showInstructionsDialog " />
44
55 <v-menu
66 :close-on-content-click =" false"
108108
109109<script setup lang="ts">
110110import { ref , computed , onMounted } from " vue" ;
111+ import { useDisplay } from " vuetify" ;
112+ import { until } from " @vueuse/core" ;
111113import NamespaceAdd from " ./NamespaceAdd.vue" ;
112114import NamespaceInstructions from " ./NamespaceInstructions.vue" ;
113115import NamespaceChip from " ./NamespaceChip.vue" ;
@@ -117,7 +119,6 @@ import useNamespaceManager from "./composables/useNamespaceManager";
117119import useAuthStore from " @/store/modules/auth" ;
118120import CopyWarning from " @/components/User/CopyWarning.vue" ;
119121import { envVariables } from " @/envVariables" ;
120- import { useDisplay } from " vuetify" ;
121122
122123defineOptions ({
123124 inheritAttrs: false ,
@@ -139,7 +140,7 @@ const {
139140const { mdAndDown, thresholds } = useDisplay ();
140141
141142const showAddDialog = ref (false );
142- const showAddNamespaceInstructions = computed (() => namespacesLoaded . value && ! hasNamespaces . value && ! props . isAdminContext );
143+ const showInstructionsDialog = ref ( false );
143144const userId = computed (() => authStore .id || localStorage .getItem (" id" ) || " " );
144145
145146const showAdminButton = computed (() => {
@@ -168,5 +169,7 @@ const navigateToAdminPanel = () => {
168169
169170onMounted (async () => {
170171 await loadCurrentNamespace ();
172+ await until (namespacesLoaded ).toBe (true );
173+ showInstructionsDialog .value = ! hasNamespaces .value && ! props .isAdminContext ;
171174});
172175 </script >
0 commit comments