From 920f2fd9b1823e90aeebd5dd83a554cbf4a66175 Mon Sep 17 00:00:00 2001 From: Marcel Schneider Date: Wed, 17 May 2017 12:16:34 +0200 Subject: [PATCH] Save last used mensa --- src/App.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App.vue b/src/App.vue index 241fba7..e6624b8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -50,6 +50,7 @@ export default { methods: { updateRoute () { this.$router.push(`/${this.where}/${this.when}`) + window.localStorage.setItem('where', this.where) } }, filters: { @@ -61,6 +62,9 @@ export default { today () { return '' + new Date().getDay() } + }, + created () { + this.where = window.localStorage.getItem('where') || 'zentralmensa' } }