diff --git a/ui/src/components/admin/CalendarAssistant.vue b/ui/src/components/admin/CalendarAssistant.vue index a3944f2..2a210e1 100644 --- a/ui/src/components/admin/CalendarAssistant.vue +++ b/ui/src/components/admin/CalendarAssistant.vue @@ -3,8 +3,7 @@ @@ -54,7 +53,7 @@ import { Options, Vue } from "vue-class-component"; import MultiModal from "../MultiModal.vue"; import BulmaButton from "../bulma/Button.vue"; -import BulmaDrawer from "../bulma/Drawer.vue"; +import BulmaDrawer, { DrawerState } from "../bulma/Drawer.vue"; @Options({ components: { @@ -64,8 +63,7 @@ import BulmaDrawer from "../bulma/Drawer.vue"; }, }) export default class extends Vue { - public is_loaded = false; - public is_failed = false; + public drawer_state = DrawerState.Loading; public day_parts: DayStrModel[] = []; public day_image_names: DayStrModel[] = []; @@ -75,8 +73,7 @@ export default class extends Vue { }; public on_open(): void { - this.is_loaded = false; - this.is_failed = false; + this.drawer_state = DrawerState.Loading; Promise.all([ this.$advent22.api_get("admin/day_parts"), @@ -85,9 +82,10 @@ export default class extends Vue { .then(([day_parts, day_image_names]) => { this.day_parts = day_parts; this.day_image_names = day_image_names; - this.is_loaded = true; + + this.drawer_state = DrawerState.Ready; }) - .catch(() => (this.is_failed = true)); + .catch(() => (this.drawer_state = DrawerState.Failed)); } public door_click(day: number) { diff --git a/ui/src/components/admin/ConfigView.vue b/ui/src/components/admin/ConfigView.vue index bcd618b..2beb907 100644 --- a/ui/src/components/admin/ConfigView.vue +++ b/ui/src/components/admin/ConfigView.vue @@ -1,8 +1,7 @@