From 0b3121bfe5b24041619188ed2635cd4aa2890f4e Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 29 Mar 2021 14:10:53 -0600 Subject: [PATCH 1/2] Move userAgent getting to VueX --- web/src/App.vue | 10 ++-------- web/src/store/index.js | 9 +++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/web/src/App.vue b/web/src/App.vue index c7c8102..8615caf 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -45,7 +45,7 @@ If you are on one of those devices and you still see this message, please contact "ghostwriter{at}resonym.com" with the following information:

- {{ userAgent }} + {{ $store.getters.userAgent }}

@@ -76,14 +76,8 @@ export default { gameState() { return this.$store.state.view; }, - userAgent() { - if (navigator == null) { - return "Navigator Undefined"; - }; - return navigator.userAgent; - }, isMobile () { - return this.userAgent.match(/(Navigator Undefined)|iPhone|iPod|Android/) != null; + return this.$store.getters.userAgent.match(/(Navigator Undefined)|iPhone|iPod|Android/) != null; }, }, methods: { diff --git a/web/src/store/index.js b/web/src/store/index.js index 590a946..b40c3c3 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -51,6 +51,15 @@ export default new Vuex.Store({ }; return ``; }, + userAgent() { + if (navigator == null) { + return "Navigator Undefined"; + }; + return navigator.userAgent; + }, + isFirefox(state, getters) { + return getters.userAgent.match(/(Navigator Undefined)|Firefox/g) != null; + }, }, mutations: { resetState(state) { From 983e11ff27ba4bea2335cc83a92c8ddbdf4bfbe2 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 29 Mar 2021 14:11:06 -0600 Subject: [PATCH 2/2] Add FF warning message --- web/src/views/CreateJoin.vue | 26 ++++++++++++++++++++++++++ web/src/views/Lobby.vue | 27 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/web/src/views/CreateJoin.vue b/web/src/views/CreateJoin.vue index c60b667..bce6bad 100644 --- a/web/src/views/CreateJoin.vue +++ b/web/src/views/CreateJoin.vue @@ -9,6 +9,23 @@ > +
+
+

+ WARNING: +
+ It appears as though you are using the Firefox web browser, + please note that Firefox is not recommended for use with + this site. Especially while streaming. This is to have the + site look as good as possible. +

+
+