2024-06-27 16:44:51 +00:00
|
|
|
import{H as S,i as U,c as ne,w as oe,m as Se,u as Ae,E as C,ak as De,_ as Ee}from"./index.4eb55f07.js";/* empty css *//* empty css *//* empty css */import{d as N,c as w,o as ae,b as Ne,f as $e,t as Fe,p as Ie,r as z,aI as r,aU as re,i as Le,bI as Ue,C as k,D as E,aH as i,G as x,u as j,aK as F,aM as O,aN as h,aJ as G,aE as K,a_ as H,b9 as ze,bJ as Re,bL as Be,be as Te,bf as Ve}from"./arco.7f845a67.js";import{g as Me}from"./vue.0bef8fc5.js";import{u as se,r as ie,_ as le}from"./dialog.9bb37d96.js";import{R as Ge,L as Ke,a as He,D as Je,T as qe,U as Xe}from"./index.0d601f0a.js";import{B as We}from"./index.4aabffd9.js";import{_ as b,u as ce}from"./useConfig.f6485710.js";import{d as I,I as Qe}from"./form-model.53f397fa.js";import{i as A}from"./helper.423f0a4e.js";import{i as J}from"./index.70f5a9a5.js";import{C as Ye}from"./index.a7d49fea.js";import{P as Ze,s as et}from"./dep-6deb4e3a.d51c3bad.js";import{L as tt}from"./index.066f8d20.js";import{F as nt,a as ot}from"./index.b2ab1064.js";import"./chart.95d38b48.js";import"./slot.c3910a16.js";import"./index.2332708c.js";import"./index.8ebc4bcd.js";import"./useDisabled.110213c8.js";function q(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),o.push.apply(o,n)}return o}function X(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?q(Object(o),!0).forEach(function(n){le(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}var at={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M17.66 7.17l-5.3 5.3-1.42-1.41 5.3-5.3 1.42 1.41zm5.65 0l-10.6 10.6-6.37-6.36L7.76 10l4.95 4.95 9.19-9.2 1.41 1.42zM2.11 10l4.94 4.95.35-.35L8.82 16l-1.77 1.77L.69 11.4 2.1 10z"}}]},rt=N({name:"CheckDoubleIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:o}=e,n=w(()=>t.size),{className:l,style:d}=se(n),s=w(()=>["t-icon","t-icon-check-double",l.value]),a=w(()=>X(X({},d.value),o.style)),v=w(()=>({class:s.value,style:a.value,onClick:c=>{var m;return(m=t.onClick)===null||m===void 0?void 0:m.call(t,{e:c})}}));return()=>ie(at,v.value)}});const st=rt;function W(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),o.push.apply(o,n)}return o}function Q(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?W(Object(o),!0).forEach(function(n){le(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):W(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}var it={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M10.88 1.38l1.28.22a4 4 0 013.34 3.94V8h5.32a2 2 0 011.97 2.33l-1.66 10A2 2 0 0119.15 22H7V10.8l3.88-9.42zm1.23 2.26L9 11.2V20h10.15l1.67-10H13.5V5.54a2 2 0 00-1.39-1.9zM4 10v12H2V10h2z"}}]},lt=N({name:"ThumbUpIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:o}=e,n=w(()=>t.size),{className:l,style:d}=se(n),s=w(()=>["t-icon","t-icon-thumb-up",l.value]),a=w(()=>Q(Q({},d.value),o.style)),v=w(()=>({class:s.value,style:a.value,onClick:c=>{var m;return(m=t.onClick)===null||m===void 0?void 0:m.call(t,{e:c})}}));return()=>ie(it,v.value)}});const ct=lt;/**
|
2024-06-18 13:10:56 +00:00
|
|
|
* tdesign v1.9.4
|
|
|
|
* (c) 2024 tdesign
|
|
|
|
* @license MIT
|
|
|
|
*/var ut={align:{type:String,default:"top",validator:function(e){return e?["start","end","center","stretch","baseline","top","middle","bottom"].includes(e):!0}},gutter:{type:[Number,Object,Array],default:0},justify:{type:String,default:"start",validator:function(e){return e?["start","end","center","space-around","space-between"].includes(e):!0}},tag:{type:String,default:"div"}};/**
|
|
|
|
* tdesign v1.9.4
|
|
|
|
* (c) 2024 tdesign
|
|
|
|
* @license MIT
|
|
|
|
*/var Y=function(e){var o="xs";return e<768?o="xs":e>=768&&e<992?o="sm":e>=992&&e<1200?o="md":e>=1200&&e<1400?o="lg":e>=1400&&e<1880?o="xl":o="xxl",o};/**
|
|
|
|
* tdesign v1.9.4
|
|
|
|
* (c) 2024 tdesign
|
|
|
|
* @license MIT
|
|
|
|
*/function pt(t,e){ae(function(){window.addEventListener(t,e)}),Ne(function(){window.removeEventListener(t,e)})}/**
|
|
|
|
* tdesign v1.9.4
|
|
|
|
* (c) 2024 tdesign
|
|
|
|
* @license MIT
|
|
|
|
*/function Z(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),o.push.apply(o,n)}return o}function L(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Z(Object(o),!0).forEach(function(n){b(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Z(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function ue(){var t=$e(Y(J?0:window.innerWidth)),e=function(){t.value=Y(J?0:window.innerWidth)};return pt("resize",e),t}function ft(t,e){var o=e.justify,n=e.align;return[t,b(b({},"".concat(t,"--").concat(o),o),"".concat(t,"--align-").concat(n),n)]}function dt(t,e){var o={},n=function(a){return Object.assign(o,{marginLeft:"".concat(a/-2,"px"),marginRight:"".concat(a/-2,"px")})},l=function(a){return Object.assign(o,{rowGap:"".concat(a,"px")})},d={isNumber:function(a){A(a)&&n(a)},isArray:function(a){U(a)&&a.length&&(d.isNumber(a[0]),A(a[1])&&l(a[1]),S(a[0])&&!I(a[0][e])&&n(a[0][e]),S(a[1])&&!I(a[1][e])&&l(a[1][e]))},isObject:function(a){S(a)&&a[e]&&(U(a)&&a.length?(n(a[e][0]),l(a[e][1])):n(a[e]))}};return Object.keys(d).forEach(function(s){d[s](t)}),o}function mt(t){return A(t)?"".concat(t," ").concat(t," 0"):/^\d+(\.\d+)?(px|r?em|%)$/.test(t)?"0 0 ".concat(t):t}function vt(t,e){var o={},n=function(s){return Object.assign(o,{paddingLeft:"".concat(s/2,"px"),paddingRight:"".concat(s/2,"px")})},l={isNumber:function(s){A(s)&&n(s)},isArray:function(s){U(s)&&s.length&&(A(s[0])&&n(s[0]),S(s[0])&&s[0][e]&&n(s[0][e]))},isObject:function(s){S(s)&&s[e]&&n(s[e])}};return Object.keys(l).forEach(function(d){l[d](t)}),o}function bt(t,e){var o=e.span,n=e.order,l=e.offset,d=e.push,s=e.pull,a=["xs","sm","md","lg","xl","xxl"],v=a.reduce(function(c,m){var _=e[m],y={};return A(_)?y.span=_:S(_)&&(y=_||{}),L(L({},c),{},b(b(b(b(b({},"".concat(t,"-").concat(m,"-").concat(y.span),!I(y.span)),"".concat(t,"-").concat(m,"-order-").concat(y.order),parseInt(y.order,10)>=0),"".concat(t,"-").concat(m,"-offset-").concat(y.offset),parseInt(y.offset,10)>=0),"".concat(t,"-").concat(m,"-push-").concat(y.push),parseInt(y.push,10)>=0),"".concat(t,"-").concat(m,"-pull-").concat(y.pull),parseInt(y.pull,10)>=0))},{});return L(b(b(b(b(b(b({},"".concat(t),!0),"".concat(t,"-").concat(o),!I(o)),"".concat(t,"-order-").concat(n),n),"".concat(t,"-offset-").concat(l),l),"".concat(t,"-push-").concat(d),d),"".concat(t,"-pull-").concat(s),s),v)}/**
|
|
|
|
* tdesign v1.9.4
|
|
|
|
* (c) 2024 tdesign
|
|
|
|
* @license MIT
|
|
|
|
*/function ee(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),o.push.apply(o,n)}return o}function yt(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?ee(Object(o),!0).forEach(function(n){b(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ee(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function gt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!re(t)}var _t=N({name:"TRow",props:yt({},ut),setup:function(e){var o=Fe(e),n=o.gutter,l=ne();Ie("rowContext",z({gutter:n}));var d=ue(),s=ce("row"),a=w(function(){return ft(s.value,e)}),v=w(function(){return dt(e.gutter,d.value)});return function(){var c,m=e.tag;return r(m,{class:a.value,style:v.value},gt(c=l("default"))?c:{default:function(){return[c]}})}}});/**
|
|
|
|
* tdesign v1.9.4
|
|
|
|
* (c) 2024 tdesign
|
|
|
|
* @license MIT
|
|
|
|
*/var wt={flex:{type:[String,Number]},lg:{type:[Number,Object]},md:{type:[Number,Object]},offset:{type:Number,default:0},order:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},sm:{type:[Number,Object]},span:{type:Number},tag:{type:String,default:"div"},xl:{type:[Number,Object]},xs:{type:[Number,Object]},xxl:{type:[Number,Object]}};/**
|
|
|
|
* tdesign v1.9.4
|
|
|
|
* (c) 2024 tdesign
|
|
|
|
* @license MIT
|
|
|
|
*/function te(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),o.push.apply(o,n)}return o}function Ot(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?te(Object(o),!0).forEach(function(n){b(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):te(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function ht(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!re(t)}var jt=N({name:"TCol",inject:["rowContext"],props:Ot({},wt),setup:function(e){var o=ce("col"),n=ne(),l=Le("rowContext",Object.create(null)),d=ue(),s=w(function(){return bt(o.value,e)}),a=w(function(){var v={},c=e.flex;if(c&&(v.flex=mt(c)),l){var m=l.gutter;Object.assign(v,vt(m,d.value))}return v});return function(){var v,c=e.tag;return r(c,{class:s.value,style:a.value},ht(v=n("default"))?v:{default:function(){return[v]}})}}});/**
|
|
|
|
* tdesign v1.9.4
|
|
|
|
* (c) 2024 tdesign
|
|
|
|
* @license MIT
|
2024-06-26 02:33:56 +00:00
|
|
|
*/var xt=oe(_t),Pt=oe(jt);const kt=t=>(Te("data-v-d833569b"),t=t(),Ve(),t),Ct={class:"container"},St={style:{"margin-right":"20px"}},At={style:{color:"#373737",margin:"10px"}},Dt=["title","src"],Et={style:{display:"flex","align-items":"center","justify-content":"space-between"}},Nt={style:{display:"flex",width:"100%"}},$t={style:{width:"90%"}},Ft=kt(()=>x("br",null,null,-1)),It={style:{width:"10%",margin:"auto","text-align":"center"}},Lt={name:"Backup"},Ut=N({...Lt,setup(t){Se();const e=Ae(),o=Me(),n=z({binaryFile:void 0,loading:!1,showPanel:!1,showUpload:!1,refLoading:!1,myList:[],total:0,page:1,nowpage:[],dropzoneActive:!1}),l=u=>{u.preventDefault(),n.dropzoneActive=!0},d=u=>{u.preventDefault(),n.dropzoneActive=!1},s=u=>{u.preventDefault()},a=u=>new Promise((p,D)=>{let g=new FileReader;g.readAsDataURL(u),g.onload=P=>{p(P.target.result)}}),v=async u=>{var D;u.preventDefault(),n.dropzoneActive=!1;const p=u.dataTransfer.files;for(let g=0;g<p.length;g++)await C.post("https://k5.vicicode.com/wsapi/upload",{type:1,token:e.accountId,title:p[g].name,desc:"",data:(D=await a(p[g]))==null?void 0:D.split(",")[1]}),_()},c=z({title:"",desc:"",firmware:[]});ae(async()=>{m({current:1})});const m=async u=>{n.page=u.current;const p=await C.get("https://k5.vicicode.com/wsapi/list?type=1&limit=24&page="+u.current+"&t="+Date.now());n.total=p.total,n.nowpage=p.data},_=async()=>{n.refLoading=!0,n.showPanel=!0;const u=await C.post("https://k5.vicicode.com/wsapi/my_list",{type:1,token:e.accountId});n.myList=u.data,n.refLoading=!1},y=()=>{c.title="",c.desc="",c.firmware=[],n.showUpload=!0},pe=async()=>{if(c.title==""||c.firmware.length==0){H.error({content:"\u672A\u586B\u5199\u540D\u79F0\u53CA\u4E0A\u4F20\u6587\u4EF6",duration:5*1e3});return}await C.post("https://k5.vicicode.com/wsapi/upload",{type:1,token:e.accountId,title:c.title,desc:c.desc,data:c.firmware[0].url}),n.showUpload=!1,_()},fe=async u=>{await C.post("https://k5.vicicode.com/wsapi/delete",{id:u,token:e.accountId}),_()},de=async u=>{await C.post("https://k5.vicicode.com/wsapi/star",{id:u}),H.success({content:"\u70B9\u8D5E\u6210\u529F",duration:5*1e3})},me=()=>{_()},ve=u=>{o.push({path:"/tool/image",query:{url:u}})};return(u,p)=>{const D=De,g=ze,P=We,R=Pt,be=xt,ye=Ye,B=Re,T=Be,ge=Ze,_e=Ue,we=et,Oe=tt,he=Ke,je=He,V=Je,xe=Qe,$=nt,Pe=qe,ke=Xe,Ce=ot;return k(),E("div",Ct,[r(D,{items:[u.$t("menu.workshop"),u.$t("menu.image")]},null,8,["items"]),r(T,{gutter:20,align:"stretch"},{default:i(()=>[r(B,{span:24},{default:i(()=>[r(_e,{class:"general-card",title:u.$t("menu.image")},{extra:i(()=>[x("div",St,[j(e).name?(k(),E(F,{key:0},[r(g,{onClick:_},{default:i(()=>[O("\xA0\xA0"+h(j(e).name)+"\xA0\xA0",1)]),_:1}),r(g,{onClick:_},{default:i(()=>[O("\xA0\xA0"+h(u.$t("global.upload"))+"\xA0\xA0",1)]),_:1}),r(g,{onClick:p[0]||(p[0]=f=>j(e).logout())},{default:i(()=>[O("\xA0\xA0"+h(u.$t("global.logout"))+"\xA0\xA0",1)]),_:1})],64)):(k(),E(F,{key:1},[r(g,{onClick:p[1]||(p[1]=f=>j(e).setInfo({showLogin:!0}))},{default:i(()=>[O("\xA0\xA0"+h(u.$t("global.login"))+"\xA0\xA0",1)]),_:1}),r(g,{onClick:p[2]||(p[2]=f=>j(e).setInfo({showRegister:!0}))},{default:i(()=>[O("\xA0\xA0"+h(u.$t("global.register"))+"\xA0\xA0",1)]),_:1}),x("span",At,h(u.$t("global.loginUpload")),1)],64))])]),default:i(()=>[r(T,{gutter:20},{default:i(()=>[(k(!0),E(F,null,G(n.nowpage,f=>(k(),K(B,{span:4},{default:i(()=>[r(ye,{style:{width:"100%",marginBottom:"10px"}},{cover:i(()=>[x("img",{style:{height:"6.75vw"},title:f.title+" ["+f.upload+"]",src:"https://k5.vicicode.com/wsapi/download?id="+f.id+"&n="+f.title+".jpg"},null,8,Dt)]),footer:i(()=>[r(be,{align:"middle",justify:"center",style:{gap:"24px"}},{default:i(()=>[r(R,{flex:"auto",style:{display:"inline-flex","justify-content":"center"}},{default:i(()=>[r(P,{variant:"text",shape:"square",onClick:M=>de(f.id)},{default:i(()=>[r(j(ct))]),_:2},1032,["onClick"])]),_:2},1024),r(R,{flex:"auto",style:{display:"inline-flex","justify-content":"center"}},{default:i(()=>[r(P,{variant:"text",shape:"square",onClick:M=>ve("https://k5.vicicode.com/wsapi/download?id="+f.id+"&n="+f.title+".jpg")},{def
|