22 lines
5.0 KiB
Python
22 lines
5.0 KiB
Python
import{c as i,d as v,r as y,o as p,I as w,a as m,b as t,n as o,h as e,i as _,g as n,A as M,X as C,F as z,s as B,y as L,J as D,x as F,K as j,t as S,e as c}from"./index-B-Ka-o3f.js";import{B as V}from"./box-CCCmbUYf.js";/**
|
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const A=i("cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
|
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const E=i("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const I=i("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const N=i("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]]),R={class:"flex items-center"},Z={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},q={class:"flex-1 overflow-y-auto custom-scrollbar"},$={class:"p-4 space-y-2"},H=["onClick"],J={class:"flex-1 flex flex-col h-full"},K={class:"flex items-center justify-between h-16 px-4"},X=v({__name:"AdminLayout",setup(O){const l=M(),a=_("isDarkMode"),x=[{id:"Dashboard",name:"仪表盘",icon:I,redirect:"/admin/dashboard"},{id:"FileManage",name:"文件管理",icon:E,redirect:"/admin/files"},{id:"Settings",name:"系统设置",icon:A,redirect:"/admin/settings"}],r=y(!0),h=()=>{r.value=!r.value},d=()=>{window.innerWidth>=1024?r.value=!0:r.value=!1};p(()=>{d(),window.addEventListener("resize",d)}),w(()=>{window.removeEventListener("resize",d)});const b=y({page:1,size:10,total:0}),f=async()=>{try{b.value.total=85}catch(g){console.error("加载文件列表失败:",g)}};return p(()=>{f()}),(g,u)=>{const k=L("router-view");return c(),m("div",{class:o(["h-screen flex flex-col lg:flex-row transition-colors duration-300",[e(a)?"bg-gray-900":"bg-gray-50"]])},[t("aside",{class:o(["fixed inset-y-0 border-transparent left-0 z-50 w-64 transform transition-all duration-300 ease-in-out lg:relative lg:translate-x-0 border-r flex flex-col h-full lg:h-screen",[e(a)?"bg-gray-800 bg-opacity-90 backdrop-filter backdrop-blur-xl ":"bg-white ",{"-translate-x-full":!r.value}]])},[t("div",{class:o(["flex items-center justify-between h-16 px-4 border-b",[e(a)?"border-gray-700":"border-gray-200"]])},[t("div",R,[t("div",Z,[t("div",{class:o(["rounded-full p-1",[e(a)?"bg-gray-800":"bg-white"]])},[n(e(V),{class:o(["w-6 h-6",[e(a)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2)]),t("h1",{onClick:u[0]||(u[0]=s=>e(l).push("/")),class:o(["ml-2 text-xl font-semibold cursor-pointer",[e(a)?"text-white":"text-gray-800"]])}," FileCodeBox ",2)]),t("button",{onClick:h,class:"lg:hidden"},[n(e(C),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])],2),t("nav",q,[t("ul",$,[(c(),m(z,null,B(x,s=>t("li",{key:s.id},[t("a",{onClick:T=>e(l).push(s.redirect),class:o(["flex items-center p-2 rounded-lg transition-colors duration-200",[e(l).currentRoute.value.name===s.id?e(a)?"bg-indigo-900 text-indigo-400":"bg-indigo-100 text-indigo-600":e(a)?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-100"]])},[(c(),D(j(s.icon),{class:"w-5 h-5 mr-3"})),F(" "+S(s.name),1)],10,H)])),64))])])],2),t("div",J,[t("header",{class:o(["shadow-md border-b transition-colors duration-300 h-16",[e(a)?"bg-gray-800 border-gray-700":"bg-white border-gray-200"]])},[t("div",K,[t("button",{onClick:h,class:"lg:hidden"},[n(e(N),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])])],2),t("main",{class:o(["overflow-y-auto transition-colors duration-300 custom-scrollbar",[e(a)?"bg-gray-900":"bg-gray-50"]])},[n(k)],2)])],2)}}});export{X as default};
|