advent22/ui/src/components/editor/DoorChooser.vue

53 lines
1.2 KiB
Vue
Raw Normal View History

2023-01-24 00:14:50 +00:00
<template>
2023-09-10 03:38:24 +00:00
<div class="card-content">
2023-09-10 03:48:50 +00:00
<div class="content is-small">
<h3>Steuerung</h3>
2023-01-24 00:14:50 +00:00
<ul>
<li>Linksklick: Türchen bearbeiten</li>
<li>Tastatur: Tag eingeben</li>
<li>[Enter]: Tag speichern</li>
<li>[Esc]: Eingabe Abbrechen</li>
<li>[Entf]: Tag entfernen</li>
2023-01-24 00:14:50 +00:00
</ul>
</div>
2023-09-09 21:41:06 +00:00
<figure class="image is-unselectable">
<img :src="_ensure_loaded(store.background_image).data_url" />
2023-01-24 00:14:50 +00:00
<ThouCanvas>
2023-09-07 01:17:14 +00:00
<PreviewDoor
2023-09-21 13:29:47 +00:00
v-for="(door, index) in doors"
2023-09-07 01:17:14 +00:00
:key="`door-${index}`"
2023-09-21 13:29:47 +00:00
:door="door"
2023-09-07 01:17:14 +00:00
/>
2023-01-24 00:14:50 +00:00
</ThouCanvas>
</figure>
</div>
2023-01-24 00:14:50 +00:00
</template>
<script lang="ts">
import { ensure_loaded, Loading } from "@/lib/helpers";
2024-08-23 16:38:04 +00:00
import { Door } from "@/lib/rects/door";
import { advent22Store } from "@/lib/store";
2023-01-24 00:14:50 +00:00
import { Options, Vue } from "vue-class-component";
2023-09-10 01:59:19 +00:00
import ThouCanvas from "../calendar/ThouCanvas.vue";
import PreviewDoor from "./PreviewDoor.vue";
2023-01-24 00:14:50 +00:00
@Options({
components: {
ThouCanvas,
PreviewDoor,
2023-01-24 00:14:50 +00:00
},
props: {
2023-02-02 15:29:26 +00:00
doors: Array,
2023-01-24 00:14:50 +00:00
},
})
2023-01-24 23:19:25 +00:00
export default class extends Vue {
2023-09-06 16:25:35 +00:00
public doors!: Door[];
public readonly store = advent22Store();
public _ensure_loaded<T>(o: Loading<T>): T {
return ensure_loaded(o);
}
2023-01-24 00:14:50 +00:00
}
</script>