import{d as B,o as N,a as T,c as V,f as s,w as t,b as o,t as c,h as v,v as y,j as d,k as r,C as I,l as u,D as M,G as j,H as q,I as A,u as D,z as H}from"./index-C5b4pIQL.js";import{a as L,_ as R}from"./_plugin-vue_export-helper-CzL5NdOX.js";const z={class:"admin-layout"},E={class:"menu-header"},G={class:"version-footer"},W={class:"admin-content"},F={class:"content-header"},J={class:"content-body"},K=B({__name:"AdminLayout",setup(O){const l=D(),f=H(),m=v(""),_=v(""),b={dashboard:"仪表盘","cloud-configs-toggle":"网盘设置及授权","cloud-configs-cleanup":"存储清理","sys-site":"网站设置","sys-services":"外部服务 & 缓存","sys-strategy":"性能配置","sys-password":"修改管理员密码","save-records":"转存日志"},p=y(()=>{const n=f.name;return n==="admin-cloud-configs"?"cloud-configs-toggle":n==="admin-cleanup"?"cloud-configs-cleanup":n==="admin-system"?f.query.section||"sys-site":n==="admin-save-records"?"save-records":"dashboard"}),h=y(()=>b[p.value]||"仪表盘");function x(n){n==="dashboard"?l.push("/admin/dashboard"):n==="cloud-configs-toggle"?l.push("/admin/cloud-configs"):n==="cloud-configs-cleanup"?l.push("/admin/cleanup"):n.startsWith("sys-")?l.push({path:"/admin/system",query:{section:n}}):n==="save-records"?l.push("/admin/save-records"):n==="logout"&&(localStorage.removeItem("admin_token"),l.push("/admin/login"))}function w(){l.push("/")}return N(async()=>{try{const n=await L();m.value=n.site_name||""}catch{}try{const e=await(await fetch("/health")).json();_.value=e.version}catch{}}),(n,e)=>{const i=d("el-icon"),a=d("el-menu-item"),g=d("el-sub-menu"),C=d("el-menu"),k=d("el-button"),S=d("router-view");return T(),V("div",z,[s(C,{"default-active":p.value,class:"admin-menu",onSelect:x},{default:t(()=>[o("div",E,[o("h2",null,c(m.value||"CloudSearch"),1),e[0]||(e[0]=o("p",null,"管理后台",-1))]),s(a,{index:"dashboard"},{default:t(()=>[s(i,null,{default:t(()=>[s(r(I))]),_:1}),e[1]||(e[1]=o("span",null,"仪表盘",-1))]),_:1}),s(g,{index:"cloud-configs"},{title:t(()=>[s(i,null,{default:t(()=>[s(r(M))]),_:1}),e[2]||(e[2]=o("span",null,"网盘配置",-1))]),default:t(()=>[s(a,{index:"cloud-configs-toggle"},{default:t(()=>[...e[3]||(e[3]=[u("网盘设置及授权",-1)])]),_:1}),s(a,{index:"cloud-configs-cleanup"},{default:t(()=>[...e[4]||(e[4]=[u("存储清理",-1)])]),_:1})]),_:1}),s(g,{index:"system"},{title:t(()=>[s(i,null,{default:t(()=>[s(r(j))]),_:1}),e[5]||(e[5]=o("span",null,"系统配置",-1))]),default:t(()=>[s(a,{index:"sys-site"},{default:t(()=>[...e[6]||(e[6]=[u("网站设置",-1)])]),_:1}),s(a,{index:"sys-services"},{default:t(()=>[...e[7]||(e[7]=[u("外部服务和缓存",-1)])]),_:1}),s(a,{index:"sys-strategy"},{default:t(()=>[...e[8]||(e[8]=[u("性能配置",-1)])]),_:1}),s(a,{index:"sys-password"},{default:t(()=>[...e[9]||(e[9]=[u("修改管理员密码",-1)])]),_:1})]),_:1}),s(a,{index:"save-records"},{default:t(()=>[s(i,null,{default:t(()=>[s(r(q))]),_:1}),e[10]||(e[10]=o("span",null,"转存日志",-1))]),_:1}),o("div",G,"T "+c(_.value),1),s(a,{index:"logout"},{default:t(()=>[s(i,null,{default:t(()=>[s(r(A))]),_:1}),e[11]||(e[11]=o("span",null,"退出登录",-1))]),_:1})]),_:1},8,["default-active"]),o("div",W,[o("div",F,[o("h2",null,c(h.value),1),s(k,{text:"",onClick:w},{default:t(()=>[...e[12]||(e[12]=[u("返回前台",-1)])]),_:1})]),o("div",J,[s(S)])])])}}}),U=R(K,[["__scopeId","data-v-529b614b"]]);export{U as default};
