From af5abc7c8fcf23f05e9b775736efa7be9ba0cd1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 26 Aug 2024 19:09:43 +0000 Subject: [PATCH] major refactoring - use bulma 1.0 - use vue composition API for several components --- ui/package.json | 5 +- ui/src/bulma-scheme.scss | 10 +- ui/src/components/Calendar.vue | 4 +- ui/src/components/admin/DoorMapEditor.vue | 3 +- ui/src/components/bulma/Breadcrumbs.vue | 39 +++----- ui/src/components/bulma/Button.vue | 55 ++++------- ui/src/components/bulma/Drawer.vue | 110 +++++++++------------- ui/src/components/bulma/Secret.vue | 83 ++++++---------- ui/src/components/bulma/Toast.vue | 58 +++++++----- ui/src/components/calendar/SVGRect.vue | 67 +++++-------- ui/src/components/calendar/ThouCanvas.vue | 44 +++------ ui/src/lib/helpers.ts | 5 + ui/src/main.scss | 69 +++----------- ui/yarn.lock | 49 +--------- 14 files changed, 212 insertions(+), 389 deletions(-) diff --git a/ui/package.json b/ui/package.json index 821097c..633251e 100644 --- a/ui/package.json +++ b/ui/package.json @@ -11,7 +11,6 @@ }, "devDependencies": { "@fortawesome/fontawesome-svg-core": "^6.6.0", - "@fortawesome/free-brands-svg-icons": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0", "@fortawesome/vue-fontawesome": "^3.0.8", "@types/chai": "^4.3.17", @@ -26,11 +25,9 @@ "@vue/cli-service": "~5.0.0", "@vue/eslint-config-typescript": "^13.0.0", "@vue/test-utils": "^2.4.6", - "@vueuse/core": "^10.11.1", "animate.css": "^4.1.1", "axios": "^1.7.3", - "bulma": "^0.9.4", - "bulma-prefers-dark": "^0.1.0-beta.1", + "bulma": "^1.0.2", "bulma-toast": "2.4.3", "chai": "^5.1.1", "core-js": "^3.38.0", diff --git a/ui/src/bulma-scheme.scss b/ui/src/bulma-scheme.scss index 856abd7..0173814 100644 --- a/ui/src/bulma-scheme.scss +++ b/ui/src/bulma-scheme.scss @@ -1,11 +1,10 @@ @charset "utf-8"; -@use "sass:map"; //===================== // custom color scheme //===================== -$advent22-colors: ( +$colors: ( "primary": #945DE1, "link": #64B4BD, "info": #8C4E80, @@ -13,10 +12,3 @@ $advent22-colors: ( "warning": #F6CA6B, "danger": #C5443B, ); - -$primary: map.get($advent22-colors, "primary"); -$link: map.get($advent22-colors, "link"); -$info: map.get($advent22-colors, "info"); -$success: map.get($advent22-colors, "success"); -$warning: map.get($advent22-colors, "warning"); -$danger: map.get($advent22-colors, "danger"); \ No newline at end of file diff --git a/ui/src/components/Calendar.vue b/ui/src/components/Calendar.vue index 6ecf4e9..40e4043 100644 --- a/ui/src/components/Calendar.vue +++ b/ui/src/components/Calendar.vue @@ -78,14 +78,14 @@ export default class extends Vue { private multi_modal?: MultiModal; - public toast?: BulmaToast; + public toast?: typeof BulmaToast; private toast_timeout?: number; public modal_handle(modal: MultiModal) { this.multi_modal = modal; } - public toast_handle(toast: BulmaToast) { + public toast_handle(toast: typeof BulmaToast) { this.toast = toast; if (this.store.is_touch_device) return; diff --git a/ui/src/components/admin/DoorMapEditor.vue b/ui/src/components/admin/DoorMapEditor.vue index 14ee36d..78c3f4e 100644 --- a/ui/src/components/admin/DoorMapEditor.vue +++ b/ui/src/components/admin/DoorMapEditor.vue @@ -69,6 +69,7 @@ diff --git a/ui/src/components/bulma/Button.vue b/ui/src/components/bulma/Button.vue index d309766..0bb6d34 100644 --- a/ui/src/components/bulma/Button.vue +++ b/ui/src/components/bulma/Button.vue @@ -1,45 +1,28 @@ + - diff --git a/ui/src/components/bulma/Drawer.vue b/ui/src/components/bulma/Drawer.vue index 60ff821..76a444a 100644 --- a/ui/src/components/bulma/Drawer.vue +++ b/ui/src/components/bulma/Drawer.vue @@ -1,36 +1,37 @@ +