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

add reset button

parent 5f195d68
No related branches found
No related tags found
No related merge requests found
......@@ -46,10 +46,15 @@
label="Bis bøyningsnumre"
hide-details
></v-checkbox>
</v-col> </v-row>
</v-container>
<v-btn rounded light>Tilbakestill</v-btn>
<v-btn>Lukk</v-btn>
</v-list>
</v-card-text>
<v-card-actions><v-spacer/>
<v-btn rounded depressed @click='resetStore'>Tilbakestill</v-btn>
<v-btn rounded depressed @click="$emit('close')">Lukk</v-btn>
</v-card-actions>
</v-card>
</template>
......@@ -84,6 +89,10 @@ export default {
changeLocale: function(event) {
console.log(event)
},
resetStore: function() {
this.$store.commit("resetStore")
}
}
}
......
......@@ -33,6 +33,13 @@ const store = new Vuex.Store({
state.showInflectionNo = localStorage.getItem('showInflectionNo') || false
state.currentLocale = localStorage.getItem('currentLocale') || {text:"nob", value: "nob"}
},
resetStore(state) {
localStorage.removeItem("showSearchToolbar")
localStorage.removeItem("showHGNO")
localStorage.removeItem("showInflectionNo")
localStorage.removeItem("currentLocale")
this.commit("initStore", state)
},
changeLocale(state, locale) {
state.currentLocale = locale
localStorage.setItem("showSearchToolbar", locale);
......
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