Fix:Remove last saved library id when changing servers so home page shelves load on init

This commit is contained in:
advplyr
2022-06-05 16:32:28 -05:00
parent d7dcaa22a6
commit 870774b408
10 changed files with 33 additions and 16 deletions
+7 -3
View File
@@ -53,11 +53,15 @@ export default {
},
methods: {
async logout() {
await this.$axios.$post('/logout').catch((error) => {
console.error(error)
})
if (this.user) {
await this.$axios.$post('/logout').catch((error) => {
console.error(error)
})
}
this.$socket.logout()
await this.$db.logout()
this.$localStore.removeLastLibraryId()
this.$store.commit('user/logout')
this.$router.push('/connect')
}
-4
View File
@@ -4,10 +4,6 @@
<home-bookshelf-toolbar v-show="!isHome" />
<div id="bookshelf-wrapper" class="main-content overflow-y-auto overflow-x-hidden relative" :class="isHome ? 'home-page' : ''">
<nuxt-child />
<!-- <div v-if="isLoading" class="absolute top-0 left-0 w-full h-full flex items-center justify-center">
<ui-loading-indicator />
</div>-->
</div>
</div>
</template>
+1 -1
View File
@@ -135,7 +135,7 @@ export default {
}
this.loading = false
},
async libraryChanged(libid) {
async libraryChanged() {
if (this.currentLibraryId) {
await this.fetchCategories()
}