diff --git a/ui/src/components/CalendarAssistant.vue b/ui/src/components/CalendarAssistant.vue index 2e502b4..823af9c 100644 --- a/ui/src/components/CalendarAssistant.vue +++ b/ui/src/components/CalendarAssistant.vue @@ -4,6 +4,7 @@ @@ -64,6 +65,8 @@ import MultiModal from "./calendar/MultiModal.vue"; }) export default class extends Vue { public is_loaded = false; + public is_failed = false; + public day_parts: DayStrModel[] = []; public day_image_names: DayStrModel[] = []; @@ -73,6 +76,7 @@ export default class extends Vue { public on_open(): void { this.is_loaded = false; + this.is_failed = false; Promise.all([ this.$advent22.api_get("admin/day_parts"), @@ -83,7 +87,7 @@ export default class extends Vue { this.day_image_names = day_image_names; this.is_loaded = true; }) - .catch(console.error); + .catch(() => (this.is_failed = true)); } public door_click(day: number) { diff --git a/ui/src/components/ConfigView.vue b/ui/src/components/ConfigView.vue index c3c50a4..2171632 100644 --- a/ui/src/components/ConfigView.vue +++ b/ui/src/components/ConfigView.vue @@ -2,6 +2,7 @@ @@ -144,6 +145,8 @@ interface Credentials { }) export default class extends Vue { public is_loaded = false; + public is_failed = true; + public config_model: ConfigModel = { puzzle: { title: "Advent22", @@ -175,6 +178,7 @@ export default class extends Vue { public on_open(): void { this.is_loaded = false; + this.is_failed = false; Promise.all([ this.$advent22.api_get("admin/config_model"), @@ -188,7 +192,7 @@ export default class extends Vue { this.is_loaded = true; }) - .catch(console.error); + .catch(() => (this.is_failed = true)); } public load_dav_credentials(): void { @@ -200,7 +204,7 @@ export default class extends Vue { password: password, }; }) - .catch(console.error); + .catch(() => {}); } public load_ui_credentials(): void { @@ -212,7 +216,7 @@ export default class extends Vue { password: password, }; }) - .catch(console.error); + .catch(() => {}); } } diff --git a/ui/src/components/DoorMapEditor.vue b/ui/src/components/DoorMapEditor.vue index f7d685f..ba87bb9 100644 --- a/ui/src/components/DoorMapEditor.vue +++ b/ui/src/components/DoorMapEditor.vue @@ -1,5 +1,10 @@ @@ -39,6 +46,11 @@ import { Options, Vue } from "vue-class-component"; default: "", }, ready: Boolean, + failed: { + type: Boolean, + required: false, + default: false, + }, refreshable: { type: Boolean, required: false, @@ -50,6 +62,7 @@ import { Options, Vue } from "vue-class-component"; export default class extends Vue { public header!: string; public ready!: boolean; + public failed!: boolean; public refreshable!: boolean; public is_open = false;