diff --git a/apps/shelve/app/components/layout/Navbar.vue b/apps/shelve/app/components/layout/Navbar.vue index 1fca17ed..6f132066 100644 --- a/apps/shelve/app/components/layout/Navbar.vue +++ b/apps/shelve/app/components/layout/Navbar.vue @@ -21,6 +21,7 @@ const allNavigations = computed(() => { const isSearchActive = ref(false) const searchQuery = ref('') const selectedTeamIndex = ref(0) +const loading = useNavbarLoading() const toggleSearch = () => { isSearchActive.value = !isSearchActive.value @@ -77,9 +78,9 @@ defineShortcuts({ diff --git a/apps/shelve/app/composables/useAppCommands.ts b/apps/shelve/app/composables/useAppCommands.ts index bdbbf2eb..b1d909aa 100644 --- a/apps/shelve/app/composables/useAppCommands.ts +++ b/apps/shelve/app/composables/useAppCommands.ts @@ -228,7 +228,7 @@ export function useAppCommands() { icon: 'lucide:bug', description: 'Report a bug or issue', action: () => { - window.open('https://github.com/hugorcd/shelve/issues', '_blank') + window.open('https://github.com/HugoRCD/shelve/issues/new/choose', '_blank') }, keywords: ['issues', 'bug', 'report', 'problem'], }, @@ -321,15 +321,8 @@ export function useAppCommands() { ] }) - // Helper function to create a team - const createTeamFromSearch = async (teamName: string) => { - if (!teamName) return - await createTeam(teamName) - } - return { commandGroups, - createTeamFromSearch, version, currentTeam, subMenuState, diff --git a/apps/shelve/app/composables/useStore.ts b/apps/shelve/app/composables/useStore.ts index 245b2ecb..6f9efa7e 100644 --- a/apps/shelve/app/composables/useStore.ts +++ b/apps/shelve/app/composables/useStore.ts @@ -43,3 +43,7 @@ export function useEnvironments(): Ref { export function useVariables(projectId: string): Ref { return useState(`variables-${projectId}`) } + +export function useNavbarLoading(): Ref { + return useState('navbar-loading', () => false) +} diff --git a/apps/shelve/app/composables/useTeams.ts b/apps/shelve/app/composables/useTeams.ts index 1921f579..7d1e5fda 100644 --- a/apps/shelve/app/composables/useTeams.ts +++ b/apps/shelve/app/composables/useTeams.ts @@ -22,6 +22,7 @@ export function useTeamsService() { const currentTeam = useTeam() const loading = ref(false) const createLoading = ref(false) + const navbarLoading = useNavbarLoading() const defaultTeamSlug = useCookie('defaultTeamSlug') @@ -50,6 +51,7 @@ export function useTeamsService() { async function createTeam(name: string): Promise { createLoading.value = true + navbarLoading.value = true try { const team = await $fetch('/api/teams', { method: 'POST', @@ -67,6 +69,7 @@ export function useTeamsService() { toast.error('Failed to create team') } finally { createLoading.value = false + navbarLoading.value = false } }