From fcd6270f2d151a21f95f6547e74e8e66860a5036 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 4 Feb 2024 15:53:05 -0600 Subject: [PATCH] Fix:Hide library list button from app bar when no network connection --- components/app/Appbar.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/app/Appbar.vue b/components/app/Appbar.vue index 04bcfd52..fee86c0b 100644 --- a/components/app/Appbar.vue +++ b/components/app/Appbar.vue @@ -7,7 +7,7 @@ arrow_back -
+

{{ currentLibraryName }}

@@ -54,14 +54,17 @@ export default { this.$store.commit('setCastAvailable', val) } }, + networkConnected() { + return this.$store.state.networkConnected + }, currentLibrary() { return this.$store.getters['libraries/getCurrentLibrary'] }, currentLibraryName() { - return this.currentLibrary ? this.currentLibrary.name : '' + return this.currentLibrary?.name || '' }, currentLibraryIcon() { - return this.currentLibrary ? this.currentLibrary.icon : 'database' + return this.currentLibrary?.icon || 'database' }, showBack() { if (!this.$route.name) return true @@ -71,7 +74,7 @@ export default { return this.$store.state.user.user }, username() { - return this.user ? this.user.username : 'err' + return this.user?.username || 'err' }, isCasting() { return this.$store.state.isCasting