2023-09-13 16:20:52 +00:00
|
|
|
<template>
|
|
|
|
<Calendar :doors="doors" />
|
2023-11-02 01:12:41 +00:00
|
|
|
<hr />
|
2023-11-03 17:07:25 +00:00
|
|
|
<div class="content" v-html="store.site_config.content" />
|
|
|
|
<template v-if="store.next_door_target !== null">
|
|
|
|
<hr />
|
|
|
|
<div class="content has-text-primary">
|
|
|
|
Zeit zum nächsten Türchen: <CountDown :until="store.next_door_target" />
|
|
|
|
</div>
|
|
|
|
</template>
|
2023-09-13 16:20:52 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { Door } from "@/lib/door";
|
2023-11-03 17:07:25 +00:00
|
|
|
import { advent22Store } from "@/plugins/store";
|
2023-09-13 16:20:52 +00:00
|
|
|
import { Options, Vue } from "vue-class-component";
|
|
|
|
|
|
|
|
import Calendar from "./Calendar.vue";
|
2023-11-03 17:07:25 +00:00
|
|
|
import CountDown from "./CountDown.vue";
|
2023-09-13 16:20:52 +00:00
|
|
|
|
|
|
|
@Options({
|
|
|
|
components: {
|
|
|
|
Calendar,
|
2023-11-03 17:07:25 +00:00
|
|
|
CountDown,
|
2023-09-13 16:20:52 +00:00
|
|
|
},
|
|
|
|
})
|
|
|
|
export default class extends Vue {
|
2023-11-03 17:07:25 +00:00
|
|
|
public readonly store = advent22Store();
|
2023-09-13 16:20:52 +00:00
|
|
|
|
2023-11-04 04:17:36 +00:00
|
|
|
public get doors(): Door[] {
|
|
|
|
const result = [];
|
2023-09-13 16:20:52 +00:00
|
|
|
|
2023-11-04 04:17:36 +00:00
|
|
|
for (const value of this.store.user_doors) {
|
|
|
|
result.push(Door.load(value));
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
2023-09-13 16:20:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|