k5web/assets/index.d33903e8.js
2024-05-12 11:43:06 +08:00

1 line
4.2 KiB
JavaScript

import{d as A,r as Q,bD as W,C as R,aE as X,aH as i,aI as c,aM as d,aN as r,u as h,bo as Y,bp as Z,bn as tt,bE as ot,bB as at,a_ as nt,b9 as et,bd as rt,be as ct,G as s,D as it}from"./arco.02de294f.js";import{v as st,e as ut,_ as U}from"./index.e6020230.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{e as _t,a as n,b as e}from"./serial.c741fbda.js";import"./chart.61cd37ef.js";import"./vue.4e4c1473.js";const pt=""+new URL("../gy.png",import.meta.url).href,k=u=>(rt("data-v-28070f4a"),u=u(),ct(),u),dt=k(()=>s("br",null,null,-1)),lt=k(()=>s("br",null,null,-1)),mt=k(()=>s("div",null,[s("img",{style:{"margin-bottom":"10px"},width:"600px",src:pt})],-1)),ft=A({__name:"banner",setup(u){const{t:S}=st.exports.useI18n(),t=ut(),P=Q({eepromSize:S("workplace.clickCheck")}),j=async()=>{var _,l,m,f,g,p,M,v,y,B,$,E,I,x,C,D,K,z,N,T,V;let o="\u672A\u77E5\u3001\u6545\u969C\u3001\u4E0D\u53EF\u7528";const F=[Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256)];await _t(t.connectPort);const a=new Uint8Array(F);if(((_=t.configuration)==null?void 0:_.uart)=="official"){const w=await n(t.connectPort,0,8,(l=t.configuration)==null?void 0:l.uart);await e(t.connectPort,0,a,8,(m=t.configuration)==null?void 0:m.uart);const b=await n(t.connectPort,0,8,(f=t.configuration)==null?void 0:f.uart);a.toString()==b.toString()&&(o="8KB\uFF0864Kbit\uFF09"),await e(t.connectPort,0,w,8,(g=t.configuration)==null?void 0:g.uart)}else{const w=await n(t.connectPort,0,8,(p=t.configuration)==null?void 0:p.uart);await e(t.connectPort,0,a,8,(M=t.configuration)==null?void 0:M.uart);const b=await n(t.connectPort,0,8,(v=t.configuration)==null?void 0:v.uart);a.toString()==b.toString()&&(o="8KB\uFF0864Kbit\uFF09"),await e(t.connectPort,0,w,8,(y=t.configuration)==null?void 0:y.uart);const G=await n(t.connectPort,131064,8,(B=t.configuration)==null?void 0:B.uart);await e(t.connectPort,131064,a,8,($=t.configuration)==null?void 0:$.uart);const H=await n(t.connectPort,131064,8,(E=t.configuration)==null?void 0:E.uart);a.toString()==H.toString()&&(o="128KB\uFF081Mbit\uFF09"),await e(t.connectPort,131064,G,8,(I=t.configuration)==null?void 0:I.uart);const L=await n(t.connectPort,262136,8,(x=t.configuration)==null?void 0:x.uart);await e(t.connectPort,262136,a,8,(C=t.configuration)==null?void 0:C.uart);const O=await n(t.connectPort,262136,8,(D=t.configuration)==null?void 0:D.uart);a.toString()==O.toString()&&(o="256KB\uFF082Mbit\uFF09"),await e(t.connectPort,262136,L,8,(K=t.configuration)==null?void 0:K.uart);const q=await n(t.connectPort,524280,8,(z=t.configuration)==null?void 0:z.uart);await e(t.connectPort,524280,a,8,(N=t.configuration)==null?void 0:N.uart);const J=await n(t.connectPort,524280,8,(T=t.configuration)==null?void 0:T.uart);a.toString()==J.toString()&&(o="512KB\uFF084Mbit\uFF09"),await e(t.connectPort,524280,q,8,(V=t.configuration)==null?void 0:V.uart)}P.eepromSize=o};return(o,F)=>{const a=tt,_=ot,l=at,m=nt,f=W,g=et;return R(),X(_,{class:"banner"},{default:i(()=>[c(_,null,{default:i(()=>[c(a,{heading:5,style:{"margin-top":"0"}},{default:i(()=>[d(r(h(t).connectState?o.$t("workplace.welcomeSuc"):o.$t("workplace.welcome")),1)]),_:1})]),_:1}),c(l,{class:"panel-border"}),c(g,null,{default:i(()=>[Y(c(f,{style:{marginTop:"2em",marginBottom:"2em"},title:o.$t("workplace.info")},{default:i(()=>{var p;return[d(r(o.$t("workplace.current"))+r(h(t).firmwareVersion)+" ",1),dt,d(" "+r(o.$t("workplace.writeconfig"))+r((p=h(t).configuration)==null?void 0:p.name)+" ",1),lt,d(" "+r(o.$t("workplace.eepromSize"))+r(P.eepromSize)+" ",1),c(m,{size:"mini",type:"primary",onClick:j},{default:i(()=>[d(r(o.$t("workplace.checkIt")),1)]),_:1})]}),_:1},8,["title"]),[[Z,h(t).connectState]])]),_:1}),mt]),_:1})}}});const gt=U(ft,[["__scopeId","data-v-28070f4a"]]),ht={class:"container"},wt={class:"left-side"},bt={class:"panel"},kt={name:"Dashboard"},St=A({...kt,setup(u){return(S,t)=>(R(),it("div",ht,[s("div",wt,[s("div",bt,[c(gt)])])]))}});const Dt=U(St,[["__scopeId","data-v-8f743d99"]]);export{Dt as default};