From f603a9947c60692310b68e4bdeb438b3e58569bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 7 Sep 2023 02:08:56 +0000 Subject: [PATCH] refactoring (moving stuff around) --- ui/src/App.vue | 3 -- ui/src/components/Calendar.vue | 8 +-- ui/src/components/DoorMapEditor.vue | 6 +-- .../{ => calendar}/CalendarDoor.vue | 4 +- .../components/{ => calendar}/MultiModal.vue | 0 .../{rects => calendar}/SVGRect.vue | 2 +- .../{rects => calendar}/ThouCanvas.vue | 2 +- .../editor}/DoorChooser.vue | 4 +- .../editor}/DoorPlacer.vue | 5 +- .../editor}/PreviewDoor.vue | 4 +- .../editor}/RectangleCanvas.vue | 8 +-- .../door_map/calendar.ts => lib/door.ts} | 2 +- .../rects/rectangles.ts => lib/rectangle.ts} | 26 +--------- ui/src/lib/vector2d.ts | 25 +++++++++ ui/tests/unit/rectangle.spec.ts | 52 +++---------------- ui/tests/unit/vector2d.spec.ts | 41 +++++++++++++++ 16 files changed, 99 insertions(+), 93 deletions(-) rename ui/src/components/{ => calendar}/CalendarDoor.vue (91%) rename ui/src/components/{ => calendar}/MultiModal.vue (100%) rename ui/src/components/{rects => calendar}/SVGRect.vue (93%) rename ui/src/components/{rects => calendar}/ThouCanvas.vue (97%) rename ui/src/components/{door_map => calendar/editor}/DoorChooser.vue (92%) rename ui/src/components/{door_map => calendar/editor}/DoorPlacer.vue (95%) rename ui/src/components/{door_map => calendar/editor}/PreviewDoor.vue (97%) rename ui/src/components/{door_map => calendar/editor}/RectangleCanvas.vue (94%) rename ui/src/{components/door_map/calendar.ts => lib/door.ts} (90%) rename ui/src/{components/rects/rectangles.ts => lib/rectangle.ts} (74%) create mode 100644 ui/src/lib/vector2d.ts create mode 100644 ui/tests/unit/vector2d.spec.ts diff --git a/ui/src/App.vue b/ui/src/App.vue index aefb128..d1ba774 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -24,13 +24,11 @@ import { Options, Vue } from "vue-class-component"; import DoorMapEditor from "./components/DoorMapEditor.vue"; import LoginModal from "./components/LoginModal.vue"; -import MultiModal from "./components/MultiModal.vue"; @Options({ components: { DoorMapEditor, LoginModal, - MultiModal, }, }) export default class extends Vue { @@ -39,7 +37,6 @@ export default class extends Vue { declare $refs: { login_modal: LoginModal; - multi_modal: MultiModal; }; public mounted() { diff --git a/ui/src/components/Calendar.vue b/ui/src/components/Calendar.vue index 07a9b0a..ad96c3e 100644 --- a/ui/src/components/Calendar.vue +++ b/ui/src/components/Calendar.vue @@ -19,12 +19,12 @@