k5web/assets/index.3fc42c69.js

2 lines
5.9 KiB
JavaScript
Raw Normal View History

2024-06-15 00:12:28 +00:00
import{d as L,r as W,bH as q,C as H,aE as X,aH as n,aI as a,aM as o,aN as l,u as p,bn as Y,bo as Z,G as s,bp as tt,bI as ot,bF as at,a$ as nt,ba as et,bJ as ut,be as rt,bf as ct,D as it}from"./arco.949c921a.js";import{v as st,k as lt,_ as U}from"./index.fbda348e.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{e as _t,a as c,b as i}from"./serial.c741fbda.js";import{L as pt}from"./index.8c6fd3d2.js";import"./chart.b6f2f6d9.js";import"./vue.d12e9c08.js";import"./useConfig.ca36cd5a.js";import"./useDisabled.bff87d5f.js";const dt=""+new URL("../gy.png",import.meta.url).href,m=f=>(rt("data-v-1b138b51"),f=f(),ct(),f),mt=m(()=>s("br",null,null,-1)),ft=m(()=>s("br",null,null,-1)),ht=m(()=>s("br",null,null,-1)),gt=m(()=>s("br",null,null,-1)),wt=m(()=>s("br",null,null,-1)),bt=m(()=>s("img",{class:"tencent",style:{"margin-bottom":"10px"},width:"200px",src:dt},null,-1)),Ft=L({__name:"banner",setup(f){const{t:r}=st.exports.useI18n(),t=lt(),S=W({eepromSize:r("workplace.clickCheck")}),G=async()=>{var h,b,F,k,y,d,_,g,w,P,C,A,M,D,$,x,I,z,T,N,V;let e=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 u=new Uint8Array(v);if(((h=t.configuration)==null?void 0:h.uart)=="official"){const E=await c(t.connectPort,0,8,(b=t.configuration)==null?void 0:b.uart);await i(t.connectPort,0,u,8,(F=t.configuration)==null?void 0:F.uart);const B=await c(t.connectPort,0,8,(k=t.configuration)==null?void 0:k.uart);u.toString()==B.toString()&&(e=r("global.8kb")),await i(t.connectPort,0,E,8,(y=t.configuration)==null?void 0:y.uart)}else{const E=await c(t.connectPort,0,8,(d=t.configuration)==null?void 0:d.uart);await i(t.connectPort,0,u,8,(_=t.configuration)==null?void 0:_.uart);const B=await c(t.connectPort,0,8,(g=t.configuration)==null?void 0:g.uart);u.toString()==B.toString()&&(e=r("global.8kb")),await i(t.connectPort,0,E,8,(w=t.configuration)==null?void 0:w.uart);const J=await c(t.connectPort,131064,8,(P=t.configuration)==null?void 0:P.uart);await i(t.connectPort,131064,u,8,(C=t.configuration)==null?void 0:C.uart);const O=await c(t.connectPort,131064,8,(A=t.configuration)==null?void 0:A.uart);u.toString()==O.toString()&&(e=r("global.128kb")),await i(t.connectPort,131064,J,8,(M=t.configuration)==null?void 0:M.uart);const R=await c(t.connectPort,262136,8,(D=t.configuration)==null?void 0:D.uart);await i(t.connectPort,262136,u,8,($=t.configuration)==null?void 0:$.uart);const j=await c(t.connectPort,262136,8,(x=t.configuration)==null?void 0:x.uart);u.toString()==j.toString()&&(e=r("global.256kb")),await i(t.connectPort,262136,R,8,(I=t.configuration)==null?void 0:I.uart);const K=await c(t.connectPort,524280,8,(z=t.configuration)==null?void 0:z.uart);await i(t.connectPort,524280,u,8,(T=t.configuration)==null?void 0:T.uart);const Q=await c(t.connectPort,524280,8,(N=t.configuration)==null?void 0:N.uart);u.toString()==Q.toString()&&(e=r("global.512kb")),await i(t.connectPort,524280,K,8,(V=t.configuration)==null?void 0:V.uart)}S.eepromSize=e};return(e,v)=>{const u=tt,h=ot,b=at,F=nt,k=q,y=et,d=pt,_=ut;return H(),X(h,{class:"banner"},{default:n(()=>[a(h,null,{default:n(()=>[a(u,{heading:5,style:{"margin-top":"0"}},{default:n(()=>[o(l(p(t).connectState?e.$t("workplace.welcomeSuc"):e.$t("workplace.welcome")),1)]),_:1})]),_:1}),a(b,{class:"panel-border"}),a(y,null,{default:n(()=>[Y(a(k,{style:{marginTop:"2em",marginBottom:"2em"},title:e.$t("workplace.info")},{default:n(()=>{var g,w;return[o(l(e.$t("workplace.current"))+l(p(t).firmwareVersion)+" ",1),mt,o(" "+l(e.$t("workplace.writeconfig"))+l((g=p(t).configuration)==null?void 0:g.name)+" ",1),ft,o(" "+l(e.$t("workplace.eepromSize"))+l(S.eepromSize)+" "+l(S.eepromSize!=p(r)("workplace.clickCheck")&&((w=p(t).configuration)==null?void 0:w.uart)=="official"