This commit is contained in:
Lan
2025-03-15 23:42:33 +08:00
parent ebf8669e3d
commit 9fb452ae14
28 changed files with 168 additions and 195 deletions
@@ -1,4 +1,4 @@
import{c as i,d as k,r as h,o as u,I as v,a as d,b as x,e as t,n as o,g as e,i as n,X as w,F as _,p as M,A as C,x as z,z as L,J as B,K as D,q as F,t as I}from"./index-BJNmHON7.js";import{B as j}from"./box-B-xD0Z_p.js";/** import{c as i,d as k,r as h,o as u,I as v,a as x,b as t,n as o,h as e,i as w,g as n,X as _,F as M,q as C,x as z,z as L,J as B,s as D,K as F,t as I,e as d}from"./index-DVYjJiZ2.js";import{B as j}from"./box-B35FMQ2u.js";/**
* @license lucide-vue-next v0.445.0 - ISC * @license lucide-vue-next v0.445.0 - ISC
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
@@ -18,4 +18,4 @@ import{c as i,d as k,r as h,o as u,I as v,a as d,b as x,e as t,n as o,g as e,i a
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree. * See the LICENSE file in the root directory of this source tree.
*/const A=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"}]]),E={class:"flex items-center"},N={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},R={class:"flex-1 overflow-y-auto"},Z={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:q,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=L("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",E,[t("div",N,[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",R,[t("ul",Z,[(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(),B(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(A),{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}; */const E=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"}]]),N={class:"flex items-center"},R={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},Z={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=L(),a=w("isDarkMode"),p=[{id:"Dashboard",name:"仪表盘",icon:q,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=z("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",N,[t("div",R,[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(_),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])],2),t("nav",Z,[t("ul",A,[(d(),x(M,null,C(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(),B(F(r.icon),{class:"w-5 h-5 mr-3"})),D(" "+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(E),{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,4 +1,4 @@
import{c as x,d as m,H as b,o as h,a as f,b as v,e as t,n as a,g as e,t as n,i as g,q as w,x as _,y as F}from"./index-BJNmHON7.js";import{F as k}from"./file-Dql1Jg4w.js";import{H as C}from"./hard-drive-DlH58Gv1.js";/** import{c as x,d as m,H as b,o as h,a as f,b as t,n as a,h as e,i as v,t as n,g,s as w,A as _,e as F}from"./index-DVYjJiZ2.js";import{F as k}from"./file-D9qp8qCA.js";import{H as C}from"./hard-drive-DBKSg-ZG.js";/**
* @license lucide-vue-next v0.445.0 - ISC * @license lucide-vue-next v0.445.0 - ISC
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
@@ -8,4 +8,4 @@ import{c as x,d as m,H as b,o as h,a as f,b as v,e as t,n as a,g as e,t as n,i a
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree. * See the LICENSE file in the root directory of this source tree.
*/const z=x("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),D={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},M={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"},S={class:"flex items-center justify-between"},B={class:"flex items-center justify-between"},$={class:"flex items-center justify-between"},j={class:"flex items-center justify-between"},H={class:"text-sm mt-1"},N=m({__name:"DashboardView",setup(I){const s=_("isDarkMode"),o=b({totalFiles:0,storageUsed:0,yesterdayCount:0,todayCount:0,yesterdaySize:0,todaySize:0,sysUptime:0}),u=l=>{const i=new Date().getTime()-l,d=Math.floor(i/(24*60*60*1e3)),c=Math.floor(i%(24*60*60*1e3)/(60*60*1e3));return`${d}${c}小时`},y=l=>{const r=parseInt(l)/1024,i=r/1024,d=i/1024,c=d/1024;return c>1?`${c.toFixed(2)}TB`:d>1?`${d.toFixed(2)}GB`:i>1?`${i.toFixed(2)}MB`:r>1?`${r.toFixed(2)}KB`:`${l}B`},p=async()=>{const l=await F.get("admin/dashboard");o.totalFiles=l.detail.totalFiles,o.storageUsed=y(l.detail.storageUsed),o.yesterdaySize=y(l.detail.yesterdaySize),o.todaySize=y(l.detail.todaySize),o.yesterdayCount=l.detail.yesterdayCount,o.todayCount=l.detail.todayCount,o.sysUptime=u(l.detail.sysUptime)};return h(()=>{p()}),(l,r)=>(f(),v("div",D,[t("h2",{class:a(["text-2xl font-bold mb-6",[e(s)?"text-white":"text-gray-800"]])}," 仪表盘 ",2),t("div",M,[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",S,[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"]])},n(o.totalFiles),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-indigo-900":"bg-indigo-100"]])},[g(e(k),{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,n(o.yesterdayCount),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,n(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",B,[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"]])},n(o.storageUsed),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-purple-900":"bg-purple-100"]])},[g(e(C),{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,n(o.yesterdaySize),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,n(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",$,[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"]])}," 25 ",2)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-green-900":"bg-green-100"]])},[g(e(z),{class:a(["w-6 h-6",[e(s)?"text-green-400":"text-green-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-red-400":"text-red-600"]])},[r[0]||(r[0]=t("span",null,"↓ 5% ",-1)),t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"较上周",2)],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",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"]])}," 正常 ",2)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-blue-900":"bg-blue-100"]])},[g(e(U),{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"]])}," 服务器运行时间: "+n(o.sysUptime),3)],2)]),t("div",{class:a(["mt-auto text-center py-4",[e(s)?"text-gray-400":"text-gray-600"]])},[r[2]||(r[2]=t("p",{class:"text-sm"}," 版本 v2.0.3 更新时间:2025-03-03 ",-1)),t("p",H,[w(" © "+n(new Date().getFullYear())+" ",1),r[1]||(r[1]=t("a",{href:"https://github.com/vastsa/FileCodeBox"},"FileCodeBox",-1))])],2)]))}});export{N as default}; */const z=x("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),D={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},M={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"},S={class:"flex items-center justify-between"},B={class:"flex items-center justify-between"},$={class:"flex items-center justify-between"},j={class:"flex items-center justify-between"},H={class:"text-sm mt-1"},N=m({__name:"DashboardView",setup(A){const s=v("isDarkMode"),o=b({totalFiles:0,storageUsed:0,yesterdayCount:0,todayCount:0,yesterdaySize:0,todaySize:0,sysUptime:0}),u=l=>{const i=new Date().getTime()-l,d=Math.floor(i/(24*60*60*1e3)),c=Math.floor(i%(24*60*60*1e3)/(60*60*1e3));return`${d}${c}小时`},y=l=>{const r=parseInt(l)/1024,i=r/1024,d=i/1024,c=d/1024;return c>1?`${c.toFixed(2)}TB`:d>1?`${d.toFixed(2)}GB`:i>1?`${i.toFixed(2)}MB`:r>1?`${r.toFixed(2)}KB`:`${l}B`},p=async()=>{const l=await _.get("admin/dashboard");o.totalFiles=l.detail.totalFiles,o.storageUsed=y(l.detail.storageUsed),o.yesterdaySize=y(l.detail.yesterdaySize),o.todaySize=y(l.detail.todaySize),o.yesterdayCount=l.detail.yesterdayCount,o.todayCount=l.detail.todayCount,o.sysUptime=u(l.detail.sysUptime)};return h(()=>{p()}),(l,r)=>(F(),f("div",D,[t("h2",{class:a(["text-2xl font-bold mb-6",[e(s)?"text-white":"text-gray-800"]])}," 仪表盘 ",2),t("div",M,[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",S,[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"]])},n(o.totalFiles),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-indigo-900":"bg-indigo-100"]])},[g(e(k),{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,n(o.yesterdayCount),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,n(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",B,[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"]])},n(o.storageUsed),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-purple-900":"bg-purple-100"]])},[g(e(C),{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,n(o.yesterdaySize),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,n(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",$,[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"]])}," 25 ",2)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-green-900":"bg-green-100"]])},[g(e(z),{class:a(["w-6 h-6",[e(s)?"text-green-400":"text-green-600"]])},null,8,["class"])],2)]),t("p",{class:a(["text-sm mt-2",[e(s)?"text-red-400":"text-red-600"]])},[r[0]||(r[0]=t("span",null,"↓ 5% ",-1)),t("span",{class:a([e(s)?"text-gray-400":"text-gray-600"])},"较上周",2)],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",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"]])}," 正常 ",2)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-blue-900":"bg-blue-100"]])},[g(e(U),{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"]])}," 服务器运行时间: "+n(o.sysUptime),3)],2)]),t("div",{class:a(["mt-auto text-center py-4",[e(s)?"text-gray-400":"text-gray-600"]])},[r[2]||(r[2]=t("p",{class:"text-sm"}," 版本 v2.0.3 更新时间:2025-03-03 ",-1)),t("p",H,[w(" © "+n(new Date().getFullYear())+" ",1),r[1]||(r[1]=t("a",{href:"https://github.com/vastsa/FileCodeBox"},"FileCodeBox",-1))])],2)]))}});export{N as default};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{G as y,r as u,d as b,u as v,a as w,b as x,e,n as l,g as o,i as h,h as k,l as S,v as A,q as V,t as D,x as B,A as P,y as _,_ as j}from"./index-BJNmHON7.js";import{B as M}from"./box-B-xD0Z_p.js";const z=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(a){d.value=a,localStorage.setItem("token",a)}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(),a=u(""),i=u(!1),s=B("isDarkMode"),c=z(),p=()=>{let r=!0;return a.value?a.value.length<6&&(n.showAlert("密码长度至少为6位","error"),r=!1):(n.showAlert("无效的密码","error"),r=!1),r},m=P(),f=async()=>{if(p()){_.post("/admin/login",{password:a.value}).then(r=>{c.updateAdminPwd(r.detail.token),m.push("/admin")}).catch(r=>{n.showAlert(r.response.data.detail,"error")}),i.value=!0;try{await new Promise(r=>setTimeout(r,2e3))}catch{}finally{i.value=!1}}};return(r,t)=>(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"])},[t[6]||(t[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,[t[1]||(t[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)),t[2]||(t[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(M),{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"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=g=>a.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,a.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},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+D(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=j(T,[["__scopeId","data-v-66eb7914"]]);export{E as default}; import{G as y,r as u,d as b,u as v,a as w,b as e,n as l,h as o,i as x,g as h,j as k,m as S,v as A,s as V,t as D,z as j,e as B,A as P,_}from"./index-DVYjJiZ2.js";import{B as z}from"./box-B35FMQ2u.js";const M=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(a){d.value=a,localStorage.setItem("token",a)}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(),a=u(""),i=u(!1),s=x("isDarkMode"),c=M(),p=()=>{let r=!0;return a.value?a.value.length<6&&(n.showAlert("密码长度至少为6位","error"),r=!1):(n.showAlert("无效的密码","error"),r=!1),r},m=j(),f=async()=>{if(p()){P.post("/admin/login",{password:a.value}).then(r=>{c.updateAdminPwd(r.detail.token),m.push("/admin")}).catch(r=>{n.showAlert(r.response.data.detail,"error")}),i.value=!0;try{await new Promise(r=>setTimeout(r,2e3))}catch{}finally{i.value=!1}}};return(r,t)=>(B(),w("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"])},[t[6]||(t[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,[t[1]||(t[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)),t[2]||(t[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"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=g=>a.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,a.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},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+D(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=_(T,[["__scopeId","data-v-66eb7914"]]);export{E as default};
@@ -1 +0,0 @@
@keyframes blob-37e5a64d{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-37e5a64d]{animation:blob-37e5a64d 25s infinite}.animate-blob-2[data-v-37e5a64d]{animation:blob-37e5a64d 30s infinite}.animate-blob-3[data-v-37e5a64d]{animation:blob-37e5a64d 35s infinite}.animate-blob-4[data-v-37e5a64d]{animation:blob-37e5a64d 40s infinite}.animate-spin-slow[data-v-37e5a64d]{animation:spin-37e5a64d 8s linear infinite}@keyframes spin-37e5a64d{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-enter-active[data-v-37e5a64d],.fade-leave-active[data-v-37e5a64d]{transition:opacity .3s ease}.fade-enter-from[data-v-37e5a64d],.fade-leave-to[data-v-37e5a64d]{opacity:0}.list-enter-active[data-v-37e5a64d],.list-leave-active[data-v-37e5a64d]{transition:all .5s ease}.list-enter-from[data-v-37e5a64d],.list-leave-to[data-v-37e5a64d]{opacity:0;transform:translate(30px)}.drawer-enter-active[data-v-37e5a64d],.drawer-leave-active[data-v-37e5a64d]{transition:transform .3s ease}.drawer-enter-from[data-v-37e5a64d],.drawer-leave-to[data-v-37e5a64d]{transform:translate(100%)}.w-97-100[data-v-37e5a64d]{width:97%}[data-v-37e5a64d] .prose{text-align:left}[data-v-37e5a64d] .prose h1,[data-v-37e5a64d] .prose h2,[data-v-37e5a64d] .prose h3,[data-v-37e5a64d] .prose h4,[data-v-37e5a64d] .prose h5,[data-v-37e5a64d] .prose h6{color:#4f46e5}@media (prefers-color-scheme: dark){[data-v-37e5a64d] .prose h1,[data-v-37e5a64d] .prose h2,[data-v-37e5a64d] .prose h3,[data-v-37e5a64d] .prose h4,[data-v-37e5a64d] .prose h5,[data-v-37e5a64d] .prose h6{color:#818cf8}}@media (min-width: 640px){.sm\:w-120[data-v-37e5a64d]{width:30rem}}
@@ -0,0 +1 @@
@keyframes blob-ba6ed153{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-ba6ed153]{animation:blob-ba6ed153 25s infinite}.animate-blob-2[data-v-ba6ed153]{animation:blob-ba6ed153 30s infinite}.animate-blob-3[data-v-ba6ed153]{animation:blob-ba6ed153 35s infinite}.animate-blob-4[data-v-ba6ed153]{animation:blob-ba6ed153 40s infinite}.animate-spin-slow[data-v-ba6ed153]{animation:spin-ba6ed153 8s linear infinite}@keyframes spin-ba6ed153{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-enter-active[data-v-ba6ed153],.fade-leave-active[data-v-ba6ed153]{transition:opacity .3s ease}.fade-enter-from[data-v-ba6ed153],.fade-leave-to[data-v-ba6ed153]{opacity:0}.list-enter-active[data-v-ba6ed153],.list-leave-active[data-v-ba6ed153]{transition:all .5s ease}.list-enter-from[data-v-ba6ed153],.list-leave-to[data-v-ba6ed153]{opacity:0;transform:translate(30px)}.drawer-enter-active[data-v-ba6ed153],.drawer-leave-active[data-v-ba6ed153]{transition:transform .3s ease}.drawer-enter-from[data-v-ba6ed153],.drawer-leave-to[data-v-ba6ed153]{transform:translate(100%)}.w-97-100[data-v-ba6ed153]{width:97%}[data-v-ba6ed153] .prose{text-align:left}[data-v-ba6ed153] .prose h1,[data-v-ba6ed153] .prose h2,[data-v-ba6ed153] .prose h3,[data-v-ba6ed153] .prose h4,[data-v-ba6ed153] .prose h5,[data-v-ba6ed153] .prose h6{color:#4f46e5}@media (prefers-color-scheme: dark){[data-v-ba6ed153] .prose h1,[data-v-ba6ed153] .prose h2,[data-v-ba6ed153] .prose h3,[data-v-ba6ed153] .prose h4,[data-v-ba6ed153] .prose h5,[data-v-ba6ed153] .prose h6{color:#818cf8}}@media (min-width: 640px){.sm\:w-120[data-v-ba6ed153]{width:30rem}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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-0b7e24c7],.fade-leave-active[data-v-0b7e24c7]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-0b7e24c7],.fade-leave-to[data-v-0b7e24c7]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-0b7e24c7]{width:30rem}}.fade-enter-to[data-v-0b7e24c7],.fade-leave-from[data-v-0b7e24c7]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-0b7e24c7],.drawer-leave-active[data-v-0b7e24c7]{transition:transform .3s ease}.drawer-enter-from[data-v-0b7e24c7],.drawer-leave-to[data-v-0b7e24c7]{transform:translate(100%)}.list-enter-active[data-v-0b7e24c7],.list-leave-active[data-v-0b7e24c7]{transition:all .5s ease}.list-enter-from[data-v-0b7e24c7],.list-leave-to[data-v-0b7e24c7]{opacity:0;transform:translate(30px)}
File diff suppressed because one or more lines are too long
@@ -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-95c00de3],.fade-leave-active[data-v-95c00de3]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-95c00de3],.fade-leave-to[data-v-95c00de3]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-95c00de3]{width:30rem}}.fade-enter-to[data-v-95c00de3],.fade-leave-from[data-v-95c00de3]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-95c00de3],.drawer-leave-active[data-v-95c00de3]{transition:transform .3s ease}.drawer-enter-from[data-v-95c00de3],.drawer-leave-to[data-v-95c00de3]{transform:translate(100%)}.list-enter-active[data-v-95c00de3],.list-leave-active[data-v-95c00de3]{transition:all .5s ease}.list-enter-from[data-v-95c00de3],.list-leave-to[data-v-95c00de3]{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
@@ -1,4 +1,4 @@
import{c as a}from"./index-BJNmHON7.js";/** import{c as a}from"./index-DVYjJiZ2.js";/**
* @license lucide-vue-next v0.445.0 - ISC * @license lucide-vue-next v0.445.0 - ISC
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
import{c as a}from"./index-BJNmHON7.js";/** import{c as a}from"./index-DVYjJiZ2.js";/**
* @license lucide-vue-next v0.445.0 - ISC * @license lucide-vue-next v0.445.0 - ISC
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
import{c as e}from"./index-BJNmHON7.js";/** import{c as e}from"./index-DVYjJiZ2.js";/**
* @license lucide-vue-next v0.445.0 - ISC * @license lucide-vue-next v0.445.0 - ISC
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
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
-26
View File
@@ -1,26 +0,0 @@
{
"name": "FileCodeBox",
"short_name": "FileCodeBox",
"start_url": "/",
"scope": "/",
"display": "standalone",
"description": "匿名口令分享文本,文件,像拿快递一样取文件",
"icons": [
{
"src": "/assets/logo_small.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/assets/logo_small.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "/assets/logo_small.png",
"sizes": "180x180",
"type": "image/png",
"purpose": "maskable any"
}
]
}
@@ -1,4 +1,4 @@
import{c}from"./index-BJNmHON7.js";/** import{c}from"./index-DVYjJiZ2.js";/**
* @license lucide-vue-next v0.445.0 - ISC * @license lucide-vue-next v0.445.0 - ISC
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
+2 -3
View File
@@ -10,11 +10,10 @@
<meta name="description" content="{{description}}" /> <meta name="description" content="{{description}}" />
<meta name="keywords" content="{{keywords}}" /> <meta name="keywords" content="{{keywords}}" />
<meta name="generator" content="FileCodeBox2.2" /> <meta name="generator" content="FileCodeBox2.2" />
<link rel="manifest" href="/assets/manifest.json" />
<meta name="github" content="https://github.com/vastsa/FileCodeBox" /> <meta name="github" content="https://github.com/vastsa/FileCodeBox" />
<title>{{title}}</title> <title>{{title}}</title>
<script type="module" crossorigin src="/assets/index-BJNmHON7.js"></script> <script type="module" crossorigin src="/assets/index-DVYjJiZ2.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BKSkS4Sc.css"> <link rel="stylesheet" crossorigin href="/assets/index-C4SP0Sip.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>