k5web/assets/index.b0952e22.js
2024-05-27 02:00:20 +08:00

2 lines
4.1 KiB
JavaScript

import{d as R,r as Q,bH as W,C as U,aE as X,aH as s,aI as i,aM as d,aN as c,u as w,bn as Y,bo as Z,bp as tt,bI as ot,bF as at,a$ as nt,ba as et,be as rt,bf as ct,G as u,D as it}from"./arco.f43727df.js";import{v as st,e as ut,_ as j}from"./index.7d9774dd.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.3c227ebb.js";import"./vue.cbdb927d.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=R({__name:"banner",setup(_){const{t:r}=st.exports.useI18n(),t=ut(),P=Q({eepromSize:r("workplace.clickCheck")}),F=async()=>{var p,m,f,g,h,l,y,M,$,I,x,B,C,z,D,E,N,T,V,A,H;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 G=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 L=await n(t.connectPort,131064,8,(B=t.configuration)==null?void 0:B.uart);a.toString()==L.toString()&&(o=r("global.128kb")),await e(t.connectPort,131064,G,8,(C=t.configuration)==null?void 0:C.uart);const O=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 q=await n(t.connectPort,262136,8,(E=t.configuration)==null?void 0:E.uart);a.toString()==q.toString()&&(o=r("global.256kb")),await e(t.connectPort,262136,O,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,(H=t.configuration)==null?void 0:H.uart)}P.eepromSize=o};return(o,v)=>{const a=tt,p=ot,m=at,f=nt,g=W,h=et;return U(),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:F},{default:s(()=>[d(c(o.$t("workplace.checkIt")),1)]),_:1})]}),_:1},8,["title"]),[[Z,w(t).connectState]])]),_:1}),mt]),_:1})}}});const gt=j(ft,[["__scopeId","data-v-769c6935"]]),ht={class:"container"},wt={class:"left-side"},bt={class:"panel"},kt={name:"Dashboard"},St=R({...kt,setup(_){return(r,t)=>(U(),it("div",ht,[u("div",wt,[u("div",bt,[i(gt)])])]))}});const Et=j(St,[["__scopeId","data-v-8f743d99"]]);export{Et as default};