mower-ng/ui/dist/assets/manager.js
fuyn101 233525247f
Some checks failed
ci/woodpecker/push/check_format Pipeline failed
明日方舟资源更新
部分更新:
- 干员名,技能,各种图像,图标更新
- 物品图标更新
未更新:
- 基建技能描述未更新
2025-01-22 12:03:06 +08:00

24 lines
7.8 KiB
JavaScript

import{z as X,aw as G,az as I,ax as J,aB as Q,B as Y,aA as Z,c as ee,aD as ne,N as O,H as $,O as te,c4 as re,F as N,bK as V,bL as M,bP as oe,r as z,p as ae,bQ as u,bV as k,bN as i,b_ as A,bW as f,bR as w,bS as o,bT as r,A as le,bm as ie,bo as se,bU as B,bX as T,i as ce,bu as ue,bp as de,c3 as pe}from"./_plugin-vue_export-helper.js";import{A as me,P as _e}from"./Play.js";import{T as he}from"./TrashOutline.js";let D=!1;function fe(){if(X&&window.CSS&&!D&&(D=!0,"registerProperty"in(window==null?void 0:window.CSS)))try{CSS.registerProperty({name:"--n-color-start",syntax:"<color>",inherits:!1,initialValue:"#0000"}),CSS.registerProperty({name:"--n-color-end",syntax:"<color>",inherits:!1,initialValue:"#0000"})}catch{}}function ve(e){const{heightSmall:a,heightMedium:s,heightLarge:t,borderRadius:n}=e;return{color:"#eee",colorEnd:"#ddd",borderRadius:n,heightSmall:a,heightMedium:s,heightLarge:t}}const ke={name:"Skeleton",common:G,self:ve},we=I([J("skeleton",`
height: 1em;
width: 100%;
transition:
--n-color-start .3s var(--n-bezier),
--n-color-end .3s var(--n-bezier),
background-color .3s var(--n-bezier);
animation: 2s skeleton-loading infinite cubic-bezier(0.36, 0, 0.64, 1);
background-color: var(--n-color-start);
`),I("@keyframes skeleton-loading",`
0% {
background: var(--n-color-start);
}
40% {
background: var(--n-color-end);
}
80% {
background: var(--n-color-start);
}
100% {
background: var(--n-color-start);
}
`)]),ge=Object.assign(Object.assign({},Q.props),{text:Boolean,round:Boolean,circle:Boolean,height:[String,Number],width:[String,Number],size:String,repeat:{type:Number,default:1},animated:{type:Boolean,default:!0},sharp:{type:Boolean,default:!0}}),ye=Y({name:"Skeleton",inheritAttrs:!1,props:ge,setup(e){fe();const{mergedClsPrefixRef:a}=Z(e),s=Q("Skeleton","-skeleton",we,ke,e,a);return{mergedClsPrefix:a,style:ee(()=>{var t,n;const g=s.value,{common:{cubicBezierEaseInOut:R}}=g,b=g.self,{color:q,colorEnd:j,borderRadius:H}=b;let y;const{circle:l,sharp:_,round:C,width:p,height:d,size:m,text:x,animated:v}=e;m!==void 0&&(y=b[ne("height",m)]);const c=l?(t=p??d)!==null&&t!==void 0?t:y:p,h=(n=l?p??d:d)!==null&&n!==void 0?n:y;return{display:x?"inline-block":"",verticalAlign:x?"-0.125em":"",borderRadius:l?"50%":C?"4096px":_?"":H,width:typeof c=="number"?O(c):c,height:typeof h=="number"?O(h):h,animation:v?"":"none","--n-bezier":R,"--n-color-start":q,"--n-color-end":j}})}},render(){const{repeat:e,style:a,mergedClsPrefix:s,$attrs:t}=this,n=$("div",te({class:`${s}-skeleton`,style:a},t));return e>1?$(N,null,re(e,null).map(g=>[n,`
`])):n}});var S={},F;function be(){if(F)return S;F=1,Object.defineProperty(S,"__esModule",{value:!0});const e=V(),a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"};return S.default=(0,e.defineComponent)({name:"CheckmarkSharp",render:function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",a,n[0]||(n[0]=[(0,e.createElementVNode)("path",{fill:"none",stroke:"currentColor","stroke-linecap":"square","stroke-miterlimit":"10","stroke-width":"44",d:"M416 128L192 384l-96-96"},null,-1)]))}}),S}var Ce=be();const xe=M(Ce);var E={},K;function ze(){if(K)return E;K=1,Object.defineProperty(E,"__esModule",{value:!0});const e=V(),a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"};return E.default=(0,e.defineComponent)({name:"CloseSharp",render:function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",a,n[0]||(n[0]=[(0,e.createElementVNode)("path",{d:"M400 145.49L366.51 112L256 222.51L145.49 112L112 145.49L222.51 256L112 366.51L145.49 400L256 289.49L366.51 400L400 366.51L289.49 256L400 145.49z",fill:"currentColor"},null,-1)]))}}),E}var Be=ze();const Se=M(Be);var P={},U;function Ee(){if(U)return P;U=1,Object.defineProperty(P,"__esModule",{value:!0});const e=V(),a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"};return P.default=(0,e.defineComponent)({name:"EllipsisHorizontal",render:function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",a,n[0]||(n[0]=[(0,e.createElementVNode)("circle",{cx:"256",cy:"256",r:"48",fill:"currentColor"},null,-1),(0,e.createElementVNode)("circle",{cx:"416",cy:"256",r:"48",fill:"currentColor"},null,-1),(0,e.createElementVNode)("circle",{cx:"96",cy:"256",r:"48",fill:"currentColor"},null,-1)]))}}),P}var Pe=Ee();const Le=M(Pe);var L={},W;function Ne(){if(W)return L;W=1,Object.defineProperty(L,"__esModule",{value:!0});const e=V(),a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"};return L.default=(0,e.defineComponent)({name:"Pencil",render:function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",a,n[0]||(n[0]=[(0,e.createElementVNode)("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"44",d:"M358.62 129.28L86.49 402.08L70 442l39.92-16.49l272.8-272.13l-24.1-24.1z"},null,-1),(0,e.createElementVNode)("path",{d:"M413.07 74.84l-11.79 11.78l24.1 24.1l11.79-11.79a16.51 16.51 0 0 0 0-23.34l-.75-.75a16.51 16.51 0 0 0-23.35 0z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"44"},null,-1)]))}}),L}var Ve=Ne();const Me=M(Ve),Re={class:"mower-list"},qe={class:"header"},je={class:"header"},He={key:0},Ie={key:3,class:"expand"},Oe={class:"folder"},$e={class:"folder-content"},Ae={__name:"MowerManager",setup(e){const a=z(!0),s=z([]),t=z(-1),n=z("");ae(()=>{window.addEventListener("pywebviewready",async()=>{s.value=await pywebview.api.get_instances(),a.value=!1})});async function g(){s.value.push({name:"新实例",path:""}),await pywebview.api.add("新实例","")}async function R(l){s.value.splice(l,1),await pywebview.api.remove(l)}function b(l){t.value=l,n.value=s.value[l].name}async function q(){const l=t.value;t.value=-1,s.value[l].name=n.value,await pywebview.api.rename(l,n.value)}function j(){t.value=-1}async function H(l){const _=await pywebview.api.select_path(l);_&&(s.value[l].path=_)}async function y(l){await pywebview.api.start(l)}return(l,_)=>{const C=ye,p=ue,d=ie,m=se,x=de;return u(),k("div",Re,[i(a)?(u(),k(N,{key:0},A(3,v=>r(p,{size:"small",key:v},{header:o(()=>[B("div",qe,[r(C,{text:"",width:"40%"})])]),default:o(()=>[r(C,{text:""})]),_:2},1024)),64)):f("",!0),(u(!0),k(N,null,A(i(s),(v,c)=>(u(),w(p,{size:"small",key:c},{header:o(()=>[B("div",je,[i(t)!=c?(u(),k("div",He,T(v.name),1)):f("",!0),i(t)==-1?(u(),w(m,{key:1,size:"tiny",onClick:h=>b(c)},{icon:o(()=>[r(d,null,{default:o(()=>[r(i(Me))]),_:1})]),_:2},1032,["onClick"])):f("",!0),i(t)==-1?(u(),w(m,{key:2,type:"error",ghost:"",size:"tiny",onClick:h=>R(c)},{icon:o(()=>[r(d,null,{default:o(()=>[r(i(he))]),_:1})]),_:2},1032,["onClick"])):f("",!0),i(t)!=c?(u(),k("div",Ie)):f("",!0),i(t)==-1?(u(),w(m,{key:4,type:"primary",size:"small",disabled:!v.path,onClick:h=>y(c)},{icon:o(()=>[r(d,null,{default:o(()=>[r(i(_e))]),_:1})]),_:2},1032,["disabled","onClick"])):f("",!0),i(t)==c?(u(),k(N,{key:5},[r(x,{placeholder:"实例名称",value:i(n),"onUpdate:value":_[0]||(_[0]=h=>ce(n)?n.value=h:null)},null,8,["value"]),r(m,{type:"primary",size:"tiny",circle:"",onClick:q},{icon:o(()=>[r(d,null,{default:o(()=>[r(i(xe))]),_:1})]),_:1}),r(m,{type:"error",size:"tiny",circle:"",onClick:j},{icon:o(()=>[r(d,null,{default:o(()=>[r(i(Se))]),_:1})]),_:1})],64)):f("",!0)])]),default:o(()=>[B("div",Oe,[B("code",$e,T(v.path||"请选择该实例配置文件的保存路径"),1),i(t)==-1?(u(),w(m,{key:0,size:"tiny",onClick:h=>H(c)},{icon:o(()=>[r(d,null,{default:o(()=>[r(i(Le))]),_:1})]),_:2},1032,["onClick"])):f("",!0)])]),_:2},1024))),128)),i(a)?f("",!0):(u(),w(m,{key:1,size:"large",dashed:"",onClick:g},{icon:o(()=>[r(d,null,{default:o(()=>[r(i(me))]),_:1})]),default:o(()=>[_[1]||(_[1]=le(" 添加实例 "))]),_:1}))])}}},Te=oe(Ae,[["__scopeId","data-v-d3131f35"]]),De=pe(Te);De.mount("#app");