diff --git a/ui/src/components/door_map/DoorChooser.vue b/ui/src/components/door_map/DoorChooser.vue
index 031ecc3..bdec9e7 100644
--- a/ui/src/components/door_map/DoorChooser.vue
+++ b/ui/src/components/door_map/DoorChooser.vue
@@ -3,28 +3,21 @@
Steuerung
- - Linksklick: Türchen auswählen
- - Tastatur [0]-[9], [Rücktaste]: Tag eingeben
- - Tastatur [Enter]: Tag speichern
- - Tastatur [Esc]: Eingabe Abbrechen
- - Tastatur [Entf]: Tag entfernen
+ - Linksklick: Türchen bearbeiten
+ - Tastatur: Tag eingeben
+ - [Enter]: Tag speichern
+ - [Esc]: Eingabe Abbrechen
+ - [Entf]: Tag entfernen
@@ -35,14 +28,12 @@ import { Options, Vue } from "vue-class-component";
import { Door } from "./calendar";
import ThouCanvas from "../rects/ThouCanvas.vue";
-import SVGRect from "../rects/SVGRect.vue";
-import SVGRectText from "../rects/SVGRectText.vue";
+import PreviewDoor from "./PreviewDoor.vue";
@Options({
components: {
ThouCanvas,
- SVGRect,
- SVGRectText,
+ PreviewDoor,
},
props: {
doors: Array,
@@ -51,53 +42,6 @@ import SVGRectText from "../rects/SVGRectText.vue";
})
export default class extends Vue {
private doors!: Door[];
- private focused = -1;
-
- private click_door(index: number) {
- if (this.focused >= 0) {
- return;
- }
-
- this.focused = index;
-
- const listener = (() => {
- let old_day = this.doors[index].day;
- let num_input = "";
-
- return (event: KeyboardEvent) => {
- if (event.key >= "0" && event.key <= "9") {
- // number input
-
- num_input += event.key;
- this.doors[this.focused].day = Number(num_input);
- } else if (event.key === "Backspace") {
- // remove char
-
- num_input = num_input.slice(0, -1);
- this.doors[this.focused].day = Number(num_input);
- } else if (event.key === "Enter") {
- // accept
-
- this.focused = -1;
- window.removeEventListener("keydown", listener);
- } else if (event.key === "Escape") {
- // abort
-
- this.doors[this.focused].day = old_day;
- this.focused = -1;
- window.removeEventListener("keydown", listener);
- } else if (event.key === "Delete") {
- // delete
-
- this.doors[this.focused].day = -1;
- this.focused = -1;
- window.removeEventListener("keydown", listener);
- }
- };
- })();
-
- window.addEventListener("keydown", listener);
- }
public beforeUnmount() {
this.$emit("update:doors", this.doors);
@@ -108,9 +52,5 @@ export default class extends Vue {
\ No newline at end of file
diff --git a/ui/src/components/door_map/PreviewDoor.vue b/ui/src/components/door_map/PreviewDoor.vue
new file mode 100644
index 0000000..55bf668
--- /dev/null
+++ b/ui/src/components/door_map/PreviewDoor.vue
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ui/src/components/rects/SVGRectText.vue b/ui/src/components/rects/SVGRectText.vue
deleted file mode 100644
index 661cae0..0000000
--- a/ui/src/components/rects/SVGRectText.vue
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file