From 0b9b0341b595ffe18c17cc97af387009e3845161 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 3 Apr 2022 14:37:44 -0500 Subject: [PATCH] Cleanup old unused and missing vars --- components/app/AudioPlayerContainer.vue | 6 +++--- components/connection/ServerConnectForm.vue | 6 +++--- layouts/default.vue | 1 + pages/bookshelf/index.vue | 1 + pages/connect.vue | 2 +- plugins/init.client.js | 9 ++++++--- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/components/app/AudioPlayerContainer.vue b/components/app/AudioPlayerContainer.vue index d3dac020..ca9bb8c1 100644 --- a/components/app/AudioPlayerContainer.vue +++ b/components/app/AudioPlayerContainer.vue @@ -1,12 +1,12 @@ @@ -27,7 +27,7 @@ export default { currentTime: 0, isSleepTimerRunning: false, sleepTimerEndTime: 0, - sleepTimerRemaining: 0, + sleepTimeRemaining: 0, onSleepTimerEndedListener: null, onSleepTimerSetListener: null, sleepInterval: null, diff --git a/components/connection/ServerConnectForm.vue b/components/connection/ServerConnectForm.vue index 976e5219..ea3201e2 100644 --- a/components/connection/ServerConnectForm.vue +++ b/components/connection/ServerConnectForm.vue @@ -105,9 +105,9 @@ export default { networkConnected() { return this.$store.state.networkConnected }, - serverConnectionConfigs() { - return this.deviceData ? this.deviceData.serverConnectionConfigs || [] : [] - }, + // serverConnectionConfigs() { + // return this.deviceData ? this.deviceData.serverConnectionConfigs || [] : [] + // }, lastServerConnectionConfigId() { return this.deviceData ? this.deviceData.lastServerConnectionConfigId : null }, diff --git a/layouts/default.vue b/layouts/default.vue index e13a878d..6d1934d1 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -73,6 +73,7 @@ export default { } }, async checkForUpdate() { + if (this.$platform == 'web') return console.log('Checking for app update') const result = await AppUpdate.getAppUpdateInfo() if (!result) { diff --git a/pages/bookshelf/index.vue b/pages/bookshelf/index.vue index 3d72868a..e29e1f24 100644 --- a/pages/bookshelf/index.vue +++ b/pages/bookshelf/index.vue @@ -124,6 +124,7 @@ export default { }, methods: { async fetchCategories() { + if (!this.currentLibraryId) return null var categories = await this.$axios .$get(`/api/libraries/${this.currentLibraryId}/personalized?minified=1`) .then((data) => { diff --git a/pages/connect.vue b/pages/connect.vue index e0c88514..1fe23b63 100644 --- a/pages/connect.vue +++ b/pages/connect.vue @@ -12,7 +12,7 @@ - +
diff --git a/plugins/init.client.js b/plugins/init.client.js index 789ce1b8..dc89edc8 100644 --- a/plugins/init.client.js +++ b/plugins/init.client.js @@ -3,13 +3,16 @@ import { App } from '@capacitor/app' import { Dialog } from '@capacitor/dialog' import { StatusBar, Style } from '@capacitor/status-bar'; import { formatDistance, format } from 'date-fns' +import { Capacitor } from '@capacitor/core'; Vue.prototype.$eventBus = new Vue() -const setStatusBarStyleDark = async () => { - await StatusBar.setStyle({ style: Style.Dark }) +if (Capacitor.getPlatform() != 'web') { + const setStatusBarStyleDark = async () => { + await StatusBar.setStyle({ style: Style.Dark }) + } + setStatusBarStyleDark() } -setStatusBarStyleDark() App.addListener('backButton', async ({ canGoBack }) => { if (!canGoBack) {