PageSourceSearch

https://cloud.shellhub.io/assets/AnnouncementDetails-BlyQiGS2.js

js shellhub.io collected 2026-09-25 21:02:17 UTC 3,525 bytes, 1 lines download raw bytes

1import{j as e,r as u}from"./index-BPFw6Db2.js";import{a as f}from"./useAdminAnnouncements-CQQOS0xa.js";import{B as p}from"./Breadcrumb-BPPkFFf-.js";import{d6 as j,d7 as h,d8 as N,d9 as b,da as g,db as v,dc as y,ae as w,a as k,a7 as D,c$ as r,L as i,ag as o,B as A,Y as B,D as d,af as C,E as L}from"./main-DlSV9Dem.js";import{D as E}from"./DeleteAnnouncementDialog-_ym7xaHJ.js";/* empty css                           */import{F}from"./PencilSquareIcon-CsZwUeAK.js";import{F as $}from"./TrashIcon-Bg6_Bbz4.js";import"./useAdminAnnouncementMutations-C_beAgXl.js";function R({content:a}){const s=j({extensions:[h,b.configure({openOnClick:!0,validate:t=>g(t),HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),v.configure({allowBase64:!1}),N],content:a,contentType:"markdown",editable:!1});return s?e.jsx("div",{className:"announcement-editor",children:e.jsx(y,{editor:s})}):e.jsx("div",{className:"min-h-[120px]"})}const l="text-2xs font-mono font-semibold uppercase tracking-label text-text-muted";function S(){const{uuid:a}=w(),s=k(),{data:t,isLoading:m,error:c}=f(a??""),[x,n]=u.useState(!1);return m?e.jsx(D,{label:"Loading announcement details"}):c||!t?e.jsxs("div",{className:"text-center py-24",children:[e.jsx(r,{className:"w-10 h-10 text-text-muted/30 mx-auto mb-3",strokeWidth:1}),e.jsx("p",{className:"text-sm text-text-muted mb-2",children:"Announcement not found"}),e.jsx(i,{to:"/admin/announcements",className:"text-sm text-primary hover:underline",children:"Back to announcements"})]}):e.jsxs("div",{className:"animate-fade-in",children:[e.jsx(p,{items:[{label:"Announcements",to:"/admin/announcements"},{label:t.title}]}),e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-8",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center shrink-0",children:e.jsx(r,{className:"w-7 h-7 text-primary"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-text-primary",children:t.title}),e.jsx("p",{className:"text-xs text-text-muted mt-1 font-mono",children:o(t.date)})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx(A,{variant:"outline",as:i,to:`/admin/announcements/${t.uuid}/edit`,icon:e.jsx(F,{className:"w-4 h-4"}),children:"Edit"}),e.jsx(B,{variant:"danger",size:"lg","aria-label":"Delete announcement",className:"border border-border hover:border-accent-red/30",onClick:()=>n(!0),children:e.jsx($,{className:"w-4 h-4"})})]})]}),e.jsxs(d,{className:"p-5 space-y-4 mb-6",children:[e.jsxs("h3",{className:"text-xs font-semibold text-text-primary flex items-center gap-2",children:[e.jsx(C,{className:"w-4 h-4 text-primary"}),"Properties"]}),e.jsxs("dl",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("dt",{className:l,children:"UUID"}),e.jsxs("dd",{className:"flex items-center gap-1 mt-0.5",children:[e.jsx("span",{className:"text-xs font-mono text-text-primary truncate min-w-0",title:t.uuid,children:t.uuid}),e.jsx(L,{text:t.uuid})]})]}),e.jsxs("div",{children:[e.jsx("dt",{className:l,children:"Date"}),e.jsx("dd",{className:"text-sm text-text-primary font-medium mt-0.5",children:o(t.date)})]})]})]}),e.jsxs(d,{className:"p-5",children:[e.jsx("h3",{className:"text-xs font-semibold text-text-primary mb-4",children:"Content"}),e.jsx(R,{content:t.content},t.uuid)]}),e.jsx(E,{open:x,onClose:()=>n(!1),announcement:t,onDeleted:()=>{s("/admin/announcements")}})]})}export{S as default};

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.