diff --git a/web-src/src/App.vue b/web-src/src/App.vue index b6a069bb..44066251 100644 --- a/web-src/src/App.vue +++ b/web-src/src/App.vue @@ -101,7 +101,7 @@ export default { socket.onopen = function () { vm.$store.dispatch('add_notification', { text: 'Connection to server established', type: 'primary', topic: 'connection', timeout: 2000 }) vm.reconnect_attempts = 0 - socket.send(JSON.stringify({ notify: ['update', 'database', 'player', 'options', 'outputs', 'volume', 'spotify'] })) + socket.send(JSON.stringify({ notify: ['update', 'database', 'player', 'options', 'outputs', 'volume', 'spotify', 'lastfm', 'pairing'] })) vm.update_outputs() vm.update_player_status() @@ -109,6 +109,8 @@ export default { vm.update_settings() vm.update_queue() vm.update_spotify() + vm.update_lastfm() + vm.update_pairing() } socket.onclose = function () { // vm.$store.dispatch('add_notification', { text: 'Connection closed', type: 'danger', timeout: 2000 }) @@ -134,6 +136,12 @@ export default { if (data.notify.includes('spotify')) { vm.update_spotify() } + if (data.notify.includes('lastfm')) { + vm.update_lastfm() + } + if (data.notify.includes('pairing')) { + vm.update_pairing() + } } }, @@ -173,6 +181,12 @@ export default { }) }, + update_lastfm: function () { + webapi.lastfm().then(({ data }) => { + this.$store.commit(types.UPDATE_LASTFM, data) + }) + }, + update_spotify: function () { webapi.spotify().then(({ data }) => { this.$store.commit(types.UPDATE_SPOTIFY, data) @@ -185,6 +199,12 @@ export default { this.token_timer_id = window.setTimeout(this.update_spotify, 1000 * data.webapi_token_expires_in) } }) + }, + + update_pairing: function () { + webapi.pairing().then(({ data }) => { + this.$store.commit(types.UPDATE_PAIRING, data) + }) } }, diff --git a/web-src/src/components/TabsSettings.vue b/web-src/src/components/TabsSettings.vue new file mode 100644 index 00000000..be78f900 --- /dev/null +++ b/web-src/src/components/TabsSettings.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/web-src/src/pages/SettingsPageOnlineServices.vue b/web-src/src/pages/SettingsPageOnlineServices.vue new file mode 100644 index 00000000..b253dfe5 --- /dev/null +++ b/web-src/src/pages/SettingsPageOnlineServices.vue @@ -0,0 +1,205 @@ + + + + + diff --git a/web-src/src/pages/SettingsPageRemotesOutputs.vue b/web-src/src/pages/SettingsPageRemotesOutputs.vue new file mode 100644 index 00000000..fa336c44 --- /dev/null +++ b/web-src/src/pages/SettingsPageRemotesOutputs.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/web-src/src/pages/SettingsPageWebinterface.vue b/web-src/src/pages/SettingsPageWebinterface.vue index 13c09cbc..115f961a 100644 --- a/web-src/src/pages/SettingsPageWebinterface.vue +++ b/web-src/src/pages/SettingsPageWebinterface.vue @@ -1,71 +1,70 @@