Add error for mobile devices.
This commit is contained in:
parent
351318ece4
commit
56c44133d5
1 changed files with 26 additions and 4 deletions
|
|
@ -1,9 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="app" class="maximize">
|
<div id="app" class="maximize">
|
||||||
<CreateJoin v-if="gameState == `login`" />
|
<div v-if="!isMobile" class="maximize">
|
||||||
<GameLobby v-else-if="gameState == `lobby`" />
|
<CreateJoin v-if="gameState == `login`" />
|
||||||
<InGame v-else-if="gameState == `in-game`" />
|
<GameLobby v-else-if="gameState == `lobby`" />
|
||||||
<Attributions />
|
<InGame v-else-if="gameState == `in-game`" />
|
||||||
|
<Attributions />
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-else
|
||||||
|
class="error"
|
||||||
|
>
|
||||||
|
<h1 class="centre">Ghost Writer Online</h1>
|
||||||
|
<p class="centre">
|
||||||
|
To use this site you must be using a laptop, desktop, or iPad.
|
||||||
|
If you are on one of those devices and you still see this message,
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -25,6 +38,9 @@ export default {
|
||||||
gameState() {
|
gameState() {
|
||||||
return this.$store.state.view;
|
return this.$store.state.view;
|
||||||
},
|
},
|
||||||
|
isMobile () {
|
||||||
|
return navigator == null || navigator.userAgent.match(/iPhone|iPod|Android/) != null;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
}
|
}
|
||||||
|
|
@ -44,4 +60,10 @@ html, body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
border: solid 2px red;
|
||||||
|
margin: 50% auto;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue