diff --git a/src/App.vue b/src/App.vue index cae0a39..e57e356 100644 --- a/src/App.vue +++ b/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 diff --git a/src/store/index.js b/src/store/index.js index f8337f3..db901f7 100644 --- a/src/store/index.js +++ b/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) {