From 5f195d68fa793c5b002de66fc1ce8154cdc61ec5 Mon Sep 17 00:00:00 2001 From: Henrik Askjer <henrik.askjer@uib.no> Date: Wed, 24 Nov 2021 14:29:55 +0100 Subject: [PATCH] wip --- src/components/Menu.vue | 10 ++++++---- src/main.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Menu.vue b/src/components/Menu.vue index c7e497c1..93a9dc04 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -22,8 +22,8 @@ <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" + :value="$store.state.currentLocale" + @input="changeLocale" prepend-inner-icon="language" outlined :items="locales" @@ -48,6 +48,8 @@ ></v-checkbox> </v-col> </v-row> </v-container> + <v-btn rounded light>Tilbakestill</v-btn> + <v-btn>Lukk</v-btn> </v-card> </template> @@ -57,8 +59,7 @@ export default { name: "Menu", data () { return { - locales: [{text: "bokmål", value: "nob"}, {text: "nynorsk", value: "nno"}, {text:"english", value: "eng"}] - + locales: [{text: "norsk (bokmål)", value: "nob"}, {text: "norsk (nynorsk)", value: "nno"}, {text:"english", value: "eng"}] } }, computed: { @@ -77,6 +78,7 @@ export default { set () { this.$store.commit("toggleInflectionNo") } }, + }, methods: { changeLocale: function(event) { diff --git a/src/main.js b/src/main.js index 10de0c96..f43918a7 100644 --- a/src/main.js +++ b/src/main.js @@ -31,7 +31,7 @@ const store = new Vuex.Store({ state.showSearchToolbar = localStorage.getItem('showSearchToolbar') || false state.showHGNO = localStorage.getItem('showHGNO') || false state.showInflectionNo = localStorage.getItem('showInflectionNo') || false - state.currentLocale = localStorage.getItem('currentLocale') || false + state.currentLocale = localStorage.getItem('currentLocale') || {text:"nob", value: "nob"} }, changeLocale(state, locale) { state.currentLocale = locale -- GitLab