diff --git a/ui/src/components/Calendar.vue b/ui/src/components/Calendar.vue
index 40e4043..52c7bff 100644
--- a/ui/src/components/Calendar.vue
+++ b/ui/src/components/Calendar.vue
@@ -45,14 +45,13 @@
-
diff --git a/ui/src/components/admin/CalendarAssistant.vue b/ui/src/components/admin/CalendarAssistant.vue
index 2bf9297..2d30b25 100644
--- a/ui/src/components/admin/CalendarAssistant.vue
+++ b/ui/src/components/admin/CalendarAssistant.vue
@@ -36,7 +36,7 @@
:key="`btn-${day}`"
:class="'tag is-' + (data.part === '' ? 'warning' : 'info')"
icon="fa-solid fa-door-open"
- :text="day"
+ :text="day.toString()"
@click.left="door_click(day)"
/>
@@ -45,74 +45,64 @@
-
diff --git a/ui/src/components/admin/ConfigView.vue b/ui/src/components/admin/ConfigView.vue
index ea4372f..b91722b 100644
--- a/ui/src/components/admin/ConfigView.vue
+++ b/ui/src/components/admin/ConfigView.vue
@@ -183,105 +183,96 @@
-
diff --git a/ui/src/components/bulma/Breadcrumbs.vue b/ui/src/components/bulma/Breadcrumbs.vue
index 57f32e3..dd0f192 100644
--- a/ui/src/components/bulma/Breadcrumbs.vue
+++ b/ui/src/components/bulma/Breadcrumbs.vue
@@ -28,7 +28,7 @@ const props = defineProps<{
}>();
const emit = defineEmits<{
- "update:modelValue": [number];
+ (event: "update:modelValue", value: number): void;
}>();
function change_step(next_step: number) {
diff --git a/ui/src/components/bulma/Drawer.vue b/ui/src/components/bulma/Drawer.vue
index 6250e0e..7d2e586 100644
--- a/ui/src/components/bulma/Drawer.vue
+++ b/ui/src/components/bulma/Drawer.vue
@@ -53,12 +53,7 @@ withDefaults(
);
const emit = defineEmits<{
- open: [
- {
- ready(): void;
- fail(): void;
- },
- ];
+ (event: "open", ready: () => void, fail: () => void): void;
}>();
const is_open = ref(false);
@@ -70,10 +65,11 @@ function toggle() {
if (is_open.value) {
state.value = "loading";
- emit("open", {
- ready: () => (state.value = "ready"),
- fail: () => (state.value = "failed"),
- });
+ emit(
+ "open",
+ () => (state.value = "ready"),
+ () => (state.value = "failed"),
+ );
}
}
diff --git a/ui/src/components/bulma/Secret.vue b/ui/src/components/bulma/Secret.vue
index 845c685..a691b54 100644
--- a/ui/src/components/bulma/Secret.vue
+++ b/ui/src/components/bulma/Secret.vue
@@ -16,7 +16,7 @@ import { ref } from "vue";
import BulmaButton from "./Button.vue";
const emit = defineEmits<{
- load: [];
+ (event: "load"): void;
}>();
const state = ref<"start" | "click" | "show">("start");
diff --git a/ui/src/components/bulma/Toast.vue b/ui/src/components/bulma/Toast.vue
index 3e9dcf4..86d9ec2 100644
--- a/ui/src/components/bulma/Toast.vue
+++ b/ui/src/components/bulma/Toast.vue
@@ -12,19 +12,19 @@ import * as bulmaToast from "bulma-toast";
import { onMounted, ref } from "vue";
const emit = defineEmits<{
- handle: [
- {
- show(options: bulmaToast.Options): void;
- hide(): void;
- },
- ];
+ (
+ event: "handle",
+ show: (options: bulmaToast.Options) => void,
+ hide: () => void,
+ ): void;
}>();
const message = ref(null);
onMounted(() =>
- emit("handle", {
- show(options: bulmaToast.Options = {}) {
+ emit(
+ "handle",
+ (options: bulmaToast.Options = {}) => {
if (!(message.value instanceof HTMLElement)) return;
bulmaToast.toast({
@@ -33,7 +33,7 @@ onMounted(() =>
message: message.value,
});
},
- hide() {
+ () => {
if (!(message.value instanceof HTMLElement)) return;
const toast_div = message.value.parentElement;
@@ -44,6 +44,6 @@ onMounted(() =>
dbutton.click();
},
- }),
+ ),
);
diff --git a/ui/src/components/calendar/SVGRect.vue b/ui/src/components/calendar/SVGRect.vue
index 7350a51..d167abc 100644
--- a/ui/src/components/calendar/SVGRect.vue
+++ b/ui/src/components/calendar/SVGRect.vue
@@ -49,6 +49,9 @@ function get_bg_aspect_ratio(): number {
if (!loading_success(store.background_image)) return 1;
return store.background_image.height / store.background_image.width;
+
+ // aspect_ratio is width/height!
+ // return store.background_image.aspect_ratio;
}
diff --git a/ui/src/lib/model.ts b/ui/src/lib/model.ts
index 2a0b0e9..6f24170 100644
--- a/ui/src/lib/model.ts
+++ b/ui/src/lib/model.ts
@@ -58,8 +58,9 @@ export interface DoorSaved {
}
export interface ImageData {
- height: number;
width: number;
+ height: number;
+ aspect_ratio: number;
data_url: string;
}