k5web/assets/index.97e453ea.js
2024-06-15 08:08:13 +08:00

2 lines
5.9 KiB
JavaScript

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.d4000d74.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.1d536ab5.js";import"./chart.b6f2f6d9.js";import"./vue.d12e9c08.js";import"./useConfig.e95fe182.js";import"./useDisabled.2989597b.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"?p(r)("workplace.clickNotice"):"")+" ",1),a(F,{size:"mini",type:"primary",onClick:G},{default:n(()=>[o(l(e.$t("workplace.checkIt")),1)]),_:1})]}),_:1},8,["title"]),[[Z,p(t).connectState]])]),_:1}),s("div",null,[a(u,{heading:5},{default:n(()=>[o("\u8BF4\u660E\uFF1A")]),_:1}),a(_,null,{default:n(()=>[o("\u25C6 \u4F7F\u7528\u5E94\u7B2C\u4E00\u65F6\u95F4"),a(d,{theme:"primary",href:"/#/tool/backup"},{default:n(()=>[o("\u5907\u4EFD")]),_:1}),o("\u914D\u7F6E\u53CA\u6821\u51C6\u6570\u636E\u3002")]),_:1}),ht,a(_,null,{default:n(()=>[o("\u25C6 \u9664\u201C\u56FA\u4EF6\u5347\u7EA7\u201D\u529F\u80FD\u624B\u53F0\u5E94\u5904\u4E8E\u5237\u673A\u6A21\u5F0F\u70B9\u51FB\u66F4\u65B0\u6309\u94AE\u9009\u62E9\u8BBE\u5907\u66F4\u65B0\uFF0C\u5176\u4F59\u529F\u80FD\u624B\u53F0\u5747\u9700\u8981\u5728\u6B63\u5E38\u6A21\u5F0F\u8FDE\u63A5\u3002")]),_:1}),gt,a(_,null,{default:n(()=>[o("\u25C6 \u841D\u535C\uFF08LOSEHU\uFF09\u56FA\u4EF6\u76F8\u5173\u95EE\u9898\u8BF7\u79FB\u6B65\uFF1A"),a(d,{theme:"primary",href:"https://github.com/losehu/uv-k5-firmware-custom",target:"_blank"},{default:n(()=>[o("https://github.com/losehu/uv-k5-firmware-custom")]),_:1}),o(" \u3002")]),_:1}),wt,a(_,null,{default:n(()=>[o("\u25C6 K5Web \u4F7F\u7528\u89C6\u9891\u6559\u7A0B\uFF08BG7QJV\uFF09\uFF1A"),a(d,{theme:"primary",href:"https://www.douyin.com/video/7378314511419313458",target:"_blank"},{default:n(()=>[o("https://www.douyin.com/video/7378314511419313458")]),_:1}),o(" \u3002")]),_:1})]),s("div",null,[a(u,{heading:5},{default:n(()=>[o("\u5E0C\u671B\u5DE5\u7A0B1+1\u52A9\u5B66\u884C\u52A8\uFF1A")]),_:1}),bt])]),_:1})}}});const kt=U(Ft,[["__scopeId","data-v-1b138b51"]]),yt={class:"container"},St={class:"left-side"},Et={class:"panel"},Bt={name:"Dashboard"},vt=L({...Bt,setup(f){return(r,t)=>(H(),it("div",yt,[s("div",St,[s("div",Et,[a(kt)])])]))}});const Ut=U(vt,[["__scopeId","data-v-8f743d99"]]);export{Ut as default};