Skip to content

Commit

Permalink
Update initial server connection to not block the home page
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Sep 10, 2023
1 parent cbdc351 commit 0322595
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/widgets/ConnectionIndicator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
return this.$store.state.attemptingConnection
},
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) {
return 'cloud_sync'
Expand Down
4 changes: 0 additions & 4 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
<app-appbar />
<div id="content" class="overflow-hidden relative" :class="isPlayerOpen ? 'playerOpen' : ''">
<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>
<app-audio-player-container ref="streamContainer" />
<modals-libraries-modal />
Expand Down
4 changes: 4 additions & 0 deletions pages/bookshelf/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<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">
<widgets-loading-spinner />
<p class="pl-4">Loading server data...</p>
Expand Down

0 comments on commit 0322595

Please sign in to comment.