feat: prepare new popups

This commit is contained in:
2026-09-08 13:00:53 +02:00
parent be2a9f3a3e
commit 946ba84518
4 changed files with 47 additions and 2 deletions
@@ -50,7 +50,6 @@
max-height: calc(100% - 9rem); max-height: calc(100% - 9rem);
>img, .fa-solid { >img, .fa-solid {
max-width: 60%;
height: 100%; height: 100%;
font-size: 40vh; font-size: 40vh;
} }
@@ -0,0 +1,25 @@
<script setup lang="ts">
import PopupElement from '../popups/PopupElement.vue';
const show = defineModel<boolean>();
const props = defineProps<{
'title': string;
'message'?: string;
}>();
const close = () => {
show.value = false;
};
</script>
<template>
<div>
<PopupElement v-model="show">
<h2>{{ props.title }}</h2>
<p>{{ props.message }}</p>
<button @click="close">
Ok
</button>
</PopupElement>
</div>
</template>
@@ -0,0 +1,21 @@
<script setup lang="ts">
import PopupElement from '../popups/PopupElement.vue';
const show = defineModel<boolean>();
const close = () => {
show.value = false;
};
</script>
<template>
<div>
<!-- TODO: Beacon request when exiting browser (and confirm popup for that!) -->
<PopupElement v-model="show">
<h2>Settings</h2>
<button @click="close">
Ok
</button>
</PopupElement>
</div>
</template>
+1 -1
View File
@@ -24,7 +24,7 @@ let hasConnected = false;
let retries = 0; let retries = 0;
// TODO: Persist settings in local storage // TODO: Persist settings in local storage
// TODO: Polling instead of sse // TODO: Polling instead of sse as option
const connect = (): Promise<void> => { const connect = (): Promise<void> => {
return new Promise( ( resolve, reject ) => { return new Promise( ( resolve, reject ) => {