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

add dummy settings

parent 00bb31c5
No related branches found
No related tags found
No related merge requests found
...@@ -19,11 +19,31 @@ ...@@ -19,11 +19,31 @@
</v-btn> </v-btn>
</v-toolbar-items> </v-toolbar-items>
</v-toolbar> </v-toolbar>
<v-container><v-row><v-col> <v-container fluid><v-row align="center" justify="space-between">
<v-col><v-subheader>Visningsspråk</v-subheader>
<v-select rounded
v-value="$store.state.currentLocale"
@submit="changeLocale"
prepend-inner-icon="language"
outlined
:items="locales"
dense>
</v-select></v-col>
</v-row><v-row align="center"><v-col>
<v-checkbox <v-checkbox
v-model="toggleSearchToolbar" v-model="toggleSearchToolbar"
label="Vis valg av ordklasse" label="Vis verktøylinje for søkealternativer"
hide-details
></v-checkbox>
<v-checkbox
v-model="toggleHGNO"
label="Vis homografnumre"
hide-details
></v-checkbox>
<v-checkbox
v-model="toggleInflectionNo"
label="Bis bøyningsnumre"
hide-details hide-details
></v-checkbox> ></v-checkbox>
</v-col> </v-row> </v-col> </v-row>
...@@ -35,11 +55,33 @@ ...@@ -35,11 +55,33 @@
export default { export default {
name: "Menu", name: "Menu",
data () {
return {
locales: [{text: "bokmål", value: "nob"}, {text: "nynorsk", value: "nno"}, {text:"english", value: "eng"}]
}
},
computed: { computed: {
toggleSearchToolbar: { toggleSearchToolbar: {
get () { return this.$store.state.showSearchToolbar}, get () { return this.$store.state.showSearchToolbar},
set () { this.$store.commit("toggleSearchToolbar") set () { this.$store.commit("toggleSearchToolbar")
} }
},
toggleHGNO: {
get () { return this.$store.state.showHGNO},
set () { this.$store.commit("toggleHGNO")
}
},
toggleInflectionNo: {
get () { return this.$store.state.showInflectionNo},
set () { this.$store.commit("toggleInflectionNo")
}
},
},
methods: {
changeLocale: function(event) {
console.log(event)
} }
} }
} }
......
...@@ -21,15 +21,21 @@ Vue.$plausible.enableAutoPageviews() ...@@ -21,15 +21,21 @@ Vue.$plausible.enableAutoPageviews()
const store = new Vuex.Store({ const store = new Vuex.Store({
strict: true, strict: true,
state: { state: {
showRadioButtons: null,
showSearchToolbar: null, showSearchToolbar: null,
locale: null showHGNO: null,
showInflectionNo: null,
currentLocale: null
}, },
mutations: { mutations: {
initStore(state) { initStore(state) {
state.showSearchToolbar = localStorage.getItem('showSearchToolbar') || false state.showSearchToolbar = localStorage.getItem('showSearchToolbar') || false
state.showRadioButtons = localStorage.getItem('showRadioButtons') || false state.showHGNO = localStorage.getItem('showHGNO') || false
state.showInflectionNo = localStorage.getItem('showInflectionNo') || false
state.currentLocale = localStorage.getItem('currentLocale') || false
},
changeLocale(state, locale) {
state.currentLocale = locale
localStorage.setItem("showSearchToolbar", locale);
}, },
toggleSearchToolbar(state) { toggleSearchToolbar(state) {
let value = !state.showSearchToolbar let value = !state.showSearchToolbar
......
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