Update initial server connection to not block the home page

This commit is contained in:
advplyr 2023-09-10 08:38:11 -05:00
parent cbdc3513c7
commit 03225957aa
3 changed files with 5 additions and 5 deletions

View file

@ -34,7 +34,7 @@ export default {
return this.$store.state.attemptingConnection return this.$store.state.attemptingConnection
}, },
icon() { icon() {
if (!this.user) return null // hide when not connected to server if (!this.user && !this.attemptingConnection) return null // hide when not connected to server
if (this.attemptingConnection) { if (this.attemptingConnection) {
return 'cloud_sync' return 'cloud_sync'

View file

@ -3,10 +3,6 @@
<app-appbar /> <app-appbar />
<div id="content" class="overflow-hidden relative" :class="isPlayerOpen ? 'playerOpen' : ''"> <div id="content" class="overflow-hidden relative" :class="isPlayerOpen ? 'playerOpen' : ''">
<Nuxt /> <Nuxt />
<div v-if="attemptingConnection" class="absolute top-0 left-0 z-50 w-full h-full flex items-center justify-center">
<ui-loading-indicator text="Connecting to server..." class="mt-9" />
</div>
</div> </div>
<app-audio-player-container ref="streamContainer" /> <app-audio-player-container ref="streamContainer" />
<modals-libraries-modal /> <modals-libraries-modal />

View file

@ -1,5 +1,9 @@
<template> <template>
<div class="w-full h-full min-h-full relative"> <div class="w-full h-full min-h-full relative">
<div v-if="attemptingConnection" class="w-full pt-4 flex items-center justify-center">
<widgets-loading-spinner />
<p class="pl-4">Attempting server connection...</p>
</div>
<div v-if="shelves.length && isLoading" class="w-full pt-4 flex items-center justify-center"> <div v-if="shelves.length && isLoading" class="w-full pt-4 flex items-center justify-center">
<widgets-loading-spinner /> <widgets-loading-spinner />
<p class="pl-4">Loading server data...</p> <p class="pl-4">Loading server data...</p>