PageSourceSearch

https://8004.ch/assets/AdminAttachmentViewer-u8mgMuc9.js

js 8004.ch collected 2026-09-25 07:32:14 UTC 1,756 bytes, 1 lines download raw bytes

1import{y as p,r as t,s as x,j as e}from"./index-CLTM18rh.js";function w(){const{id:n}=p(),[i,f]=t.useState(null),[c,u]=t.useState(""),[l,s]=t.useState(null),d=t.useCallback(async()=>{if(!n)return;const{data:o,error:h}=await x.from("board_agenda_attachments").select("id, file_path, file_name, content_type").eq("id",n).single();if(h||!o){s("Anhang nicht gefunden oder keine Berechtigung.");return}const a=o;u(a.file_name),document.title=a.file_name;const{data:m,error:g}=await x.storage.from("documents-internal").createSignedUrl(a.file_path,3600);if(g||!m?.signedUrl){s("Anhang konnte nicht geladen werden.");return}const r=await fetch(m.signedUrl);if(!r.ok){s(`Anhang konnte nicht geladen werden (${r.status}).`);return}f(await r.text())},[n]);return t.useEffect(()=>{d()},[d]),l?e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-zinc-950",children:e.jsx("p",{className:"text-sm text-red-600",children:l})}):i===null?e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-zinc-950",children:e.jsx("p",{className:"text-sm text-zinc-400",children:"Anhang wird geladen…"})}):e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-white dark:bg-zinc-950",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-zinc-200 dark:border-zinc-800 shrink-0",children:[e.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-white truncate",children:c}),e.jsx("span",{className:"text-[11.5px] text-zinc-400",children:"Anhang aus dem Vorstandsbereich"})]}),e.jsx("iframe",{title:c,srcDoc:i,sandbox:"allow-scripts allow-popups allow-popups-to-escape-sandbox",className:"flex-1 w-full border-0"})]})}export{w as AdminAttachmentViewer};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.