flex-mcp 1.1.11 → 1.1.13
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/web/assets/Blank-BHJQs5sx.js +1 -0
- package/dist/web/assets/Configs-ClEYNzO5.js +1 -0
- package/dist/web/assets/{Dashboard-DG4KlU_v.js → Dashboard-CnyNQRgh.js} +4 -4
- package/dist/web/assets/InitScriptEditor-BFTWTD26.js +499 -0
- package/dist/web/assets/Layout-B9iGlIQE.js +1 -0
- package/dist/web/assets/Layout-Da7GFkga.js +1 -0
- package/dist/web/assets/Login-BWlz3FI1.js +1 -0
- package/dist/web/assets/Login-DXNFmh7b.js +1 -0
- package/dist/web/assets/Users-DGRVEG-v.js +1 -0
- package/dist/web/assets/index-CmiEbWrJ.js +2 -0
- package/dist/web/assets/monaco-editor-BXWd1EVR.js +11 -0
- package/dist/web/assets/naive-ui-BwyHI4J3.js +7313 -0
- package/dist/web/assets/style-CrcCgeaU.css +1 -0
- package/dist/web/assets/vendor-DpXl860f.js +58 -0
- package/dist/web/index.html +5 -2
- package/package.json +1 -1
- package/dist/web/assets/Blank-DnwEW0VT.js +0 -1
- package/dist/web/assets/Configs-Bq1LRu7c.js +0 -1
- package/dist/web/assets/InitScriptEditor-BpsNM3mj.js +0 -509
- package/dist/web/assets/Layout-CZunjis7.js +0 -1
- package/dist/web/assets/Layout-DuBl1mVJ.js +0 -1
- package/dist/web/assets/Login-CV4pyxSI.js +0 -1
- package/dist/web/assets/Login-Drzps0QW.js +0 -1
- package/dist/web/assets/Users-zsruR1wp.js +0 -1
- package/dist/web/assets/index-mIcNgFiY.js +0 -7371
- package/dist/web/assets/style-BdM4weEm.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as A,a as U,u as T,$ as F,p as I,q as N,r as u,s as S,c as v,b as e,e as G,f,w as _,g as H,B as $,F as D,v as P,x as R,t as h,y as g,n as a,o as i,z as q,m as Z,A as w,C as y,T as E,i as O}from"./index-mIcNgFiY.js";import{_ as J}from"./_plugin-vue_export-helper-DlAUqK2U.js";const K={class:"app-shell"},Q={class:"app-header"},W={class:"app-header__container"},X={class:"app-header__right"},Y={class:"app-body"},ee={class:"app-sidebar"},te={class:"sidebar-nav"},oe=["onClick"],se={class:"nav-item__icon admin-nav-icon"},ae={class:"nav-item__content"},ne={class:"nav-item__label"},re={class:"nav-item__description"},ie={key:0,class:"nav-item__indicator admin-indicator"},de={class:"app-content"},ce={class:"content-wrapper"},le={class:"app-footer"},pe={class:"version-info"},ue={class:"version-text"},ve=A({__name:"Layout",setup(fe){const m=O(),x=N(),C=U(),r=T(),M=F(),k=I(()=>x.name),c=u(!1),l=u(!1),p=u("..."),L=[{label:"用户管理",key:"AdminUsers",icon:()=>a("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),description:"管理系统用户和权限"},{label:"配置管理",key:"AdminConfigs",icon:()=>a("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),description:"管理用户的 MCP 配置"}];function b(o){m.push({name:o})}function B(){C.adminLogout(),m.push("/admin/login")}async function V(){if(!c.value){c.value=!0;try{const t=(await g.get("/update/check")).data;t.success&&t.hasUpdate&&M.warning({title:"发现新版本",content:()=>a("div",[a("p",{style:"margin-bottom: 12px;"},`当前版本: ${t.currentVersion}`),a("p",{style:"margin-bottom: 12px;"},`最新版本: ${t.latestVersion}`),a("p",{style:"color: #666; font-size: 14px;"},"是否立即更新?更新后系统将自动重启。")]),positiveText:"立即更新",negativeText:"稍后提醒",onPositiveClick:async()=>{await z()},onNegativeClick:()=>{}})}catch(o){console.error("检查更新失败:",o)}finally{c.value=!1}}}async function z(){var t,d;if(l.value)return;l.value=!0;const o=r.loading("正在更新,请稍候...",{duration:0});try{const n=(await g.post("/update/execute")).data;o.destroy(),n.success?n.restartFailed?r.warning("更新成功,但重启失败,请手动重启服务",{duration:5e3}):(r.success("更新成功,系统正在重启...",{duration:3e3}),setTimeout(()=>{window.location.reload()},3e3)):r.error(n.error||"更新失败",{duration:5e3})}catch(s){o.destroy();const n=((d=(t=s.response)==null?void 0:t.data)==null?void 0:d.error)||s.message||"更新失败";r.error(n,{duration:5e3})}finally{l.value=!1}}async function j(){try{const o=await g.get("/update/version");o.data.success&&(p.value=o.data.version)}catch(o){console.error("获取版本失败:",o),p.value="unknown"}}return S(()=>{j(),setTimeout(()=>{V()},2e3)}),(o,t)=>{const d=R("router-view");return i(),v("div",K,[e("header",Q,[e("div",W,[t[2]||(t[2]=G('<div class="app-header__left" data-v-01543ff6><div class="app-logo" data-v-01543ff6><div class="logo-icon admin-theme" data-v-01543ff6><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-01543ff6><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#admin-gradient1)" data-v-01543ff6></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#admin-gradient2)" data-v-01543ff6></path><defs data-v-01543ff6><linearGradient id="admin-gradient1" x1="2" y1="2" x2="22" y2="12" data-v-01543ff6><stop offset="0%" stop-color="#dc2626" data-v-01543ff6></stop><stop offset="100%" stop-color="#ea580c" data-v-01543ff6></stop></linearGradient><linearGradient id="admin-gradient2" x1="2" y1="12" x2="22" y2="22" data-v-01543ff6><stop offset="0%" stop-color="#ea580c" data-v-01543ff6></stop><stop offset="100%" stop-color="#f59e0b" data-v-01543ff6></stop></linearGradient></defs></svg></div><div class="logo-text" data-v-01543ff6><div class="logo-title admin-title" data-v-01543ff6>Flex MCP Admin</div><div class="logo-subtitle" data-v-01543ff6>管理员控制台</div></div></div></div>',1)),e("div",X,[t[1]||(t[1]=e("div",{class:"admin-badge"},[e("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),e("span",null,"管理员")],-1)),f(H($),{class:"logout-btn",quaternary:"",circle:"",onClick:B},{icon:_(()=>[...t[0]||(t[0]=[e("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M9 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M16 17L21 12L16 7",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M21 12H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1})])])]),e("div",Y,[e("aside",ee,[e("nav",te,[(i(),v(D,null,P(L,s=>e("div",{key:s.key,class:q(["nav-item",{"nav-item--active":k.value===s.key}]),onClick:n=>b(s.key)},[e("div",se,[(i(),w(y(s.icon)))]),e("div",ae,[e("div",ne,h(s.label),1),e("div",re,h(s.description),1)]),k.value===s.key?(i(),v("div",ie)):Z("",!0)],10,oe)),64))])]),e("main",de,[e("div",ce,[f(d,null,{default:_(({Component:s,route:n})=>[f(E,{name:"page-fade",mode:"out-in"},{default:_(()=>[(i(),w(y(s),{key:n.path}))]),_:2},1024)]),_:1})])])]),e("footer",le,[e("div",pe,[e("span",ue,"v"+h(p.value),1)])])])}}}),ke=J(ve,[["__scopeId","data-v-01543ff6"]]);export{ke as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as t,d as L,a as V,r as H,p as _,q as j,s as z,c as i,b as o,e as I,f as v,t as a,g as m,w as h,B as A,F,v as P,x as S,y as q,o as r,z as D,m as G,A as g,C,T as N,i as T}from"./index-mIcNgFiY.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";const O=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"}),t("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"}),t("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"}),t("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1",stroke:"currentColor","stroke-width":"2",fill:"none"})]),U=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),Z=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M4 7h3m13 0h-3m-2 4l-2 5l-2-5m9-4l-3 8l-3-8m-6 11h3m0 0h3m-3 0V10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),$=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("polyline",{points:"16 18 22 12 16 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("polyline",{points:"8 6 2 12 8 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),E=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h7v2H7v-2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),W=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("path",{d:"M14 2v6h6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("path",{d:"M16 13H8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}),t("path",{d:"M16 17H8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}),t("path",{d:"M10 9H8",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})]),x=[{label:"MCP 组件",key:"section-components",icon:O,description:"管理 MCP 服务组件"},{label:"自定义工具",key:"section-tools",icon:U,description:"创建和编辑工具"},{label:"变量管理",key:"section-variables",icon:Z,description:"配置环境变量",hideForAdmin:!0},{label:"初始化脚本",key:"section-init",icon:$,description:"编写启动脚本"},{label:"数据管理",key:"section-tables",icon:E,description:"创建和管理数据表",hideForAdmin:!0},{label:"提示词管理",key:"section-prompts",icon:W,description:"创建和管理提示词模板"}],J={class:"app-shell"},K={class:"app-header"},Q={class:"app-header__container"},X={class:"app-header__right"},Y={class:"user-info"},oo={class:"user-email"},to={class:"app-body"},eo={class:"app-sidebar"},so={class:"sidebar-nav"},no=["onClick"],ro={class:"nav-item__icon"},io={class:"nav-item__content"},ao={class:"nav-item__label"},lo={class:"nav-item__description"},co={key:0,class:"nav-item__indicator"},po={class:"app-content"},uo={class:"content-wrapper"},vo={class:"app-footer"},ho={class:"version-info"},ko={class:"version-text"},wo=L({__name:"Layout",setup(fo){const d=T(),l=j(),c=V(),p=H("..."),k=_(()=>l.name==="UserDashboard"?`section-${l.query.section||"components"}`:l.name),y=_(()=>{var s;return((s=c.user)==null?void 0:s.role)==="admin"?x.filter(u=>!u.hideForAdmin):x});function b(e){if(e.startsWith("section-")){const s=e.replace("section-","");d.push({name:"UserDashboard",query:{section:s}});return}d.push({name:e})}function M(){c.userLogout(),d.push("/user/login")}async function B(){try{const e=await q.get("/update/version");e.data.success&&(p.value=e.data.version)}catch(e){console.error("获取版本失败:",e),p.value="unknown"}}return z(()=>{B()}),(e,s)=>{var w;const u=S("router-view");return r(),i("div",J,[o("header",K,[o("div",Q,[s[2]||(s[2]=I('<div class="app-header__left" data-v-d9fd6813><div class="app-logo" data-v-d9fd6813><div class="logo-icon" data-v-d9fd6813><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d9fd6813><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#gradient1)" data-v-d9fd6813></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#gradient2)" data-v-d9fd6813></path><defs data-v-d9fd6813><linearGradient id="gradient1" x1="2" y1="2" x2="22" y2="12" data-v-d9fd6813><stop offset="0%" stop-color="#6366f1" data-v-d9fd6813></stop><stop offset="100%" stop-color="#8b5cf6" data-v-d9fd6813></stop></linearGradient><linearGradient id="gradient2" x1="2" y1="12" x2="22" y2="22" data-v-d9fd6813><stop offset="0%" stop-color="#8b5cf6" data-v-d9fd6813></stop><stop offset="100%" stop-color="#ec4899" data-v-d9fd6813></stop></linearGradient></defs></svg></div><div class="logo-text" data-v-d9fd6813><div class="logo-title" data-v-d9fd6813>Flex MCP</div><div class="logo-subtitle" data-v-d9fd6813>MCP 服务运营平台</div></div></div></div>',1)),o("div",X,[o("div",Y,[s[0]||(s[0]=o("div",{class:"user-avatar"},[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("circle",{cx:"12",cy:"8",r:"4",fill:"currentColor",opacity:"0.3"}),o("path",{d:"M6 21C6 17.686 8.686 15 12 15C15.314 15 18 17.686 18 21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})])],-1)),o("span",oo,a(((w=m(c).user)==null?void 0:w.email)||"用户"),1)]),v(m(A),{class:"logout-btn",quaternary:"",circle:"",onClick:M},{icon:h(()=>[...s[1]||(s[1]=[o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M9 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M16 17L21 12L16 7",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M21 12H9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1})])])]),o("div",to,[o("aside",eo,[o("nav",so,[(r(!0),i(F,null,P(y.value,n=>(r(),i("div",{key:n.key,class:D(["nav-item",{"nav-item--active":k.value===n.key}]),onClick:f=>b(n.key)},[o("div",ro,[(r(),g(C(n.icon)))]),o("div",io,[o("div",ao,a(n.label),1),o("div",lo,a(n.description),1)]),k.value===n.key?(r(),i("div",co)):G("",!0)],10,no))),128))])]),o("main",po,[o("div",uo,[v(u,null,{default:h(({Component:n,route:f})=>[v(N,{name:"page-fade",mode:"out-in"},{default:h(()=>[(r(),g(C(n),{key:f.path}))]),_:2},1024)]),_:1})])])]),o("footer",vo,[o("div",ho,[o("span",ko,"v"+a(p.value),1)])])])}}}),go=R(wo,[["__scopeId","data-v-d9fd6813"]]);export{go as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as C,u as B,a as z,r as v,c,b as a,e as w,f as r,w as t,g as n,N as j,h as f,o as g,j as m,k as h,l as k,B as L,m as N,i as V}from"./index-mIcNgFiY.js";import{_ as A}from"./_plugin-vue_export-helper-DlAUqK2U.js";const _={class:"auth-bg admin-theme"},H={class:"login-container"},G={class:"form-section"},F={class:"form-card"},I={key:0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},K=C({__name:"Login",setup(R){const x=V(),p=B(),b=z(),u=v(),l=v(!1),s=v({username:"",password:""}),M={username:{required:!0,message:"请输入管理员用户名",trigger:"blur"},password:{required:!0,message:"请输入管理员密码",trigger:"blur"}};async function d(){var i,e,o;try{await((i=u.value)==null?void 0:i.validate()),l.value=!0,await b.loginAdmin(s.value.username,s.value.password),p.success("登录成功"),x.push("/admin/users")}catch(y){p.error(((o=(e=y.response)==null?void 0:e.data)==null?void 0:o.error)||"登录失败,请检查您的凭据")}finally{l.value=!1}}return(i,e)=>(g(),c("div",_,[e[11]||(e[11]=a("div",{class:"floating-shapes"},[a("div",{class:"shape shape-1"}),a("div",{class:"shape shape-2"}),a("div",{class:"shape shape-3"})],-1)),a("div",H,[e[10]||(e[10]=w('<div class="brand-section admin-gradient" data-v-332e576e><div class="brand-content" data-v-332e576e><div class="brand-logo" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#admin-logo-gradient1)" data-v-332e576e></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#admin-logo-gradient2)" data-v-332e576e></path><defs data-v-332e576e><linearGradient id="admin-logo-gradient1" x1="2" y1="2" x2="22" y2="12" data-v-332e576e><stop offset="0%" stop-color="#ffffff" data-v-332e576e></stop><stop offset="100%" stop-color="#fef3c7" data-v-332e576e></stop></linearGradient><linearGradient id="admin-logo-gradient2" x1="2" y1="12" x2="22" y2="22" data-v-332e576e><stop offset="0%" stop-color="#fef3c7" data-v-332e576e></stop><stop offset="100%" stop-color="#ffffff" data-v-332e576e></stop></linearGradient></defs></svg></div><h1 class="brand-title" data-v-332e576e>Flex MCP Admin</h1><p class="brand-subtitle" data-v-332e576e>超级管理员控制台</p><div class="brand-features" data-v-332e576e><div class="feature-item" data-v-332e576e><div class="feature-icon" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg></div><span data-v-332e576e>全面的用户管理</span></div><div class="feature-item" data-v-332e576e><div class="feature-icon" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path><path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg></div><span data-v-332e576e>灵活的配置管理</span></div><div class="feature-item" data-v-332e576e><div class="feature-icon" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg></div><span data-v-332e576e>强大的权限控制</span></div></div></div></div>',1)),a("div",G,[a("div",F,[e[8]||(e[8]=w('<div class="form-header" data-v-332e576e><div class="admin-badge" data-v-332e576e><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-332e576e><path d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-332e576e></path></svg><span data-v-332e576e>管理员登录</span></div><h2 class="form-title" data-v-332e576e>系统管理后台</h2><p class="form-description" data-v-332e576e>使用管理员凭据访问控制面板</p></div>',1)),r(n(j),{ref_key:"formRef",ref:u,model:s.value,rules:M,size:"large"},{default:t(()=>[r(n(m),{path:"username"},{label:t(()=>[...e[2]||(e[2]=[a("div",{class:"input-label"},[a("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),a("span",null,"管理员账号")],-1)])]),default:t(()=>[r(n(h),{value:s.value.username,"onUpdate:value":e[0]||(e[0]=o=>s.value.username=o),placeholder:"输入管理员用户名",class:"modern-input",onKeyup:k(d,["enter"])},{prefix:t(()=>[...e[3]||(e[3]=[a("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),r(n(m),{path:"password"},{label:t(()=>[...e[4]||(e[4]=[a("div",{class:"input-label"},[a("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),a("span",null,"管理员密码")],-1)])]),default:t(()=>[r(n(h),{value:s.value.password,"onUpdate:value":e[1]||(e[1]=o=>s.value.password=o),type:"password",placeholder:"输入管理员密码",class:"modern-input","show-password-on":"click",onKeyup:k(d,["enter"])},{prefix:t(()=>[...e[5]||(e[5]=[a("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M7 11V7a5 5 0 0110 0v4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),r(n(L),{type:"primary",size:"large",block:"",loading:l.value,class:"login-button admin-login-btn",onClick:d},{icon:t(()=>[l.value?N("",!0):(g(),c("svg",I,[...e[6]||(e[6]=[a("path",{d:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))]),default:t(()=>[e[7]||(e[7]=f(" 进入管理后台 ",-1))]),_:1},8,["loading"])]),_:1},8,["model"]),e[9]||(e[9]=a("div",{class:"form-footer"},[a("p",{class:"help-text"},[a("svg",{class:"help-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),f(" 仅限授权管理员访问,未经授权的访问将被记录 ")])],-1))])])])]))}}),U=A(K,[["__scopeId","data-v-332e576e"]]);export{U as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as C,u as M,a as B,r as v,c as u,b as e,e as L,f as d,w as t,g as r,N as V,h as w,o as f,i as j,j as g,k as m,l as h,B as K,m as z}from"./index-mIcNgFiY.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";const I={class:"auth-bg"},P={class:"login-container"},A={class:"form-section"},H={class:"form-card"},_={key:0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G=C({__name:"Login",setup(F){const b=j(),p=M(),k=B(),c=v(),l=v(!1),s=v({email:"",apiKey:""}),x={email:{required:!0,message:"请输入邮箱地址",trigger:"blur"},apiKey:{required:!0,message:"请输入 API Key",trigger:"blur"}};async function n(){var i,a,o;try{await((i=c.value)==null?void 0:i.validate()),l.value=!0,await k.loginUser(s.value.email,s.value.apiKey),p.success("登录成功"),b.push("/user/dashboard")}catch(y){p.error(((o=(a=y.response)==null?void 0:a.data)==null?void 0:o.error)||"登录失败,请检查您的凭据")}finally{l.value=!1}}return(i,a)=>(f(),u("div",I,[a[11]||(a[11]=e("div",{class:"floating-shapes"},[e("div",{class:"shape shape-1"}),e("div",{class:"shape shape-2"}),e("div",{class:"shape shape-3"})],-1)),e("div",P,[a[10]||(a[10]=L('<div class="brand-section" data-v-d6d8ce7b><div class="brand-content" data-v-d6d8ce7b><div class="brand-logo" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M12 2L2 7L12 12L22 7L12 2Z" fill="url(#logo-gradient1)" data-v-d6d8ce7b></path><path d="M2 17L12 22L22 17V12L12 17L2 12V17Z" fill="url(#logo-gradient2)" data-v-d6d8ce7b></path><defs data-v-d6d8ce7b><linearGradient id="logo-gradient1" x1="2" y1="2" x2="22" y2="12" data-v-d6d8ce7b><stop offset="0%" stop-color="#6366f1" data-v-d6d8ce7b></stop><stop offset="100%" stop-color="#8b5cf6" data-v-d6d8ce7b></stop></linearGradient><linearGradient id="logo-gradient2" x1="2" y1="12" x2="22" y2="22" data-v-d6d8ce7b><stop offset="0%" stop-color="#8b5cf6" data-v-d6d8ce7b></stop><stop offset="100%" stop-color="#ec4899" data-v-d6d8ce7b></stop></linearGradient></defs></svg></div><h1 class="brand-title" data-v-d6d8ce7b>Flex MCP</h1><p class="brand-subtitle" data-v-d6d8ce7b>MCP 服务运营平台</p><div class="brand-features" data-v-d6d8ce7b><div class="feature-item" data-v-d6d8ce7b><div class="feature-icon" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-d6d8ce7b></path></svg></div><span data-v-d6d8ce7b>统一管理 MCP 组件</span></div><div class="feature-item" data-v-d6d8ce7b><div class="feature-icon" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M13 10V3L4 14h7v7l9-11h-7z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-d6d8ce7b></path></svg></div><span data-v-d6d8ce7b>快速创建自定义工具</span></div><div class="feature-item" data-v-d6d8ce7b><div class="feature-icon" data-v-d6d8ce7b><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d6d8ce7b><path d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-d6d8ce7b></path></svg></div><span data-v-d6d8ce7b>安全的 API 密钥管理</span></div></div></div></div>',1)),e("div",A,[e("div",H,[a[8]||(a[8]=e("div",{class:"form-header"},[e("h2",{class:"form-title"},"欢迎回来"),e("p",{class:"form-description"},"使用您的账户凭据登录系统")],-1)),d(r(V),{ref_key:"formRef",ref:c,model:s.value,rules:x,size:"large"},{default:t(()=>[d(r(g),{path:"email"},{label:t(()=>[...a[2]||(a[2]=[e("div",{class:"input-label"},[e("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),e("span",null,"邮箱地址")],-1)])]),default:t(()=>[d(r(m),{value:s.value.email,"onUpdate:value":a[0]||(a[0]=o=>s.value.email=o),placeholder:"your@email.com",class:"modern-input",onKeyup:h(n,["enter"])},{prefix:t(()=>[...a[3]||(a[3]=[e("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),d(r(g),{path:"apiKey"},{label:t(()=>[...a[4]||(a[4]=[e("div",{class:"input-label"},[e("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),e("span",null,"API 密钥")],-1)])]),default:t(()=>[d(r(m),{value:s.value.apiKey,"onUpdate:value":a[1]||(a[1]=o=>s.value.apiKey=o),type:"password",placeholder:"输入您的 API Key",class:"modern-input","show-password-on":"click",onKeyup:h(n,["enter"])},{prefix:t(()=>[...a[5]||(a[5]=[e("svg",{class:"input-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M7 11V7a5 5 0 0110 0v4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["value"])]),_:1}),d(r(K),{type:"primary",size:"large",block:"",loading:l.value,class:"login-button",onClick:n},{icon:t(()=>[l.value?z("",!0):(f(),u("svg",_,[...a[6]||(a[6]=[e("path",{d:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))]),default:t(()=>[a[7]||(a[7]=w(" 登录系统 ",-1))]),_:1},8,["loading"])]),_:1},8,["model"]),a[9]||(a[9]=e("div",{class:"form-footer"},[e("p",{class:"help-text"},[e("svg",{class:"help-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),w(" 首次使用?请联系管理员获取账户信息 ")])],-1))])])])]))}}),U=N(G,[["__scopeId","data-v-d6d8ce7b"]]);export{U as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as V,u as D,$ as L,r as n,s as O,c as E,b as s,f as a,w as o,g as r,B as p,E as q,G as C,y,o as F,h as v,N as G,j as M,k as z,O as J,M as R,a0 as Q,n as B,Q as W}from"./index-mIcNgFiY.js";import{_ as X}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Y={class:"users-page"},Z={class:"page-header"},_={class:"users-card"},ee={class:"modal-footer"},se={class:"apikey-section"},oe={class:"mcp-config-section"},le=V({__name:"Users",setup(te){const d=D(),N=L(),m=n(!1),f=n(!1),c=n(!1),w=n(!1),g=n(""),h=n(""),b=n([]),x=n(),i=n({email:"",role:"user"}),j={pageSize:10,showSizePicker:!0,pageSizes:[10,20,50]},A=t=>({style:"cursor: pointer; transition: all 0.2s ease;",onMouseenter:e=>{e.currentTarget.style.backgroundColor="rgba(99, 102, 241, 0.04)"},onMouseleave:e=>{e.currentTarget.style.backgroundColor=""}}),$=[{label:"普通用户",value:"user"},{label:"管理员",value:"admin"}],P={email:{required:!0,message:"请输入邮箱地址",trigger:"blur"},role:{required:!0,message:"请选择用户角色",trigger:"change"}},U=[{title:"邮箱",key:"email",ellipsis:{tooltip:!0}},{title:"角色",key:"role",width:120,render(t){return B(W,{type:t.role==="admin"?"error":"info",round:!0},{default:()=>t.role==="admin"?"管理员":"普通用户"})}},{title:"创建时间",key:"createdAt",width:180},{title:"操作",key:"actions",width:100,render(t){return B(p,{type:"error",size:"small",secondary:!0,onClick:()=>H(t)},{default:()=>"删除"})}}];async function k(){m.value=!0;try{const t=await y.get("/users");b.value=t.data.data}catch{d.error("加载用户列表失败")}finally{m.value=!1}}async function T(){var t,e,l;try{await((t=x.value)==null?void 0:t.validate()),f.value=!0;const u=await y.post("/users",i.value);u.data.data&&u.data.data.apiKey?(g.value=u.data.data.apiKey,h.value=i.value.email,w.value=!0):d.success("创建成功"),c.value=!1,i.value={email:"",role:"user"},await k()}catch(u){d.error(((l=(e=u.response)==null?void 0:e.data)==null?void 0:l.error)||"创建失败")}finally{f.value=!1}}function H(t){N.warning({title:"确认删除",content:`确定要删除用户 ${t.email} 吗?此操作不可恢复。`,positiveText:"删除",negativeText:"取消",onPositiveClick:async()=>{var e,l;try{await y.delete(`/users/${t.id}`),d.success("删除成功"),await k()}catch(u){d.error(((l=(e=u.response)==null?void 0:e.data)==null?void 0:l.error)||"删除失败")}}})}function I(){navigator.clipboard.writeText(g.value),d.success("已复制到剪贴板")}function K(){const t=window.location.hostname,l=["5173","5174"].includes(window.location.port)?"3000":window.location.port,S={mcpServers:{"flex-mcp":{url:`${`${window.location.protocol}//${t}${l?`:${l}`:""}`}/mcp/sse`,headers:{email:h.value,apiKey:g.value}}}};navigator.clipboard.writeText(JSON.stringify(S,null,2)),d.success("MCP 配置已复制到剪贴板")}return O(()=>{k()}),(t,e)=>(F(),E("div",Y,[s("div",Z,[e[9]||(e[9]=s("div",null,[s("h1",{class:"page-title"},"用户管理"),s("p",{class:"page-description"},"创建和管理系统用户,分配权限和 API 密钥")],-1)),a(r(p),{type:"primary",size:"large",class:"create-btn",onClick:e[0]||(e[0]=l=>c.value=!0)},{icon:o(()=>[...e[7]||(e[7]=[s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M12 4v16m8-8H4",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:o(()=>[e[8]||(e[8]=v(" 创建用户 ",-1))]),_:1})]),s("div",_,[a(r(q),{columns:U,data:b.value,loading:m.value,pagination:j,"row-props":A,class:"modern-table"},null,8,["data","loading"])]),a(r(C),{show:c.value,"onUpdate:show":e[4]||(e[4]=l=>c.value=l),preset:"card",title:"创建新用户",class:"create-modal",bordered:!1,size:"huge"},{header:o(()=>[...e[10]||(e[10]=[s("div",{class:"modal-header"},[s("div",{class:"modal-icon"},[s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])]),s("div",null,[s("h3",{class:"modal-title"},"创建新用户"),s("p",{class:"modal-subtitle"},"为新用户设置邮箱和角色权限")])],-1)])]),footer:o(()=>[s("div",ee,[a(r(p),{size:"large",onClick:e[3]||(e[3]=l=>c.value=!1)},{default:o(()=>[...e[13]||(e[13]=[v("取消",-1)])]),_:1}),a(r(p),{type:"primary",size:"large",loading:f.value,class:"submit-btn",onClick:T},{icon:o(()=>[...e[14]||(e[14]=[s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M5 13l4 4L19 7",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:o(()=>[e[15]||(e[15]=v(" 创建用户 ",-1))]),_:1},8,["loading"])])]),default:o(()=>[a(r(G),{ref_key:"formRef",ref:x,model:i.value,rules:P,size:"large"},{default:o(()=>[a(r(M),{path:"email"},{label:o(()=>[...e[11]||(e[11]=[s("div",{class:"form-label"},[s("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),s("span",null,"用户邮箱")],-1)])]),default:o(()=>[a(r(z),{value:i.value.email,"onUpdate:value":e[1]||(e[1]=l=>i.value.email=l),placeholder:"user@example.com","input-props":{type:"email"}},null,8,["value"])]),_:1}),a(r(M),{path:"role"},{label:o(()=>[...e[12]||(e[12]=[s("div",{class:"form-label"},[s("svg",{class:"label-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),s("span",null,"用户角色")],-1)])]),default:o(()=>[a(r(J),{value:i.value.role,"onUpdate:value":e[2]||(e[2]=l=>i.value.role=l),options:$,placeholder:"选择用户角色"},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["show"]),a(r(C),{show:w.value,"onUpdate:show":e[6]||(e[6]=l=>w.value=l),preset:"card",title:"用户创建成功",closable:!1,"mask-closable":!1,class:"apikey-modal",bordered:!1,size:"huge"},{header:o(()=>[...e[16]||(e[16]=[s("div",{class:"success-header"},[s("div",{class:"success-icon"},[s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])]),s("div",null,[s("h3",{class:"success-title"},"用户创建成功!"),s("p",{class:"success-subtitle"},"请妥善保管以下信息")])],-1)])]),footer:o(()=>[a(r(p),{type:"primary",size:"large",block:"",class:"confirm-btn",onClick:e[5]||(e[5]=l=>w.value=!1)},{default:o(()=>[...e[25]||(e[25]=[v(" 我已保存,关闭窗口 ",-1)])]),_:1})]),default:o(()=>[a(r(R),{type:"warning",class:"warning-alert"},{icon:o(()=>[...e[17]||(e[17]=[s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:o(()=>[e[18]||(e[18]=s("div",{class:"warning-content"},[s("strong",null,"重要提示"),s("p",null,"API Key 只会显示一次,请立即复制并妥善保存!丢失后需要重新创建用户。")],-1))]),_:1}),s("div",se,[e[21]||(e[21]=s("div",{class:"section-label"},[s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),s("span",null,"API 密钥")],-1)),a(r(Q),{class:"apikey-input-group"},{default:o(()=>[a(r(z),{value:g.value,readonly:"",placeholder:"API Key",size:"large",class:"apikey-input"},null,8,["value"]),a(r(p),{type:"primary",size:"large",class:"copy-btn",onClick:I},{icon:o(()=>[...e[19]||(e[19]=[s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:o(()=>[e[20]||(e[20]=v(" 复制 ",-1))]),_:1})]),_:1})]),s("div",oe,[e[24]||(e[24]=s("div",{class:"section-label"},[s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]),s("span",null,"MCP 配置 (用于 Cursor / Claude)")],-1)),a(r(p),{type:"primary",size:"large",block:"",class:"copy-config-btn",onClick:K},{icon:o(()=>[...e[22]||(e[22]=[s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),default:o(()=>[e[23]||(e[23]=v(" 复制 MCP 配置 JSON ",-1))]),_:1})])]),_:1},8,["show"])]))}}),ne=X(le,[["__scopeId","data-v-8c8c351d"]]);export{ne as default};
|