k5web/assets/index.6ed4b5f7.js

2 lines
4.7 KiB
JavaScript
Raw Normal View History

2024-06-08 16:11:36 +00:00
import{ak as g,_ as v}from"./index.77e506b7.js";/* empty css *//* empty css */import{d as E,r as x,w as M,o as V,bS as C,bH as y,C as D,D as A,aI as e,aH as u,aM as t,bT as w,a$ as B,bI as U,bJ as k}from"./arco.768e32d2.js";import{f as S}from"./vue.5a5bc6a2.js";import{S as I}from"./index.4e671ab9.js";import"./chart.affe3403.js";import"./useConfig.c8c4aaa5.js";import"./slot.ac9049d4.js";const j={class:"container"},O={name:"Backup"},H=E({...O,setup(R){const r=S(),_=()=>{r.push({path:"/tool/flash",query:{url:"https://k5.vicicode.com/diyapi/LOSEHU"+a.flag.join("")+".bin"}})},a=x({versions:[],flag:["0","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},{0:!1,1:!1}]});M(a.flag,()=>{f()});const f=()=>{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})})};return V(async()=>{const n=await(await fetch("https://k5.vicicode.com/diyapi/version.json?v="+new Date().getTime())).text();a.versions=JSON.parse(n),f()}),(n,l)=>{const i=g,d=C,o=w,p=B,m=I,b=y,F=U,c=k;return D(),A("div",j,[e(i,{items:[n.$t("menu.workshop"),"\u81EA\u5B9A\u4E49\u841D\u535C\u56FA\u4EF6"]},null,8,["items"]),e(c,{gutter:20,align:"stretch"},{default:u(()=>[e(F,{span:24},{default:u(()=>[e(b,{class:"general-card",title:"\u81EA\u5B9A\u4E49\u841D\u535C\u56FA\u4EF6"},{default:u(()=>[e(m,{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(d,{value:"0",disabled:a.disMatrix[0][0]},{default:u(()=>[t("\u82F1\u6587\u4FE1\u9053")]),_:1},8,["disabled"]),e(d,{value:"4",disabled:a.disMatrix[0][4]},{default:u(()=>[t("\u4E2D\u6587\u4FE1\u9053")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[6],"onUpdate:modelValue":l[1]||(l[1]=s=>a.flag[6]=s),type:"button"},{default:u(()=>[e(d,{value:"0",disabled:a.disMatrix[6][0]},{default:u(()=>[t("\u505C\u7528\u9891\u8C31\u4EEA")]),_:1},8,["disabled"]),e(d,{value:"1",disabled:a.disMatrix[6][1]},{default:u(()=>[t("\u5F00\u542F\u9891\u8C31\u4EEA")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[3],"onUpdate:modelValue":l[2]||(l[2]=s=>a.flag[3]=s),type:"button"},{default:u(()=>[e(d,{value:"0",disabled:a.disMatrix[3][0]},{default:u(()=>[t("\u505C\u7528MDC\u4FE1\u4EE4")]),_:1},8,["disabled"]),e(d,{value:"1",disabled:a.disMatrix[3][1]},{default:u(()=>[t("\u5F00\u542FMDC\u4FE1\u4EE4")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[2],"onUpdate:modelValue":l[3]||(l[3]=s=>a.flag[2]=s),type:"button"},{default:u(()=>[e(d,{value:"0",disabled:a.disMatrix[2][0]},{default:u(()=>[t("\u505C\u7528\u591A\u666E\u52D2")]),_:1},8,["disabled"]),e(d,{value:"1",disabled:a.disMatrix[2][1]},{default:u(()=>[t("\u5F00\u542F\u591A\u666E\u52D2")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[5],"onUpdate:modelValue":l[4]||(l[4]=s=>a.flag[5]=s),type:"button"},{default:u(()=>[e(d,{value:"0",disabled:a.disMatrix[5][0]},{default:u(()=>[t("\u505C\u7528\u8F93\u5165\u6CD5")]),_:1},8,["disabled"]),e(d,{value:"1",disabled:a.disMatrix[5][1]},{default:u(()=>[t("\u5F00\u542F\u8F93\u5165\u6CD5")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[1],"onUpdate:modelValue":l[5]||(l[5]=s=>a.flag[1]=s),type:"button"},{default:u(()=>[e(d,{value:"0",disabled:a.disMatrix[1][0]},{default:u(()=>[t("\u505C\u7528\u77ED\u4FE1\u529F\u80FD")]),_:1},8,["disabled"]),e(d,{value:"1",disabled:a.disMatrix[1][1]},{default:u(()=>[t("\u5F00\u542F\u77ED\u4FE1\u529F\u80FD")]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),e(o,{modelValue:a.flag[4],"onUpdate:modelValue":l[6]||(l[6]=s=>a.flag[4]=s),type:"button"},{default:u(()=>[e(d,{value:"0",disabled:a.disMatrix[4][0]},{default:u(()=>[t("\u505C\u7528\u6536\u97F3\u673A")]),_:1},8,["disabled"]),e(d,{value:"F",disabled:a.disMatrix[4].F},{default:u(()=>[t("\u9ED8\u8BA4\u6536\u97F3\u673A")]),_:1},8,["disabled"]),