Compare commits

...

3 commits

5 changed files with 25 additions and 8 deletions

View file

@ -91,7 +91,7 @@ export default class extends Vue {
if (this.store.user_doors.length === 0) return; if (this.store.user_doors.length === 0) return;
this.toast!.show({ duration: 600000, type: "is-warning" }); this.toast!.show({ duration: 600000, type: "is-warning" });
}, 10000); }, 10e3);
}); });
} }

View file

@ -1,5 +1,5 @@
<template> <template>
<template v-if="store.user_doors.length > 0"> <template v-if="store.is_initialized === true">
<Calendar :doors="store.user_doors" /> <Calendar :doors="store.user_doors" />
<hr /> <hr />
<div class="content" v-html="store.site_config.content" /> <div class="content" v-html="store.site_config.content" />
@ -7,9 +7,14 @@
<template v-if="store.next_door_target === null"> <template v-if="store.next_door_target === null">
Alle {{ store.user_doors.length }} Türchen offen! Alle {{ store.user_doors.length }} Türchen offen!
</template> </template>
<template v-else>
<template v-if="store.user_doors.length === 0">
Zeit bis zum ersten Türchen:
</template>
<template v-else> <template v-else>
{{ store.user_doors.length }} Türchen offen. Zeit bis zum nächsten {{ store.user_doors.length }} Türchen offen. Zeit bis zum nächsten
Türchen: Türchen:
</template>
<CountDown :until="store.next_door_target" /> <CountDown :until="store.next_door_target" />
</template> </template>
</div> </div>

View file

@ -150,7 +150,13 @@ export default class extends Vue {
this.loading_doors = true; this.loading_doors = true;
this.load_doors() this.load_doors()
.then(() => toast({ message: "Erfolgreich!", type: "is-success" })) .then(() =>
toast({
message: "Erfolgreich!",
type: "is-success",
duration: 2e3,
}),
)
.catch(() => {}) .catch(() => {})
.finally(() => (this.loading_doors = false)); .finally(() => (this.loading_doors = false));
} }
@ -170,7 +176,13 @@ export default class extends Vue {
this.save_doors() this.save_doors()
.then(() => { .then(() => {
this.load_doors() this.load_doors()
.then(() => toast({ message: "Erfolgreich!", type: "is-success" })) .then(() =>
toast({
message: "Erfolgreich!",
type: "is-success",
duration: 2e3,
}),
)
.catch(() => {}) .catch(() => {})
.finally(() => (this.saving_doors = false)); .finally(() => (this.saving_doors = false));
}) })

View file

@ -19,7 +19,7 @@ advent22Store().init();
app.mount("#app"); app.mount("#app");
bulmaToast.setDefaults({ bulmaToast.setDefaults({
duration: 10000, duration: 10e3,
pauseOnHover: true, pauseOnHover: true,
dismissible: true, dismissible: true,
closeOnClick: false, closeOnClick: false,

View file

@ -8,7 +8,7 @@ export class Advent22 {
public constructor() { public constructor() {
this.axios = axios.create({ this.axios = axios.create({
timeout: 10000, timeout: 10e3,
}); });
} }