import{U as b}from"./upload-Cl9qkJl5.js";import{d as y,a as l,b as s,f as d,u as g,j as i,F as r,r as c,s as _,o as a,t as o,h as m,w as v,e as f}from"./index-C5t0nGiQ.js";const k={class:"p-6"},h={class:"mb-6"},D={class:"flex items-center justify-between mb-2"},F={class:"flex items-center gap-3"},C={class:"px-4 py-2 rounded text-white flex items-center gap-2",style:{"background-color":"#4a7c59"}},B={class:"bg-white rounded-lg",style:{"box-shadow":"0 1px 2px rgba(0,0,0,0.05)"}},S={class:"divide-y",style:{"border-color":"#F0F0F0"}},A={class:"flex items-center gap-4 mb-2"},z={class:"text-lg font-semibold"},M={class:"text-sm",style:{color:"rgba(0,0,0,0.45)"}},N={class:"text-sm",style:{color:"#52C41A"}},T={class:"text-sm mb-1",style:{color:"rgba(0,0,0,0.65)"}},V={class:"text-sm mb-1",style:{color:"rgba(0,0,0,0.65)"}},L={class:"text-sm mb-3",style:{color:"rgba(0,0,0,0.65)"}},j={key:0,class:"mb-3"},R={key:1,class:"mb-4"},U={class:"text-sm list-disc pl-5",style:{color:"rgba(0,0,0,0.65)"}},E={class:"flex items-center gap-6 pt-2"},G={key:1,class:"flex items-center gap-6 pt-3"},H=["onClick"],J=y({__name:"FirmwareLibrary",setup(O){const p=_([{version:"v2.3.0",releaseDate:"2024-02-20",status:"已发布",fileSize:"12.5MB",downloads:1234,md5:"a1b2c3d4e5f6...",sha256:"...",model:"GD30",hardwareRange:"A1-A3",upgradeType:"可选",signed:!0,notes:["修复OTA升级流程中的断点续传Bug","优化设备心跳上报频率","新增配置文件远程下发功能","增强安全性，升级前强制验证固件签名"],expanded:!0},{version:"v2.2.0",releaseDate:"2024-01-15",status:"已发布",fileSize:"12.0MB",downloads:2456,expanded:!1},{version:"v2.1.0",releaseDate:"2023-12-01",status:"已发布",fileSize:"11.5MB",downloads:3587,expanded:!1}]);return($,e)=>{const u=f("router-link");return a(),l("div",k,[s("div",h,[s("div",D,[e[2]||(e[2]=s("h2",{class:"text-2xl font-semibold"},"固件库",-1)),s("div",F,[s("button",C,[d(g(b),{size:16}),e[0]||(e[0]=i(" 上传固件 ",-1))]),e[1]||(e[1]=s("button",{class:"px-4 py-2 rounded flex items-center gap-2",style:{border:"1px solid #D9D9D9",color:"rgba(0,0,0,0.85)"}}," 发布固件 ",-1))])])]),s("div",B,[e[10]||(e[10]=s("div",{class:"p-6 border-b",style:{"border-color":"#F0F0F0"}},[s("h3",{class:"text-base font-medium"},"固件版本库")],-1)),s("div",S,[(a(!0),l(r,null,c(p.value,t=>(a(),l("div",{key:t.version,class:"p-6"},[s("div",A,[s("span",z,"版本: "+o(t.version),1),s("span",M,"发布日期: "+o(t.releaseDate),1),s("span",N,o(t.status),1)]),s("div",T," 文件大小: "+o(t.fileSize)+" 下载次数: "+o(t.downloads.toLocaleString())+"次 ",1),t.expanded&&t.md5?(a(),l(r,{key:0},[s("div",V," MD5: "+o(t.md5)+" SHA256: "+o(t.sha256),1),s("div",L," 适用型号: "+o(t.model)+" 硬件版本范围: "+o(t.hardwareRange)+" 升级类型: "+o(t.upgradeType),1),t.signed?(a(),l("div",j,[...e[3]||(e[3]=[s("span",{class:"text-sm",style:{color:"#52C41A"}},"数字签名: 已签名",-1)])])):m("",!0),t.notes&&t.notes.length?(a(),l("div",R,[e[4]||(e[4]=s("div",{class:"text-sm font-medium mb-1",style:{color:"rgba(0,0,0,0.85)"}},"发布说明:",-1)),s("ul",U,[(a(!0),l(r,null,c(t.notes,(n,x)=>(a(),l("li",{key:x},o(n),1))),128))])])):m("",!0),s("div",E,[e[6]||(e[6]=s("button",{class:"text-sm",style:{color:"#4a7c59"}},"下载",-1)),e[7]||(e[7]=s("button",{class:"text-sm",style:{color:"#4a7c59"}},"编辑",-1)),e[8]||(e[8]=s("button",{class:"text-sm",style:{color:"#4a7c59"}},"撤回发布",-1)),d(u,{to:"/firmware-upgrade",class:"text-sm",style:{color:"#4a7c59"}},{default:v(()=>[...e[5]||(e[5]=[i("查看升级任务",-1)])]),_:1})])],64)):(a(),l("div",G,[e[9]||(e[9]=s("button",{class:"text-sm",style:{color:"#4a7c59"}},"下载",-1)),s("button",{class:"text-sm",style:{color:"#4a7c59"},onClick:n=>t.expanded=!0},"查看详情",8,H)]))]))),128))])])])}}});export{J as default};
