diff --git a/fcb-fronted/dist/assets/AdminLayout-BBfRqdU7.js b/fcb-fronted/dist/assets/AdminLayout-DFpljGo6.js similarity index 98% rename from fcb-fronted/dist/assets/AdminLayout-BBfRqdU7.js rename to fcb-fronted/dist/assets/AdminLayout-DFpljGo6.js index 29b47e41..1f4a8be2 100644 --- a/fcb-fronted/dist/assets/AdminLayout-BBfRqdU7.js +++ b/fcb-fronted/dist/assets/AdminLayout-DFpljGo6.js @@ -1,4 +1,4 @@ -import{c as i,B as k,r as h,o as u,J 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 L,K as B,L as D,k as F,t as I}from"./index-b4wH2aDB.js";import{B as j}from"./box-fk1vZEzO.js";/** +import{c as i,B as k,r as h,o as u,J 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 L,K as B,L as D,k as F,t as I}from"./index-DlNqZq-D.js";import{B as j}from"./box-DasTGycM.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/fcb-fronted/dist/assets/AdminLayout-CEJ6vCgl.css b/fcb-fronted/dist/assets/AdminLayout-N15TxCCO.css similarity index 62% rename from fcb-fronted/dist/assets/AdminLayout-CEJ6vCgl.css rename to fcb-fronted/dist/assets/AdminLayout-N15TxCCO.css index fa750a32..d718e8fd 100644 --- a/fcb-fronted/dist/assets/AdminLayout-CEJ6vCgl.css +++ b/fcb-fronted/dist/assets/AdminLayout-N15TxCCO.css @@ -1 +1 @@ -.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#e5e7eb;transition:.4s}.dark .slider{background-color:#4b5563}input:checked+.slider{background-color:#4f46e5}.dark input:checked+.slider{background-color:#4f46e5}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;transition:.4s}.dark .slider:before{background-color:#e5e7eb}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin-slow{animation:spin 8s linear infinite}.transition-colors{transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s} +.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#e5e7eb;transition:.4s}.dark .slider{background-color:#4b5563}input:checked+.slider{background-color:#4f46e5}.dark input:checked+.slider{background-color:#4f46e5}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;transition:.4s}.dark .slider:before{background-color:#e5e7eb}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin-slow{animation:spin 8s linear infinite}.transition-colors{transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.custom-scrollbar::-webkit-scrollbar{width:8px}.custom-scrollbar::-webkit-scrollbar-track{background:transparent}.custom-scrollbar::-webkit-scrollbar-thumb{background-color:#cbd5e0;border-radius:4px}:is():hover{background-color:#a0aec0}.custom-scrollbar :deep(.dark &::-webkit-scrollbar-thumb){background-color:#4a5568}.custom-scrollbar :deep(.dark &::-webkit-scrollbar-thumb):hover{background-color:#2d3748}.space-y-6{margin-bottom:5rem} diff --git a/fcb-fronted/dist/assets/DashboardView-DMN1r5C4.js b/fcb-fronted/dist/assets/DashboardView-DMN1r5C4.js deleted file mode 100644 index 9be58c66..00000000 --- a/fcb-fronted/dist/assets/DashboardView-DMN1r5C4.js +++ /dev/null @@ -1,21 +0,0 @@ -import{c as g,B as v,I as w,o as _,p,b as u,d as t,n as a,e,t as r,f as y,F as k,x as U,z as F,A as M,K as z,L as C}from"./index-b4wH2aDB.js";import{F as m}from"./file-CezeW3my.js";import{H as D,T as S}from"./trash-2qdaMQPm.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 B=g("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"}]]);/** - * @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 I=g("UploadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** - * @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 $=g("UserIcon",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** - * @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 H=g("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"}]]),j={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"},A={class:"flex items-center justify-between"},L={class:"flex items-center justify-between"},T={class:"flex items-center justify-between"},V={class:"flex items-center justify-between"},K={class:"p-6"},N={class:"space-y-4"},q={class:"flex-shrink-0"},E={class:"flex-1"},Q=v({__name:"DashboardView",setup(G){const s=F("isDarkMode"),o=w({totalFiles:0,storageUsed:0,yesterdayCount:0,todayCount:0,yesterdaySize:0,todaySize:0,sysUptime:0}),h=[{icon:I,description:'张三上传了文件 "项目计划.pdf"',time:"10分钟前"},{icon:$,description:"新用户李四加入了系统",time:"30分钟前"},{icon:S,description:'王五删除了文件 "旧文档.doc"',time:"1小时前"},{icon:m,description:"系统自动备份完成",time:"2小时前"}],b=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}小时`},x=l=>{const n=parseInt(l)/1024,i=n/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`:n>1?`${n.toFixed(2)}KB`:`${l}B`},f=async()=>{const l=await M.get("/admin/dashboard");o.totalFiles=l.detail.totalFiles,o.storageUsed=x(l.detail.storageUsed),o.yesterdaySize=x(l.detail.yesterdaySize),o.todaySize=x(l.detail.todaySize),o.yesterdayCount=l.detail.yesterdayCount,o.todayCount=l.detail.todayCount,o.sysUptime=b(l.detail.sysUptime)};return _(()=>{f()}),(l,n)=>(p(),u("div",null,[t("h2",{class:a(["text-2xl font-bold mb-6",[e(s)?"text-white":"text-gray-800"]])}," 仪表盘 ",2),t("div",j,[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",A,[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"]])},r(o.totalFiles),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-indigo-900":"bg-indigo-100"]])},[y(e(m),{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,r(o.yesterdayCount),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,r(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",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"]])},r(o.storageUsed),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-purple-900":"bg-purple-100"]])},[y(e(D),{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,r(o.yesterdaySize),1),t("span",{class:a(["ml-2",[e(s)?"text-gray-400":"text-gray-600"]])},"今天:",2),t("span",null,r(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,[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"]])},[y(e(H),{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"]])},[n[0]||(n[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",V,[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"]])},[y(e(B),{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"]])}," 服务器运行时间: "+r(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",K,[t("div",N,[(p(),u(k,null,U(h,(i,d)=>t("div",{key:d,class:"flex items-center space-x-4"},[t("div",q,[(p(),z(C(i.icon),{class:a(["w-5 h-5",[e(s)?"text-gray-400":"text-gray-600"]])},null,8,["class"]))]),t("div",E,[t("p",{class:a([e(s)?"text-gray-300":"text-gray-700"])},r(i.description),3),t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-500"]])},r(i.time),3)])])),64))])])],2)]))}});export{Q as default}; diff --git a/fcb-fronted/dist/assets/DashboardView-V_ky_QUg.js b/fcb-fronted/dist/assets/DashboardView-V_ky_QUg.js new file mode 100644 index 00000000..8b9a4d4e --- /dev/null +++ b/fcb-fronted/dist/assets/DashboardView-V_ky_QUg.js @@ -0,0 +1,21 @@ +import{c as g,B as v,I as w,o as _,p,b as u,d as t,n as a,e,t as i,f as y,F as k,x as U,z as F,A as M,K as z,L as C}from"./index-DlNqZq-D.js";import{F as m}from"./file-CuCz68gZ.js";import{H as D,T as S}from"./trash-CytZg4YE.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 B=g("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"}]]);/** + * @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 I=g("UploadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** + * @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 $=g("UserIcon",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @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 H=g("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"}]]),j={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},A={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"},L={class:"flex items-center justify-between"},T={class:"flex items-center justify-between"},V={class:"flex items-center justify-between"},K={class:"flex items-center justify-between"},N={class:"p-6"},q={class:"space-y-4"},E={class:"flex-shrink-0"},G={class:"flex-1"},R=v({__name:"DashboardView",setup(J){const s=F("isDarkMode"),o=w({totalFiles:0,storageUsed:0,yesterdayCount:0,todayCount:0,yesterdaySize:0,todaySize:0,sysUptime:0}),h=[{icon:I,description:'张三上传了文件 "项目计划.pdf"',time:"10分钟前"},{icon:$,description:"新用户李四加入了系统",time:"30分钟前"},{icon:S,description:'王五删除了文件 "旧文档.doc"',time:"1小时前"},{icon:m,description:"系统自动备份完成",time:"2小时前"}],b=l=>{const r=new Date().getTime()-l,d=Math.floor(r/(24*60*60*1e3)),c=Math.floor(r%(24*60*60*1e3)/(60*60*1e3));return`${d}天${c}小时`},x=l=>{const n=parseInt(l)/1024,r=n/1024,d=r/1024,c=d/1024;return c>1?`${c.toFixed(2)}TB`:d>1?`${d.toFixed(2)}GB`:r>1?`${r.toFixed(2)}MB`:n>1?`${n.toFixed(2)}KB`:`${l}B`},f=async()=>{const l=await M.get("/admin/dashboard");o.totalFiles=l.detail.totalFiles,o.storageUsed=x(l.detail.storageUsed),o.yesterdaySize=x(l.detail.yesterdaySize),o.todaySize=x(l.detail.todaySize),o.yesterdayCount=l.detail.yesterdayCount,o.todayCount=l.detail.todayCount,o.sysUptime=b(l.detail.sysUptime)};return _(()=>{f()}),(l,n)=>(p(),u("div",j,[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",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"]])},i(o.totalFiles),3)]),t("div",{class:a(["p-3 rounded-full",[e(s)?"bg-indigo-900":"bg-indigo-100"]])},[y(e(m),{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",T,[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"]])},[y(e(D),{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",V,[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"]])},[y(e(H),{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"]])},[n[0]||(n[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",K,[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"]])},[y(e(B),{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",N,[t("div",q,[(p(),u(k,null,U(h,(r,d)=>t("div",{key:d,class:"flex items-center space-x-4"},[t("div",E,[(p(),z(C(r.icon),{class:a(["w-5 h-5",[e(s)?"text-gray-400":"text-gray-600"]])},null,8,["class"]))]),t("div",G,[t("p",{class:a([e(s)?"text-gray-300":"text-gray-700"])},i(r.description),3),t("p",{class:a(["text-sm",[e(s)?"text-gray-400":"text-gray-500"]])},i(r.time),3)])])),64))])])],2)]))}});export{R as default}; diff --git a/fcb-fronted/dist/assets/FileManageView-B6HJEg5n.js b/fcb-fronted/dist/assets/FileManageView-B6HJEg5n.js deleted file mode 100644 index 6e3bffcb..00000000 --- a/fcb-fronted/dist/assets/FileManageView-B6HJEg5n.js +++ /dev/null @@ -1,6 +0,0 @@ -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-b4wH2aDB.js";import{F as L}from"./file-CezeW3my.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=j("SearchIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),E={class:"mb-6 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between"},U={class:"flex flex-1 gap-4"},Y={class:"relative flex-1"},G={class:"flex gap-4"},J={class:"overflow-x-auto"},K={class:"px-6 py-4 whitespace-nowrap"},O={class:"flex items-center"},Q={class:"px-6 py-4 whitespace-nowrap"},R={class:"flex items-center"},W={class:"px-6 py-4 whitespace-nowrap"},X={class:"px-6 py-4 whitespace-nowrap"},Z={class:"px-6 py-4 whitespace-nowrap"},N={class:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium"},tt=["onClick"],et={class:"flex items-center space-x-2"},at=["disabled"],st={class:"flex items-center space-x-1"},rt=["onClick"],ot=["disabled"],dt=T({__name:"FileManageView",setup(lt){const C=A();function $(n){const l=new Date(n),e=l.getFullYear(),i=(l.getMonth()+1).toString().padStart(2,"0"),x=l.getDate().toString().padStart(2,"0"),h=l.getHours().toString().padStart(2,"0"),y=l.getMinutes().toString().padStart(2,"0"),V=l.getSeconds().toString().padStart(2,"0");return`${e}-${i}-${x} ${h}:${y}:${V}`}const r=I("isDarkMode"),f=_([]),F=["取件码","名称","大小","描述","过期时间","操作"],s=_({page:1,size:10,total:0,keyword:""}),z=async n=>{try{await S({url:"/admin/file/delete",method:"delete",data:{id:n}}),await p()}catch(l){console.error("删除失败:",l)}},p=async()=>{try{const n=await S({url:"/admin/file/list",method:"get",params:s.value});f.value=n.detail.data,s.value.total=n.detail.total,C.showAlert("加载成功","success")}catch(n){console.error("加载文件列表失败:",n)}},b=async n=>{n<1||n>u.value||(s.value.page=n,await p())};p();const u=k(()=>Math.ceil(s.value.total/s.value.size)),D=k(()=>{const n=s.value.page,l=u.value,e=2;let i=[];i.push(1);let x=Math.max(2,n-e),h=Math.min(l-1,n+e);x>2&&i.push("...");for(let y=x;y<=h;y++)i.push(y);return h1&&i.push(l),i}),B=async()=>{s.value.page=1,await p()};return(n,l)=>(c(),g("div",null,[t("h2",{class:o(["text-2xl font-bold mb-6",[a(r)?"text-white":"text-gray-800"]])}," 文件管理 ",2),t("div",E,[t("div",U,[t("div",Y,[P(t("input",{type:"text","onUpdate:modelValue":l[0]||(l[0]=e=>s.value.keyword=e),class:o([[a(r)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400":"bg-white border-gray-300 text-gray-900 placeholder-gray-400"],"w-full pl-10 pr-4 py-2 rounded-lg border focus:ring-2 focus:ring-indigo-500 focus:border-transparent"]),placeholder:"搜索文件..."},null,2),[[q,s.value.keyword]]),m(a(M),{class:o(["absolute left-3 top-2.5 w-5 h-5",[a(r)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])]),t("div",G,[t("button",{onClick:B,class:"flex items-center px-4 py-2 rounded-lg bg-indigo-600 text-white hover:bg-indigo-700 transition-colors duration-200"},[m(a(M),{class:"w-5 h-5 mr-2"}),l[3]||(l[3]=H(" 搜索 "))])])]),t("div",{class:o(["rounded-lg shadow-md overflow-hidden transition-colors duration-300",[a(r)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",{class:o(["px-6 py-4 border-b",[a(r)?"border-gray-700":"border-gray-200"]])},[t("h3",{class:o(["text-lg font-medium",[a(r)?"text-white":"text-gray-800"]])}," 所有文件 ",2)],2),t("div",J,[t("table",{class:o(["min-w-full divide-y",[a(r)?"divide-gray-700":"divide-gray-200"]])},[t("thead",{class:o([a(r)?"bg-gray-900":"bg-gray-100"])},[t("tr",null,[(c(),g(v,null,w(F,e=>t("th",{key:e,class:o(["px-6 py-3 text-left text-xs font-medium uppercase tracking-wider",[a(r)?"text-gray-400":"text-gray-500"]])},d(e),3)),64))])],2),t("tbody",{class:o([a(r)?"bg-gray-800 divide-y divide-gray-700":"bg-white divide-y divide-gray-200"])},[(c(!0),g(v,null,w(f.value,e=>(c(),g("tr",{key:e.id},[t("td",K,[t("div",O,[t("span",{class:o(["font-medium",[a(r)?"text-white":"text-gray-900"]])},d(e.code),3)])]),t("td",Q,[t("div",R,[m(a(L),{class:o(["w-5 h-5 mr-2",[a(r)?"text-indigo-400":"text-indigo-500"]])},null,8,["class"]),t("span",{class:o(["font-medium",[a(r)?"text-white":"text-gray-900"]])},d(e.prefix),3)])]),t("td",W,[t("span",{class:o([a(r)?"text-gray-400":"text-gray-500"])},d(Math.round(e.size/1024/1024*100)/100)+"MB ",3)]),t("td",X,[t("span",{class:o([a(r)?"text-gray-400":"text-gray-500"])},d(e.text),3)]),t("td",Z,[t("span",{class:o([a(r)?"text-gray-400":"text-gray-500"])},d(e.expired_at?$(e.expired_at):"永久"),3)]),t("td",N,[t("button",{onClick:i=>z(e.id),class:o(["transition-colors duration-200",[a(r)?"text-red-400 hover:text-red-300":"text-red-600 hover:text-red-900"]])}," 删除 ",10,tt)])]))),128))],2)],2)])],2),t("div",{class:o(["mt-4 flex items-center justify-between px-6 py-3 border-t",[a(r)?"border-gray-700":"border-gray-200"]])},[t("div",{class:o(["flex items-center text-sm",[a(r)?"text-gray-400":"text-gray-500"]])}," 显示第 "+d((s.value.page-1)*s.value.size+1)+" 到 "+d(Math.min(s.value.page*s.value.size,s.value.total))+" 条,共 "+d(s.value.total)+" 条 ",3),t("div",et,[t("button",{onClick:l[1]||(l[1]=e=>b(s.value.page-1)),disabled:s.value.page===1,class:o(["px-3 py-1 rounded-md transition-colors duration-200",[a(r)?s.value.page===1?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-gray-700 text-gray-300 hover:bg-gray-600":s.value.page===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])}," 上一页 ",10,at),t("div",st,[(c(!0),g(v,null,w(D.value,e=>(c(),g(v,{key:e},[e!=="..."?(c(),g("button",{key:0,onClick:i=>b(e),class:o(["px-3 py-1 rounded-md transition-colors duration-200",[s.value.page===e?"bg-indigo-600 text-white":a(r)?"bg-gray-700 text-gray-300 hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])},d(e),11,rt)):(c(),g("span",{key:1,class:o(["px-2",[a(r)?"text-gray-400":"text-gray-500"]])}," ... ",2))],64))),128))]),t("button",{onClick:l[2]||(l[2]=e=>b(s.value.page+1)),disabled:s.value.page>=u.value,class:o(["px-3 py-1 rounded-md transition-colors duration-200",[a(r)?s.value.page>=u.value?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-gray-700 text-gray-300 hover:bg-gray-600":s.value.page>=u.value?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])}," 下一页 ",10,ot)])],2)]))}});export{dt as default}; diff --git a/fcb-fronted/dist/assets/FileManageView-DOkmzxxl.js b/fcb-fronted/dist/assets/FileManageView-DOkmzxxl.js new file mode 100644 index 00000000..72120016 --- /dev/null +++ b/fcb-fronted/dist/assets/FileManageView-DOkmzxxl.js @@ -0,0 +1,6 @@ +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-DlNqZq-D.js";import{F as L}from"./file-CuCz68gZ.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=j("SearchIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),E={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},U={class:"mb-6 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between"},Y={class:"flex flex-1 gap-4"},G={class:"relative flex-1"},J={class:"flex gap-4"},K={class:"overflow-x-auto"},O={class:"px-6 py-4 whitespace-nowrap"},Q={class:"flex items-center"},R={class:"px-6 py-4 whitespace-nowrap"},W={class:"flex items-center"},X={class:"px-6 py-4 whitespace-nowrap"},Z={class:"px-6 py-4 whitespace-nowrap"},N={class:"px-6 py-4 whitespace-nowrap"},tt={class:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium"},et=["onClick"],at={class:"flex items-center space-x-2"},st=["disabled"],rt={class:"flex items-center space-x-1"},ot=["onClick"],lt=["disabled"],ct=T({__name:"FileManageView",setup(nt){const C=A();function $(n){const l=new Date(n),e=l.getFullYear(),i=(l.getMonth()+1).toString().padStart(2,"0"),x=l.getDate().toString().padStart(2,"0"),h=l.getHours().toString().padStart(2,"0"),y=l.getMinutes().toString().padStart(2,"0"),V=l.getSeconds().toString().padStart(2,"0");return`${e}-${i}-${x} ${h}:${y}:${V}`}const r=I("isDarkMode"),f=_([]),F=["取件码","名称","大小","描述","过期时间","操作"],s=_({page:1,size:10,total:0,keyword:""}),z=async n=>{try{await S({url:"/admin/file/delete",method:"delete",data:{id:n}}),await p()}catch(l){console.error("删除失败:",l)}},p=async()=>{try{const n=await S({url:"/admin/file/list",method:"get",params:s.value});f.value=n.detail.data,s.value.total=n.detail.total,C.showAlert("加载成功","success")}catch(n){console.error("加载文件列表失败:",n)}},b=async n=>{n<1||n>u.value||(s.value.page=n,await p())};p();const u=k(()=>Math.ceil(s.value.total/s.value.size)),D=k(()=>{const n=s.value.page,l=u.value,e=2;let i=[];i.push(1);let x=Math.max(2,n-e),h=Math.min(l-1,n+e);x>2&&i.push("...");for(let y=x;y<=h;y++)i.push(y);return h1&&i.push(l),i}),B=async()=>{s.value.page=1,await p()};return(n,l)=>(c(),g("div",E,[t("h2",{class:o(["text-2xl font-bold mb-6",[a(r)?"text-white":"text-gray-800"]])}," 文件管理 ",2),t("div",U,[t("div",Y,[t("div",G,[P(t("input",{type:"text","onUpdate:modelValue":l[0]||(l[0]=e=>s.value.keyword=e),class:o([[a(r)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400":"bg-white border-gray-300 text-gray-900 placeholder-gray-400"],"w-full pl-10 pr-4 py-2 rounded-lg border focus:ring-2 focus:ring-indigo-500 focus:border-transparent"]),placeholder:"搜索文件..."},null,2),[[q,s.value.keyword]]),m(a(M),{class:o(["absolute left-3 top-2.5 w-5 h-5",[a(r)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])]),t("div",J,[t("button",{onClick:B,class:"flex items-center px-4 py-2 rounded-lg bg-indigo-600 text-white hover:bg-indigo-700 transition-colors duration-200"},[m(a(M),{class:"w-5 h-5 mr-2"}),l[3]||(l[3]=H(" 搜索 "))])])]),t("div",{class:o(["rounded-lg shadow-md overflow-hidden transition-colors duration-300",[a(r)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[t("div",{class:o(["px-6 py-4 border-b",[a(r)?"border-gray-700":"border-gray-200"]])},[t("h3",{class:o(["text-lg font-medium",[a(r)?"text-white":"text-gray-800"]])}," 所有文件 ",2)],2),t("div",K,[t("table",{class:o(["min-w-full divide-y",[a(r)?"divide-gray-700":"divide-gray-200"]])},[t("thead",{class:o([a(r)?"bg-gray-900":"bg-gray-100"])},[t("tr",null,[(c(),g(v,null,w(F,e=>t("th",{key:e,class:o(["px-6 py-3 text-left text-xs font-medium uppercase tracking-wider",[a(r)?"text-gray-400":"text-gray-500"]])},d(e),3)),64))])],2),t("tbody",{class:o([a(r)?"bg-gray-800 divide-y divide-gray-700":"bg-white divide-y divide-gray-200"])},[(c(!0),g(v,null,w(f.value,e=>(c(),g("tr",{key:e.id},[t("td",O,[t("div",Q,[t("span",{class:o(["font-medium",[a(r)?"text-white":"text-gray-900"]])},d(e.code),3)])]),t("td",R,[t("div",W,[m(a(L),{class:o(["w-5 h-5 mr-2",[a(r)?"text-indigo-400":"text-indigo-500"]])},null,8,["class"]),t("span",{class:o(["font-medium",[a(r)?"text-white":"text-gray-900"]])},d(e.prefix),3)])]),t("td",X,[t("span",{class:o([a(r)?"text-gray-400":"text-gray-500"])},d(Math.round(e.size/1024/1024*100)/100)+"MB ",3)]),t("td",Z,[t("span",{class:o([a(r)?"text-gray-400":"text-gray-500"])},d(e.text),3)]),t("td",N,[t("span",{class:o([a(r)?"text-gray-400":"text-gray-500"])},d(e.expired_at?$(e.expired_at):"永久"),3)]),t("td",tt,[t("button",{onClick:i=>z(e.id),class:o(["transition-colors duration-200",[a(r)?"text-red-400 hover:text-red-300":"text-red-600 hover:text-red-900"]])}," 删除 ",10,et)])]))),128))],2)],2)])],2),t("div",{class:o(["mt-4 flex items-center justify-between px-6 py-3 border-t",[a(r)?"border-gray-700":"border-gray-200"]])},[t("div",{class:o(["flex items-center text-sm",[a(r)?"text-gray-400":"text-gray-500"]])}," 显示第 "+d((s.value.page-1)*s.value.size+1)+" 到 "+d(Math.min(s.value.page*s.value.size,s.value.total))+" 条,共 "+d(s.value.total)+" 条 ",3),t("div",at,[t("button",{onClick:l[1]||(l[1]=e=>b(s.value.page-1)),disabled:s.value.page===1,class:o(["px-3 py-1 rounded-md transition-colors duration-200",[a(r)?s.value.page===1?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-gray-700 text-gray-300 hover:bg-gray-600":s.value.page===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])}," 上一页 ",10,st),t("div",rt,[(c(!0),g(v,null,w(D.value,e=>(c(),g(v,{key:e},[e!=="..."?(c(),g("button",{key:0,onClick:i=>b(e),class:o(["px-3 py-1 rounded-md transition-colors duration-200",[s.value.page===e?"bg-indigo-600 text-white":a(r)?"bg-gray-700 text-gray-300 hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])},d(e),11,ot)):(c(),g("span",{key:1,class:o(["px-2",[a(r)?"text-gray-400":"text-gray-500"]])}," ... ",2))],64))),128))]),t("button",{onClick:l[2]||(l[2]=e=>b(s.value.page+1)),disabled:s.value.page>=u.value,class:o(["px-3 py-1 rounded-md transition-colors duration-200",[a(r)?s.value.page>=u.value?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-gray-700 text-gray-300 hover:bg-gray-600":s.value.page>=u.value?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])}," 下一页 ",10,lt)])],2)]))}});export{ct as default}; diff --git a/fcb-fronted/dist/assets/LoginView-CNbKA-If.js b/fcb-fronted/dist/assets/LoginView-yrMAxh32.js similarity index 96% rename from fcb-fronted/dist/assets/LoginView-CNbKA-If.js rename to fcb-fronted/dist/assets/LoginView-yrMAxh32.js index 3788ed4d..45413b39 100644 --- a/fcb-fronted/dist/assets/LoginView-CNbKA-If.js +++ b/fcb-fronted/dist/assets/LoginView-yrMAxh32.js @@ -1 +1 @@ -import{H 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-b4wH2aDB.js";import{B as z}from"./box-fk1vZEzO.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{H 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-DlNqZq-D.js";import{B as z}from"./box-DasTGycM.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}; diff --git a/fcb-fronted/dist/assets/RetrievewFileView-CVzgwexs.js b/fcb-fronted/dist/assets/RetrievewFileView-DMP8rhpF.js similarity index 99% rename from fcb-fronted/dist/assets/RetrievewFileView-CVzgwexs.js rename to fcb-fronted/dist/assets/RetrievewFileView-DMP8rhpF.js index 0ee2e33e..6260a1f0 100644 --- a/fcb-fronted/dist/assets/RetrievewFileView-CVzgwexs.js +++ b/fcb-fronted/dist/assets/RetrievewFileView-DMP8rhpF.js @@ -1,4 +1,4 @@ -var qe=Object.defineProperty;var De=(d,e,t)=>e in d?qe(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var v=(d,e,t)=>De(d,typeof e!="symbol"?e+"":e,t);import{c as _e,_ as Pe,u as Fe,s as Ze,r as q,o as Oe,w as Ue,a as Qe,b as I,d as p,n as k,e as f,f as _,g as He,h as Ne,v as Ve,i as Y,t as D,j as U,k as Z,T as oe,l as Ge,m as Xe,p as C,X as ge,q as We,F as Ke,x as Je,y as Ye,z as et,A as tt}from"./index-b4wH2aDB.js";import{c as Q,u as nt,S as st,C as it,a as rt,Q as ot,E as lt}from"./_commonjsHelpers-DsI9l0Rc.js";import{B as at}from"./box-fk1vZEzO.js";import{F as xe}from"./file-CezeW3my.js";import{H as ct,T as ut}from"./trash-2qdaMQPm.js";/** +var qe=Object.defineProperty;var De=(d,e,t)=>e in d?qe(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var v=(d,e,t)=>De(d,typeof e!="symbol"?e+"":e,t);import{c as _e,_ as Pe,u as Fe,s as Ze,r as q,o as Oe,w as Ue,a as Qe,b as I,d as p,n as k,e as f,f as _,g as He,h as Ne,v as Ve,i as Y,t as D,j as U,k as Z,T as oe,l as Ge,m as Xe,p as C,X as ge,q as We,F as Ke,x as Je,y as Ye,z as et,A as tt}from"./index-DlNqZq-D.js";import{c as Q,u as nt,S as st,C as it,a as rt,Q as ot,E as lt}from"./_commonjsHelpers-BqRSbYMX.js";import{B as at}from"./box-DasTGycM.js";import{F as xe}from"./file-CuCz68gZ.js";import{H as ct,T as ut}from"./trash-CytZg4YE.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/fcb-fronted/dist/assets/SendFileView-DjsGNqez.js b/fcb-fronted/dist/assets/SendFileView-BXcnmHJa.js similarity index 99% rename from fcb-fronted/dist/assets/SendFileView-DjsGNqez.js rename to fcb-fronted/dist/assets/SendFileView-BXcnmHJa.js index 7e4ea1f3..6a469bea 100644 --- a/fcb-fronted/dist/assets/SendFileView-DjsGNqez.js +++ b/fcb-fronted/dist/assets/SendFileView-BXcnmHJa.js @@ -1,4 +1,4 @@ -import{c as W,B as te,r as T,o as re,w as he,p as F,b as $,d as i,_ as oe,u as pe,a as ge,n as h,e as l,g as G,f as C,j as N,i as E,t as P,h as J,v as Z,T as K,C as ye,D as ve,k as j,X as be,q as xe,F as me,x as we,y as _e,z as Ce,A as Ae,m as Se}from"./index-b4wH2aDB.js";import{g as Me,u as Be,S as Te,C as Ie,a as ke,Q as Ue,E as De}from"./_commonjsHelpers-DsI9l0Rc.js";import{F as ee}from"./file-CezeW3my.js";import{H as Fe,T as $e}from"./trash-2qdaMQPm.js";/** +import{c as W,B as te,r as T,o as re,w as he,p as F,b as $,d as i,_ as oe,u as pe,a as ge,n as h,e as l,g as G,f as C,j as N,i as E,t as P,h as J,v as Z,T as K,C as ye,D as ve,k as j,X as be,q as xe,F as me,x as we,y as _e,z as Ce,A as Ae,m as Se}from"./index-DlNqZq-D.js";import{g as Me,u as Be,S as Te,C as Ie,a as ke,Q as Ue,E as De}from"./_commonjsHelpers-BqRSbYMX.js";import{F as ee}from"./file-CuCz68gZ.js";import{H as Fe,T as $e}from"./trash-CytZg4YE.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/fcb-fronted/dist/assets/SystemSettingsView-2lDuNKAP.css b/fcb-fronted/dist/assets/SystemSettingsView-2lDuNKAP.css deleted file mode 100644 index e579b31d..00000000 --- a/fcb-fronted/dist/assets/SystemSettingsView-2lDuNKAP.css +++ /dev/null @@ -1 +0,0 @@ -.custom-scrollbar[data-v-2f785aa5]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-2f785aa5]::-webkit-scrollbar-track{background:transparent}:is()[data-v-2f785aa5]{background-color:#cbd5e0;border-radius:4px}:is()[data-v-2f785aa5]:hover{background-color:#a0aec0}[data-v-2f785aa5] .dark .custom-scrollbar::-webkit-scrollbar-thumb{background-color:#4a5568}:is():hover{background-color:#2d3748}.space-y-6[data-v-2f785aa5]{margin-bottom:5rem} diff --git a/fcb-fronted/dist/assets/SystemSettingsView-BrgX3I32.js b/fcb-fronted/dist/assets/SystemSettingsView-BrgX3I32.js new file mode 100644 index 00000000..09e05264 --- /dev/null +++ b/fcb-fronted/dist/assets/SystemSettingsView-BrgX3I32.js @@ -0,0 +1 @@ +import{B as V,r as p,u as B,p as m,b as v,d as e,n as t,e as s,h as l,v as i,C as b,t as x,i as M,F as C,x as D,z,A as h,M as A}from"./index-DlNqZq-D.js";const F={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},T={class:"space-y-4"},K={class:"grid grid-cols-1 gap-6"},E={class:"space-y-2"},G={class:"space-y-2"},N={class:"space-y-2"},j={class:"relative"},I={class:"space-y-2"},R={class:"space-y-2"},$={class:"grid grid-cols-1 gap-6 mt-8"},H={class:"space-y-2"},L={class:"space-y-2"},q={class:"mt-8"},J={class:"space-y-4"},O={class:"space-y-2"},P={key:0,class:"space-y-4"},Q={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},W={class:"space-y-2"},X={class:"space-y-2"},Y={class:"space-y-2"},Z={class:"space-y-2"},ee={class:"space-y-2"},oe={class:"space-y-2"},re={class:"space-y-2"},te={class:"space-y-2"},ae={class:"flex items-center"},se=["aria-checked"],ne={class:"mt-8"},le={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ie={class:"space-y-2"},de={class:"flex items-center space-x-2"},ue={class:"space-y-2"},ge={class:"flex items-center space-x-2"},ce={class:"space-y-2"},ye={class:"flex items-center space-x-2"},pe={class:"space-y-2"},be={class:"flex flex-wrap gap-3"},me=["value"],ve={class:"space-y-2"},xe={class:"flex items-center space-x-2"},fe={class:"space-y-2"},he={class:"flex items-center"},_e=["aria-checked"],we={class:"mt-8"},ke={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Ue={class:"space-y-2"},Se={class:"flex items-center space-x-2"},Ve={class:"space-y-2"},Be={class:"flex items-center space-x-2"},De=V({__name:"SystemSettingsView",setup(Me){const a=z("isDarkMode"),n=p({name:"",description:"",file_storage:"",expireStyle:[],admin_token:"",robotsText:"",keywords:"",notify_title:"",notify_content:"",openUpload:1,uploadSize:1,uploadMinute:1,max_save_seconds:0,opacity:.9,s3_access_key_id:"",background:"",showAdminAddr:0,page_explain:"",s3_secret_access_key:"",aws_session_token:"",s3_signature_version:"",s3_region_name:"",s3_bucket_name:"",s3_endpoint_url:"",s3_hostname:"",uploadCount:1,errorMinute:1,errorCount:1,s3_proxy:0}),c=p(1),y=p("MB"),u=p(1),g=p("天"),_=(d,o)=>d*{秒:1,分:60,时:3600,天:86400}[o],w=()=>{h({url:"/admin/config/get",method:"get"}).then(d=>{n.value=d.detail;let o=n.value.uploadSize;o>=1024*1024*1024?(c.value=Math.round(o/(1024*1024*1024)),y.value="GB"):o>=1024*1024?(c.value=Math.round(o/(1024*1024)),y.value="MB"):(c.value=Math.round(o/1024),y.value="KB");let r=n.value.max_save_seconds;r===0?(u.value=7,g.value="天"):r%86400===0&&r>=86400?(u.value=r/86400,g.value="天"):r%3600===0&&r>=3600?(u.value=r/3600,g.value="时"):r%60===0&&r>=60?(u.value=r/60,g.value="分"):(u.value=r,g.value="秒")})},f=B(),k=(d,o)=>d*{KB:1024,MB:1048576,GB:1073741824}[o],U=()=>{const d={...n.value};d.uploadSize=k(c.value,y.value),u.value===0?d.max_save_seconds=7*86400:d.max_save_seconds=_(u.value,g.value),h({url:"/admin/config/update",method:"patch",data:d}).then(o=>{o.code==200?f.showAlert("保存成功","success"):f.showAlert(o.message,"error")})};return w(),(d,o)=>(m(),v("div",F,[e("h2",{class:t(["text-2xl font-bold mb-6",[s(a)?"text-white":"text-gray-800"]])}," 系统设置 ",2),e("div",{class:t(["space-y-6 rounded-lg shadow-md p-6",[s(a)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[e("section",T,[e("h3",{class:t(["text-lg font-medium mb-4",[s(a)?"text-white":"text-gray-800"]])}," 基本设置 ",2),e("div",K,[e("div",E,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 网站名称 ",2),l(e("input",{type:"text","onUpdate:modelValue":o[0]||(o[0]=r=>n.value.name=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.name]])]),e("div",G,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 网站描述 ",2),l(e("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=r=>n.value.description=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.description]])]),e("div",N,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 管理员密码 ",2),e("div",j,[l(e("input",{type:"password","onUpdate:modelValue":o[2]||(o[2]=r=>n.value.admin_token=r),placeholder:"留空则不修改密码",class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.admin_token]]),e("div",{class:t(["absolute inset-y-0 right-0 flex items-center pr-3 text-sm text-gray-400",[s(a)?"text-gray-500":"text-gray-400"]])},o[26]||(o[26]=[e("span",{class:"text-xs"},"留空则不修改",-1)]),2)])]),e("div",I,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 关键词 ",2),l(e("input",{type:"text","onUpdate:modelValue":o[3]||(o[3]=r=>n.value.keywords=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.keywords]])]),e("div",R,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," Robots.txt ",2),l(e("textarea",{"onUpdate:modelValue":o[4]||(o[4]=r=>n.value.robotsText=r),rows:"3",class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.robotsText]])])]),e("div",$,[e("div",H,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 通知标题 ",2),l(e("input",{type:"text","onUpdate:modelValue":o[5]||(o[5]=r=>n.value.notify_title=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.notify_title]])]),e("div",L,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 通知内容 ",2),l(e("textarea",{"onUpdate:modelValue":o[6]||(o[6]=r=>n.value.notify_content=r),rows:"3",class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.notify_content]])])]),e("div",q,[e("h3",{class:t(["text-lg font-medium mb-4",[s(a)?"text-white":"text-gray-800"]])}," 存储设置 ",2),e("div",J,[e("div",O,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 存储方式 ",2),l(e("select",{"onUpdate:modelValue":o[7]||(o[7]=r=>n.value.file_storage=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[s(a)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},o[27]||(o[27]=[e("option",{value:"local"},"本地存储",-1),e("option",{value:"s3"},"S3 存储",-1)]),2),[[b,n.value.file_storage]])]),n.value.file_storage==="s3"?(m(),v("div",P,[e("div",Q,[e("div",W,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 AccessKeyId ",2),l(e("input",{type:"text","onUpdate:modelValue":o[8]||(o[8]=r=>n.value.s3_access_key_id=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.s3_access_key_id]])]),e("div",X,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 SecretAccessKey ",2),l(e("input",{type:"password","onUpdate:modelValue":o[9]||(o[9]=r=>n.value.s3_secret_access_key=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.s3_secret_access_key]])]),e("div",Y,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 BucketName ",2),l(e("input",{type:"text","onUpdate:modelValue":o[10]||(o[10]=r=>n.value.s3_bucket_name=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.s3_bucket_name]])]),e("div",Z,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 EndpointUrl ",2),l(e("input",{type:"text","onUpdate:modelValue":o[11]||(o[11]=r=>n.value.s3_endpoint_url=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.s3_endpoint_url]])]),e("div",ee,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 Region Name ",2),l(e("input",{type:"text","onUpdate:modelValue":o[12]||(o[12]=r=>n.value.s3_region_name=r),placeholder:"auto",class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.s3_region_name]])]),e("div",oe,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 Signature Version ",2),l(e("select",{"onUpdate:modelValue":o[13]||(o[13]=r=>n.value.s3_signature_version=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[28]||(o[28]=[e("option",{value:"s3v2"},"S3v2",-1),e("option",{value:"s3v4"},"S3v4",-1)]),2),[[b,n.value.s3_signature_version]])]),e("div",re,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 Hostname ",2),l(e("input",{type:"text","onUpdate:modelValue":o[14]||(o[14]=r=>n.value.s3_hostname=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.s3_hostname]])]),e("div",te,[e("label",{class:t(["block text-sm font-medium mb-2",[s(a)?"text-gray-300":"text-gray-700"]])}," 启用代理 ",2),e("div",ae,[e("button",{type:"button",onClick:o[15]||(o[15]=r=>n.value.s3_proxy=n.value.s3_proxy===1?0:1),class:t(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[n.value.s3_proxy===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":n.value.s3_proxy===1},[e("span",{class:t(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[n.value.s3_proxy===1?"translate-x-5":"translate-x-0",s(a)&&n.value.s3_proxy!==1?"bg-gray-100":"bg-white"]])},null,2)],10,se),e("span",{class:t(["ml-3 text-sm",[s(a)?"text-gray-300":"text-gray-700"]])},x(n.value.s3_proxy===1?"已开启":"已关闭"),3)])])])])):M("",!0)])]),e("div",ne,[e("h3",{class:t(["text-lg font-medium mb-4",[s(a)?"text-white":"text-gray-800"]])}," 上传限制 ",2),e("div",le,[e("div",ie,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 每分钟上传限制 ",2),e("div",de,[l(e("input",{type:"number","onUpdate:modelValue":o[16]||(o[16]=r=>n.value.uploadMinute=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.uploadMinute]]),e("span",{class:t([s(a)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",ue,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 上传数量限制 ",2),e("div",ge,[l(e("input",{type:"number","onUpdate:modelValue":o[17]||(o[17]=r=>n.value.uploadCount=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.uploadCount]]),e("span",{class:t([s(a)?"text-gray-300":"text-gray-700"])},"个文件",2)])]),e("div",ce,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 文件大小限制 ",2),e("div",ye,[l(e("input",{type:"number","onUpdate:modelValue":o[18]||(o[18]=r=>c.value=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,c.value]]),l(e("select",{"onUpdate:modelValue":o[19]||(o[19]=r=>y.value=r),class:t(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[29]||(o[29]=[e("option",{value:"KB"},"KB",-1),e("option",{value:"MB"},"MB",-1),e("option",{value:"GB"},"GB",-1)]),2),[[b,y.value]])])]),e("div",pe,[e("label",{class:t(["block text-sm font-medium mb-2",[s(a)?"text-gray-300":"text-gray-700"]])}," 过期方式 ",2),e("div",be,[(m(),v(C,null,D(["day","hour","minute","forever","count"],r=>e("label",{key:r,class:"relative inline-flex items-center group cursor-pointer"},[l(e("input",{type:"checkbox",value:r,"onUpdate:modelValue":o[20]||(o[20]=S=>n.value.expireStyle=S),class:"peer sr-only"},null,8,me),[[A,n.value.expireStyle]]),e("div",{class:t(["px-4 py-2 rounded-full border-2 transition-all duration-200 select-none",[n.value.expireStyle.includes(r)?(s(a),"bg-indigo-600 border-indigo-600 text-white"):s(a)?"bg-gray-700 border-gray-600 text-gray-300 hover:border-indigo-500":"bg-white border-gray-300 text-gray-700 hover:border-indigo-500"]])},x({day:"按天",hour:"按小时",minute:"按分钟",forever:"永久",count:"按次数"}[r]),3)])),64))])]),e("div",ve,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 最长保存时间 ",2),e("div",xe,[l(e("input",{type:"number","onUpdate:modelValue":o[21]||(o[21]=r=>u.value=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,u.value]]),l(e("select",{"onUpdate:modelValue":o[22]||(o[22]=r=>g.value=r),class:t(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[30]||(o[30]=[e("option",{value:"秒"},"秒",-1),e("option",{value:"分"},"分",-1),e("option",{value:"时"},"时",-1),e("option",{value:"天"},"天",-1)]),2),[[b,g.value]])])]),e("div",fe,[e("label",{class:t(["block text-sm font-medium mb-2",[s(a)?"text-gray-300":"text-gray-700"]])}," 游客上传 ",2),e("div",he,[e("button",{type:"button",onClick:o[23]||(o[23]=r=>n.value.openUpload=n.value.openUpload===1?0:1),class:t(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[n.value.openUpload===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":n.value.openUpload===1},[e("span",{class:t(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[n.value.openUpload===1?"translate-x-5":"translate-x-0",s(a)&&n.value.openUpload!==1?"bg-gray-100":"bg-white"]])},null,2)],10,_e),e("span",{class:t(["ml-3 text-sm",[s(a)?"text-gray-300":"text-gray-700"]])},x(n.value.openUpload===1?"已开启":"已关闭"),3)])])])]),e("div",we,[e("h3",{class:t(["text-lg font-medium mb-4",[s(a)?"text-white":"text-gray-800"]])}," 错误限制 ",2),e("div",ke,[e("div",Ue,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 每分钟错误限制 ",2),e("div",Se,[l(e("input",{type:"number","onUpdate:modelValue":o[24]||(o[24]=r=>n.value.errorMinute=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.errorMinute]]),e("span",{class:t([s(a)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",Ve,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 错误次数限制 ",2),e("div",Be,[l(e("input",{type:"number","onUpdate:modelValue":o[25]||(o[25]=r=>n.value.errorCount=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,n.value.errorCount]]),e("span",{class:t([s(a)?"text-gray-300":"text-gray-700"])},"次",2)])])])]),e("div",{class:"flex justify-end mt-8"},[e("button",{onClick:U,class:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors duration-200"}," 保存设置 ")])])],2)]))}});export{De as default}; diff --git a/fcb-fronted/dist/assets/SystemSettingsView-CvU75WjY.js b/fcb-fronted/dist/assets/SystemSettingsView-CvU75WjY.js deleted file mode 100644 index 30c5e752..00000000 --- a/fcb-fronted/dist/assets/SystemSettingsView-CvU75WjY.js +++ /dev/null @@ -1 +0,0 @@ -import{B as V,r as p,u as B,p as b,b as m,d as e,n as a,e as s,h as n,v as i,C as v,i as M,F as C,x as D,t as f,z,A as h,M as A,_ as F}from"./index-b4wH2aDB.js";const T={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},K={class:"space-y-4"},E={class:"grid grid-cols-1 gap-6"},G={class:"space-y-2"},I={class:"space-y-2"},j={class:"space-y-2"},N={class:"relative"},L={class:"space-y-2"},R={class:"space-y-2"},$={class:"grid grid-cols-1 gap-6 mt-8"},q={class:"space-y-2"},H={class:"space-y-2"},J={class:"mt-8"},O={class:"space-y-4"},P={class:"space-y-2"},Q={key:0,class:"space-y-4"},W={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},X={class:"space-y-2"},Y={class:"space-y-2"},Z={class:"space-y-2"},ee={class:"space-y-2"},oe={class:"mt-8"},re={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},te={class:"space-y-2"},ae={class:"flex items-center space-x-2"},se={class:"space-y-2"},le={class:"flex items-center space-x-2"},ne={class:"space-y-2"},ie={class:"flex items-center space-x-2"},de={class:"space-y-2"},ue={class:"flex flex-wrap gap-3"},ge=["value"],ce={class:"space-y-2"},ye={class:"flex items-center space-x-2"},pe={class:"space-y-2"},be={class:"flex items-center"},me=["aria-checked"],ve={class:"mt-8"},xe={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},fe={class:"space-y-2"},he={class:"flex items-center space-x-2"},_e={class:"space-y-2"},we={class:"flex items-center space-x-2"},ke=V({__name:"SystemSettingsView",setup(Ue){const t=z("isDarkMode"),l=p({name:"",description:"",file_storage:"",expireStyle:[],admin_token:"",robotsText:"",keywords:"",notify_title:"",notify_content:"",openUpload:1,uploadSize:1,uploadMinute:1,max_save_seconds:0,opacity:.9,s3_access_key_id:"",background:"",showAdminAddr:0,page_explain:"",s3_secret_access_key:"",aws_session_token:"",s3_signature_version:"",s3_region_name:"",s3_bucket_name:"",s3_endpoint_url:"",s3_hostname:"",uploadCount:1,errorMinute:1,errorCount:1}),c=p(1),y=p("MB"),u=p(1),g=p("天"),_=(d,o)=>d*{秒:1,分:60,时:3600,天:86400}[o],w=()=>{h({url:"/admin/config/get",method:"get"}).then(d=>{l.value=d.detail;let o=l.value.uploadSize;o>=1024*1024*1024?(c.value=Math.round(o/(1024*1024*1024)),y.value="GB"):o>=1024*1024?(c.value=Math.round(o/(1024*1024)),y.value="MB"):(c.value=Math.round(o/1024),y.value="KB");let r=l.value.max_save_seconds;r===0?(u.value=7,g.value="天"):r%86400===0&&r>=86400?(u.value=r/86400,g.value="天"):r%3600===0&&r>=3600?(u.value=r/3600,g.value="时"):r%60===0&&r>=60?(u.value=r/60,g.value="分"):(u.value=r,g.value="秒")})},x=B(),k=(d,o)=>d*{KB:1024,MB:1048576,GB:1073741824}[o],U=()=>{const d={...l.value};d.uploadSize=k(c.value,y.value),u.value===0?d.max_save_seconds=7*86400:d.max_save_seconds=_(u.value,g.value),h({url:"/admin/config/update",method:"patch",data:d}).then(o=>{o.code==200?x.showAlert("保存成功","success"):x.showAlert(o.message,"error")})};return w(),(d,o)=>(b(),m("div",T,[e("h2",{class:a(["text-2xl font-bold mb-6",[s(t)?"text-white":"text-gray-800"]])}," 系统设置 ",2),e("div",{class:a(["space-y-6 rounded-lg shadow-md p-6",[s(t)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[e("section",K,[e("h3",{class:a(["text-lg font-medium mb-4",[s(t)?"text-white":"text-gray-800"]])}," 基本设置 ",2),e("div",E,[e("div",G,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 网站名称 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[0]||(o[0]=r=>l.value.name=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.name]])]),e("div",I,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 网站描述 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=r=>l.value.description=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.description]])]),e("div",j,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 管理员密码 ",2),e("div",N,[n(e("input",{type:"password","onUpdate:modelValue":o[2]||(o[2]=r=>l.value.admin_token=r),placeholder:"留空则不修改密码",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.admin_token]]),e("div",{class:a(["absolute inset-y-0 right-0 flex items-center pr-3 text-sm text-gray-400",[s(t)?"text-gray-500":"text-gray-400"]])},o[22]||(o[22]=[e("span",{class:"text-xs"},"留空则不修改",-1)]),2)])]),e("div",L,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 关键词 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[3]||(o[3]=r=>l.value.keywords=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.keywords]])]),e("div",R,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," Robots.txt ",2),n(e("textarea",{"onUpdate:modelValue":o[4]||(o[4]=r=>l.value.robotsText=r),rows:"3",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.robotsText]])])]),e("div",$,[e("div",q,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 通知标题 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[5]||(o[5]=r=>l.value.notify_title=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.notify_title]])]),e("div",H,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 通知内容 ",2),n(e("textarea",{"onUpdate:modelValue":o[6]||(o[6]=r=>l.value.notify_content=r),rows:"3",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.notify_content]])])]),e("div",J,[e("h3",{class:a(["text-lg font-medium mb-4",[s(t)?"text-white":"text-gray-800"]])}," 存储设置 ",2),e("div",O,[e("div",P,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 存储方式 ",2),n(e("select",{"onUpdate:modelValue":o[7]||(o[7]=r=>l.value.file_storage=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[s(t)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},o[23]||(o[23]=[e("option",{value:"local"},"本地存储",-1),e("option",{value:"s3"},"S3 存储",-1)]),2),[[v,l.value.file_storage]])]),l.value.file_storage==="s3"?(b(),m("div",Q,[e("div",W,[e("div",X,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," S3 AccessKeyId ",2),n(e("input",{type:"text","onUpdate:modelValue":o[8]||(o[8]=r=>l.value.s3_access_key_id=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.s3_access_key_id]])]),e("div",Y,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," S3 SecretAccessKey ",2),n(e("input",{type:"password","onUpdate:modelValue":o[9]||(o[9]=r=>l.value.s3_secret_access_key=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.s3_secret_access_key]])]),e("div",Z,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," S3 BucketName ",2),n(e("input",{type:"text","onUpdate:modelValue":o[10]||(o[10]=r=>l.value.s3_bucket_name=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.s3_bucket_name]])]),e("div",ee,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," S3 EndpointUrl ",2),n(e("input",{type:"text","onUpdate:modelValue":o[11]||(o[11]=r=>l.value.s3_endpoint_url=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.s3_endpoint_url]])])])])):M("",!0)])]),e("div",oe,[e("h3",{class:a(["text-lg font-medium mb-4",[s(t)?"text-white":"text-gray-800"]])}," 上传限制 ",2),e("div",re,[e("div",te,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 每分钟上传限制 ",2),e("div",ae,[n(e("input",{type:"number","onUpdate:modelValue":o[12]||(o[12]=r=>l.value.uploadMinute=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.uploadMinute]]),e("span",{class:a([s(t)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",se,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 上传数量限制 ",2),e("div",le,[n(e("input",{type:"number","onUpdate:modelValue":o[13]||(o[13]=r=>l.value.uploadCount=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.uploadCount]]),e("span",{class:a([s(t)?"text-gray-300":"text-gray-700"])},"个文件",2)])]),e("div",ne,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 文件大小限制 ",2),e("div",ie,[n(e("input",{type:"number","onUpdate:modelValue":o[14]||(o[14]=r=>c.value=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,c.value]]),n(e("select",{"onUpdate:modelValue":o[15]||(o[15]=r=>y.value=r),class:a(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[24]||(o[24]=[e("option",{value:"KB"},"KB",-1),e("option",{value:"MB"},"MB",-1),e("option",{value:"GB"},"GB",-1)]),2),[[v,y.value]])])]),e("div",de,[e("label",{class:a(["block text-sm font-medium mb-2",[s(t)?"text-gray-300":"text-gray-700"]])}," 过期方式 ",2),e("div",ue,[(b(),m(C,null,D(["day","hour","minute","forever","count"],r=>e("label",{key:r,class:"relative inline-flex items-center group cursor-pointer"},[n(e("input",{type:"checkbox",value:r,"onUpdate:modelValue":o[16]||(o[16]=S=>l.value.expireStyle=S),class:"peer sr-only"},null,8,ge),[[A,l.value.expireStyle]]),e("div",{class:a(["px-4 py-2 rounded-full border-2 transition-all duration-200 select-none",[l.value.expireStyle.includes(r)?(s(t),"bg-indigo-600 border-indigo-600 text-white"):s(t)?"bg-gray-700 border-gray-600 text-gray-300 hover:border-indigo-500":"bg-white border-gray-300 text-gray-700 hover:border-indigo-500"]])},f({day:"按天",hour:"按小时",minute:"按分钟",forever:"永久",count:"按次数"}[r]),3)])),64))])]),e("div",ce,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 最长保存时间 ",2),e("div",ye,[n(e("input",{type:"number","onUpdate:modelValue":o[17]||(o[17]=r=>u.value=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,u.value]]),n(e("select",{"onUpdate:modelValue":o[18]||(o[18]=r=>g.value=r),class:a(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[25]||(o[25]=[e("option",{value:"秒"},"秒",-1),e("option",{value:"分"},"分",-1),e("option",{value:"时"},"时",-1),e("option",{value:"天"},"天",-1)]),2),[[v,g.value]])])]),e("div",pe,[e("label",{class:a(["block text-sm font-medium mb-2",[s(t)?"text-gray-300":"text-gray-700"]])}," 游客上传 ",2),e("div",be,[e("button",{type:"button",onClick:o[19]||(o[19]=r=>l.value.openUpload=l.value.openUpload===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[l.value.openUpload===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":l.value.openUpload===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[l.value.openUpload===1?"translate-x-5":"translate-x-0",s(t)&&l.value.openUpload!==1?"bg-gray-100":"bg-white"]])},null,2)],10,me),e("span",{class:a(["ml-3 text-sm",[s(t)?"text-gray-300":"text-gray-700"]])},f(l.value.openUpload===1?"已开启":"已关闭"),3)])])])]),e("div",ve,[e("h3",{class:a(["text-lg font-medium mb-4",[s(t)?"text-white":"text-gray-800"]])}," 错误限制 ",2),e("div",xe,[e("div",fe,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 每分钟错误限制 ",2),e("div",he,[n(e("input",{type:"number","onUpdate:modelValue":o[20]||(o[20]=r=>l.value.errorMinute=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.errorMinute]]),e("span",{class:a([s(t)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",_e,[e("label",{class:a(["block text-sm font-medium",[s(t)?"text-gray-300":"text-gray-700"]])}," 错误次数限制 ",2),e("div",we,[n(e("input",{type:"number","onUpdate:modelValue":o[21]||(o[21]=r=>l.value.errorCount=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(t)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[i,l.value.errorCount]]),e("span",{class:a([s(t)?"text-gray-300":"text-gray-700"])},"次",2)])])])]),e("div",{class:"flex justify-end mt-8"},[e("button",{onClick:U,class:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors duration-200"}," 保存设置 ")])])],2)]))}}),Ve=F(ke,[["__scopeId","data-v-2f785aa5"]]);export{Ve as default}; diff --git a/fcb-fronted/dist/assets/_commonjsHelpers-DsI9l0Rc.js b/fcb-fronted/dist/assets/_commonjsHelpers-BqRSbYMX.js similarity index 99% rename from fcb-fronted/dist/assets/_commonjsHelpers-DsI9l0Rc.js rename to fcb-fronted/dist/assets/_commonjsHelpers-BqRSbYMX.js index cc82e8ac..cf9e6e64 100644 --- a/fcb-fronted/dist/assets/_commonjsHelpers-DsI9l0Rc.js +++ b/fcb-fronted/dist/assets/_commonjsHelpers-BqRSbYMX.js @@ -1,4 +1,4 @@ -import{c as D,B as _,E as I,r as k,G as U,o as W,H as $,I as Q}from"./index-b4wH2aDB.js";/** +import{c as D,B as _,E as I,r as k,G as U,o as W,H as $,I as Q}from"./index-DlNqZq-D.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/fcb-fronted/dist/assets/box-fk1vZEzO.js b/fcb-fronted/dist/assets/box-DasTGycM.js similarity index 90% rename from fcb-fronted/dist/assets/box-fk1vZEzO.js rename to fcb-fronted/dist/assets/box-DasTGycM.js index 5e19d705..beeec762 100644 --- a/fcb-fronted/dist/assets/box-fk1vZEzO.js +++ b/fcb-fronted/dist/assets/box-DasTGycM.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-b4wH2aDB.js";/** +import{c as a}from"./index-DlNqZq-D.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/fcb-fronted/dist/assets/file-CezeW3my.js b/fcb-fronted/dist/assets/file-CuCz68gZ.js similarity index 88% rename from fcb-fronted/dist/assets/file-CezeW3my.js rename to fcb-fronted/dist/assets/file-CuCz68gZ.js index 089c352f..f7de1741 100644 --- a/fcb-fronted/dist/assets/file-CezeW3my.js +++ b/fcb-fronted/dist/assets/file-CuCz68gZ.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-b4wH2aDB.js";/** +import{c as a}from"./index-DlNqZq-D.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/fcb-fronted/dist/assets/index-b4wH2aDB.js b/fcb-fronted/dist/assets/index-DlNqZq-D.js similarity index 98% rename from fcb-fronted/dist/assets/index-b4wH2aDB.js rename to fcb-fronted/dist/assets/index-DlNqZq-D.js index f8eb423a..41e03c95 100644 --- a/fcb-fronted/dist/assets/index-b4wH2aDB.js +++ b/fcb-fronted/dist/assets/index-DlNqZq-D.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RetrievewFileView-CVzgwexs.js","assets/_commonjsHelpers-DsI9l0Rc.js","assets/box-fk1vZEzO.js","assets/file-CezeW3my.js","assets/trash-2qdaMQPm.js","assets/RetrievewFileView-C_lpDe7q.css","assets/SendFileView-DjsGNqez.js","assets/SendFileView-D1IOhjmE.css","assets/AdminLayout-BBfRqdU7.js","assets/AdminLayout-CEJ6vCgl.css","assets/DashboardView-DMN1r5C4.js","assets/FileManageView-B6HJEg5n.js","assets/SystemSettingsView-CvU75WjY.js","assets/SystemSettingsView-2lDuNKAP.css","assets/LoginView-CNbKA-If.js","assets/LoginView-BU7fFnDZ.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RetrievewFileView-DMP8rhpF.js","assets/_commonjsHelpers-BqRSbYMX.js","assets/box-DasTGycM.js","assets/file-CuCz68gZ.js","assets/trash-CytZg4YE.js","assets/RetrievewFileView-C_lpDe7q.css","assets/SendFileView-BXcnmHJa.js","assets/SendFileView-D1IOhjmE.css","assets/AdminLayout-DFpljGo6.js","assets/AdminLayout-N15TxCCO.css","assets/DashboardView-V_ky_QUg.js","assets/FileManageView-DOkmzxxl.js","assets/LoginView-yrMAxh32.js","assets/LoginView-BU7fFnDZ.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/** * @vue/shared v3.5.8 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -83,4 +83,4 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RetrievewFileVi `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[Ri]=this[Ri]={accessors:{}}).accessors,r=this.prototype;function o(i){const l=bn(i);s[l]||(ap(r,i),s[l]=!0)}return b.isArray(t)?t.forEach(o):o(t),this}}Ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(Ie.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});b.freezeMethods(Ie);function ir(e,t){const n=this||Gn,s=t||n,r=Ie.from(s.headers);let o=s.data;return b.forEach(e,function(l){o=l.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function Dc(e){return!!(e&&e.__CANCEL__)}function hn(e,t,n){G.call(this,e??"canceled",G.ERR_CANCELED,t,n),this.name="CanceledError"}b.inherits(hn,G,{__CANCEL__:!0});function jc(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new G("Request failed with status code "+n.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function up(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fp(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),a=s[o];i||(i=u),n[r]=c,s[r]=u;let f=o,p=0;for(;f!==r;)p+=n[f++],f=f%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),u-i{n=a,r=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const a=Date.now(),f=a-n;f>=s?i(u,a):(r=u,o||(o=setTimeout(()=>{o=null,i(r)},s-f)))},()=>r&&i(r)]}const ys=(e,t,n=3)=>{let s=0;const r=fp(50,250);return dp(o=>{const i=o.loaded,l=o.lengthComputable?o.total:void 0,c=i-s,u=r(c),a=i<=l;s=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&a?(l-i)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},xi=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Ci=e=>(...t)=>b.asap(()=>e(...t)),hp=Pe.hasStandardBrowserEnv?function(){const t=Pe.navigator&&/(msie|trident)/i.test(Pe.navigator.userAgent),n=document.createElement("a");let s;function r(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(i){const l=b.isString(i)?r(i):i;return l.protocol===s.protocol&&l.host===s.host}}():function(){return function(){return!0}}(),pp=Pe.hasStandardBrowserEnv?{write(e,t,n,s,r,o){const i=[e+"="+encodeURIComponent(t)];b.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),b.isString(s)&&i.push("path="+s),b.isString(r)&&i.push("domain="+r),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function mp(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Bc(e,t){return e&&!mp(t)?gp(e,t):t}const Ai=e=>e instanceof Ie?{...e}:e;function qt(e,t){t=t||{};const n={};function s(u,a,f){return b.isPlainObject(u)&&b.isPlainObject(a)?b.merge.call({caseless:f},u,a):b.isPlainObject(a)?b.merge({},a):b.isArray(a)?a.slice():a}function r(u,a,f){if(b.isUndefined(a)){if(!b.isUndefined(u))return s(void 0,u,f)}else return s(u,a,f)}function o(u,a){if(!b.isUndefined(a))return s(void 0,a)}function i(u,a){if(b.isUndefined(a)){if(!b.isUndefined(u))return s(void 0,u)}else return s(void 0,a)}function l(u,a,f){if(f in t)return s(u,a);if(f in e)return s(void 0,u)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(u,a)=>r(Ai(u),Ai(a),!0)};return b.forEach(Object.keys(Object.assign({},e,t)),function(a){const f=c[a]||r,p=f(e[a],t[a],a);b.isUndefined(p)&&f!==l||(n[a]=p)}),n}const Hc=e=>{const t=qt({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:i,auth:l}=t;t.headers=i=Ie.from(i),t.url=Mc(Bc(t.baseURL,t.url),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(b.isFormData(n)){if(Pe.hasStandardBrowserEnv||Pe.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[u,...a]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...a].join("; "))}}if(Pe.hasStandardBrowserEnv&&(s&&b.isFunction(s)&&(s=s(t)),s||s!==!1&&hp(t.url))){const u=r&&o&&pp.read(o);u&&i.set(r,u)}return t},yp=typeof XMLHttpRequest<"u",bp=yp&&function(e){return new Promise(function(n,s){const r=Hc(e);let o=r.data;const i=Ie.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=r,a,f,p,m,y;function w(){m&&m(),y&&y(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function T(){if(!E)return;const P=Ie.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),j={data:!l||l==="text"||l==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:P,config:e,request:E};jc(function(z){n(z),w()},function(z){s(z),w()},j),E=null}"onloadend"in E?E.onloadend=T:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(T)},E.onabort=function(){E&&(s(new G("Request aborted",G.ECONNABORTED,e,E)),E=null)},E.onerror=function(){s(new G("Network Error",G.ERR_NETWORK,e,E)),E=null},E.ontimeout=function(){let I=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const j=r.transitional||kc;r.timeoutErrorMessage&&(I=r.timeoutErrorMessage),s(new G(I,j.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,E)),E=null},o===void 0&&i.setContentType(null),"setRequestHeader"in E&&b.forEach(i.toJSON(),function(I,j){E.setRequestHeader(j,I)}),b.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),l&&l!=="json"&&(E.responseType=r.responseType),u&&([p,y]=ys(u,!0),E.addEventListener("progress",p)),c&&E.upload&&([f,m]=ys(c),E.upload.addEventListener("progress",f),E.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(a=P=>{E&&(s(!P||P.type?new hn(null,e,E):P),E.abort(),E=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const C=up(r.url);if(C&&Pe.protocols.indexOf(C)===-1){s(new G("Unsupported protocol "+C+":",G.ERR_BAD_REQUEST,e));return}E.send(o||null)})},_p=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const o=function(u){if(!r){r=!0,l();const a=u instanceof Error?u:this.reason;s.abort(a instanceof G?a:new hn(a instanceof Error?a.message:a))}};let i=t&&setTimeout(()=>{i=null,o(new G(`timeout ${t} of ms exceeded`,G.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=s;return c.unsubscribe=()=>b.asap(l),c}},vp=function*(e,t){let n=e.byteLength;if(n{const r=wp(e,t);let o=0,i,l=c=>{i||(i=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:u,value:a}=await r.next();if(u){l(),c.close();return}let f=a.byteLength;if(n){let p=o+=f;n(p)}c.enqueue(new Uint8Array(a))}catch(u){throw l(u),u}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},$s=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$c=$s&&typeof ReadableStream=="function",Sp=$s&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Uc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Rp=$c&&Uc(()=>{let e=!1;const t=new Request(Pe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Oi=64*1024,Ar=$c&&Uc(()=>b.isReadableStream(new Response("").body)),bs={stream:Ar&&(e=>e.body)};$s&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!bs[t]&&(bs[t]=b.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new G(`Response type '${t}' is not supported`,G.ERR_NOT_SUPPORT,s)})})})(new Response);const xp=async e=>{if(e==null)return 0;if(b.isBlob(e))return e.size;if(b.isSpecCompliantForm(e))return(await new Request(Pe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(b.isArrayBufferView(e)||b.isArrayBuffer(e))return e.byteLength;if(b.isURLSearchParams(e)&&(e=e+""),b.isString(e))return(await Sp(e)).byteLength},Cp=async(e,t)=>{const n=b.toFiniteNumber(e.getContentLength());return n??xp(t)},Ap=$s&&(async e=>{let{url:t,method:n,data:s,signal:r,cancelToken:o,timeout:i,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:a,withCredentials:f="same-origin",fetchOptions:p}=Hc(e);u=u?(u+"").toLowerCase():"text";let m=_p([r,o&&o.toAbortSignal()],i),y;const w=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let E;try{if(c&&Rp&&n!=="get"&&n!=="head"&&(E=await Cp(a,s))!==0){let j=new Request(t,{method:"POST",body:s,duplex:"half"}),X;if(b.isFormData(s)&&(X=j.headers.get("content-type"))&&a.setContentType(X),j.body){const[z,V]=xi(E,ys(Ci(c)));s=Ti(j.body,Oi,z,V)}}b.isString(f)||(f=f?"include":"omit");const T="credentials"in Request.prototype;y=new Request(t,{...p,signal:m,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:s,duplex:"half",credentials:T?f:void 0});let C=await fetch(y);const P=Ar&&(u==="stream"||u==="response");if(Ar&&(l||P&&w)){const j={};["status","statusText","headers"].forEach(N=>{j[N]=C[N]});const X=b.toFiniteNumber(C.headers.get("content-length")),[z,V]=l&&xi(X,ys(Ci(l),!0))||[];C=new Response(Ti(C.body,Oi,z,()=>{V&&V(),w&&w()}),j)}u=u||"text";let I=await bs[b.findKey(bs,u)||"text"](C,e);return!P&&w&&w(),await new Promise((j,X)=>{jc(j,X,{data:I,headers:Ie.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:y})})}catch(T){throw w&&w(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new G("Network Error",G.ERR_NETWORK,e,y),{cause:T.cause||T}):G.from(T,T&&T.code,e,y)}}),Tr={http:Uh,xhr:bp,fetch:Ap};b.forEach(Tr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Pi=e=>`- ${e}`,Tp=e=>b.isFunction(e)||e===null||e===!1,Vc={getAdapter:e=>{e=b.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let o=0;o`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : `+o.map(Pi).join(` `):" "+Pi(o[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return s},adapters:Tr};function lr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hn(null,e)}function Ii(e){return lr(e),e.headers=Ie.from(e.headers),e.data=ir.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vc.getAdapter(e.adapter||Gn.adapter)(e).then(function(s){return lr(e),s.data=ir.call(e,e.transformResponse,s),s.headers=Ie.from(s.headers),s},function(s){return Dc(s)||(lr(e),s&&s.response&&(s.response.data=ir.call(e,e.transformResponse,s.response),s.response.headers=Ie.from(s.response.headers))),Promise.reject(s)})}const qc="1.7.7",oo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{oo[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Li={};oo.transitional=function(t,n,s){function r(o,i){return"[Axios v"+qc+"] Transitional option '"+o+"'"+i+(s?". "+s:"")}return(o,i,l)=>{if(t===!1)throw new G(r(i," has been removed"+(n?" in "+n:"")),G.ERR_DEPRECATED);return n&&!Li[i]&&(Li[i]=!0,console.warn(r(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};function Op(e,t,n){if(typeof e!="object")throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],i=t[o];if(i){const l=e[o],c=l===void 0||i(l,o,e);if(c!==!0)throw new G("option "+o+" must be "+c,G.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new G("Unknown option "+o,G.ERR_BAD_OPTION)}}const Or={assertOptions:Op,validators:oo},_t=Or.validators;class $t{constructor(t){this.defaults=t,this.interceptors={request:new Si,response:new Si}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=` -`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Or.assertOptions(s,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),r!=null&&(b.isFunction(r)?n.paramsSerializer={serialize:r}:Or.assertOptions(r,{encode:_t.function,serialize:_t.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ie.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(c=c&&w.synchronous,l.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let a,f=0,p;if(!c){const y=[Ii.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,a=Promise.resolve(n);f{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new hn(o,i,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new io(function(r){t=r}),cancel:t}}}function Pp(e){return function(n){return e.apply(null,n)}}function Ip(e){return b.isObject(e)&&e.isAxiosError===!0}const Pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pr).forEach(([e,t])=>{Pr[t]=e});function Kc(e){const t=new $t(e),n=Ec($t.prototype.request,t);return b.extend(n,$t.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Kc(qt(e,r))},n}const ye=Kc(Gn);ye.Axios=$t;ye.CanceledError=hn;ye.CancelToken=io;ye.isCancel=Dc;ye.VERSION=qc;ye.toFormData=Hs;ye.AxiosError=G;ye.Cancel=ye.CanceledError;ye.all=function(t){return Promise.all(t)};ye.spread=Pp;ye.isAxiosError=Ip;ye.mergeConfig=qt;ye.AxiosHeaders=Ie;ye.formToJSON=e=>Fc(b.isHTMLForm(e)?new FormData(e):e);ye.getAdapter=Vc.getAdapter;ye.HttpStatusCode=Pr;ye.default=ye;const Lp="",Wc=Lp,lo=ye.create({baseURL:Wc,timeout:1e4,headers:{"Content-Type":"application/json"}});lo.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e.url&&!e.url.startsWith("http")&&(e.url=`${Wc}/${e.url.replace(/^\//,"")}`),e},e=>Promise.reject(e));lo.interceptors.response.use(e=>e.data,e=>{if(e.response)switch(e.response.status){case 401:console.error("未授权,请重新登录"),localStorage.clear(),window.location.href="/#/login";break;case 403:console.error("禁止访问");break;case 404:console.error("请求的资源不存在");break;default:console.error("发生错误:",e.response.data)}else e.request?console.error("未收到响应:",e.request):console.error("请求配置错误:",e.message);return Promise.reject(e)});const zc=Uf("alert",{state:()=>({alerts:[]}),actions:{showAlert(e,t="info",n=5e3){const s=Date.now(),r=Date.now();this.alerts.push({id:s,message:e,type:t,progress:100,duration:n,startTime:r}),setTimeout(()=>this.removeAlert(s),n)},removeAlert(e){const t=this.alerts.findIndex(n=>n.id===e);t>-1&&this.alerts.splice(t,1)},updateAlertProgress(e){const t=this.alerts.find(n=>n.id===e);if(t){const s=100-(Date.now()-t.startTime)/t.duration*100;t.progress=Math.max(0,s),t.progress<=0&&this.removeAlert(e)}}}}),Np={class:"p-4"},Mp={class:"flex items-start"},kp={class:"flex-shrink-0"},Fp={class:"ml-3 flex-1 pt-0.5"},Dp=["innerHTML"],jp={class:"ml-4 flex-shrink-0 flex"},Bp=["onClick"],Hp={class:"h-1 bg-white bg-opacity-25"},$p=Kn({__name:"AlertComponent",setup(e){const t=zc(),{alerts:n}=Vf(t),{removeAlert:s,updateAlertProgress:r}=t,o={success:"from-green-500 to-green-600",error:"from-red-500 to-red-600",warning:"from-yellow-500 to-yellow-600",info:"from-blue-500 to-blue-600"},i={success:Xd,error:eh,warning:Jd,info:Qd};let l;return Os(()=>{l=setInterval(()=>{n.value.forEach(c=>{r(c.id)})},100)}),Jr(()=>{clearInterval(l)}),(c,u)=>(We(),sn(Ef,{name:"alert-fade",tag:"div",class:"fixed top-4 right-4 z-50 w-full sm:max-w-sm md:max-w-md space-y-4 px-4 sm:px-0"},{default:hs(()=>[(We(!0),Fn(Ue,null,su(Te(n),a=>(We(),Fn("div",{key:a.id,class:fn(["w-full rounded-lg shadow-xl overflow-hidden","bg-gradient-to-r",o[a.type]])},[De("div",Np,[De("div",Mp,[De("div",kp,[(We(),sn(Al(i[a.type]),{class:"h-6 w-6 text-white"}))]),De("div",Fp,[De("p",{class:"text-sm font-medium text-white",innerHTML:a.message},null,8,Dp)]),De("div",jp,[De("button",{onClick:f=>Te(s)(a.id),class:"inline-flex text-white hover:text-gray-200 focus:outline-none transition-colors duration-200"},[u[0]||(u[0]=De("span",{class:"sr-only"},"关闭",-1)),me(Te(th),{class:"h-5 w-5"})],8,Bp)])])]),De("div",Hp,[De("div",{class:"h-full bg-white transition-all duration-100 ease-out",style:Es({width:`${a.progress}%`})},null,4)])],2))),128))]),_:1}))}}),Up=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Vp=Up($p,[["__scopeId","data-v-03615137"]]),qp={key:0,class:"loading-overlay"},Kp=Kn({__name:"App",setup(e){const t=nn(!1),n=nn(!1),s=Wd(),r=zc(),o=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,i=()=>{const c=localStorage.getItem("colorMode");return c?c==="dark":null},l=c=>{t.value=c,localStorage.setItem("colorMode",c?"dark":"light")};return Os(()=>{const c=i();l(c!==null?c:o()),lo.post("/",{}).then(u=>{u.code===200&&(localStorage.setItem("config",JSON.stringify(u.detail)),u.detail.notify_title&&u.detail.notify_content&&localStorage.getItem("notify")!==u.detail.notify_title+u.detail.notify_content&&(localStorage.setItem("notify",u.detail.notify_title+u.detail.notify_content),r.showAlert(u.detail.notify_title+": "+u.detail.notify_content,"success")))})}),xu(()=>{document.documentElement.classList.toggle("dark",t.value)}),s.beforeEach((c,u,a)=>{n.value=!0,a()}),s.afterEach(()=>{setTimeout(()=>{n.value=!1},200)}),Ht("isDarkMode",t),Ht("setColorMode",l),Ht("isLoading",n),(c,u)=>(We(),Fn("div",{class:fn(["app-container",t.value?"dark":"light"])},[me(nh,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=a=>t.value=a)},null,8,["modelValue"]),n.value?(We(),Fn("div",qp,u[1]||(u[1]=[De("div",{class:"loading-spinner"},null,-1)]))):ju("",!0),me(Te(wc),null,{default:hs(({Component:a})=>[me(ef,{name:"fade",mode:"out-in"},{default:hs(()=>[(We(),sn(Al(a),{key:c.$route.fullPath}))]),_:2},1024)]),_:1}),me(Vp)],2))}}),Wp="modulepreload",zp=function(e){return"/"+e},Ni={},Et=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=zp(c),c in Ni)return;Ni[c]=!0;const u=c.endsWith(".css"),a=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Wp,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Gp=qd({history:wd("/"),routes:[{path:"/",name:"Retrieve",component:()=>Et(()=>import("./RetrievewFileView-CVzgwexs.js"),__vite__mapDeps([0,1,2,3,4,5]))},{path:"/send",name:"Send",component:()=>Et(()=>import("./SendFileView-DjsGNqez.js"),__vite__mapDeps([6,1,3,4,7]))},{path:"/admin",name:"Manage",component:()=>Et(()=>import("./AdminLayout-BBfRqdU7.js"),__vite__mapDeps([8,2,9])),redirect:"/admin/dashboard",children:[{path:"/admin/dashboard",name:"Dashboard",component:()=>Et(()=>import("./DashboardView-DMN1r5C4.js"),__vite__mapDeps([10,3,4]))},{path:"/admin/files",name:"FileManage",component:()=>Et(()=>import("./FileManageView-B6HJEg5n.js"),__vite__mapDeps([11,3]))},{path:"/admin/settings",name:"Settings",component:()=>Et(()=>import("./SystemSettingsView-CvU75WjY.js"),__vite__mapDeps([12,13]))}]},{path:"/login",name:"Login",component:()=>Et(()=>import("./LoginView-CNbKA-If.js"),__vite__mapDeps([14,2,15]))}]});Et(()=>import("./SendFileView-DjsGNqez.js"),__vite__mapDeps([6,1,3,4,7]));const co=Lf(Kp);co.use(Ff());co.use(Gp);co.mount("#app");export{lo as A,Kn as B,em as C,Qp as D,rn as E,Ue as F,Sl as G,Uf as H,Vn as I,Jr as J,sn as K,Al as L,Zp as M,ef as T,th as X,Up as _,Ve as a,Fn as b,Wt as c,De as d,Te as e,me as f,tm as g,Jp as h,ju as i,hs as j,Du as k,nm as l,Xp as m,fn as n,Os as o,We as p,Ef as q,nn as r,Vf as s,la as t,zc as u,Yp as v,Rn as w,su as x,Wd as y,Oe as z}; +`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Or.assertOptions(s,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),r!=null&&(b.isFunction(r)?n.paramsSerializer={serialize:r}:Or.assertOptions(r,{encode:_t.function,serialize:_t.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ie.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(c=c&&w.synchronous,l.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let a,f=0,p;if(!c){const y=[Ii.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,a=Promise.resolve(n);f{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new hn(o,i,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new io(function(r){t=r}),cancel:t}}}function Pp(e){return function(n){return e.apply(null,n)}}function Ip(e){return b.isObject(e)&&e.isAxiosError===!0}const Pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pr).forEach(([e,t])=>{Pr[t]=e});function Kc(e){const t=new $t(e),n=Ec($t.prototype.request,t);return b.extend(n,$t.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Kc(qt(e,r))},n}const ye=Kc(Gn);ye.Axios=$t;ye.CanceledError=hn;ye.CancelToken=io;ye.isCancel=Dc;ye.VERSION=qc;ye.toFormData=Hs;ye.AxiosError=G;ye.Cancel=ye.CanceledError;ye.all=function(t){return Promise.all(t)};ye.spread=Pp;ye.isAxiosError=Ip;ye.mergeConfig=qt;ye.AxiosHeaders=Ie;ye.formToJSON=e=>Fc(b.isHTMLForm(e)?new FormData(e):e);ye.getAdapter=Vc.getAdapter;ye.HttpStatusCode=Pr;ye.default=ye;const Lp="",Wc=Lp,lo=ye.create({baseURL:Wc,timeout:1e4,headers:{"Content-Type":"application/json"}});lo.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e.url&&!e.url.startsWith("http")&&(e.url=`${Wc}/${e.url.replace(/^\//,"")}`),e},e=>Promise.reject(e));lo.interceptors.response.use(e=>e.data,e=>{if(e.response)switch(e.response.status){case 401:console.error("未授权,请重新登录"),localStorage.clear(),window.location.href="/#/login";break;case 403:console.error("禁止访问");break;case 404:console.error("请求的资源不存在");break;default:console.error("发生错误:",e.response.data)}else e.request?console.error("未收到响应:",e.request):console.error("请求配置错误:",e.message);return Promise.reject(e)});const zc=Uf("alert",{state:()=>({alerts:[]}),actions:{showAlert(e,t="info",n=5e3){const s=Date.now(),r=Date.now();this.alerts.push({id:s,message:e,type:t,progress:100,duration:n,startTime:r}),setTimeout(()=>this.removeAlert(s),n)},removeAlert(e){const t=this.alerts.findIndex(n=>n.id===e);t>-1&&this.alerts.splice(t,1)},updateAlertProgress(e){const t=this.alerts.find(n=>n.id===e);if(t){const s=100-(Date.now()-t.startTime)/t.duration*100;t.progress=Math.max(0,s),t.progress<=0&&this.removeAlert(e)}}}}),Np={class:"p-4"},Mp={class:"flex items-start"},kp={class:"flex-shrink-0"},Fp={class:"ml-3 flex-1 pt-0.5"},Dp=["innerHTML"],jp={class:"ml-4 flex-shrink-0 flex"},Bp=["onClick"],Hp={class:"h-1 bg-white bg-opacity-25"},$p=Kn({__name:"AlertComponent",setup(e){const t=zc(),{alerts:n}=Vf(t),{removeAlert:s,updateAlertProgress:r}=t,o={success:"from-green-500 to-green-600",error:"from-red-500 to-red-600",warning:"from-yellow-500 to-yellow-600",info:"from-blue-500 to-blue-600"},i={success:Xd,error:eh,warning:Jd,info:Qd};let l;return Os(()=>{l=setInterval(()=>{n.value.forEach(c=>{r(c.id)})},100)}),Jr(()=>{clearInterval(l)}),(c,u)=>(We(),sn(Ef,{name:"alert-fade",tag:"div",class:"fixed top-4 right-4 z-50 w-full sm:max-w-sm md:max-w-md space-y-4 px-4 sm:px-0"},{default:hs(()=>[(We(!0),Fn(Ue,null,su(Te(n),a=>(We(),Fn("div",{key:a.id,class:fn(["w-full rounded-lg shadow-xl overflow-hidden","bg-gradient-to-r",o[a.type]])},[De("div",Np,[De("div",Mp,[De("div",kp,[(We(),sn(Al(i[a.type]),{class:"h-6 w-6 text-white"}))]),De("div",Fp,[De("p",{class:"text-sm font-medium text-white",innerHTML:a.message},null,8,Dp)]),De("div",jp,[De("button",{onClick:f=>Te(s)(a.id),class:"inline-flex text-white hover:text-gray-200 focus:outline-none transition-colors duration-200"},[u[0]||(u[0]=De("span",{class:"sr-only"},"关闭",-1)),me(Te(th),{class:"h-5 w-5"})],8,Bp)])])]),De("div",Hp,[De("div",{class:"h-full bg-white transition-all duration-100 ease-out",style:Es({width:`${a.progress}%`})},null,4)])],2))),128))]),_:1}))}}),Up=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Vp=Up($p,[["__scopeId","data-v-03615137"]]),qp={key:0,class:"loading-overlay"},Kp=Kn({__name:"App",setup(e){const t=nn(!1),n=nn(!1),s=Wd(),r=zc(),o=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,i=()=>{const c=localStorage.getItem("colorMode");return c?c==="dark":null},l=c=>{t.value=c,localStorage.setItem("colorMode",c?"dark":"light")};return Os(()=>{const c=i();l(c!==null?c:o()),lo.post("/",{}).then(u=>{u.code===200&&(localStorage.setItem("config",JSON.stringify(u.detail)),u.detail.notify_title&&u.detail.notify_content&&localStorage.getItem("notify")!==u.detail.notify_title+u.detail.notify_content&&(localStorage.setItem("notify",u.detail.notify_title+u.detail.notify_content),r.showAlert(u.detail.notify_title+": "+u.detail.notify_content,"success")))})}),xu(()=>{document.documentElement.classList.toggle("dark",t.value)}),s.beforeEach((c,u,a)=>{n.value=!0,a()}),s.afterEach(()=>{setTimeout(()=>{n.value=!1},200)}),Ht("isDarkMode",t),Ht("setColorMode",l),Ht("isLoading",n),(c,u)=>(We(),Fn("div",{class:fn(["app-container",t.value?"dark":"light"])},[me(nh,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=a=>t.value=a)},null,8,["modelValue"]),n.value?(We(),Fn("div",qp,u[1]||(u[1]=[De("div",{class:"loading-spinner"},null,-1)]))):ju("",!0),me(Te(wc),null,{default:hs(({Component:a})=>[me(ef,{name:"fade",mode:"out-in"},{default:hs(()=>[(We(),sn(Al(a),{key:c.$route.fullPath}))]),_:2},1024)]),_:1}),me(Vp)],2))}}),Wp="modulepreload",zp=function(e){return"/"+e},Ni={},Et=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=zp(c),c in Ni)return;Ni[c]=!0;const u=c.endsWith(".css"),a=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Wp,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Gp=qd({history:wd("/"),routes:[{path:"/",name:"Retrieve",component:()=>Et(()=>import("./RetrievewFileView-DMP8rhpF.js"),__vite__mapDeps([0,1,2,3,4,5]))},{path:"/send",name:"Send",component:()=>Et(()=>import("./SendFileView-BXcnmHJa.js"),__vite__mapDeps([6,1,3,4,7]))},{path:"/admin",name:"Manage",component:()=>Et(()=>import("./AdminLayout-DFpljGo6.js"),__vite__mapDeps([8,2,9])),redirect:"/admin/dashboard",children:[{path:"/admin/dashboard",name:"Dashboard",component:()=>Et(()=>import("./DashboardView-V_ky_QUg.js"),__vite__mapDeps([10,3,4]))},{path:"/admin/files",name:"FileManage",component:()=>Et(()=>import("./FileManageView-DOkmzxxl.js"),__vite__mapDeps([11,3]))},{path:"/admin/settings",name:"Settings",component:()=>Et(()=>import("./SystemSettingsView-BrgX3I32.js"),[])}]},{path:"/login",name:"Login",component:()=>Et(()=>import("./LoginView-yrMAxh32.js"),__vite__mapDeps([12,2,13]))}]});Et(()=>import("./SendFileView-BXcnmHJa.js"),__vite__mapDeps([6,1,3,4,7]));const co=Lf(Kp);co.use(Ff());co.use(Gp);co.mount("#app");export{lo as A,Kn as B,em as C,Qp as D,rn as E,Ue as F,Sl as G,Uf as H,Vn as I,Jr as J,sn as K,Al as L,Zp as M,ef as T,th as X,Up as _,Ve as a,Fn as b,Wt as c,De as d,Te as e,me as f,tm as g,Jp as h,ju as i,hs as j,Du as k,nm as l,Xp as m,fn as n,Os as o,We as p,Ef as q,nn as r,Vf as s,la as t,zc as u,Yp as v,Rn as w,su as x,Wd as y,Oe as z}; diff --git a/fcb-fronted/dist/assets/trash-2qdaMQPm.js b/fcb-fronted/dist/assets/trash-CytZg4YE.js similarity index 95% rename from fcb-fronted/dist/assets/trash-2qdaMQPm.js rename to fcb-fronted/dist/assets/trash-CytZg4YE.js index 938d0e71..ccea5f5e 100644 --- a/fcb-fronted/dist/assets/trash-2qdaMQPm.js +++ b/fcb-fronted/dist/assets/trash-CytZg4YE.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-b4wH2aDB.js";/** +import{c as a}from"./index-DlNqZq-D.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/fcb-fronted/dist/index.html b/fcb-fronted/dist/index.html index 81a0a47a..039f58f0 100644 --- a/fcb-fronted/dist/index.html +++ b/fcb-fronted/dist/index.html @@ -11,7 +11,7 @@ FileCodeBox - +