0
0
Fork 0

Move userAgent getting to VueX

This commit is contained in:
Oliver-Akins 2021-03-29 14:10:53 -06:00
parent bc94ea898f
commit 0b3121bfe5
2 changed files with 11 additions and 8 deletions

View file

@ -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:
<br><br>
{{ userAgent }}
{{ $store.getters.userAgent }}
</p>
</div>
</div>
@ -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: {