zdashboard 2.6.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +861 -282
- package/dist/cli.js.map +1 -1
- package/dist/web/assets/ApprovalPanel-CXQRioSw.js +1 -0
- package/dist/web/assets/BatchDashboard-BigPUG8g.js +2 -0
- package/dist/web/assets/CheckpointViewer-DBmTkC_E.js +1 -0
- package/dist/web/assets/ConfigField-BqjVlteZ.js +1 -0
- package/dist/web/assets/DependencyGraph-DPVneSQh.js +1 -0
- package/dist/web/assets/FileIcon-tDB2mYGC.js +279 -0
- package/dist/web/assets/{FilterPills-B6u1IBeC.js → FilterPills-CvO0pz85.js} +1 -1
- package/dist/web/assets/{ProgressBar-CbyvyLzw.js → ProgressBar-DIoIeYBA.js} +1 -1
- package/dist/web/assets/{Workspace-DQmfVJh6.js → Workspace-B2nKQnQf.js} +1 -1
- package/dist/web/assets/badge-CmIMTBDj.js +1 -0
- package/dist/web/assets/index-BHL7sr_b.css +1 -0
- package/dist/web/assets/{index-BvuOeKbq.js → index-CtlFZEcM.js} +1 -1
- package/dist/web/assets/{index-BfA6l4to.js → index-yx7txO50.js} +1565 -1565
- package/dist/web/assets/web-BBv8hkwo.js +1 -0
- package/dist/web/assets/web-BNjs9lCy.js +139 -0
- package/dist/web/assets/{web-BXCBKn6i.js → web-BX2cajm6.js} +1 -1
- package/dist/web/assets/web-BpBEbcYZ.js +1 -0
- package/dist/web/assets/web-CGbbhItO.js +2 -0
- package/dist/web/assets/web-CcDed_yx.js +1 -0
- package/dist/web/assets/{web-C8I10oqh.js → web-DsIjKVnn.js} +1 -1
- package/dist/web/assets/web-Eo4S0U_k.js +2 -0
- package/dist/web/favicon.svg +13 -5
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/FileIcon-B0-2gV6a.js +0 -10
- package/dist/web/assets/MdViewer-Cvh3TNQI.js +0 -270
- package/dist/web/assets/badge-DTb6qo3S.js +0 -1
- package/dist/web/assets/index-DQkehbup.css +0 -1
- package/dist/web/assets/web-5newSm97.js +0 -1
- package/dist/web/assets/web-BOg9UnpC.js +0 -1
- package/dist/web/assets/web-BcTJQUKr.js +0 -1
- package/dist/web/assets/web-CLCAgjmg.js +0 -1
- package/dist/web/assets/web-CXE89yN1.js +0 -2
- /package/dist/web/assets/{MdViewer-BTcE7LSd.css → FileIcon-BTcE7LSd.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,j as e}from"./index-yx7txO50.js";function u({state:a,onApprove:i}){const[l,c]=n.useState(a.parallelism),[t,m]=n.useState([]),o=s=>{m(d=>d.includes(s)?d.filter(h=>h!==s):[...d,s])},r=a.changes.filter(s=>s.status==="pending"||s.status==="parked"),x=r.reduce((s,d)=>s+(d.estimatedDuration||0),0);return e.jsxs("div",{className:"max-w-4xl mx-auto p-6",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6",children:"📋 执行计划确认"}),e.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-8",children:[e.jsxs("div",{className:"p-4 rounded-lg border border-border bg-card",children:[e.jsx("div",{className:"text-2xl font-bold",children:a.changes.length}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"总变更数"})]}),e.jsxs("div",{className:"p-4 rounded-lg border border-border bg-card",children:[e.jsx("div",{className:"text-2xl font-bold",children:r.filter(s=>s.status==="pending").length}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"待执行"})]}),e.jsxs("div",{className:"p-4 rounded-lg border border-border bg-card",children:[e.jsx("div",{className:"text-2xl font-bold",children:r.filter(s=>s.risk==="high").length}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"高风险项"})]}),e.jsxs("div",{className:"p-4 rounded-lg border border-border bg-card",children:[e.jsxs("div",{className:"text-2xl font-bold",children:["~",Math.ceil(x/60),"h"]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"预估总时长"})]})]}),e.jsxs("div",{className:"mb-6 p-4 rounded-lg border border-border bg-card",children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"并行度"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("input",{type:"range",min:"1",max:"8",value:l,onChange:s=>c(Number(s.target.value)),className:"flex-1"}),e.jsx("span",{className:"text-lg font-mono font-bold w-12 text-center",children:l})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"建议并行度 2-4。过高可能导致工作树冲突或资源竞争。"})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"变更列表"}),e.jsx("div",{className:"space-y-2",children:r.map(s=>e.jsx("div",{className:`p-4 rounded-lg border ${s.status==="parked"?"border-warning bg-warning/5":"border-border"}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"checkbox",checked:t.includes(s.name),onChange:()=>o(s.name),className:"h-4 w-4"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:s.name}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["优先级: ",s.priority," · 风险: ",s.risk," · 预估: ",s.estimatedDuration," 分钟"]})]})]}),s.status==="parked"&&e.jsx("span",{className:"text-xs px-2 py-1 rounded bg-warning/20 text-warning",children:"高风险"})]})},s.name))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["已跳过 ",t.length," 个变更,预计执行 ",r.filter(s=>!t.includes(s.name)).length," 个"]}),e.jsx("div",{className:"flex gap-3",children:e.jsx("button",{onClick:()=>i(l,t),className:"px-6 py-2.5 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90",children:"确认执行"})})]})]})}export{u as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DependencyGraph-DPVneSQh.js","assets/index-yx7txO50.js","assets/index-BHL7sr_b.css","assets/ApprovalPanel-CXQRioSw.js","assets/CheckpointViewer-DBmTkC_E.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r,j as e,_ as o}from"./index-yx7txO50.js";const w=r.lazy(()=>o(()=>import("./DependencyGraph-DPVneSQh.js"),__vite__mapDeps([0,1,2]))),k=r.lazy(()=>o(()=>import("./ApprovalPanel-CXQRioSw.js"),__vite__mapDeps([3,1,2]))),S=r.lazy(()=>o(()=>import("./CheckpointViewer-DBmTkC_E.js"),__vite__mapDeps([4,1,2]))),l="/__apply-batch";function P(){const[t,g]=r.useState(null),[j,b]=r.useState(!0),[i,p]=r.useState(null),[n,d]=r.useState("graph"),a=r.useCallback(async()=>{try{const c=await(await fetch(`${l}`)).json();g(c)}catch{}b(!1)},[]);r.useEffect(()=>{a();const s=setInterval(a,2e3);return()=>clearInterval(s)},[a]);const h=async(s,c)=>{await fetch(`${l}/approve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parallelism:s,skipChanges:c})}),a()},y=async s=>{await fetch(`${l}/retry`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s})}),a()},v=async()=>{await fetch(`${l}/pause`,{method:"POST"}),a()},N=async()=>{await fetch(`${l}/resume`,{method:"POST"}),a()};if(j)return e.jsx("div",{className:"flex items-center justify-center h-screen",children:e.jsx("div",{className:"text-lg text-muted-foreground",children:"加载中..."})});if(!t)return e.jsx("div",{className:"flex items-center justify-center h-screen",children:e.jsx("div",{className:"text-lg text-muted-foreground",children:"暂无批量执行数据"})});const m=t.changes.filter(s=>s.status==="completed").length,x=t.changes.filter(s=>s.status==="failed").length,u=t.changes.filter(s=>s.status==="parked").length,_=t.changes.filter(s=>s.status==="running").length,f=t.changes.length;return e.jsxs("div",{className:"flex flex-col h-screen",children:[e.jsxs("header",{className:"flex items-center justify-between px-6 py-3 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"⚡ zapply batch"}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsxs("span",{children:["并行度: ",t.parallelism]}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["进度: ",m+x,"/",f]}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["🔄 ",_," 运行中"]}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["✅ ",m," 成功"]}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["❌ ",x," 失败"]}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["⏸️ ",u," parked"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[t.status==="running"&&e.jsx("button",{onClick:v,className:"px-3 py-1.5 text-sm rounded-md border border-border hover:bg-accent",children:"暂停"}),t.status==="paused"&&e.jsx("button",{onClick:N,className:"px-3 py-1.5 text-sm rounded-md border border-border hover:bg-accent",children:"恢复"}),e.jsx("button",{onClick:()=>d("graph"),className:`px-3 py-1.5 text-sm rounded-md ${n==="graph"?"bg-primary text-primary-foreground":"border border-border hover:bg-accent"}`,children:"依赖图"}),e.jsx("button",{onClick:()=>d("approval"),className:`px-3 py-1.5 text-sm rounded-md ${n==="approval"?"bg-primary text-primary-foreground":"border border-border hover:bg-accent"}`,children:"确认"}),e.jsx("button",{onClick:()=>d("checkpoint"),className:`px-3 py-1.5 text-sm rounded-md ${n==="checkpoint"?"bg-primary text-primary-foreground":"border border-border hover:bg-accent"}`,children:"进度"})]})]}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsxs(r.Suspense,{fallback:e.jsx("div",{className:"flex items-center justify-center h-full",children:"加载中..."}),children:[n==="graph"&&e.jsx(w,{state:t,selectedChange:i,onSelectChange:p,onRetry:y}),n==="approval"&&e.jsx(k,{state:t,onApprove:h}),n==="checkpoint"&&e.jsx(S,{state:t,selectedChange:i,onSelectChange:p})]})}),t.status==="pending-approval"&&e.jsx("div",{className:"border-t border-border bg-warning/10 px-6 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"需要确认执行计划"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["检测到 ",f," 个变更,",u," 个风险项已 parked,",t.conflicts.length," 个冲突"]})]}),e.jsx("div",{className:"flex gap-2",children:e.jsx("button",{onClick:()=>h(t.parallelism,[]),className:"px-4 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90",children:"确认执行"})})]})}),e.jsx("footer",{className:"border-t border-border px-6 py-2 max-h-32 overflow-y-auto",children:e.jsx("div",{className:"text-xs font-mono space-y-1",children:t.logs.slice(-20).reverse().map((s,c)=>e.jsxs("div",{className:`${s.level==="error"?"text-destructive":s.level==="warn"?"text-warning":"text-muted-foreground"}`,children:[e.jsxs("span",{className:"text-muted-foreground/60",children:["[",new Date(s.timestamp).toLocaleTimeString(),"]"]}),s.changeName&&e.jsxs("span",{className:"text-info ml-2",children:["[",s.changeName,"]"]}),e.jsx("span",{className:"ml-2",children:s.message})]},c))})})]})}export{P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./index-yx7txO50.js";function x({state:c,selectedChange:r,onSelectChange:a}){const t=c.changes.filter(s=>s.checkpoint&&s.status==="running");return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("aside",{className:"w-80 border-r border-border overflow-y-auto p-4",children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:"执行中的变更"}),e.jsxs("div",{className:"space-y-2",children:[t.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无执行中的变更"}),t.map(s=>e.jsxs("div",{onClick:()=>a(r===s.name?null:s.name),className:`p-3 rounded-lg border cursor-pointer transition-colors ${r===s.name?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,children:[e.jsx("div",{className:"font-medium text-sm",children:s.name}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[s.checkpoint.completedTasks,"/",s.checkpoint.totalTasks," 任务"]})]},s.name))]})]}),e.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:r&&t.find(s=>s.name===r)?e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:r}),e.jsx("div",{className:"space-y-3",children:Array.from({length:t.find(s=>s.name===r).checkpoint.totalTasks}).map((s,n)=>{const d=t.find(l=>l.name===r),i=n<d.checkpoint.completedTasks,o=n===d.checkpoint.currentTaskIndex;return e.jsx("div",{className:`p-4 rounded-lg border ${i?"border-success/30 bg-success/5":o?"border-info/30 bg-info/5":"border-border bg-card"}`,children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-xs ${i?"bg-success text-success-foreground":o?"bg-info text-info-foreground":"bg-muted text-muted-foreground"}`,children:i?"✓":o?"↻":n+1}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:`text-sm ${i?"line-through text-muted-foreground":"font-medium"}`,children:o?d.checkpoint.currentTask:`任务 #${n+1}`}),o&&e.jsx("div",{className:"text-xs text-info mt-1",children:"执行中..."})]})]})},n)})})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"选择一个变更查看任务进度"})})]})}export{x as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,j as r}from"./index-yx7txO50.js";function j(n,x){const[o,a]=i.useState({}),[l,c]=i.useState(!0),[b,f]=i.useState(!1),e=i.useCallback(async()=>{try{const s=(await(await fetch("/__plugins/config",{cache:"no-store"})).json())[n]??{},m={};if(x)for(const[g,p]of Object.entries(x))m[g]=g in s?s[g]:p.default??"";a(m)}catch{a({})}finally{c(!1)}},[n,x]);i.useEffect(()=>{e()},[e]);const u=i.useCallback(async t=>{var d;f(!0);try{(await fetch("/__plugins/config",{method:"POST",headers:{"Content-Type":"application/json","X-Stop-Token":((d=document.querySelector('meta[name="stop-token"]'))==null?void 0:d.getAttribute("content"))??""},body:JSON.stringify({[n]:t})})).ok&&a(t)}catch{}finally{f(!1)}},[n]);return{config:o,setConfig:a,save:u,loading:l,saving:b,refresh:e}}function N({key_:n,field:x,value:o,onChange:a}){const{type:l,label:c,placeholder:b,options:f}=x;if(l==="boolean")return r.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[r.jsx("input",{type:"checkbox",checked:!!o,onChange:e=>a(n,e.target.checked),className:"h-3.5 w-3.5 rounded border-border"}),r.jsx("span",{className:"text-foreground",children:c})]});if(l==="text")return r.jsxs("div",{className:"text-xs",children:[r.jsx("label",{className:"block text-muted-foreground mb-1",children:c}),r.jsx("textarea",{value:String(o??""),onChange:e=>a(n,e.target.value),placeholder:b,rows:3,className:"w-full px-2 py-1 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"})]});if(l==="string[]"){const e=Array.isArray(o)?o:[],[u,t]=i.useState(""),d=()=>{const s=u.trim();s&&(a(n,[...e,s]),t(""))};return r.jsxs("div",{className:"text-xs",children:[r.jsx("label",{className:"block text-muted-foreground mb-1",children:c}),r.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:e.map((s,m)=>r.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5",children:[s,r.jsx("button",{onClick:()=>a(n,e.filter((g,p)=>p!==m)),className:"text-muted-foreground hover:text-foreground",children:"✕"})]},m))}),r.jsxs("div",{className:"flex gap-1",children:[r.jsx("input",{value:u,onChange:s=>t(s.target.value),onKeyDown:s=>s.key==="Enter"&&(s.preventDefault(),d()),placeholder:b,className:"flex-1 h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"}),r.jsx("button",{onClick:d,className:"h-7 px-2 text-xs rounded border border-border hover:bg-muted",children:"+"})]})]})}if(l==="select")return r.jsxs("div",{className:"text-xs",children:[r.jsx("label",{className:"block text-muted-foreground mb-1",children:c}),r.jsx("select",{value:String(o??""),onChange:e=>a(n,e.target.value),className:"w-full h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary",children:(f??[]).map(e=>r.jsx("option",{value:e.value,children:e.label},e.value))})]});if(l==="multiselect"){const e=Array.isArray(o)?o:[],u=t=>{const d=e.includes(t)?e.filter(s=>s!==t):[...e,t];a(n,d)};return r.jsxs("div",{className:"text-xs",children:[r.jsx("label",{className:"block text-muted-foreground mb-1",children:c}),r.jsx("div",{className:"flex flex-wrap gap-1",children:(f??[]).map(t=>r.jsx("button",{onClick:()=>u(t.value),className:`px-2 py-1 rounded border ${e.includes(t.value)?"bg-primary/10 border-primary text-foreground":"border-border text-muted-foreground"}`,children:t.label},t.value))})]})}return r.jsxs("div",{className:"text-xs",children:[r.jsx("label",{className:"block text-muted-foreground mb-1",children:c}),r.jsx("input",{type:l==="number"?"number":"text",value:String(o??""),onChange:e=>a(n,l==="number"?Number(e.target.value):e.target.value),placeholder:b,className:"w-full h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"})]})}export{N as C,j as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as p,j as e}from"./index-yx7txO50.js";const t={pending:"bg-muted text-muted-foreground",running:"bg-info/20 text-info",completed:"bg-success/20 text-success",failed:"bg-destructive/20 text-destructive",parked:"bg-warning/20 text-warning",skipped:"bg-muted text-muted-foreground line-through"};function b({state:a,selectedChange:d,onSelectChange:l,onRetry:o}){const[i,m]=p.useState("all"),c=a.changes.filter(s=>i==="all"||s.status===i),x=a.batches.reduce((s,n)=>{const r=a.changes.filter(u=>u.batchIndex===n.index);return r.length&&(s[n.index]=r),s},{});return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("aside",{className:"w-80 border-r border-border overflow-y-auto p-4",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"text-sm font-medium",children:"状态筛选"}),e.jsxs("select",{value:i,onChange:s=>m(s.target.value),className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-1.5 text-sm",children:[e.jsx("option",{value:"all",children:"全部"}),e.jsx("option",{value:"pending",children:"待执行"}),e.jsx("option",{value:"running",children:"执行中"}),e.jsx("option",{value:"completed",children:"已完成"}),e.jsx("option",{value:"failed",children:"失败"}),e.jsx("option",{value:"parked",children:"已暂停"})]})]}),e.jsx("div",{className:"space-y-2",children:c.map(s=>e.jsxs("div",{onClick:()=>l(d===s.name?null:s.name),className:`p-3 rounded-lg border cursor-pointer transition-colors ${d===s.name?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"font-medium text-sm",children:s.name}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded ${t[s.status]||t.pending}`,children:s.status})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["批次 ",s.batchIndex," · 依赖 ",s.dependencies.length," 个"]}),s.status==="failed"&&e.jsx("button",{onClick:n=>{n.stopPropagation(),o(s.name)},className:"mt-2 text-xs px-2 py-1 rounded bg-primary/10 hover:bg-primary/20",children:"重试"})]},s.name))})]}),e.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[a.conflicts.length>0&&e.jsxs("div",{className:"mb-6 p-4 rounded-lg border border-warning bg-warning/10",children:[e.jsx("h3",{className:"font-medium text-warning mb-2",children:"⚠️ 文件冲突检测"}),e.jsx("div",{className:"space-y-2",children:a.conflicts.map((s,n)=>e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"font-medium",children:s.changeA}),e.jsx("span",{className:"text-muted-foreground",children:" 与 "}),e.jsx("span",{className:"font-medium",children:s.changeB}),e.jsx("span",{className:"text-muted-foreground",children:" 冲突于: "}),e.jsx("code",{className:"text-xs bg-background/50 px-1 rounded",children:s.files.join(", ")})]},n))})]}),e.jsx("div",{className:"space-y-6",children:Object.entries(x).sort(([s],[n])=>Number(s)-Number(n)).map(([s,n])=>e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:["批次 ",s,e.jsxs("span",{className:"ml-2 text-xs",children:["(",n.filter(r=>r.status==="completed").length,"/",n.length," 完成)"]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:n.map(r=>e.jsxs("div",{onClick:()=>l(d===r.name?null:r.name),className:`p-4 rounded-lg border transition-colors ${d===r.name?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"font-medium",children:r.name}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded ${t[r.status]||t.pending}`,children:r.status})]}),r.dependencies.length>0&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["依赖: ",r.dependencies.join(", ")]})]},r.name))})]},s))})]})]})}export{b as default};
|