1import{a as p,u as h,a9 as k,j as e,F as x,br as j,ad as v,S as u,T as a,r as S,bs as y,bt as w,bu as C,B as d,H as i,bv as z,y as L,bw as H,bx as T}from"./index-CQhC_N3X.js";function D(){const o=p();h(o.pageTitle.feedback);const{data:t,isLoading:s}=k({queryKey:["my-feedback"],queryFn:T,staleTime:3e4});if(s)return e.jsx(x,{justify:"center",py:20,children:e.jsx(j,{size:"lg",color:"velox.muted"})});const r=(t==null?void 0:t.items)??[];return r.length===0?e.jsx(v,{title:o.feedback.list.empty,description:o.feedback.list.emptyHint}):e.jsxs(u,{gap:3,children:[e.jsx(x,{justify:"space-between",align:"center",children:e.jsx(a,{fontSize:"sm",color:"velox.muted",children:o.feedback.list.contactHint})}),e.jsx(u,{gap:2,children:r.map(n=>e.jsx(m,{item:n},n.id))})]})}function m({item:o}){const t=p(),[s,r]=S.useState(!1),n=o.kind==="bug"?t.feedback.kindBug:o.kind==="feature"?t.feedback.kindFeature:t.feedback.kindOther,f=o.kind==="bug"?y:o.kind==="feature"?w:C,g=o.kind==="bug"&&o.bugSubKind?t.feedback.bugSubKind[o.bugSubKind]:null,l=!!(o.contact||o.txHash||o.token||o.page);return e.jsxs(d,{bg:"velox.card",borderWidth:"1px",borderColor:"velox.border",borderRadius:"xl",px:4,py:3.5,cursor:l?"pointer":void 0,onClick:l?()=>r(b=>!b):void 0,transition:"border-color .15s",_hover:l?{borderColor:"velox.borderStrong"}:void 0,children:[e.jsxs(x,{justify:"space-between",align:"flex-start",gap:3,children:[e.jsxs(d,{flex:"1",minW:0,children:[e.jsxs(i,{gap:2,mb:2,wrap:"wrap",children:[e.jsxs(i,{gap:1.5,px:2,py:.5,borderRadius:"md",bg:"velox.card2",fontSize:"11px",fontWeight:"600",color:"velox.muted",children:[e.jsx(f,{size:12}),e.jsx(a,{as:"span",children:n})]}),g&&e.jsx(a,{fontSize:"11px",color:"velox.muted",children:g}),e.jsx(B,{status:o.status})]}),e.jsx(a,{fontSize:"13px",color:"velox.text",lineHeight:"1.6",...!s&&{css:{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"}},children:o.content})]}),e.jsxs(i,{gap:1.5,flexShrink:0,children:[e.jsx(a,{fontSize:"11px",color:"velox.muted",whiteSpace:"nowrap",children:F(o.createdAt)}),l&&e.jsx(d,{color:"velox.muted",fontSize:"13px",children:s?e.jsx(z,{}):e.jsx(L,{})})]})]}),s&&l&&e.jsx(d,{mt:3,pt:3,borderTopWidth:"1px",borderColor:"velox.border",onClick:b=>b.stopPropagation(),cursor:"auto",children:e.jsxs(u,{gap:2,children:[o.txHash&&e.jsx(c,{label:t.feedback.list.detailTxHash,value:o.txHash,mono:!0}),o.token&&e.jsx(c,{label:t.feedback.list.detailToken,value:o.token,mono:!0}),o.contact&&e.jsx(c,{label:t.feedback.list.detailContact,value:o.contact}),o.page&&e.jsx(c,{label:t.feedback.list.detailPage,value:o.page})]})})]})}function c({label:o,value:t,mono:s}){return e.jsxs(x,{gap:3,fontSize:"12px",align:"baseline",children:[e.jsx(a,{color:"velox.muted",flexShrink:0,w:"80px",children:o}),e.jsx(a,{color:"velox.text",fontFamily:s?"mono":void 0,fontSize:s?"11px":"12px",wordBreak:"break-all",userSelect:"text",children:t})]})}function B({status:o}){const t=p(),s={open:{label:t.feedback.list.statusOpen,color:"velox.yellow",bg:"velox.yellowSoft",border:"velox.yellowBorder"},triaged:{label:t.feedback.list.statusTriaged,color:"velox.green",bg:"velox.accentSoft",border:"velox.accentBorder"},closed:{label:t.feedback.list.statusClosed,color:"velox.muted",bg:"velox.card2",border:"velox.border"}},r=s[o]??s.open;return e.jsxs(i,{gap:1,px:2,py:.5,borderRadius:"md",fontSize:"11px",fontWeight:"600",color:r.color,bg:r.bg,borderWidth:"1px",borderColor:r.border,children:[e.jsx(H,{size:10}),e.jsx(a,{as:"span",children:r.label})]})}function F(o){const t=new Date(o),s=r=>String(r).padStart(2,"0");return`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())} ${s(t.getHours())}:${s(t.getMinutes())}`}export{D as FeedbackListPage};
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.