chore: 重新编译前端产物(补装CodeMirror依赖)

This commit is contained in:
attacker committed 2026-06-26 23:29:08 +08:00
1 parent 23e9e3da62
commit 4e384ca401
115 files changed
+147 -147

No files matched your search

@@ -0,0 +1 @@
import{r as o,j as e}from"./vendor-codemirror-B1SGo4xl.js";import{f as R,B as t,D as F,a as O,b as T,c as A,t as a}from"./index-Dungj95X.js";import{I as u}from"./input-CXoUQQLm.js";import{B as I}from"./badge-CGJlVD3L.js";import{L as y}from"./label-CMpUoC87.js";import{d as n}from"./config-BrfI0oO-.js";import{R as $,P as H,L as K,V as w,j as V,d as X,T as _,a3 as q,a9 as J}from"./vendor-icons-DmqcWdzX.js";function oe(){const g=R(),[G,C]=o.useState([]),[k,j]=o.useState(!0),[S,D]=o.useState({}),[E,p]=o.useState(!1),[l,M]=o.useState(null),[i,m]=o.useState(""),[x,h]=o.useState(""),[U,v]=o.useState(!1),[f,N]=o.useState({}),c=async()=>{j(!0);try{const s=await n.getGroups();C(s?.list||[])}catch{a.error("加载失败")}finally{j(!1)}};o.useEffect(()=>{c()},[]);const z=async()=>{if(!i.trim()){a.error("请输入组名");return}v(!0);try{l?await n.updateGroup(l,{name:i,description:x}):await n.createGroup({name:i,description:x}),a.success(l?"已更新":"已创建"),p(!1),c()}catch{a.error("操作失败")}finally{v(!1)}},L=async s=>{if(await g({title:"删除用户组",description:`确定删除「${s.name}」?所有成员和流水线授权将同时移除。`,variant:"destructive"}))try{await n.deleteGroup(s.id),a.success("已删除"),c()}catch{a.error("删除失败")}},b=async s=>{const r=(f[s]||"").trim();if(!r){a.error("输入用户名");return}try{await n.addGroupMember(s,{username:r}),a.success("已添加"),c(),N(d=>({...d,[s]:""}))}catch{a.error("添加失败")}},B=async(s,r,d)=>{if(await g({title:"移除成员",description:`确定从组中移除「${d}」?`}))try{await n.removeGroupMember(s,r),a.success("已移除"),c()}catch{a.error("移除失败")}},P=s=>D(r=>({...r,[s]:!r[s]}));return e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:82:5",className:"space-y-4",children:[e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:83:7",className:"flex items-center justify-between",children:[e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:84:9",children:[e.jsx("h2",{"code-path":"src/components/deploy/UserGroupsManager.tsx:85:11",className:"text-lg font-semibold text-[var(--dg-text-primary)]",children:"用户组管理"}),e.jsx("p",{"code-path":"src/components/deploy/UserGroupsManager.tsx:86:11",className:"text-sm text-[var(--dg-text-secondary)] mt-1",children:"创建用户组,将组授权给流水线,组内成员自动获得流水线权限"})]}),e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:88:9",className:"flex items-center gap-2",children:[e.jsxs(t,{"code-path":"src/components/deploy/UserGroupsManager.tsx:89:11",variant:"outline",size:"sm",onClick:c,children:[e.jsx($,{"code-path":"src/components/deploy/UserGroupsManager.tsx:89:68",className:"w-4 h-4 mr-1"}),"刷新"]}),e.jsxs(t,{"code-path":"src/components/deploy/UserGroupsManager.tsx:90:11",size:"sm",onClick:()=>{M(null),m(""),h(""),p(!0)},children:[e.jsx(H,{"code-path":"src/components/deploy/UserGroupsManager.tsx:91:13",className:"w-4 h-4 mr-1"}),"新建用户组"]})]})]}),k?e.jsx("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:97:9",className:"flex justify-center py-12",children:e.jsx(K,{"code-path":"src/components/deploy/UserGroupsManager.tsx:97:52",className:"w-6 h-6 animate-spin text-[var(--dg-text-secondary)]"})}):G.length===0?e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:99:9",className:"text-center py-12 text-[var(--dg-text-secondary)]",children:[e.jsx(w,{"code-path":"src/components/deploy/UserGroupsManager.tsx:100:11",className:"w-10 h-10 mx-auto mb-3 opacity-30"}),e.jsx("p",{"code-path":"src/components/deploy/UserGroupsManager.tsx:101:11",children:"暂无用户组,点击「新建用户组」创建"})]}):e.jsx("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:104:9",className:"space-y-3",children:G.map(s=>e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:106:13",className:"border border-[var(--dg-border)] rounded-lg bg-[var(--dg-bg-secondary)]",children:[e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:107:15",className:"flex items-center justify-between p-4",children:[e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:108:17",className:"flex items-center gap-3",style:{cursor:"pointer"},onClick:()=>P(s.id),children:[e.jsx(V,{"code-path":"src/components/deploy/UserGroupsManager.tsx:109:19",className:"w-5 h-5 text-blue-400"}),e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:110:19",children:[e.jsx("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:111:21",className:"font-medium text-[var(--dg-text-primary)]",children:s.name}),e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:112:21",className:"text-xs text-[var(--dg-text-secondary)]",children:[s.description||"暂无描述"," · ",(s.members||[]).length," 位成员"]})]})]}),e.jsxs("div",{"code-path":"src/components/deploy/UserGroupsManager.tsx:11Line truncated