Detect if device supports touch on login

This commit is contained in:
Roman Cervantes 2018-12-01 13:36:09 -07:00
parent 58da55f002
commit 5ccc12a171
2 changed files with 3 additions and 0 deletions

View file

@ -2,6 +2,8 @@ import Vue from 'vue';
export default { export default {
SET_USER(state, data) { SET_USER(state, data) {
state.isTouchDevice = ('ontouchstart' in window);
state.user = { state.user = {
uid: data.uid, uid: data.uid,
displayName: data.displayName, displayName: data.displayName,

View file

@ -9,4 +9,5 @@ export default {
games: {}, games: {},
publicGameData: {}, publicGameData: {},
game: null, game: null,
isTouchDevice: false,
}; };