Skip to content
Snippets Groups Projects
Commit 051ca5ff authored by Henrik Askjer's avatar Henrik Askjer
Browse files

move noMouse to Vuex

parent 08e51024
No related branches found
No related tags found
No related merge requests found
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
let self = this let self = this
setTimeout(() => { setTimeout(() => {
if (!self.$vuetify.noMouse) self.$refs.autocomplete.$refs.input.select() if (!self.$store.state.noMouse) self.$refs.autocomplete.$refs.input.select()
else self.$refs.autocomplete.$refs.input.blur() else self.$refs.autocomplete.$refs.input.blur()
this.suggesting = false this.suggesting = false
}, 1) }, 1)
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
mounted: function() { mounted: function() {
if (! this.$route.hash) { if (! this.$route.hash) {
window.scrollTo(0,0) window.scrollTo(0,0)
if(!this.$vuetify.noMouse) { if(!this.$store.state.noMouse) {
this.$refs.autocomplete.focus() this.$refs.autocomplete.focus()
} }
......
...@@ -92,7 +92,7 @@ const store = new Vuex.Store({ ...@@ -92,7 +92,7 @@ const store = new Vuex.Store({
currentLocale: null, currentLocale: null,
collapseArticles: null, collapseArticles: null,
menuOpen: false, menuOpen: false,
noMouse: window.matchMedia('(hover: none)').matches,
searchRoute: null, searchRoute: null,
aboutOpen: false aboutOpen: false
......
...@@ -15,7 +15,6 @@ export default new Vuetify({ ...@@ -15,7 +15,6 @@ export default new Vuetify({
}, },
scrollBarWidth: 24, scrollBarWidth: 24,
}, },
noMouse: window.matchMedia('(hover: none)').matches,
theme: { theme: {
options: { options: {
customProperties: true customProperties: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment