PageSourceSearch

https://app.mentes.ai/assets/TaskDoorPage-M_W5xCO8.js

js mentes.ai collected 2026-09-24 14:07:42 UTC 3,126 bytes, 2 lines download raw bytes

1import{u as p,j as e,i as f,p as c,c as n,P as g,f as x}from"./index-B4KdSqZl.js";import{u as b,a as h}from"./use-tasks-gEFuf1h2.js";import{u as y}from"./use-history-back-BJ8ZBOUb.js";import{A as j}from"./arrow-left-ChhOZKly.js";function T(){const{id:r}=p(),{data:t,isLoading:s}=b(r??null),o=h(),d=y("/study");if(s&&!t)return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("div",{className:"size-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})});if(!t?.id)return e.jsx("div",{className:"mx-auto w-full max-w-2xl px-4 py-16 text-center text-sm text-muted-foreground",children:"This task doesn’t exist, or it was deleted."});const l=f(t),a=t.status==="COMPLETED",u=c(t.due_at);return e.jsxs("div",{className:"mx-auto w-full max-w-2xl px-4 py-10",children:[e.jsxs("button",{type:"button",onClick:d,className:"mb-8 inline-flex items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(j,{className:"size-4"}),"Back"]}),e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(k,{task:t,overdue:l,done:a}),e.jsx("span",{className:"rounded-full border border-border px-2.5 py-0.5 font-mono text-[10.5px] uppercase tracking-wider text-muted-foreground",children:"Task"})]}),e.jsx("h1",{className:n("text-balance text-2xl font-semibold leading-tight tracking-tight",a&&"text-muted-foreground line-through"),children:t.description||"Untitled task"}),e.jsxs("p",{className:"mt-2 font-mono text-xs tracking-wide text-muted-foreground",children:["captured ",v(t.created_at)]}),e.jsxs("dl",{className:"mt-6 flex flex-wrap gap-x-9 gap-y-5",children:[e.jsx(i,{label:"Status",value:m(t.status)}),e.jsx(i,{label:"Priority",value:g[t.priority]}),e.jsx(i,{label:"Due",value:u?x(u,"MMM d, yyyy"):"No date",emphasise:l})]}),e.jsx("div",{className:"mt-8 flex items-center gap-2.5",children:e.jsx("button",{type:"button",onClick:()=>o.mutate(t),disabled:o.isPending,className:n("inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-medium transition-colors disabled:opacity-50",a?"border border-border text-foreground hover:border-foreground
1/60":"bg-primary text-primary-foreground hover:opacity-90"),children:a?"Mark not done":"Mark done"})})]})}function k({task:r,overdue:t,done:s}){const o=t&&!s,d=s?"Done":t?"Overdue":m(r.status);return e.jsx("span",{className:n("rounded-full px-2.5 py-0.5 font-mono text-[10.5px] uppercase tracking-wider",o?"bg-foreground font-semibold text-background":"border border-border text-muted-foreground"),children:d})}function i({label:r,value:t,emphasise:s}){return e.jsxs("div",{children:[e.jsx("dt",{className:"mb-1 font-mono text-[10.5px] uppercase tracking-wider text-muted-foreground",children:r}),e.jsx("dd",{className:n("text-[15px] text-foreground",s&&"font-semibold"),children:t})]})}const N={PENDING:"Pending",QUEUED:"Queued",IN_PROGRESS:"In progress",IN_REVIEW:"In review",COMPLETED:"Completed",CANCELLED:"Cancelled"},m=r=>N[r]??r;function v(r){const t=c(r);return t?x(t,"MMM d, yyyy"):"—"}export{T as default};
2//# sourceMappingURL=TaskDoorPage-M_W5xCO8.js.map

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.