k5web/assets/index.7e18cbbf.js
2024-05-22 23:16:17 +08:00

2 lines
4.1 KiB
JavaScript

import{d as U,r as Q,bD as W,C as j,aE as X,aH as s,aI as i,aM as d,aN as c,u as w,bo as Y,bp as Z,bn as tt,bE as ot,bB as at,a$ as nt,ba as et,be as rt,bf as ct,G as u,D as it}from"./arco.b289f6bb.js";import{v as st,h as ut,_ as G}from"./index.b999f3ae.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.7501771f.js";import"./vue.e0867ae8.js";const pt=""+new URL("../gy.png",import.meta.url).href,S=_=>(rt("data-v-769c6935"),_=_(),ct(),_),lt=S(()=>u("br",null,null,-1)),dt=S(()=>u("br",null,null,-1)),mt=S(()=>u("div",null,[u("img",{style:{"margin-bottom":"10px"},width:"600px",src:pt})],-1)),ft=U({__name:"banner",setup(_){const{t:r}=st.exports.useI18n(),t=ut(),P=Q({eepromSize:r("workplace.clickCheck")}),H=async()=>{var p,m,f,g,h,l,y,M,$,I,x,B,C,z,D,E,N,T,V,A,R;let o=r("workplace.unk");const v=[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(v);if(((p=t.configuration)==null?void 0:p.uart)=="official"){const b=await n(t.connectPort,0,8,(m=t.configuration)==null?void 0:m.uart);await e(t.connectPort,0,a,8,(f=t.configuration)==null?void 0:f.uart);const k=await n(t.connectPort,0,8,(g=t.configuration)==null?void 0:g.uart);a.toString()==k.toString()&&(o=r("global.8kb")),await e(t.connectPort,0,b,8,(h=t.configuration)==null?void 0:h.uart)}else{const b=await n(t.connectPort,0,8,(l=t.configuration)==null?void 0:l.uart);await e(t.connectPort,0,a,8,(y=t.configuration)==null?void 0:y.uart);const k=await n(t.connectPort,0,8,(M=t.configuration)==null?void 0:M.uart);a.toString()==k.toString()&&(o=r("global.8kb")),await e(t.connectPort,0,b,8,($=t.configuration)==null?void 0:$.uart);const L=await n(t.connectPort,131064,8,(I=t.configuration)==null?void 0:I.uart);await e(t.connectPort,131064,a,8,(x=t.configuration)==null?void 0:x.uart);const O=await n(t.connectPort,131064,8,(B=t.configuration)==null?void 0:B.uart);a.toString()==O.toString()&&(o=r("global.128kb")),await e(t.connectPort,131064,L,8,(C=t.configuration)==null?void 0:C.uart);const q=await n(t.connectPort,262136,8,(z=t.configuration)==null?void 0:z.uart);await e(t.connectPort,262136,a,8,(D=t.configuration)==null?void 0:D.uart);const F=await n(t.connectPort,262136,8,(E=t.configuration)==null?void 0:E.uart);a.toString()==F.toString()&&(o=r("global.256kb")),await e(t.connectPort,262136,q,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);await e(t.connectPort,524280,a,8,(V=t.configuration)==null?void 0:V.uart);const K=await n(t.connectPort,524280,8,(A=t.configuration)==null?void 0:A.uart);a.toString()==K.toString()&&(o=r("global.512kb")),await e(t.connectPort,524280,J,8,(R=t.configuration)==null?void 0:R.uart)}P.eepromSize=o};return(o,v)=>{const a=tt,p=ot,m=at,f=nt,g=W,h=et;return j(),X(p,{class:"banner"},{default:s(()=>[i(p,null,{default:s(()=>[i(a,{heading:5,style:{"margin-top":"0"}},{default:s(()=>[d(c(w(t).connectState?o.$t("workplace.welcomeSuc"):o.$t("workplace.welcome")),1)]),_:1})]),_:1}),i(m,{class:"panel-border"}),i(h,null,{default:s(()=>[Y(i(g,{style:{marginTop:"2em",marginBottom:"2em"},title:o.$t("workplace.info")},{default:s(()=>{var l;return[d(c(o.$t("workplace.current"))+c(w(t).firmwareVersion)+" ",1),lt,d(" "+c(o.$t("workplace.writeconfig"))+c((l=w(t).configuration)==null?void 0:l.name)+" ",1),dt,d(" "+c(o.$t("workplace.eepromSize"))+c(P.eepromSize)+" ",1),i(f,{size:"mini",type:"primary",onClick:H},{default:s(()=>[d(c(o.$t("workplace.checkIt")),1)]),_:1})]}),_:1},8,["title"]),[[Z,w(t).connectState]])]),_:1}),mt]),_:1})}}});const gt=G(ft,[["__scopeId","data-v-769c6935"]]),ht={class:"container"},wt={class:"left-side"},bt={class:"panel"},kt={name:"Dashboard"},St=U({...kt,setup(_){return(r,t)=>(j(),it("div",ht,[u("div",wt,[u("div",bt,[i(gt)])])]))}});const Et=G(St,[["__scopeId","data-v-8f743d99"]]);export{Et as default};