view image files

This commit is contained in:
2025-07-23 13:47:42 +02:00
parent b3e68deb38
commit 7f8726c225
23 changed files with 553 additions and 45 deletions

View File

@@ -0,0 +1,29 @@
<script setup lang="ts">
const warrenStore = useWarrenStore();
function onOpenUpdate(state: boolean) {
if (!state) {
warrenStore.imageViewer.src = null;
}
}
</script>
<template>
<Dialog
:open="warrenStore.imageViewer.src != null"
@update:open="onOpenUpdate"
>
<DialogTrigger>
<slot />
</DialogTrigger>
<DialogContent
class="w-full overflow-hidden p-0 sm:!max-h-[90vh] sm:!max-w-[90vw]"
>
<img
v-if="warrenStore.imageViewer.src"
class="h-full w-full overflow-hidden !object-contain"
:src="warrenStore.imageViewer.src"
/>
</DialogContent>
</Dialog>
</template>