diff --git a/src/components/Menu.vue b/src/components/Menu.vue index c7e497c1cc237c0c652c2a3dab15c320e312bb41..93a9dc04fa616fb01173c40188ba01537c530f8f 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 10de0c96e81adab7b90cc1bdfcf7455a46bef50b..f43918a7c181c8e1b6d802bd09c31b354469f732 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