k5web/assets/index.73baf32a.js
2024-06-08 12:39:20 +08:00

2 lines
4.2 KiB
JavaScript

import{as as c,_ as E}from"./index.5159b099.js";/* empty css *//* empty css */import{d as g,r as x,w as v,o as M,bS as V,bH as C,C as y,D,aI as e,aH as u,aM as d,bT as A,a$ as w,bI as U,bL as B}from"./arco.446db797.js";import{f as S}from"./vue.848e4abf.js";import{S as k}from"./index.0041978e.js";import"./chart.27192e44.js";import"./useConfig.d4cd85a0.js";import"./slot.1fb52dbb.js";const j={class:"container"},O={name:"Backup"},H=g({...O,setup(I){const r=S(),f=()=>{r.push({path:"/tool/flash",query:{url:"/diy/LOSEHU"+a.flag.join("")+".bin"}})},a=x({versions:[],flag:["0","0","0","0","0","0","0"],disMatrix:[{0:!1,4:!1},{0:!1,1:!1},{0:!1,1:!1},{0:!1,1:!1},{0:!1,F:!1,4:!1},{0:!1,1:!1},{0:!1,1:!1}]});return v(a.flag,()=>{a.flag.map((n,l)=>{Object.keys(a.disMatrix[l]).map(i=>{a.versions.indexOf("LOSEHU"+a.flag.join("").substring(0,l)+i+a.flag.join("").substring(l+1)+".bin")==-1?a.disMatrix[l][i]=!0:a.disMatrix[l][i]=!1})})}),M(async()=>{const n=await(await fetch("/diy/version.json")).text();a.versions=JSON.parse(n)}),(n,l)=>{const i=c,t=V,o=A,_=w,p=k,m=C,b=U,F=B;return y(),D("div",j,[e(i,{items:[n.$t("menu.workshop"),"\u81EA\u5B9A\u4E49\u841D\u535C\u56FA\u4EF6"]},null,8,["items"]),e(F,{gutter:20,align:"stretch"},{default:u(()=>[e(b,{span:24},{default:u(()=>[e(m,{class:"general-card",title:"\u81EA\u5B9A\u4E49\u841D\u535C\u56FA\u4EF6"},{default:u(()=>[e(p,{direction:"vertical"},{default:u(()=>[e(o,{modelValue:a.flag[0],"onUpdate:modelValue":l[0]||(l[0]=s=>a.flag[0]=s),type:"button"},{default:u(()=>[e(t,{value:"0",disabled:a.disMatrix[0][0]},{default:u(()=>[d("\u82F1\u6587\u4FE1\u9053")]),_:1},8,["disabled"]),e(t,{value:"4",disabled:a.disMatrix[0][4]},{default:u(()=>[d("\u4E2D\u6587\u4FE1\u9053")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[1],"onUpdate:modelValue":l[1]||(l[1]=s=>a.flag[1]=s),type:"button"},{default:u(()=>[e(t,{value:"0",disabled:a.disMatrix[1][0]},{default:u(()=>[d("\u505C\u7528\u77ED\u4FE1\u529F\u80FD")]),_:1},8,["disabled"]),e(t,{value:"1",disabled:a.disMatrix[1][1]},{default:u(()=>[d("\u5F00\u542F\u77ED\u4FE1\u529F\u80FD")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[2],"onUpdate:modelValue":l[2]||(l[2]=s=>a.flag[2]=s),type:"button"},{default:u(()=>[e(t,{value:"0",disabled:a.disMatrix[2][0]},{default:u(()=>[d("\u505C\u7528\u591A\u666E\u52D2")]),_:1},8,["disabled"]),e(t,{value:"1",disabled:a.disMatrix[2][1]},{default:u(()=>[d("\u5F00\u542F\u591A\u666E\u52D2")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[3],"onUpdate:modelValue":l[3]||(l[3]=s=>a.flag[3]=s),type:"button"},{default:u(()=>[e(t,{value:"0",disabled:a.disMatrix[3][0]},{default:u(()=>[d("\u505C\u7528MDC\u4FE1\u4EE4")]),_:1},8,["disabled"]),e(t,{value:"1",disabled:a.disMatrix[3][1]},{default:u(()=>[d("\u5F00\u542FMDC\u4FE1\u4EE4")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[4],"onUpdate:modelValue":l[4]||(l[4]=s=>a.flag[4]=s),type:"button"},{default:u(()=>[e(t,{value:"0",disabled:a.disMatrix[4][0]},{default:u(()=>[d("\u505C\u7528\u6536\u97F3\u673A")]),_:1},8,["disabled"]),e(t,{value:"F",disabled:a.disMatrix[4].F},{default:u(()=>[d("\u9ED8\u8BA4\u6536\u97F3\u673A")]),_:1},8,["disabled"]),e(t,{value:"4",disabled:a.disMatrix[4][4]},{default:u(()=>[d("SI4732\u6536\u97F3\u673A")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[5],"onUpdate:modelValue":l[5]||(l[5]=s=>a.flag[5]=s),type:"button"},{default:u(()=>[e(t,{value:"0",disabled:a.disMatrix[5][0]},{default:u(()=>[d("\u505C\u7528\u8F93\u5165\u6CD5")]),_:1},8,["disabled"]),e(t,{value:"1",disabled:a.disMatrix[5][1]},{default:u(()=>[d("\u5F00\u542F\u8F93\u5165\u6CD5")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[6],"onUpdate:modelValue":l[6]||(l[6]=s=>a.flag[6]=s),type:"button"},{default:u(()=>[e(t,{value:"0",disabled:a.disMatrix[6][0]},{default:u(()=>[d("\u505C\u7528\u9891\u8C31\u4EEA")]),_:1},8,["disabled"]),e(t,{value:"1",disabled:a.disMatrix[6][1]},{default:u(()=>[d("\u5F00\u542F\u9891\u8C31\u4EEA")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(_,{type:"primary",onClick:f},{default:u(()=>[d("\u751F\u6210")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])}}});const K=E(H,[["__scopeId","data-v-dc5d18d5"]]);export{K as default};