From 513b6ecf10ecdc4300f4c058ab23f9dc60357313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Fri, 15 Sep 2023 16:55:03 +0000 Subject: [PATCH] ConfigView.next_door --- ui/src/components/CountDown.vue | 58 ++++++++++++++++++++++++++ ui/src/components/admin/ConfigView.vue | 12 ++++-- 2 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 ui/src/components/CountDown.vue diff --git a/ui/src/components/CountDown.vue b/ui/src/components/CountDown.vue new file mode 100644 index 0000000..1f49aa0 --- /dev/null +++ b/ui/src/components/CountDown.vue @@ -0,0 +1,58 @@ + + + diff --git a/ui/src/components/admin/ConfigView.vue b/ui/src/components/admin/ConfigView.vue index 591932e..5e4a8b9 100644 --- a/ui/src/components/admin/ConfigView.vue +++ b/ui/src/components/admin/ConfigView.vue @@ -16,9 +16,8 @@
Offene Türchen
{{ num_user_doors }}
-
Nächstes Türchen in
- -
dd-hh-mm-ss
+
Zeit zum nächsten Türchen
+
Erstes Türchen
{{ config_model.puzzle.first }}
@@ -126,6 +125,7 @@ import { Options, Vue } from "vue-class-component"; import BulmaDrawer from "../bulma/Drawer.vue"; import BulmaSecret from "../bulma/Secret.vue"; +import CountDown from "../CountDown.vue"; interface Credentials { username: string; @@ -136,6 +136,7 @@ interface Credentials { components: { BulmaDrawer, BulmaSecret, + CountDown, }, }) export default class extends Vue { @@ -164,6 +165,7 @@ export default class extends Vue { }; public day_parts: DayStrModel[] = []; public num_user_doors = 0; + public next_door: number | null = null; public dav_credentials: Credentials = { username: "", password: "" }; public ui_credentials: Credentials = { username: "", password: "" }; @@ -172,11 +174,13 @@ export default class extends Vue { this.$advent22.api_get("admin/config_model"), this.$advent22.api_get("admin/day_parts"), this.$advent22.api_get("user/doors"), + this.$advent22.api_get("user/next_door"), ]) - .then(([config_model, day_parts, user_doors]) => { + .then(([config_model, day_parts, user_doors, next_door]) => { this.config_model = config_model; this.day_parts = day_parts; this.num_user_doors = user_doors.length; + this.next_door = next_door; ready(); })