feat: page scroll

This commit is contained in:
Lan
2025-01-27 09:47:00 +08:00
parent 0c393a9890
commit 828368a9e2
27 changed files with 220 additions and 223 deletions
@@ -0,0 +1,21 @@
import{c as i,B as k,r as h,o as u,I as v,p as d,b as x,d as t,n as o,e,f as n,X as w,F as _,x as M,y as C,z,m as B,J as L,K as D,k as F,t as I}from"./index-BMgmatCO.js";import{B as j}from"./box-DezRNKnJ.js";/**
* @license lucide-vue-next v0.445.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const S=i("CogIcon",[["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.445.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V=i("FolderIcon",[["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.445.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("LayoutDashboardIcon",[["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.445.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("MenuIcon",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),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"},A={class:"p-4 space-y-2"},H=["onClick"],J={class:"flex-1 flex flex-col min-h-screen"},K={class:"flex items-center justify-between h-16 px-4"},$=k({__name:"AdminLayout",setup(O){const c=C(),a=z("isDarkMode"),p=[{id:"Dashboard",name:"仪表盘",icon:E,redirect:"/admin/dashboard"},{id:"FileManage",name:"文件管理",icon:V,redirect:"/admin/files"},{id:"Settings",name:"系统设置",icon:S,redirect:"/admin/settings"}],s=h(!0),y=()=>{s.value=!s.value},l=()=>{window.innerWidth>=1024?s.value=!0:s.value=!1};u(()=>{l(),window.addEventListener("resize",l)}),v(()=>{window.removeEventListener("resize",l)});const m=h({page:1,size:10,total:0}),b=async()=>{try{m.value.total=85}catch(g){console.error("加载文件列表失败:",g)}};return u(()=>{b()}),(g,T)=>{const f=B("router-view");return d(),x("div",{class:o(["min-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 left-0 z-50 w-64 transform transition-all duration-300 ease-in-out lg:relative lg:translate-x-0 border-r",[e(a)?"bg-gray-800 bg-opacity-90 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200",{"-translate-x-full":!s.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(j),{class:o(["w-6 h-6",[e(a)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2)]),t("h1",{class:o(["ml-2 text-xl font-semibold",[e(a)?"text-white":"text-gray-800"]])}," FileCodeBox ",2)]),t("button",{onClick:y,class:"lg:hidden"},[n(e(w),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])],2),t("nav",q,[t("ul",A,[(d(),x(_,null,M(p,r=>t("li",{key:r.id},[t("a",{onClick:U=>e(c).push(r.redirect),class:o(["flex items-center p-2 rounded-lg transition-colors duration-200",[e(c).currentRoute.value.name===r.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"]])},[(d(),L(D(r.icon),{class:"w-5 h-5 mr-3"})),F(" "+I(r.name),1)],10,H)])),64))])])],2),t("div",J,[t("header",{class:o(["shadow-md border-b transition-colors duration-300",[e(a)?"bg-gray-800 border-gray-700":"bg-white border-gray-200"]])},[t("div",K,[t("button",{onClick:y,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(["flex-1 p-6 overflow-y-auto transition-colors duration-300",[e(a)?"bg-gray-900":"bg-gray-50"]])},[n(f)],2)])],2)}}});export{$ as default};
@@ -1,21 +0,0 @@
import{c as i,B as M,r as h,o as u,I as C,p as d,b as x,d as t,n as o,e,f as n,j as z,t as m,X as I,F as L,x as B,y as D,z as F,m as p,J as S,K as j,k as N}from"./index-Du-dk8JL.js";import{B as V}from"./box-C2fXqZ8a.js";/**
* @license lucide-vue-next v0.445.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("CogIcon",[["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.445.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R=i("FolderIcon",[["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.445.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z=i("LayoutDashboardIcon",[["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.445.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q=i("MenuIcon",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),A={class:"flex items-center"},J={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},O={class:"flex-1 overflow-y-auto"},H={class:"p-4 space-y-2"},K=["onClick"],T={class:"flex-1 flex flex-col min-h-screen"},U={class:"flex items-center justify-between h-16 px-4"},Q=M({__name:"AdminLayout",setup(W){const b=JSON.parse(localStorage.getItem("config")||"{}"),c=D(),a=F("isDarkMode"),f=[{id:"Dashboard",name:"仪表盘",icon:Z,redirect:"/admin/dashboard"},{id:"FileManage",name:"文件管理",icon:R,redirect:"/admin/files"},{id:"Settings",name:"系统设置",icon:E,redirect:"/admin/settings"}],r=h(!0),g=()=>{r.value=!r.value},l=()=>{window.innerWidth>=1024?r.value=!0:r.value=!1};u(()=>{l(),window.addEventListener("resize",l)}),C(()=>{window.removeEventListener("resize",l)});const k=h({page:1,size:10,total:0}),v=async()=>{try{k.value.total=85}catch(y){console.error("加载文件列表失败:",y)}};return u(()=>{v()}),(y,X)=>{const w=p("router-link"),_=p("router-view");return d(),x("div",{class:o(["min-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 left-0 z-50 w-64 transform transition-all duration-300 ease-in-out lg:relative lg:translate-x-0 border-r",[e(a)?"bg-gray-800 bg-opacity-90 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200",{"-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",A,[t("div",J,[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)]),n(w,{to:"/"},{default:z(()=>[t("h1",{class:o(["ml-2 text-xl font-semibold",[e(a)?"text-white":"text-gray-800"]])},m(e(b).name),3)]),_:1})]),t("button",{onClick:g,class:"lg:hidden"},[n(e(I),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])],2),t("nav",O,[t("ul",H,[(d(),x(L,null,B(f,s=>t("li",{key:s.id},[t("a",{onClick:$=>e(c).push(s.redirect),class:o(["flex items-center p-2 rounded-lg transition-colors duration-200",[e(c).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"]])},[(d(),S(j(s.icon),{class:"w-5 h-5 mr-3"})),N(" "+m(s.name),1)],10,K)])),64))])])],2),t("div",T,[t("header",{class:o(["shadow-md border-b transition-colors duration-300",[e(a)?"bg-gray-800 border-gray-700":"bg-white border-gray-200"]])},[t("div",U,[t("button",{onClick:g,class:"lg:hidden"},[n(e(q),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])])],2),t("main",{class:o(["flex-1 p-6 overflow-y-auto transition-colors duration-300",[e(a)?"bg-gray-900":"bg-gray-50"]])},[n(_)],2)])],2)}}});export{Q as default};
@@ -1,6 +0,0 @@
import{c as b,B as f,H as v,o as _,p as g,b as x,d as t,n as a,e,t as i,f as p,F as w,x as C,i as F,z,A as k,J as D,K as S}from"./index-Du-dk8JL.js";import{F as B}from"./file-ivaREKmJ.js";import{H as U}from"./hard-drive-BBm9eeol.js";/**
* @license lucide-vue-next v0.445.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M=b("ActivityIcon",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),$={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},A={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8"},j={class:"flex items-center justify-between"},H={class:"flex items-center justify-between"},L={class:"flex items-center justify-between"},V={class:"p-6"},I={class:"space-y-4"},N={class:"flex-shrink-0"},K={class:"flex-1"},T={key:0},O=f({__name:"DashboardView",setup(E){const s=z("isDarkMode"),o=v({totalFiles:0,storageUsed:0,yesterdayCount:0,todayCount:0,yesterdaySize:0,todaySize:0,sysUptime:0}),u=[],m=r=>{const l=new Date().getTime()-r,n=Math.floor(l/(24*60*60*1e3)),c=Math.floor(l%(24*60*60*1e3)/(60*60*1e3));return`${n}${c}小时`},y=r=>{const d=parseInt(r)/1024,l=d/1024,n=l/1024,c=n/1024;return c>1?`${c.toFixed(2)}TB`:n>1?`${n.toFixed(2)}GB`:l>1?`${l.toFixed(2)}MB`:d>1?`${d.toFixed(2)}KB`:`${r}B`},h=async()=>{const r=await k.get("/admin/dashboard");o.totalFiles=r.detail.totalFiles,o.storageUsed=y(r.detail.storageUsed),o.yesterdaySize=y(r.detail.yesterdaySize),o.todaySize=y(r.detail.todaySize),o.yesterdayCount=r.detail.yesterdayCount,o.todayCount=r.detail.todayCount,o.sysUptime=m(r.detail.sysUptime)};return _(()=>{h()}),(r,d)=>(g(),x("div",$,[t("h2",{class:a(["text-2xl font-bold mb-6",[e(s)?"text-white":"text-gray-800"]])}," 仪表盘 ",2),t("div",A,[t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",j,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 总文件数 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])},i(o.totalFiles),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-indigo-900":"bg-indigo-100"]])},[p(e(B),{class:a(["w-6 h-6",[e(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-green-400":"text-green-600"]])},[t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"昨天:",2),t("span",null,i(o.yesterdayCount),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,i(o.todayCount),1)],2)],2),t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",H,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 存储空间 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])},i(o.storageUsed),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-purple-900":"bg-purple-100"]])},[p(e(U),{class:a(["w-6 h-6",[e(s)?"text-purple-400":"text-purple-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-green-400":"text-green-600"]])},[t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"昨天:",2),t("span",null,i(o.yesterdaySize),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,i(o.todaySize),1)],2)],2),t("div",{class:a(["p-6 rounded-lg shadow-md transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",L,[t("div",null,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 系统状态 ",2),t("h3",{class:a(["text-2xl font-bold mt-1",[e(s)?"text-white":"text-gray-800"]])}," 正常 ",2)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-blue-900":"bg-blue-100"]])},[p(e(M),{class:a(["w-6 h-6",[e(s)?"text-blue-400":"text-blue-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-gray-400":"text-gray-600"]])}," 服务器运行时间: "+i(o.sysUptime),3)],2)]),t("div",{class:a(["rounded-lg shadow-md overflow-hidden transition-colors duration-300",[e(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",{class:a(["px-6 py-4 border-b",[e(s)?"border-gray-700":"border-gray-200"]])},[t("h3",{class:a(["text-lg font-medium",[e(s)?"text-white":"text-gray-800"]])}," 最近活动 ",2)],2),t("div",V,[t("div",I,[(g(),x(w,null,C(u,(l,n)=>t("div",{key:n,class:"flex items-center space-x-4"},[t("div",N,[(g(),D(S(l.icon),{class:a(["w-5 h-5",[e(s)?"text-gray-400":"text-gray-600"]])},null,8,["class"]))]),t("div",K,[t("p",{class:a([e(s)?"text-gray-300":"text-gray-700"])},i(l.description),3),t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-500"]])},i(l.time),3)])])),64)),u.length===0?(g(),x("div",T,[t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-600"]])}," 暂无活动 ",2)])):F("",!0)])])],2)]))}});export{O as default};
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
import{c as j,B as T,u as A,r as _,a as k,p as c,b as g,d as t,n as o,e as a,h as P,v as q,f as m,k as H,F as v,x as w,t as d,z as I,A as S}from"./index-Du-dk8JL.js";import{F as L}from"./file-ivaREKmJ.js";/**
import{c as j,B as T,u as A,r as _,a as k,p as c,b as g,d as t,n as o,e as a,h as P,v as q,f as m,k as H,F as v,x as w,t as d,z as I,A as S}from"./index-BMgmatCO.js";import{F as L}from"./file-C8d0agNl.js";/**
* @license lucide-vue-next v0.445.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1 +1 @@
import{G as y,r as u,B as b,u as v,p as w,b as x,d as e,n as l,e as o,f as h,g as k,h as S,v as A,k as V,t as B,z as D,y as P,A as _,_ as j}from"./index-Du-dk8JL.js";import{B as z}from"./box-C2fXqZ8a.js";const M=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(t){d.value=t,localStorage.setItem("token",t)}return{adminPassword:d,updateAdminPwd:n}}),I={class:"mx-auto h-16 w-16 relative"},L={class:"rounded-md shadow-sm -space-y-px"},N=["disabled"],T=b({__name:"LoginView",setup(d){const n=v(),t=u(""),i=u(!1),s=D("isDarkMode"),c=M(),p=()=>{let a=!0;return t.value?t.value.length<6&&(n.showAlert("密码长度至少为6位","error"),a=!1):(n.showAlert("无效的密码","error"),a=!1),a},m=P(),f=async()=>{if(p()){c.updateAdminPwd(t.value),_.post("/admin/login",{password:t.value}).then(()=>{m.push("/admin")}).catch(a=>{n.showAlert(a.response.data.detail,"error")}),i.value=!0;try{await new Promise(a=>setTimeout(a,2e3))}catch{}finally{i.value=!1}}};return(a,r)=>(w(),x("div",{class:l(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",o(s)?"bg-gray-900":"bg-gray-50"])},[r[6]||(r[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:l(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[o(s)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",I,[r[1]||(r[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),r[2]||(r[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:l(["absolute inset-1 rounded-full flex items-center justify-center",o(s)?"bg-gray-800":"bg-white"])},[h(o(z),{class:l(["h-8 w-8",o(s)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:l(["mt-6 text-center text-3xl font-extrabold",o(s)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:k(f,["prevent"])},[r[5]||(r[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[r[3]||(r[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":r[0]||(r[0]=g=>t.value=g),class:l(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",o(s)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[A,t.value]])])]),e("div",null,[e("button",{type:"submit",class:l(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",o(s)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",i.value?"opacity-75 cursor-not-allowed":""]),disabled:i.value},[r[4]||(r[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+B(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=j(T,[["__scopeId","data-v-2e50c3fa"]]);export{E as default};
import{G as y,r as u,B as b,u as v,p as w,b as x,d as e,n as l,e as o,f as h,g as k,h as S,v as A,k as V,t as B,z as D,y as P,A as _,_ as j}from"./index-BMgmatCO.js";import{B as z}from"./box-DezRNKnJ.js";const M=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(t){d.value=t,localStorage.setItem("token",t)}return{adminPassword:d,updateAdminPwd:n}}),I={class:"mx-auto h-16 w-16 relative"},L={class:"rounded-md shadow-sm -space-y-px"},N=["disabled"],T=b({__name:"LoginView",setup(d){const n=v(),t=u(""),i=u(!1),s=D("isDarkMode"),c=M(),p=()=>{let a=!0;return t.value?t.value.length<6&&(n.showAlert("密码长度至少为6位","error"),a=!1):(n.showAlert("无效的密码","error"),a=!1),a},m=P(),f=async()=>{if(p()){c.updateAdminPwd(t.value),_.post("/admin/login",{password:t.value}).then(()=>{m.push("/admin")}).catch(a=>{n.showAlert(a.response.data.detail,"error")}),i.value=!0;try{await new Promise(a=>setTimeout(a,2e3))}catch{}finally{i.value=!1}}};return(a,r)=>(w(),x("div",{class:l(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",o(s)?"bg-gray-900":"bg-gray-50"])},[r[6]||(r[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:l(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[o(s)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",I,[r[1]||(r[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),r[2]||(r[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:l(["absolute inset-1 rounded-full flex items-center justify-center",o(s)?"bg-gray-800":"bg-white"])},[h(o(z),{class:l(["h-8 w-8",o(s)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:l(["mt-6 text-center text-3xl font-extrabold",o(s)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:k(f,["prevent"])},[r[5]||(r[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[r[3]||(r[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":r[0]||(r[0]=g=>t.value=g),class:l(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",o(s)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[A,t.value]])])]),e("div",null,[e("button",{type:"submit",class:l(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",o(s)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",i.value?"opacity-75 cursor-not-allowed":""]),disabled:i.value},[r[4]||(r[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+B(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=j(T,[["__scopeId","data-v-2e50c3fa"]]);export{E as default};
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
@keyframes blob-dda23bee{0%,to{transform:translate(0) scale(1)}25%{transform:translate(20px,-50px) scale(1.1)}50%{transform:translate(-20px,20px) scale(.9)}75%{transform:translate(50px,50px) scale(1.05)}}.animate-blob-1[data-v-dda23bee]{animation:blob-dda23bee 25s infinite}.animate-blob-2[data-v-dda23bee]{animation:blob-dda23bee 30s infinite}.animate-blob-3[data-v-dda23bee]{animation:blob-dda23bee 35s infinite}.animate-blob-4[data-v-dda23bee]{animation:blob-dda23bee 40s infinite}.animate-spin-slow[data-v-dda23bee]{animation:spin-dda23bee 8s linear infinite}@keyframes spin-dda23bee{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-enter-active[data-v-dda23bee],.fade-leave-active[data-v-dda23bee]{transition:opacity .3s ease}.fade-enter-from[data-v-dda23bee],.fade-leave-to[data-v-dda23bee]{opacity:0}.list-enter-active[data-v-dda23bee],.list-leave-active[data-v-dda23bee]{transition:all .5s ease}.list-enter-from[data-v-dda23bee],.list-leave-to[data-v-dda23bee]{opacity:0;transform:translate(30px)}.drawer-enter-active[data-v-dda23bee],.drawer-leave-active[data-v-dda23bee]{transition:transform .3s ease}.drawer-enter-from[data-v-dda23bee],.drawer-leave-to[data-v-dda23bee]{transform:translate(100%)}.w-97-100[data-v-dda23bee]{width:97%}[data-v-dda23bee] .prose{text-align:left}[data-v-dda23bee] .prose h1,[data-v-dda23bee] .prose h2,[data-v-dda23bee] .prose h3,[data-v-dda23bee] .prose h4,[data-v-dda23bee] .prose h5,[data-v-dda23bee] .prose h6{color:#4f46e5}@media (prefers-color-scheme: dark){[data-v-dda23bee] .prose h1,[data-v-dda23bee] .prose h2,[data-v-dda23bee] .prose h3,[data-v-dda23bee] .prose h4,[data-v-dda23bee] .prose h5,[data-v-dda23bee] .prose h6{color:#818cf8}}@media (min-width: 640px){.sm\:w-120[data-v-dda23bee]{width:30rem}}
@@ -1 +0,0 @@
@keyframes blob-39d0237a{0%,to{transform:translate(0) scale(1)}25%{transform:translate(20px,-50px) scale(1.1)}50%{transform:translate(-20px,20px) scale(.9)}75%{transform:translate(50px,50px) scale(1.05)}}.animate-blob-1[data-v-39d0237a]{animation:blob-39d0237a 25s infinite}.animate-blob-2[data-v-39d0237a]{animation:blob-39d0237a 30s infinite}.animate-blob-3[data-v-39d0237a]{animation:blob-39d0237a 35s infinite}.animate-blob-4[data-v-39d0237a]{animation:blob-39d0237a 40s infinite}.animate-spin-slow[data-v-39d0237a]{animation:spin-39d0237a 8s linear infinite}@keyframes spin-39d0237a{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-enter-active[data-v-39d0237a],.fade-leave-active[data-v-39d0237a]{transition:opacity .3s ease}.fade-enter-from[data-v-39d0237a],.fade-leave-to[data-v-39d0237a]{opacity:0}.list-enter-active[data-v-39d0237a],.list-leave-active[data-v-39d0237a]{transition:all .5s ease}.list-enter-from[data-v-39d0237a],.list-leave-to[data-v-39d0237a]{opacity:0;transform:translate(30px)}.drawer-enter-active[data-v-39d0237a],.drawer-leave-active[data-v-39d0237a]{transition:transform .3s ease}.drawer-enter-from[data-v-39d0237a],.drawer-leave-to[data-v-39d0237a]{transform:translate(100%)}.w-97-100[data-v-39d0237a]{width:97%}[data-v-39d0237a] .prose{text-align:left}[data-v-39d0237a] .prose h1,[data-v-39d0237a] .prose h2,[data-v-39d0237a] .prose h3,[data-v-39d0237a] .prose h4,[data-v-39d0237a] .prose h5,[data-v-39d0237a] .prose h6{color:#4f46e5}@media (prefers-color-scheme: dark){[data-v-39d0237a] .prose h1,[data-v-39d0237a] .prose h2,[data-v-39d0237a] .prose h3,[data-v-39d0237a] .prose h4,[data-v-39d0237a] .prose h5,[data-v-39d0237a] .prose h6{color:#818cf8}}@media (min-width: 640px){.sm\:w-120[data-v-39d0237a]{width:30rem}}
@@ -1 +0,0 @@
.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.fade-enter-active[data-v-dec78af8],.fade-leave-active[data-v-dec78af8]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-dec78af8],.fade-leave-to[data-v-dec78af8]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-dec78af8]{width:30rem}}.fade-enter-to[data-v-dec78af8],.fade-leave-from[data-v-dec78af8]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-dec78af8],.drawer-leave-active[data-v-dec78af8]{transition:transform .3s ease}.drawer-enter-from[data-v-dec78af8],.drawer-leave-to[data-v-dec78af8]{transform:translate(100%)}.list-enter-active[data-v-dec78af8],.list-leave-active[data-v-dec78af8]{transition:all .5s ease}.list-enter-from[data-v-dec78af8],.list-leave-to[data-v-dec78af8]{opacity:0;transform:translate(30px)}
@@ -0,0 +1 @@
.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.fade-enter-active[data-v-f88861ef],.fade-leave-active[data-v-f88861ef]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-f88861ef],.fade-leave-to[data-v-f88861ef]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-f88861ef]{width:30rem}}.fade-enter-to[data-v-f88861ef],.fade-leave-from[data-v-f88861ef]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-f88861ef],.drawer-leave-active[data-v-f88861ef]{transition:transform .3s ease}.drawer-enter-from[data-v-f88861ef],.drawer-leave-to[data-v-f88861ef]{transform:translate(100%)}.list-enter-active[data-v-f88861ef],.list-leave-active[data-v-f88861ef]{transition:all .5s ease}.list-enter-from[data-v-f88861ef],.list-leave-to[data-v-f88861ef]{opacity:0;transform:translate(30px)}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
import{c as a}from"./index-Du-dk8JL.js";/**
import{c as a}from"./index-BMgmatCO.js";/**
* @license lucide-vue-next v0.445.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as a}from"./index-Du-dk8JL.js";/**
import{c as a}from"./index-BMgmatCO.js";/**
* @license lucide-vue-next v0.445.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,6 +0,0 @@
import{c as e}from"./index-Du-dk8JL.js";/**
* @license lucide-vue-next v0.445.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=e("HardDriveIcon",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);export{a as H};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

+11
View File
@@ -0,0 +1,11 @@
import{c as a}from"./index-BMgmatCO.js";/**
* @license lucide-vue-next v0.445.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const y=a("HardDriveIcon",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
* @license lucide-vue-next v0.445.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const c=a("TrashIcon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);export{y as H,c as T};