2023-01-24 00:14:50 +00:00
|
|
|
<template>
|
|
|
|
<section>
|
|
|
|
<div class="content">
|
2023-02-02 18:06:55 +00:00
|
|
|
<p class="title is-5">Steuerung</p>
|
2023-01-24 00:14:50 +00:00
|
|
|
<ul>
|
2023-02-02 18:06:55 +00:00
|
|
|
<li>Linksklick: Türchen hochzählen</li>
|
|
|
|
<li>Rechtsklick: Türchen runterzählen</li>
|
2023-01-24 00:14:50 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<figure class="image">
|
|
|
|
<img src="@/assets/adventskalender.jpg" />
|
|
|
|
<ThouCanvas>
|
2023-02-02 18:06:55 +00:00
|
|
|
<template v-for="(door, index) in doors" :key="`door-${index}`">
|
|
|
|
<SVGRectText
|
|
|
|
v-if="door.day >= 0"
|
|
|
|
:text="String(door.day)"
|
|
|
|
:rectangle="door.position"
|
|
|
|
/>
|
|
|
|
<SVGRect
|
|
|
|
:rectangle="door.position"
|
|
|
|
:focused="door.day >= 0"
|
|
|
|
@click.left="door.day++"
|
|
|
|
@click.right="door.day--"
|
|
|
|
style="cursor: pointer"
|
|
|
|
/>
|
2023-01-24 11:35:45 +00:00
|
|
|
</template>
|
2023-01-24 00:14:50 +00:00
|
|
|
</ThouCanvas>
|
|
|
|
</figure>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { Options, Vue } from "vue-class-component";
|
2023-02-02 15:29:26 +00:00
|
|
|
import { Door } from "./calendar";
|
2023-01-24 00:14:50 +00:00
|
|
|
|
|
|
|
import ThouCanvas from "../rects/ThouCanvas.vue";
|
2023-01-25 11:39:58 +00:00
|
|
|
import SVGRect from "../rects/SVGRect.vue";
|
|
|
|
import SVGRectText from "../rects/SVGRectText.vue";
|
2023-01-24 00:14:50 +00:00
|
|
|
|
|
|
|
@Options({
|
|
|
|
components: {
|
|
|
|
ThouCanvas,
|
2023-01-25 11:39:58 +00:00
|
|
|
SVGRect,
|
|
|
|
SVGRectText,
|
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-02-02 15:29:26 +00:00
|
|
|
emits: ["update:doors"],
|
2023-01-24 00:14:50 +00:00
|
|
|
})
|
2023-01-24 23:19:25 +00:00
|
|
|
export default class extends Vue {
|
2023-02-02 15:29:26 +00:00
|
|
|
private doors!: Door[];
|
2023-01-24 00:14:50 +00:00
|
|
|
|
|
|
|
public beforeUnmount() {
|
2023-02-02 15:29:26 +00:00
|
|
|
this.$emit("update:doors", this.doors);
|
2023-01-24 00:14:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
section > figure {
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
</style>
|