diff --git a/src/store/modules/synclounge/actions.js b/src/store/modules/synclounge/actions.js index e7037d4e..1c3beef1 100644 --- a/src/store/modules/synclounge/actions.js +++ b/src/store/modules/synclounge/actions.js @@ -33,7 +33,10 @@ export default { await dispatch('DISCONNECT_IF_CONNECTED'); const properBase = new URL(getters.GET_SERVER, window.location); + const url = combineUrl('socket.io', properBase.toString()); + console.log('ESTABLISH_SOCKET_CONNECTION', url.toString()); + const { id } = await open(url.origin, { path: url.pathname, transports: ['websocket', 'polling'], diff --git a/src/views/join.vue b/src/views/join.vue index 6230d1e0..fab304ed 100644 --- a/src/views/join.vue +++ b/src/views/join.vue @@ -105,10 +105,12 @@ export default { methods: { ...mapActions('synclounge', [ 'SET_AND_CONNECT_AND_JOIN_ROOM', + 'DISCONNECT_IF_CONNECTED', ]), async joinInvite() { this.error = null; + this.loading = true; try { await this.SET_AND_CONNECT_AND_JOIN_ROOM({ @@ -126,9 +128,10 @@ export default { } } catch (e) { console.log(e); - throw e; - // this.error = e.message; + this.error = e.message; } + + this.loading = false; }, }, };