mower-ng/ui/dist/assets/depot.js

34 lines
5.8 KiB
JavaScript

import{b7 as H,b8 as L,av as j,b5 as A,b1 as J,b9 as M,b6 as Q,ba as U,v as W}from"./main.js";import{ax as g,ay as f,az as S,aB as I,B as X,aA as q,aL as G,c as K,aE as Y,H as a,F as E,r as C,p as Z,bV as k,bT as i,bS as r,bQ as p,bU as v,bX as $,bN as B,A as m,b_ as O,bo as ee,bR as D}from"./_plugin-vue_export-helper.js";const te=g("thing",`
display: flex;
transition: color .3s var(--n-bezier);
font-size: var(--n-font-size);
color: var(--n-text-color);
`,[g("thing-avatar",`
margin-right: 12px;
margin-top: 2px;
`),g("thing-avatar-header-wrapper",`
display: flex;
flex-wrap: nowrap;
`,[g("thing-header-wrapper",`
flex: 1;
`)]),g("thing-main",`
flex-grow: 1;
`,[g("thing-header",`
display: flex;
margin-bottom: 4px;
justify-content: space-between;
align-items: center;
`,[f("title",`
font-size: 16px;
font-weight: var(--n-title-font-weight);
transition: color .3s var(--n-bezier);
color: var(--n-title-text-color);
`)]),f("description",[S("&:not(:last-child)",`
margin-bottom: 4px;
`)]),f("content",[S("&:not(:first-child)",`
margin-top: 12px;
`)]),f("footer",[S("&:not(:first-child)",`
margin-top: 12px;
`)]),f("action",[S("&:not(:first-child)",`
margin-top: 12px;
`)])])]),ne=Object.assign(Object.assign({},I.props),{title:String,titleExtra:String,description:String,descriptionClass:String,descriptionStyle:[String,Object],content:String,contentClass:String,contentStyle:[String,Object],contentIndented:Boolean}),ae=X({name:"Thing",props:ne,setup(n,{slots:e}){const{mergedClsPrefixRef:h,inlineThemeDisabled:_,mergedRtlRef:u}=q(n),w=I("Thing","-thing",te,H,n,h),x=G("Thing",u,h),b=K(()=>{const{self:{titleTextColor:l,textColor:t,titleFontWeight:o,fontSize:s},common:{cubicBezierEaseInOut:d}}=w.value;return{"--n-bezier":d,"--n-font-size":s,"--n-text-color":t,"--n-title-font-weight":o,"--n-title-text-color":l}}),c=_?Y("thing",void 0,b,n):void 0;return()=>{var l;const{value:t}=h,o=x?x.value:!1;return(l=c==null?void 0:c.onRender)===null||l===void 0||l.call(c),a("div",{class:[`${t}-thing`,c==null?void 0:c.themeClass,o&&`${t}-thing--rtl`],style:_?void 0:b.value},e.avatar&&n.contentIndented?a("div",{class:`${t}-thing-avatar`},e.avatar()):null,a("div",{class:`${t}-thing-main`},!n.contentIndented&&(e.header||n.title||e["header-extra"]||n.titleExtra||e.avatar)?a("div",{class:`${t}-thing-avatar-header-wrapper`},e.avatar?a("div",{class:`${t}-thing-avatar`},e.avatar()):null,e.header||n.title||e["header-extra"]||n.titleExtra?a("div",{class:`${t}-thing-header-wrapper`},a("div",{class:`${t}-thing-header`},e.header||n.title?a("div",{class:`${t}-thing-header__title`},e.header?e.header():n.title):null,e["header-extra"]||n.titleExtra?a("div",{class:`${t}-thing-header__extra`},e["header-extra"]?e["header-extra"]():n.titleExtra):null),e.description||n.description?a("div",{class:[`${t}-thing-main__description`,n.descriptionClass],style:n.descriptionStyle},e.description?e.description():n.description):null):null):a(E,null,e.header||n.title||e["header-extra"]||n.titleExtra?a("div",{class:`${t}-thing-header`},e.header||n.title?a("div",{class:`${t}-thing-header__title`},e.header?e.header():n.title):null,e["header-extra"]||n.titleExtra?a("div",{class:`${t}-thing-header__extra`},e["header-extra"]?e["header-extra"]():n.titleExtra):null):null,e.description||n.description?a("div",{class:[`${t}-thing-main__description`,n.descriptionClass],style:n.descriptionStyle},e.description?e.description():n.description):null),e.default||n.content?a("div",{class:[`${t}-thing-main__content`,n.contentClass],style:n.contentStyle},e.default?e.default():n.content):null,e.footer?a("div",{class:`${t}-thing-main__footer`},e.footer()):null,e.action?a("div",{class:`${t}-thing-main__action`},e.action()):null))}}}),ie=L("depot",()=>{async function n(){return(await j.get("/depot/readdepot")).data}return{getDepotinfo:n}}),oe={__name:"depot",setup(n){const e=ie(),{getDepotinfo:h}=e,_=C([]);let u=C([]);async function w(){_.value=await h(),x()}function x(){u.value={..._.value[0]};for(const l in u.value)if(u.value.hasOwnProperty(l)){const t=u.value[l],o=Object.entries(t).map(([s,d])=>({key:s,...d})).sort((s,d)=>s.sort-d.sort);u.value[l]=o}}Z(w);const b=async()=>{try{await navigator.clipboard.writeText(_.value[1])}catch(l){console.error("Failed to copy text:",l)}};function c(){j.post("/update/depot_skland")}return C(!1),(l,t)=>{const o=J,s=M,d=Q,z=ee,N=U,V=W,F=ae,R=A;return p(),k("div",null,[i(R,{cols:"1",responsive:"screen"},{default:r(()=>[i(d,null,{default:r(()=>[i(o,{vertical:"",style:{"margin-top":"2cap"}},{default:r(()=>[v("span",null,"扫描时间:"+$(B(_)[2]),1),t[0]||(t[0]=v("span",null,"注:图像识别扫描时,万以下的数字并不会计入,如“龙门币 245万” “资质凭证 2万”",-1)),t[1]||(t[1]=v("span",null,"注:森空岛读取仓库中并不会识别“常用”下的材料,只识别材料",-1))]),_:1}),i(s)]),_:1}),i(d,null,{default:r(()=>[i(o,{vertical:""},{default:r(()=>[i(o,null,{default:r(()=>[t[3]||(t[3]=v("span",null,"导出JSON数据到 直接跳转复制:",-1)),i(z,{onClick:b,tag:"a",href:"https://arkntools.app/#/material",target:"_blank"},{default:r(()=>t[2]||(t[2]=[m(" 明日方舟工具箱 ")])),_:1})]),_:1}),i(o,null,{default:r(()=>[t[5]||(t[5]=v("span",null," 更新仓库数据:",-1)),i(z,{onClick:c},{default:r(()=>t[4]||(t[4]=[m(" 森空岛部分(需要填入森空岛信息)")])),_:1})]),_:1})]),_:1}),i(s)]),_:1}),(p(!0),k(E,null,O(B(u),(P,T)=>(p(),D(d,{key:T},{default:r(()=>[i(N,null,{default:r(()=>[m($(T.slice(1)),1)]),_:2},1024),i(R,{"x-gap":"10px","y-gap":"10px",cols:"2 m:6 l:6 ",responsive:"screen"},{default:r(()=>[(p(!0),k(E,null,O(P,y=>(p(),D(d,{key:y},{default:r(()=>[i(F,null,{avatar:r(()=>[i(V,{color:"000",size:"large",src:"/depot/"+y.icon+".webp"},null,8,["src"])]),header:r(()=>[m($(y.key),1)]),description:r(()=>[m("拥有:"+$(y.number),1)]),_:2},1024)]),_:2},1024))),128))]),_:2},1024),i(s)]),_:2},1024))),128))]),_:1})])}}};export{oe as default};