From 109dec73d2b4afb6de868b6424413b3aa5802093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 26 Aug 2024 14:14:07 +0000 Subject: [PATCH] first part of refactoring - use `ImageData` and `Loading` types for image transfer - consolidate library directory - remove `advent22` plugin in favor of static `API` class --- ui/src/App.vue | 13 ++++++- ui/src/components/AdminButton.vue | 3 +- ui/src/components/Calendar.vue | 34 ++++++++++++------- ui/src/components/UserView.vue | 33 ++++++++---------- ui/src/components/admin/CalendarAssistant.vue | 23 +++++++------ ui/src/components/admin/ConfigView.vue | 11 +++--- ui/src/components/admin/DoorMapEditor.vue | 12 +++---- ui/src/components/calendar/SVGRect.vue | 15 ++++++-- ui/src/components/calendar/ThouCanvas.vue | 9 ----- ui/src/components/editor/DoorChooser.vue | 7 +++- ui/src/components/editor/DoorPlacer.vue | 7 +++- ui/src/lib/api_error.ts | 4 +++ ui/src/lib/helpers.ts | 10 ++++++ ui/src/main.ts | 4 +-- 14 files changed, 113 insertions(+), 72 deletions(-) diff --git a/ui/src/App.vue b/ui/src/App.vue index 0f7a739..dccb68f 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -7,7 +7,18 @@
-
+ +
+ Hintergrundbild konnte nicht geladen werden +
+
diff --git a/ui/src/components/AdminButton.vue b/ui/src/components/AdminButton.vue index 4defc89..75ab479 100644 --- a/ui/src/components/AdminButton.vue +++ b/ui/src/components/AdminButton.vue @@ -15,6 +15,7 @@ import { Credentials } from "@/lib/model"; import { advent22Store } from "@/lib/store"; import { Options, Vue } from "vue-class-component"; +import { APIError } from "@/lib/api_error"; import BulmaButton from "./bulma/Button.vue"; import LoginModal from "./LoginModal.vue"; @@ -44,7 +45,7 @@ export default class extends Vue { this.store .login(creds) - .catch(this.store.alert_user_error) + .catch((error) => APIError.alert(error)) .finally(() => (this.is_busy = false)); } diff --git a/ui/src/components/Calendar.vue b/ui/src/components/Calendar.vue index dcb5860..6ecf4e9 100644 --- a/ui/src/components/Calendar.vue +++ b/ui/src/components/Calendar.vue @@ -29,14 +29,14 @@
- + @@ -46,6 +46,10 @@ diff --git a/ui/src/components/UserView.vue b/ui/src/components/UserView.vue index 90a431b..7aab8df 100644 --- a/ui/src/components/UserView.vue +++ b/ui/src/components/UserView.vue @@ -1,25 +1,22 @@