Browse Source

Save last used mensa in localStorage

master
Schneider 4 years ago
parent
commit
430a6c37d4
  1. 5
      src/App.vue
  2. 1
      src/store/index.js

5
src/App.vue

@ -95,6 +95,11 @@ export default {
}
},
created() {
let where = window.localStorage.getItem('mensa_where')
if (where !== null) {
this.where = where
}
this.$store.dispatch('loadMeals', {
when: this.when,
where: this.where

1
src/store/index.js

@ -13,6 +13,7 @@ const state = {
const mutations = {
updateWhere(state, where) {
state.where = where
window.localStorage.setItem('mensa_where', where)
},
updateWhen(state, when) {

Loading…
Cancel
Save