From e43c2f6fcecfc3a64f6c637221248a20ceecffa7 Mon Sep 17 00:00:00 2001 From: Travis Shivers Date: Mon, 22 Jun 2020 21:42:24 -0500 Subject: [PATCH] Add http link on client connect error --- src/components/autojoin.vue | 17 +++++++++-------- src/components/clientpicker.vue | 34 +++++++++++++++++++++++++++++++-- src/components/createroom.vue | 2 +- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/src/components/autojoin.vue b/src/components/autojoin.vue index 7103d572..b84ad082 100644 --- a/src/components/autojoin.vue +++ b/src/components/autojoin.vue @@ -8,6 +8,13 @@ :loading="loading" class="pa-4" > + + + + - - Welcome to SyncLounge - - - Unable to connect to client + + + Unable to connect to client. + + + + Try with http + + Try + + + @@ -14,7 +33,8 @@ refresh @@ -32,6 +52,8 @@ :client-id="id" /> + + @@ -58,6 +80,14 @@ export default { 'GET_CHOSEN_CLIENT_ID', 'GET_PLEX_CLIENT_IDS_SORTED_BY_LAST_SEEN', ]), + + isHttps() { + return window.location.protocol === 'https:'; + }, + + httpLink() { + return `http:${window.location.href.substring(window.location.protocol.length)}`; + }, }, mounted() { diff --git a/src/components/createroom.vue b/src/components/createroom.vue index f9835f39..e2d6b316 100644 --- a/src/components/createroom.vue +++ b/src/components/createroom.vue @@ -7,7 +7,7 @@