diff --git a/components/app/Appbar.vue b/components/app/Appbar.vue index 21d17a4c..c4628437 100644 --- a/components/app/Appbar.vue +++ b/components/app/Appbar.vue @@ -13,20 +13,23 @@

{{ currentLibraryName }}

+ + +
- cast + cast
- + search -
+
menu
diff --git a/components/app/AudioPlayer.vue b/components/app/AudioPlayer.vue index fbbd908d..14b8ee92 100644 --- a/components/app/AudioPlayer.vue +++ b/components/app/AudioPlayer.vue @@ -523,7 +523,6 @@ export default { var data = await AbsAudioPlayer.getCurrentTime() this.currentTime = Number(data.value.toFixed(2)) this.bufferedTime = Number(data.bufferedTime.toFixed(2)) - console.log('[AudioPlayer] Got Current Time', this.currentTime) this.timeupdate() }, 1000) }, diff --git a/components/app/SideDrawer.vue b/components/app/SideDrawer.vue index 28660b7c..8506812f 100644 --- a/components/app/SideDrawer.vue +++ b/components/app/SideDrawer.vue @@ -19,7 +19,7 @@
-

{{ serverConnectionConfig.address }} (v{{ serverSettings.version }})

+

{{ serverConnectionConfig.address }} (v{{ serverSettings.version }})

{{ $config.version }}

diff --git a/components/widgets/ConnectionIndicator.vue b/components/widgets/ConnectionIndicator.vue new file mode 100644 index 00000000..2301f2b7 --- /dev/null +++ b/components/widgets/ConnectionIndicator.vue @@ -0,0 +1,73 @@ + + + \ No newline at end of file diff --git a/ios/App/Podfile b/ios/App/Podfile index dcdae730..89125e80 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -9,12 +9,12 @@ install! 'cocoapods', :disable_input_output_paths => true def capacitor_pods pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' - pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app' - pod 'CapacitorDialog', :path => '../../node_modules/@capacitor/dialog' - pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics' - pod 'CapacitorNetwork', :path => '../../node_modules/@capacitor/network' - pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar' - pod 'CapacitorStorage', :path => '../../node_modules/@capacitor/storage' + pod 'CapacitorApp', :path => '..\..\node_modules\@capacitor\app' + pod 'CapacitorDialog', :path => '..\..\node_modules\@capacitor\dialog' + pod 'CapacitorHaptics', :path => '..\..\node_modules\@capacitor\haptics' + pod 'CapacitorNetwork', :path => '..\..\node_modules\@capacitor\network' + pod 'CapacitorStatusBar', :path => '..\..\node_modules\@capacitor\status-bar' + pod 'CapacitorStorage', :path => '..\..\node_modules\@capacitor\storage' end target 'App' do diff --git a/layouts/default.vue b/layouts/default.vue index 327c8d9a..29191138 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -154,9 +154,6 @@ export default { // Only cancels stream if streamining not playing downloaded this.$eventBus.$emit('close-stream') }, - socketConnectionUpdate(isConnected) { - console.log('Socket connection update', isConnected) - }, socketConnectionFailed(err) { this.$toast.error('Socket connection error: ' + err.message) }, @@ -253,7 +250,6 @@ export default { } }, async mounted() { - this.$socket.on('connection-update', this.socketConnectionUpdate) this.$socket.on('initialized', this.socketInit) this.$socket.on('user_updated', this.userUpdated) this.$socket.on('user_media_progress_updated', this.userMediaProgressUpdated) @@ -282,7 +278,6 @@ export default { } }, beforeDestroy() { - this.$socket.off('connection-update', this.socketConnectionUpdate) this.$socket.off('initialized', this.socketInit) this.$socket.off('user_updated', this.userUpdated) this.$socket.off('user_media_progress_updated', this.userMediaProgressUpdated) diff --git a/plugins/server.js b/plugins/server.js index ca1a2e3c..e56f44c1 100644 --- a/plugins/server.js +++ b/plugins/server.js @@ -39,6 +39,7 @@ class ServerSocket extends EventEmitter { logout() { if (this.socket) this.socket.disconnect() + this.removeListeners() } setSocketListeners() { @@ -54,6 +55,14 @@ class ServerSocket extends EventEmitter { // }) } + removeListeners() { + if (!this.socket) return + this.socket.removeAllListeners() + if (this.socket.io && this.socket.io.removeAllListeners) { + this.socket.io.removeAllListeners() + } + } + onConnect() { console.log('[SOCKET] Socket Connected ' + this.socket.id) this.connected = true @@ -67,11 +76,6 @@ class ServerSocket extends EventEmitter { this.connected = false this.$store.commit('setSocketConnected', false) this.emit('connection-update', false) - - this.socket.removeAllListeners() - if (this.socket.io && this.socket.io.removeAllListeners) { - this.socket.io.removeAllListeners() - } } onInit(data) {