From c6e61d5d761d223bb420cb299b0a8c018e59aa3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Wed, 3 Apr 2024 18:29:08 +0000 Subject: [PATCH] move `*_user_error` from `advent22.ts` to `store.ts`, fixing `advent22Store.init` --- ui/src/components/AdminButton.vue | 2 +- ui/src/components/Calendar.vue | 2 +- ui/src/components/admin/DoorMapEditor.vue | 6 ++- ui/src/plugins/advent22.ts | 59 +--------------------- ui/src/plugins/store.ts | 61 ++++++++++++++++++++++- 5 files changed, 66 insertions(+), 64 deletions(-) diff --git a/ui/src/components/AdminButton.vue b/ui/src/components/AdminButton.vue index 09f0978..433bcdc 100644 --- a/ui/src/components/AdminButton.vue +++ b/ui/src/components/AdminButton.vue @@ -44,7 +44,7 @@ export default class extends Vue { this.store .login(creds) - .catch(this.$advent22.alert_user_error) + .catch(this.store.alert_user_error) .finally(() => (this.is_busy = false)); } diff --git a/ui/src/components/Calendar.vue b/ui/src/components/Calendar.vue index fdd4d14..6790242 100644 --- a/ui/src/components/Calendar.vue +++ b/ui/src/components/Calendar.vue @@ -109,7 +109,7 @@ export default class extends Vue { this.multi_modal!.show_image(image_src, this.$advent22.name_door(day)); }) .catch((error) => { - this.$advent22.alert_user_error(error); + this.store.alert_user_error(error); this.multi_modal!.hide(); }); } diff --git a/ui/src/components/admin/DoorMapEditor.vue b/ui/src/components/admin/DoorMapEditor.vue index 73e678a..bdbef3d 100644 --- a/ui/src/components/admin/DoorMapEditor.vue +++ b/ui/src/components/admin/DoorMapEditor.vue @@ -71,6 +71,7 @@