refactor: un-hardcode file urls

This commit is contained in:
Zoe
2026-05-12 10:28:33 -05:00
parent 9550d44220
commit 47009b1f0a
11 changed files with 2790 additions and 15 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { useFloating, offset, flip, shift, autoUpdate, hide } from '@floating-ui/vue';
import { resolveFileUrl } from '~~/utils/url';
const { open: sidebarOpen, openSidebar } = useSidebar();
const {
@@ -88,7 +89,7 @@ const handleRowClick = (e: MouseEvent) => {
if (file && isImage(file.mimeType)) {
const row = trigger.closest('[data-file-id]') as HTMLElement;
previewOrigin.value = row?.getBoundingClientRect() ?? null;
previewSrc.value = file.url;
previewSrc.value = resolveFileUrl(file.url);
}
break;
}