From ebae808d7d6bbfdf2309b33dd5285ef4963542ff Mon Sep 17 00:00:00 2001 From: Lan Date: Sun, 2 Mar 2025 15:26:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 1 + ...ut-ZenjtDj0.js => AdminLayout-BKo7bAwn.js} | 2 +- ...-Bwdc9UeU.js => DashboardView-DCpSB9YD.js} | 2 +- ...DusG8LwU.js => FileManageView-wzrO3Tfi.js} | 2 +- ...View-BinjNy1N.js => LoginView-Cbf_aa1P.js} | 2 +- ...LCro9.js => RetrievewFileView-D7SdcE_L.js} | 2 +- themes/2024/assets/SendFileView-BIguT9JI.css | 1 + themes/2024/assets/SendFileView-B_U1EQv_.js | 21 +++++++++++++++++++ themes/2024/assets/SendFileView-CnhaeT0s.js | 21 ------------------- themes/2024/assets/SendFileView-DqlRaD1M.css | 1 - ...OR82.js => SystemSettingsView-DOa2Ilyz.js} | 2 +- .../{box-4qc9LeUs.js => box-D3pjVbpO.js} | 2 +- .../{file-CzCZpmbi.js => file-C_3WBI8u.js} | 2 +- ...eData-CIXeVjba.js => fileData-BBcRSbAS.js} | 2 +- .../{index-DODrGbMr.js => index-Cv6iTFk7.js} | 4 ++-- .../{trash-DdPsY65y.js => trash-BvQ_jbNG.js} | 2 +- themes/2024/index.html | 2 +- 17 files changed, 36 insertions(+), 35 deletions(-) rename themes/2024/assets/{AdminLayout-ZenjtDj0.js => AdminLayout-BKo7bAwn.js} (98%) rename themes/2024/assets/{DashboardView-Bwdc9UeU.js => DashboardView-DCpSB9YD.js} (98%) rename themes/2024/assets/{FileManageView-DusG8LwU.js => FileManageView-wzrO3Tfi.js} (98%) rename themes/2024/assets/{LoginView-BinjNy1N.js => LoginView-Cbf_aa1P.js} (96%) rename themes/2024/assets/{RetrievewFileView-Bd3LCro9.js => RetrievewFileView-D7SdcE_L.js} (99%) create mode 100644 themes/2024/assets/SendFileView-BIguT9JI.css create mode 100644 themes/2024/assets/SendFileView-B_U1EQv_.js delete mode 100644 themes/2024/assets/SendFileView-CnhaeT0s.js delete mode 100644 themes/2024/assets/SendFileView-DqlRaD1M.css rename themes/2024/assets/{SystemSettingsView-C4QzOR82.js => SystemSettingsView-DOa2Ilyz.js} (99%) rename themes/2024/assets/{box-4qc9LeUs.js => box-D3pjVbpO.js} (90%) rename themes/2024/assets/{file-CzCZpmbi.js => file-C_3WBI8u.js} (88%) rename themes/2024/assets/{fileData-CIXeVjba.js => fileData-BBcRSbAS.js} (99%) rename themes/2024/assets/{index-DODrGbMr.js => index-Cv6iTFk7.js} (99%) rename themes/2024/assets/{trash-DdPsY65y.js => trash-BvQ_jbNG.js} (95%) diff --git a/main.py b/main.py index 5b33502..a85da80 100644 --- a/main.py +++ b/main.py @@ -139,6 +139,7 @@ async def get_config(): "notify_title": settings.notify_title, "notify_content": settings.notify_content, "show_admin_address": settings.showAdminAddr, + "max_save_seconds": settings.max_save_seconds, } ) diff --git a/themes/2024/assets/AdminLayout-ZenjtDj0.js b/themes/2024/assets/AdminLayout-BKo7bAwn.js similarity index 98% rename from themes/2024/assets/AdminLayout-ZenjtDj0.js rename to themes/2024/assets/AdminLayout-BKo7bAwn.js index 61a198a..4d9b751 100644 --- a/themes/2024/assets/AdminLayout-ZenjtDj0.js +++ b/themes/2024/assets/AdminLayout-BKo7bAwn.js @@ -1,4 +1,4 @@ -import{c as i,d as k,r as h,o as u,I as v,a as x,b as t,n as o,h as e,i as w,g as n,X as _,F as M,q as C,x as z,z as L,J as B,s as D,K as F,t as I,e as d}from"./index-DODrGbMr.js";import{B as j}from"./box-4qc9LeUs.js";/** +import{c as i,d as k,r as h,o as u,I as v,a as x,b as t,n as o,h as e,i as w,g as n,X as _,F as M,q as C,x as z,z as L,J as B,s as D,K as F,t as I,e as d}from"./index-Cv6iTFk7.js";import{B as j}from"./box-D3pjVbpO.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/DashboardView-Bwdc9UeU.js b/themes/2024/assets/DashboardView-DCpSB9YD.js similarity index 98% rename from themes/2024/assets/DashboardView-Bwdc9UeU.js rename to themes/2024/assets/DashboardView-DCpSB9YD.js index dcc61c7..358b5d3 100644 --- a/themes/2024/assets/DashboardView-Bwdc9UeU.js +++ b/themes/2024/assets/DashboardView-DCpSB9YD.js @@ -1,4 +1,4 @@ -import{c as g,d as v,H as w,o as _,a as u,b as t,n as a,h as e,i as k,t as i,g as y,F as U,q as F,A as M,e as p,J as C,K as z}from"./index-DODrGbMr.js";import{F as m}from"./file-CzCZpmbi.js";import{H as D,T as S}from"./trash-DdPsY65y.js";/** +import{c as g,d as v,H as w,o as _,a as u,b as t,n as a,h as e,i as k,t as i,g as y,F as U,q as F,A as M,e as p,J as C,K as z}from"./index-Cv6iTFk7.js";import{F as m}from"./file-C_3WBI8u.js";import{H as D,T as S}from"./trash-BvQ_jbNG.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/FileManageView-DusG8LwU.js b/themes/2024/assets/FileManageView-wzrO3Tfi.js similarity index 98% rename from themes/2024/assets/FileManageView-DusG8LwU.js rename to themes/2024/assets/FileManageView-wzrO3Tfi.js index a2a942c..8d60c50 100644 --- a/themes/2024/assets/FileManageView-DusG8LwU.js +++ b/themes/2024/assets/FileManageView-wzrO3Tfi.js @@ -1,4 +1,4 @@ -import{c as B,d as T,u as q,r as _,f as k,a as c,b as t,n as o,h as a,i as A,m as P,g as m,v as H,s as I,F as v,q as w,t as d,A as S,e as g}from"./index-DODrGbMr.js";import{F as L}from"./file-CzCZpmbi.js";/** +import{c as B,d as T,u as q,r as _,f as k,a as c,b as t,n as o,h as a,i as A,m as P,g as m,v as H,s as I,F as v,q as w,t as d,A as S,e as g}from"./index-Cv6iTFk7.js";import{F as L}from"./file-C_3WBI8u.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/LoginView-BinjNy1N.js b/themes/2024/assets/LoginView-Cbf_aa1P.js similarity index 96% rename from themes/2024/assets/LoginView-BinjNy1N.js rename to themes/2024/assets/LoginView-Cbf_aa1P.js index 06f4bca..27569c4 100644 --- a/themes/2024/assets/LoginView-BinjNy1N.js +++ b/themes/2024/assets/LoginView-Cbf_aa1P.js @@ -1 +1 @@ -import{G as y,r as u,d as b,u as v,a as w,b as e,n as l,h as o,i as x,g as h,j as k,m as S,v as A,s as V,t as D,z as j,e as B,A as P,_}from"./index-DODrGbMr.js";import{B as z}from"./box-4qc9LeUs.js";const M=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(a){d.value=a,localStorage.setItem("token",a)}return{adminPassword:d,updateAdminPwd:n}}),I={class:"mx-auto h-16 w-16 relative"},L={class:"rounded-md shadow-sm -space-y-px"},N=["disabled"],T=b({__name:"LoginView",setup(d){const n=v(),a=u(""),i=u(!1),s=x("isDarkMode"),c=M(),p=()=>{let r=!0;return a.value?a.value.length<6&&(n.showAlert("密码长度至少为6位","error"),r=!1):(n.showAlert("无效的密码","error"),r=!1),r},m=j(),f=async()=>{if(p()){P.post("/admin/login",{password:a.value}).then(r=>{c.updateAdminPwd(r.detail.token),m.push("/admin")}).catch(r=>{n.showAlert(r.response.data.detail,"error")}),i.value=!0;try{await new Promise(r=>setTimeout(r,2e3))}catch{}finally{i.value=!1}}};return(r,t)=>(B(),w("div",{class:l(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",o(s)?"bg-gray-900":"bg-gray-50"])},[t[6]||(t[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:l(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[o(s)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",I,[t[1]||(t[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),t[2]||(t[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:l(["absolute inset-1 rounded-full flex items-center justify-center",o(s)?"bg-gray-800":"bg-white"])},[h(o(z),{class:l(["h-8 w-8",o(s)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:l(["mt-6 text-center text-3xl font-extrabold",o(s)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:k(f,["prevent"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=g=>a.value=g),class:l(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",o(s)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[A,a.value]])])]),e("div",null,[e("button",{type:"submit",class:l(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",o(s)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",i.value?"opacity-75 cursor-not-allowed":""]),disabled:i.value},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+D(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=_(T,[["__scopeId","data-v-66eb7914"]]);export{E as default}; +import{G as y,r as u,d as b,u as v,a as w,b as e,n as l,h as o,i as x,g as h,j as k,m as S,v as A,s as V,t as D,z as j,e as B,A as P,_}from"./index-Cv6iTFk7.js";import{B as z}from"./box-D3pjVbpO.js";const M=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(a){d.value=a,localStorage.setItem("token",a)}return{adminPassword:d,updateAdminPwd:n}}),I={class:"mx-auto h-16 w-16 relative"},L={class:"rounded-md shadow-sm -space-y-px"},N=["disabled"],T=b({__name:"LoginView",setup(d){const n=v(),a=u(""),i=u(!1),s=x("isDarkMode"),c=M(),p=()=>{let r=!0;return a.value?a.value.length<6&&(n.showAlert("密码长度至少为6位","error"),r=!1):(n.showAlert("无效的密码","error"),r=!1),r},m=j(),f=async()=>{if(p()){P.post("/admin/login",{password:a.value}).then(r=>{c.updateAdminPwd(r.detail.token),m.push("/admin")}).catch(r=>{n.showAlert(r.response.data.detail,"error")}),i.value=!0;try{await new Promise(r=>setTimeout(r,2e3))}catch{}finally{i.value=!1}}};return(r,t)=>(B(),w("div",{class:l(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",o(s)?"bg-gray-900":"bg-gray-50"])},[t[6]||(t[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:l(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[o(s)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",I,[t[1]||(t[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),t[2]||(t[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:l(["absolute inset-1 rounded-full flex items-center justify-center",o(s)?"bg-gray-800":"bg-white"])},[h(o(z),{class:l(["h-8 w-8",o(s)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:l(["mt-6 text-center text-3xl font-extrabold",o(s)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:k(f,["prevent"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=g=>a.value=g),class:l(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",o(s)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[A,a.value]])])]),e("div",null,[e("button",{type:"submit",class:l(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",o(s)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",i.value?"opacity-75 cursor-not-allowed":""]),disabled:i.value},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+D(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=_(T,[["__scopeId","data-v-66eb7914"]]);export{E as default}; diff --git a/themes/2024/assets/RetrievewFileView-Bd3LCro9.js b/themes/2024/assets/RetrievewFileView-D7SdcE_L.js similarity index 99% rename from themes/2024/assets/RetrievewFileView-Bd3LCro9.js rename to themes/2024/assets/RetrievewFileView-D7SdcE_L.js index c17c6eb..eefb4ba 100644 --- a/themes/2024/assets/RetrievewFileView-Bd3LCro9.js +++ b/themes/2024/assets/RetrievewFileView-D7SdcE_L.js @@ -1,4 +1,4 @@ -var De=Object.defineProperty;var Pe=(d,e,t)=>e in d?De(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var v=(d,e,t)=>Pe(d,typeof e!="symbol"?e+"":e,t);import{c as _e,_ as Fe,u as Ze,B as Oe,r as D,o as Ue,C as Qe,w as He,f as Ne,a as L,b as p,g as $,n as b,h as f,i as Ve,t as j,j as Ge,m as We,l as ee,v as Xe,k as Q,s as Z,x as Ke,X as xe,y as Je,F as Ye,q as et,T as le,z as tt,e as C,A as nt}from"./index-DODrGbMr.js";import{u as st,S as it,C as rt,a as ot,Q as lt,E as at}from"./fileData-CIXeVjba.js";import{B as ct}from"./box-4qc9LeUs.js";import{F as ke}from"./file-CzCZpmbi.js";import{H as ut,T as pt}from"./trash-DdPsY65y.js";/** +var De=Object.defineProperty;var Pe=(d,e,t)=>e in d?De(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var v=(d,e,t)=>Pe(d,typeof e!="symbol"?e+"":e,t);import{c as _e,_ as Fe,u as Ze,B as Oe,r as D,o as Ue,C as Qe,w as He,f as Ne,a as L,b as p,g as $,n as b,h as f,i as Ve,t as j,j as Ge,m as We,l as ee,v as Xe,k as Q,s as Z,x as Ke,X as xe,y as Je,F as Ye,q as et,T as le,z as tt,e as C,A as nt}from"./index-Cv6iTFk7.js";import{u as st,S as it,C as rt,a as ot,Q as lt,E as at}from"./fileData-BBcRSbAS.js";import{B as ct}from"./box-D3pjVbpO.js";import{F as ke}from"./file-C_3WBI8u.js";import{H as ut,T as pt}from"./trash-BvQ_jbNG.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/SendFileView-BIguT9JI.css b/themes/2024/assets/SendFileView-BIguT9JI.css new file mode 100644 index 0000000..3736401 --- /dev/null +++ b/themes/2024/assets/SendFileView-BIguT9JI.css @@ -0,0 +1 @@ +.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.fade-enter-active[data-v-065f7e80],.fade-leave-active[data-v-065f7e80]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-065f7e80],.fade-leave-to[data-v-065f7e80]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-065f7e80]{width:30rem}}.fade-enter-to[data-v-065f7e80],.fade-leave-from[data-v-065f7e80]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-065f7e80],.drawer-leave-active[data-v-065f7e80]{transition:transform .3s ease}.drawer-enter-from[data-v-065f7e80],.drawer-leave-to[data-v-065f7e80]{transform:translate(100%)}.list-enter-active[data-v-065f7e80],.list-leave-active[data-v-065f7e80]{transition:all .5s ease}.list-enter-from[data-v-065f7e80],.list-leave-to[data-v-065f7e80]{opacity:0;transform:translate(30px)} diff --git a/themes/2024/assets/SendFileView-B_U1EQv_.js b/themes/2024/assets/SendFileView-B_U1EQv_.js new file mode 100644 index 0000000..c0d3830 --- /dev/null +++ b/themes/2024/assets/SendFileView-B_U1EQv_.js @@ -0,0 +1,21 @@ +import{c as N,d as se,r as I,o as ne,w as Me,a as M,b as e,e as S,_ as le,u as ie,f as Se,g as x,n as l,h as o,i as ze,t as C,j as E,k as B,l as j,m as Q,v as Z,T as J,p as Te,F as ee,q as te,s as U,x as Ie,X as De,y as Ae,z as Pe,A as L}from"./index-Cv6iTFk7.js";import{u as Fe,S as $e,C as Ue,a as Re,Q as Be,E as je}from"./fileData-BBcRSbAS.js";import{F as oe}from"./file-C_3WBI8u.js";import{H as Le,T as Ve}from"./trash-BvQ_jbNG.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 He=N("ClipboardCopyIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** + * @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 Ee=N("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @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 Ne=N("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/** + * @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 qe=N("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),We=se({__name:"BorderProgressBar",props:{progress:{}},setup(_){const k=_,P=I(null),s=I(null);let u=null;const w=()=>{if(!u||!s.value||!P.value)return;const p=P.value.clientWidth,h=P.value.clientHeight;s.value.width=p,s.value.height=h;const c=4,r=8;u.lineWidth=c;const y=u.createLinearGradient(0,0,p,h);y.addColorStop(0,"#4f46e5"),y.addColorStop(.5,"#7c3aed"),y.addColorStop(1,"#db2777"),u.strokeStyle="rgba(229, 231, 235, 0.2)",f(u,c/2,c/2,p-c,h-c,r),u.stroke();const z=((p+h)*2-8*r+2*Math.PI*r)*k.progress/100;u.strokeStyle=y,u.lineCap="round",u.lineJoin="round",u.beginPath();let i=z;const v=c/2,T=p-c,F=h-c;if(i>0){const g=Math.min(T-2*r,i);u.moveTo(r+v,v),u.lineTo(g+r+v,v),i-=g}if(i>0){const g=Math.min(Math.PI/2,i/r);u.arc(T-r+v,r+v,r,-Math.PI/2,g-Math.PI/2,!1),i-=g*r}if(i>0){const g=Math.min(F-2*r,i);u.lineTo(T+v,g+r+v),i-=g}if(i>0){const g=Math.min(Math.PI/2,i/r);u.arc(T-r+v,F-r+v,r,0,g,!1),i-=g*r}if(i>0){const g=Math.min(T-2*r,i);u.lineTo(T-g-r+v,F+v),i-=g}if(i>0){const g=Math.min(Math.PI/2,i/r);u.arc(r+v,F-r+v,r,Math.PI/2,Math.PI/2+g,!1),i-=g*r}if(i>0){const g=Math.min(F-2*r,i);u.lineTo(v,F-g-r+v),i-=g}if(i>0){const g=Math.min(Math.PI/2,i/r);u.arc(r+v,r+v,r,Math.PI,Math.PI+g,!1)}u.stroke()};function f(p,h,c,r,y,m){p.beginPath(),p.moveTo(h+m,c),p.lineTo(h+r-m,c),p.arcTo(h+r,c,h+r,c+m,m),p.lineTo(h+r,c+y-m),p.arcTo(h+r,c+y,h+r-m,c+y,m),p.lineTo(h+m,c+y),p.arcTo(h,c+y,h,c+y-m,m),p.lineTo(h,c+m),p.arcTo(h,c,h+m,c,m),p.closePath()}return ne(()=>{s.value&&(u=s.value.getContext("2d"),w())}),Me(()=>k.progress,w),(p,h)=>(S(),M("div",{class:"border-progress-container",ref_key:"container",ref:P},[e("canvas",{ref_key:"canvas",ref:s,class:"border-progress-canvas"},null,512)],512))}}),Ge=le(We,[["__scopeId","data-v-2fbf5085"]]),ce=async(_,k={})=>{const{successMsg:P="复制成功",errorMsg:s="复制失败,请手动复制",showMsg:u=!0}=k,w=ie();try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(_),u&&w.showAlert(P,"success"),!0;const f=document.createElement("textarea");f.value=_,f.style.position="fixed",f.style.opacity="0",document.body.appendChild(f),f.select();const p=document.execCommand("copy");if(document.body.removeChild(f),p)return u&&w.showAlert(P,"success"),!0;throw new Error("execCommand copy failed")}catch(f){return console.error("复制失败:",f),u&&w.showAlert(s,"error"),!1}},re=async _=>{const k=`${window.location.origin}/#/?code=${_}`;return ce(k,{successMsg:"取件链接已复制到剪贴板",errorMsg:"复制失败,请手动复制取件链接"})},Oe=async _=>ce(_,{successMsg:"取件码已复制到剪贴板",errorMsg:"复制失败,请手动复制取件码"}),ae=_=>_>=1024*1024*1024?Math.round(_/(1024*1024*1024))+"GB":_>=1024*1024?Math.round(_/(1024*1024))+"MB":Math.round(_/1024)+"KB",Qe={class:"p-8"},Je={class:"flex justify-center space-x-4 mb-6"},Ke={key:"file",class:"grid grid-cols-1 gap-8"},Xe={key:0,class:"absolute inset-0 w-full h-full"},Ye={class:"block truncate"},Ze={key:"text",class:"grid grid-cols-1 gap-8"},et={key:0,class:"flex flex-col"},tt={class:"flex flex-col space-y-4"},ot=["value"],rt={key:0,class:"flex items-center space-x-2"},at={class:"relative flex-grow"},st=["placeholder"],nt={type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-4 px-6 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition-all duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group"},lt={class:"relative z-10 flex items-center justify-center text-lg"},it={class:"mt-6 text-center"},ct={class:"flex-grow overflow-y-auto p-6"},dt={class:"flex-shrink-0 mr-4"},ut={class:"flex-grow min-w-0 mr-4"},pt={class:"flex-shrink-0 flex space-x-2"},gt=["onClick"],ft=["onClick"],ht=["onClick"],vt={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},xt={class:"space-y-4"},mt={class:"flex items-center"},yt={class:"flex items-center"},bt={class:"flex items-center"},wt={class:"flex items-center"},kt={class:"mt-6 flex justify-between items-center"},_t={class:"flex flex-col items-center w-1/2 pr-2"},Ct={class:"text-2xl font-bold text-indigo-600"},Mt={class:"flex flex-col items-center w-1/2 pl-2"},St={class:"bg-white p-2 rounded-lg shadow-md"},zt=se({__name:"SendFileView",setup(_){const k=JSON.parse(localStorage.getItem("config")||"{}"),P=Pe(),s=ze("isDarkMode"),u=Fe(),w=I("file"),f=I(null),p=I(""),h=I(null),c=I("day"),r=I("1"),y=I(0),m=I(!1),z=I(null),i=ie(),v=Se(()=>u.shareData),T=I(""),F=()=>{var n;(n=h.value)==null||n.click()},g=async n=>{const t=n.target;if(t.files&&t.files.length>0){const d=t.files[0];if(f.value=d,!G())return;T.value=await q(d),console.log(T.value)}},de=async n=>{var t;if((t=n.dataTransfer)!=null&&t.files&&n.dataTransfer.files.length>0){const d=n.dataTransfer.files[0];if(f.value=d,!G())return;T.value=await q(d)}},ue=async n=>{var d;const t=(d=n.clipboardData)==null?void 0:d.items;if(t){for(const a of t)if(a.kind==="file"){const b=a.getAsFile();if(b){if(f.value=b,!G())return;T.value=await q(b),i.showAlert("已从剪贴板添加文件:"+b.name,"success");break}}}},q=async n=>new Promise(t=>{const a=new FileReader;let b=0;const D=Math.ceil(n.size/2097152);a.onload=async $=>{const A=new Uint8Array($.target.result),V=await crypto.subtle.digest("SHA-256",A),O=Array.from(new Uint8Array(V)).map(H=>H.toString(16).padStart(2,"0")).join("");b++,b{const $=b*2097152,A=$+2097152>=n.size?n.size:$+2097152;a.readAsArrayBuffer(n.slice($,A))};R()}),pe=(n=c.value)=>{switch(n){case"day":return"输入天数";case"hour":return"输入小时数";case"minute":return"输入分钟数";case"count":return"输入查看次数";case"forever":return"永久";default:return"输入值"}},W=(n=c.value)=>{switch(n){case"day":return"天";case"hour":return"小时";case"minute":return"分钟";case"count":return"次";case"forever":return"永久";default:return""}},ge=async n=>{var t,d;try{const b=Math.ceil(n.size/5242880),D=await L.post("/chunk/upload/init/",{file_name:n.name,file_size:n.size,chunk_size:5242880,file_hash:T.value});if(D.code!==200)throw new Error("初始化切片上传失败");if(D.detail.existed)return D;const R=D.detail.upload_id;for(let A=0;A{const Ce=Math.round((A*5242880+_e.loaded)*100/n.size);y.value=Ce}})).code!==200)throw new Error(`切片 ${A} 上传失败`)}const $=await L.post(`/chunk/upload/complete/${R}`,{expire_value:r.value?parseInt(r.value):1,expire_style:c.value});if($.code!==200)throw new Error("完成上传失败");return $}catch(a){throw console.error("切片上传失败:",a),(d=(t=a.response)==null?void 0:t.data)!=null&&d.detail?i.showAlert(a.response.data.detail,"error"):i.showAlert("上传失败,请稍后重试","error"),a}},fe=async n=>{const t=new FormData,d={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:b=>{const D=Math.round(b.loaded*100/b.total);y.value=D}};return t.append("file",n),t.append("expire_value",r.value),t.append("expire_style",c.value),await L.post("/share/file/",t,d)},he=()=>k.openUpload===0&&localStorage.getItem("token")===null?(i.showAlert("游客上传功能已关闭","error"),!1):!0,ve=n=>n.size>k.uploadSize?(i.showAlert(`文件大小超过限制 (${ae(k.uploadSize)})`,"error"),f.value=null,!1):!0,K=(n,t)=>{if(n==="forever"||n==="count")return!0;const d=k.max_save_seconds||0;if(d===0)return!0;let a=0;switch(n){case"minute":a=parseInt(t)*60;break;case"hour":a=parseInt(t)*3600;break;case"day":a=parseInt(t)*86400;break;default:return!1}return a<=d},G=()=>!(!he()||!ve(f.value)||!K(c.value,r.value)),xe=async()=>{var n,t;if(w.value==="file"&&!f.value){i.showAlert("请选择要上传的文件","error");return}if(w.value==="text"&&!p.value.trim()){i.showAlert("请输入要发送的文本","error");return}if(c.value!=="forever"&&!r.value){i.showAlert("请输入过期值","error");return}if(!K(c.value,r.value)){const d=Math.floor(k.max_save_seconds/86400);i.showAlert(`过期时间不能超过${d}天`,"error");return}try{let d;if(w.value==="file")k.enableChunk?d=await ge(f.value):d=await fe(f.value);else{const a=new FormData;a.append("text",p.value),a.append("expire_value",r.value),a.append("expire_style",c.value),d=await L.post("/share/text/",a,{headers:{"Content-Type":"multipart/form-data"}})}if(d&&d.code===200){const a=d.detail.code,b=d.detail.name,D={id:Date.now(),filename:b,date:new Date().toISOString().split("T")[0],size:w.value==="text"?`${(p.value.length/1024).toFixed(2)} KB`:`${(f.value.size/(1024*1024)).toFixed(1)} MB`,expiration:c.value==="forever"?"永久":`${r.value}${W()}后过期`,retrieveCode:a};u.addShareData(D),i.showAlert(`文件发送成功!取件码:${a}`,"success"),f.value=null,p.value="",r.value="",y.value=0,m.value=!0,await re(a)}else throw new Error("服务器响应异常")}catch(d){console.error("发送失败:",d),(t=(n=d.response)==null?void 0:n.data)!=null&&t.detail?i.showAlert(d.response.data.detail,"error"):i.showAlert("发送失败,请稍后重试","error")}finally{y.value=0}},me=()=>{P.push("/")},X=()=>{m.value=!m.value},ye=n=>{z.value=n},be=n=>{const t=u.shareData.findIndex(d=>d.id===n);t!==-1&&u.deleteShareData(t)},we=window.location.origin+"/#/",ke=n=>`${we}?code=${n.retrieveCode}`;return ne(()=>{console.log("SendFileView mounted")}),(n,t)=>{const d=Ie("router-link");return S(),M("div",{class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300",onPaste:E(ue,["prevent"])},[e("div",{class:l(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[o(s)?"bg-white bg-opacity-10 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[e("div",Qe,[e("h2",{class:l(["text-3xl font-extrabold text-center mb-8 cursor-pointer transition-colors duration-300",[o(s)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:me},C(o(k).name),3),e("form",{onSubmit:E(xe,["prevent"]),class:"space-y-8"},[e("div",Je,[e("button",{type:"button",onClick:t[0]||(t[0]=a=>w.value="file"),class:l(["px-4 py-2 rounded-lg",w.value==="file"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文件 ",2),e("button",{type:"button",onClick:t[1]||(t[1]=a=>w.value="text"),class:l(["px-4 py-2 rounded-lg",w.value==="text"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文本 ",2)]),x(J,{name:"fade",mode:"out-in"},{default:B(()=>[w.value==="file"?(S(),M("div",Ke,[e("div",{class:l(["rounded-xl p-8 flex flex-col items-center justify-center border-2 border-dashed transition-all duration-300 group cursor-pointer relative",[o(s)?"bg-gray-800 bg-opacity-50 border-gray-600 hover:border-indigo-500":"bg-gray-100 border-gray-300 hover:border-indigo-500"]]),onClick:F,onDragover:t[2]||(t[2]=E(()=>{},["prevent"])),onDrop:E(de,["prevent"])},[e("input",{id:"file-upload",type:"file",class:"hidden",onChange:g,ref_key:"fileInput",ref:h},null,544),y.value>0?(S(),M("div",Xe,[x(Ge,{progress:y.value},null,8,["progress"])])):j("",!0),x(o(Ne),{class:l(["w-16 h-16 transition-colors duration-300",o(s)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},null,8,["class"]),e("p",{class:l(["mt-4 text-sm transition-colors duration-300 w-full text-center",o(s)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[e("span",Ye,C(f.value?f.value.name:"点击或拖放文件到此处上传"),1)],2),e("p",{class:l(["mt-2 text-xs",o(s)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+C(o(ae)(o(k).uploadSize)),3)],34)])):(S(),M("div",Ze,[w.value==="text"?(S(),M("div",et,[Q(e("textarea",{id:"text-content","onUpdate:modelValue":t[3]||(t[3]=a=>p.value=a),rows:"7",class:l(["flex-grow px-4 py-3 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 resize-none",o(s)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[Z,p.value]])])):j("",!0)]))]),_:1}),e("div",tt,[e("label",{class:l(["text-sm font-medium",o(s)?"text-gray-300":"text-gray-700"])}," 过期方式 ",2),Q(e("select",{"onUpdate:modelValue":t[4]||(t[4]=a=>c.value=a),class:l(["px-4 py-2 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500",o(s)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},[(S(!0),M(ee,null,te(o(k).expireStyle,a=>(S(),M("option",{value:a,key:a},C(W(a)),9,ot))),128))],2),[[Te,c.value]]),c.value!=="forever"?(S(),M("div",rt,[e("div",at,[Q(e("input",{"onUpdate:modelValue":t[5]||(t[5]=a=>r.value=a),type:"number",placeholder:pe(),class:l(["w-full px-4 py-2 pr-16 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500",o(s)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},null,10,st),[[Z,r.value]]),e("span",{class:l(["absolute right-3 top-1/2 transform -translate-y-1/2",o(s)?"text-gray-300":"text-gray-700"])},C(W()),3)])])):j("",!0)]),e("button",nt,[t[9]||(t[9]=e("span",{class:"absolute top-0 left-0 w-full h-full bg-white opacity-0 group-hover:opacity-20 transition-opacity duration-300"},null,-1)),e("span",lt,[x(o(qe),{class:"w-6 h-6 mr-2"}),t[8]||(t[8]=e("span",null,"安全寄送",-1))])])],32),e("div",it,[x(d,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:B(()=>t[10]||(t[10]=[U(" 需要取件?点击这里 ")])),_:1})])]),e("div",{class:l(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[o(s)?"bg-gray-800":"bg-gray-100"]])},[e("span",{class:l(["text-sm flex items-center",[o(s)?"text-gray-300":"text-gray-800"]])},[x(o($e),{class:"w-4 h-4 mr-1 text-green-400"}),t[11]||(t[11]=U(" 安全加密 "))],2),e("button",{onClick:X,class:l(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[o(s)?"text-indigo-400":"text-indigo-600"]])},[t[12]||(t[12]=U(" 发件记录 ")),x(o(Ue),{class:"w-4 h-4 ml-1"})],2)],2)],2),x(J,{name:"drawer"},{default:B(()=>[m.value?(S(),M("div",{key:0,class:l(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[o(s)?"bg-gray-900":"bg-white"]])},[e("div",{class:l(["flex justify-between items-center p-6 border-b",[o(s)?"border-gray-700":"border-gray-200"]])},[e("h3",{class:l(["text-2xl font-bold",[o(s)?"text-white":"text-gray-800"]])}," 发件记录 ",2),e("button",{onClick:X,class:l(["hover:text-white transition duration-300",[o(s)?"text-gray-400":"text-gray-800"]])},[x(o(De),{class:"w-6 h-6"})],2)],2),e("div",ct,[x(Ae,{name:"list",tag:"div",class:"space-y-4"},{default:B(()=>[(S(!0),M(ee,null,te(v.value,a=>(S(),M("div",{key:a.id,class:l(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[o(s)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[e("div",dt,[x(o(oe),{class:l(["w-10 h-10",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),e("div",ut,[e("p",{class:l(["font-medium text-lg truncate",[o(s)?"text-white":"text-gray-800"]])},C(a.filename?a.filename:"Text"),3),e("p",{class:l(["text-sm truncate",[o(s)?"text-gray-400":"text-gray-600"]])},C(a.date)+" · "+C(a.size),3)]),e("div",pt,[e("button",{onClick:b=>o(re)(a.retrieveCode),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[o(s)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[x(o(He),{class:"w-5 h-5"})],10,gt),e("button",{onClick:b=>ye(a),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[o(s)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[x(o(je),{class:"w-5 h-5"})],10,ft),e("button",{onClick:b=>be(a.id),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[o(s)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[x(o(Ve),{class:"w-5 h-5"})],10,ht)])],2))),128))]),_:1})])],2)):j("",!0)]),_:1}),x(J,{name:"fade"},{default:B(()=>[z.value?(S(),M("div",vt,[e("div",{class:l(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70",[o(s)?"bg-gray-800":"bg-white"]])},[e("h3",{class:l(["text-2xl font-bold mb-6",[o(s)?"text-white":"text-gray-800"]])}," 文件详情 ",2),e("div",xt,[e("div",mt,[x(o(oe),{class:l(["w-6 h-6 mr-3",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:l([o(s)?"text-gray-300":"text-gray-800"])},[t[13]||(t[13]=e("span",{class:"font-medium"},"文件名:",-1)),U(C(z.value.filename),1)],2)]),e("div",yt,[x(o(Re),{class:l(["w-6 h-6 mr-3",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:l([o(s)?"text-gray-300":"text-gray-800"])},[t[14]||(t[14]=e("span",{class:"font-medium"},"发送日期:",-1)),U(C(z.value.date),1)],2)]),e("div",bt,[x(o(Le),{class:l(["w-6 h-6 mr-3",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:l([o(s)?"text-gray-300":"text-gray-800"])},[t[15]||(t[15]=e("span",{class:"font-medium"},"文件大小:",-1)),U(C(z.value.size),1)],2)]),e("div",wt,[x(o(Ee),{class:l(["w-6 h-6 mr-3",[o(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:l([o(s)?"text-gray-300":"text-gray-800"])},[t[16]||(t[16]=e("span",{class:"font-medium"},"过期时间:",-1)),U(C(z.value.expiration),1)],2)])]),e("div",kt,[e("div",_t,[e("h4",{class:l(["text-lg font-semibold mb-3",[o(s)?"text-white":"text-gray-800"]])}," 取件码 ",2),e("div",{class:"bg-gray-100 p-3 rounded-lg shadow-md cursor-pointer hover:bg-gray-200 transition-colors duration-300 w-full text-center",onClick:t[6]||(t[6]=a=>o(Oe)(z.value.retrieveCode))},[e("p",Ct,C(z.value.retrieveCode),1)]),e("p",{class:l(["mt-2 text-sm",[o(s)?"text-gray-400":"text-gray-600"]])}," 点击复制取件码 ",2)]),e("div",Mt,[e("h4",{class:l(["text-lg font-semibold mb-3",[o(s)?"text-white":"text-gray-800"]])}," 二维码 ",2),e("div",St,[x(Be,{value:ke(z.value),size:128,level:"M"},null,8,["value"])]),e("p",{class:l(["mt-2 text-sm",[o(s)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)])]),e("button",{onClick:t[7]||(t[7]=a=>z.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):j("",!0)]),_:1})],32)}}}),Ft=le(zt,[["__scopeId","data-v-065f7e80"]]);export{Ft as default}; diff --git a/themes/2024/assets/SendFileView-CnhaeT0s.js b/themes/2024/assets/SendFileView-CnhaeT0s.js deleted file mode 100644 index 169afe5..0000000 --- a/themes/2024/assets/SendFileView-CnhaeT0s.js +++ /dev/null @@ -1,21 +0,0 @@ -import{c as q,d as re,r as A,o as ae,w as be,a as S,b as e,e as M,_ as se,u as ne,f as ke,g as m,n,h as o,i as _e,t as C,j as E,k as B,l as j,m as J,v as Y,T as K,p as Ce,F as Z,q as ee,s as U,x as Se,X as Me,y as ze,z as Te,A as L}from"./index-DODrGbMr.js";import{u as Ae,S as Ie,C as De,a as Pe,Q as $e,E as Fe}from"./fileData-CIXeVjba.js";import{F as te}from"./file-CzCZpmbi.js";import{H as Ue,T as Re}from"./trash-DdPsY65y.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 Be=q("ClipboardCopyIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** - * @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 je=q("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @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 Le=q("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/** - * @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 Ve=q("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),He=re({__name:"BorderProgressBar",props:{progress:{}},setup(_){const v=_,P=A(null),r=A(null);let u=null;const k=()=>{if(!u||!r.value||!P.value)return;const p=P.value.clientWidth,h=P.value.clientHeight;r.value.width=p,r.value.height=h;const c=4,a=8;u.lineWidth=c;const b=u.createLinearGradient(0,0,p,h);b.addColorStop(0,"#4f46e5"),b.addColorStop(.5,"#7c3aed"),b.addColorStop(1,"#db2777"),u.strokeStyle="rgba(229, 231, 235, 0.2)",f(u,c/2,c/2,p-c,h-c,a),u.stroke();const z=((p+h)*2-8*a+2*Math.PI*a)*v.progress/100;u.strokeStyle=b,u.lineCap="round",u.lineJoin="round",u.beginPath();let l=z;const x=c/2,T=p-c,$=h-c;if(l>0){const g=Math.min(T-2*a,l);u.moveTo(a+x,x),u.lineTo(g+a+x,x),l-=g}if(l>0){const g=Math.min(Math.PI/2,l/a);u.arc(T-a+x,a+x,a,-Math.PI/2,g-Math.PI/2,!1),l-=g*a}if(l>0){const g=Math.min($-2*a,l);u.lineTo(T+x,g+a+x),l-=g}if(l>0){const g=Math.min(Math.PI/2,l/a);u.arc(T-a+x,$-a+x,a,0,g,!1),l-=g*a}if(l>0){const g=Math.min(T-2*a,l);u.lineTo(T-g-a+x,$+x),l-=g}if(l>0){const g=Math.min(Math.PI/2,l/a);u.arc(a+x,$-a+x,a,Math.PI/2,Math.PI/2+g,!1),l-=g*a}if(l>0){const g=Math.min($-2*a,l);u.lineTo(x,$-g-a+x),l-=g}if(l>0){const g=Math.min(Math.PI/2,l/a);u.arc(a+x,a+x,a,Math.PI,Math.PI+g,!1)}u.stroke()};function f(p,h,c,a,b,y){p.beginPath(),p.moveTo(h+y,c),p.lineTo(h+a-y,c),p.arcTo(h+a,c,h+a,c+y,y),p.lineTo(h+a,c+b-y),p.arcTo(h+a,c+b,h+a-y,c+b,y),p.lineTo(h+y,c+b),p.arcTo(h,c+b,h,c+b-y,y),p.lineTo(h,c+y),p.arcTo(h,c,h+y,c,y),p.closePath()}return ae(()=>{r.value&&(u=r.value.getContext("2d"),k())}),be(()=>v.progress,k),(p,h)=>(M(),S("div",{class:"border-progress-container",ref_key:"container",ref:P},[e("canvas",{ref_key:"canvas",ref:r,class:"border-progress-canvas"},null,512)],512))}}),Ee=se(He,[["__scopeId","data-v-2fbf5085"]]),le=async(_,v={})=>{const{successMsg:P="复制成功",errorMsg:r="复制失败,请手动复制",showMsg:u=!0}=v,k=ne();try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(_),u&&k.showAlert(P,"success"),!0;const f=document.createElement("textarea");f.value=_,f.style.position="fixed",f.style.opacity="0",document.body.appendChild(f),f.select();const p=document.execCommand("copy");if(document.body.removeChild(f),p)return u&&k.showAlert(P,"success"),!0;throw new Error("execCommand copy failed")}catch(f){return console.error("复制失败:",f),u&&k.showAlert(r,"error"),!1}},oe=async _=>{const v=`${window.location.origin}/#/?code=${_}`;return le(v,{successMsg:"取件链接已复制到剪贴板",errorMsg:"复制失败,请手动复制取件链接"})},Ne=async _=>le(_,{successMsg:"取件码已复制到剪贴板",errorMsg:"复制失败,请手动复制取件码"}),N=_=>_>=1024*1024*1024?Math.round(_/(1024*1024*1024))+"GB":_>=1024*1024?Math.round(_/(1024*1024))+"MB":Math.round(_/1024)+"KB",qe={class:"p-8"},We={class:"flex justify-center space-x-4 mb-6"},Ge={key:"file",class:"grid grid-cols-1 gap-8"},Qe={key:0,class:"absolute inset-0 w-full h-full"},Je={class:"block truncate"},Ke={key:"text",class:"grid grid-cols-1 gap-8"},Oe={key:0,class:"flex flex-col"},Xe={class:"flex flex-col space-y-4"},Ye=["value"],Ze={key:0,class:"flex items-center space-x-2"},et={class:"relative flex-grow"},tt=["placeholder"],ot={type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-4 px-6 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition-all duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group"},rt={class:"relative z-10 flex items-center justify-center text-lg"},at={class:"mt-6 text-center"},st={class:"flex-grow overflow-y-auto p-6"},nt={class:"flex-shrink-0 mr-4"},lt={class:"flex-grow min-w-0 mr-4"},it={class:"flex-shrink-0 flex space-x-2"},ct=["onClick"],dt=["onClick"],ut=["onClick"],pt={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},gt={class:"space-y-4"},ht={class:"flex items-center"},ft={class:"flex items-center"},vt={class:"flex items-center"},xt={class:"flex items-center"},mt={class:"mt-6 flex justify-between items-center"},yt={class:"flex flex-col items-center w-1/2 pr-2"},wt={class:"text-2xl font-bold text-indigo-600"},bt={class:"flex flex-col items-center w-1/2 pl-2"},kt={class:"bg-white p-2 rounded-lg shadow-md"},_t=re({__name:"SendFileView",setup(_){const v=JSON.parse(localStorage.getItem("config")||"{}"),P=Te(),r=_e("isDarkMode"),u=Ae(),k=A("file"),f=A(null),p=A(""),h=A(null),c=A("day"),a=A("1"),b=A(0),y=A(!1),z=A(null),l=ne(),x=ke(()=>u.shareData),T=A(""),$=()=>{var i;(i=h.value)==null||i.click()},g=async i=>{const t=i.target;if(t.files&&t.files.length>0){const d=t.files[0];if(!v.openUpload&&localStorage.getItem("token")===null){l.showAlert("游客上传功能已关闭","error");return}if(d.size>v.uploadSize){l.showAlert(`文件大小超过限制 (${N(v.uploadSize)})`,"error");return}f.value=d,T.value=await W(d),console.log(T.value)}},ie=async i=>{var t;if((t=i.dataTransfer)!=null&&t.files&&i.dataTransfer.files.length>0){const d=i.dataTransfer.files[0];if(!v.openUpload&&localStorage.getItem("token")===null){l.showAlert("游客上传功能已关闭","error");return}if(d.size>v.uploadSize){l.showAlert(`文件大小超过限制 (${N(v.uploadSize)})`,"error");return}f.value=d,T.value=await W(d)}},ce=async i=>{var d;const t=(d=i.clipboardData)==null?void 0:d.items;if(t){if(v.openUpload===0&&localStorage.getItem("token")===null){l.showAlert("游客上传功能已关闭","error");return}for(const s of t)if(s.kind==="file"){const w=s.getAsFile();if(w){if(w.size>v.uploadSize){l.showAlert(`文件大小超过限制 (${N(v.uploadSize)})`,"error");return}f.value=w,T.value=await W(w),l.showAlert("已从剪贴板添加文件:"+w.name,"success");break}}}},W=async i=>new Promise(t=>{const s=new FileReader;let w=0;const I=Math.ceil(i.size/2097152);s.onload=async F=>{const D=new Uint8Array(F.target.result),V=await crypto.subtle.digest("SHA-256",D),Q=Array.from(new Uint8Array(V)).map(H=>H.toString(16).padStart(2,"0")).join("");w++,w{const F=w*2097152,D=F+2097152>=i.size?i.size:F+2097152;s.readAsArrayBuffer(i.slice(F,D))};R()}),de=(i=c.value)=>{switch(i){case"day":return"输入天数";case"hour":return"输入小时数";case"minute":return"输入分钟数";case"count":return"输入查看次数";case"forever":return"永久";default:return"输入值"}},G=(i=c.value)=>{switch(i){case"day":return"天";case"hour":return"小时";case"minute":return"分钟";case"count":return"次";case"forever":return"永久";default:return""}},ue=async i=>{var t,d;try{const w=Math.ceil(i.size/5242880),I=await L.post("/chunk/upload/init/",{file_name:i.name,file_size:i.size,chunk_size:5242880,file_hash:T.value});if(I.code!==200)throw new Error("初始化切片上传失败");if(I.detail.existed)return I;const R=I.detail.upload_id;for(let D=0;D{const we=Math.round((D*5242880+ye.loaded)*100/i.size);b.value=we}})).code!==200)throw new Error(`切片 ${D} 上传失败`)}const F=await L.post(`/chunk/upload/complete/${R}`,{expire_value:a.value?parseInt(a.value):1,expire_style:c.value});if(F.code!==200)throw new Error("完成上传失败");return F}catch(s){throw console.error("切片上传失败:",s),(d=(t=s.response)==null?void 0:t.data)!=null&&d.detail?l.showAlert(s.response.data.detail,"error"):l.showAlert("上传失败,请稍后重试","error"),s}},pe=async i=>{const t=new FormData,d={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:w=>{const I=Math.round(w.loaded*100/w.total);b.value=I}};return t.append("file",i),t.append("expire_value",a.value),t.append("expire_style",c.value),await L.post("/share/file/",t,d)},ge=async()=>{var i,t;if(k.value==="file"&&!f.value){l.showAlert("请选择要上传的文件","error");return}if(k.value==="text"&&!p.value.trim()){l.showAlert("请输入要发送的文本","error");return}if(c.value!=="forever"&&!a.value){l.showAlert("请输入过期值","error");return}try{let d;if(k.value==="file")v.enableChunk?d=await ue(f.value):d=await pe(f.value);else{const s=new FormData;s.append("text",p.value),s.append("expire_value",a.value),s.append("expire_style",c.value),d=await L.post("/share/text/",s,{headers:{"Content-Type":"multipart/form-data"}})}if(d&&d.code===200){const s=d.detail.code,w=d.detail.name,I={id:Date.now(),filename:w,date:new Date().toISOString().split("T")[0],size:k.value==="text"?`${(p.value.length/1024).toFixed(2)} KB`:`${(f.value.size/(1024*1024)).toFixed(1)} MB`,expiration:c.value==="forever"?"永久":`${a.value}${G()}后过期`,retrieveCode:s};u.addShareData(I),l.showAlert(`文件发送成功!取件码:${s}`,"success"),f.value=null,p.value="",a.value="",b.value=0,y.value=!0,await oe(s)}else throw new Error("服务器响应异常")}catch(d){console.error("发送失败:",d),(t=(i=d.response)==null?void 0:i.data)!=null&&t.detail?l.showAlert(d.response.data.detail,"error"):l.showAlert("发送失败,请稍后重试","error")}finally{b.value=0}},he=()=>{P.push("/")},O=()=>{y.value=!y.value},fe=i=>{z.value=i},ve=i=>{const t=u.shareData.findIndex(d=>d.id===i);t!==-1&&u.deleteShareData(t)},xe=window.location.origin+"/#/",me=i=>`${xe}?code=${i.retrieveCode}`;return ae(()=>{console.log("SendFileView mounted")}),(i,t)=>{const d=Se("router-link");return M(),S("div",{class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300",onPaste:E(ce,["prevent"])},[e("div",{class:n(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[o(r)?"bg-white bg-opacity-10 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[e("div",qe,[e("h2",{class:n(["text-3xl font-extrabold text-center mb-8 cursor-pointer transition-colors duration-300",[o(r)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:he},C(o(v).name),3),e("form",{onSubmit:E(ge,["prevent"]),class:"space-y-8"},[e("div",We,[e("button",{type:"button",onClick:t[0]||(t[0]=s=>k.value="file"),class:n(["px-4 py-2 rounded-lg",k.value==="file"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文件 ",2),e("button",{type:"button",onClick:t[1]||(t[1]=s=>k.value="text"),class:n(["px-4 py-2 rounded-lg",k.value==="text"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文本 ",2)]),m(K,{name:"fade",mode:"out-in"},{default:B(()=>[k.value==="file"?(M(),S("div",Ge,[e("div",{class:n(["rounded-xl p-8 flex flex-col items-center justify-center border-2 border-dashed transition-all duration-300 group cursor-pointer relative",[o(r)?"bg-gray-800 bg-opacity-50 border-gray-600 hover:border-indigo-500":"bg-gray-100 border-gray-300 hover:border-indigo-500"]]),onClick:$,onDragover:t[2]||(t[2]=E(()=>{},["prevent"])),onDrop:E(ie,["prevent"])},[e("input",{id:"file-upload",type:"file",class:"hidden",onChange:g,ref_key:"fileInput",ref:h},null,544),b.value>0?(M(),S("div",Qe,[m(Ee,{progress:b.value},null,8,["progress"])])):j("",!0),m(o(Le),{class:n(["w-16 h-16 transition-colors duration-300",o(r)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},null,8,["class"]),e("p",{class:n(["mt-4 text-sm transition-colors duration-300 w-full text-center",o(r)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[e("span",Je,C(f.value?f.value.name:"点击或拖放文件到此处上传"),1)],2),e("p",{class:n(["mt-2 text-xs",o(r)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+C(o(N)(o(v).uploadSize)),3)],34)])):(M(),S("div",Ke,[k.value==="text"?(M(),S("div",Oe,[J(e("textarea",{id:"text-content","onUpdate:modelValue":t[3]||(t[3]=s=>p.value=s),rows:"7",class:n(["flex-grow px-4 py-3 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 resize-none",o(r)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[Y,p.value]])])):j("",!0)]))]),_:1}),e("div",Xe,[e("label",{class:n(["text-sm font-medium",o(r)?"text-gray-300":"text-gray-700"])}," 过期方式 ",2),J(e("select",{"onUpdate:modelValue":t[4]||(t[4]=s=>c.value=s),class:n(["px-4 py-2 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500",o(r)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},[(M(!0),S(Z,null,ee(o(v).expireStyle,s=>(M(),S("option",{value:s,key:s},C(G(s)),9,Ye))),128))],2),[[Ce,c.value]]),c.value!=="forever"?(M(),S("div",Ze,[e("div",et,[J(e("input",{"onUpdate:modelValue":t[5]||(t[5]=s=>a.value=s),type:"number",placeholder:de(),class:n(["w-full px-4 py-2 pr-16 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500",o(r)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},null,10,tt),[[Y,a.value]]),e("span",{class:n(["absolute right-3 top-1/2 transform -translate-y-1/2",o(r)?"text-gray-300":"text-gray-700"])},C(G()),3)])])):j("",!0)]),e("button",ot,[t[9]||(t[9]=e("span",{class:"absolute top-0 left-0 w-full h-full bg-white opacity-0 group-hover:opacity-20 transition-opacity duration-300"},null,-1)),e("span",rt,[m(o(Ve),{class:"w-6 h-6 mr-2"}),t[8]||(t[8]=e("span",null,"安全寄送",-1))])])],32),e("div",at,[m(d,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:B(()=>t[10]||(t[10]=[U(" 需要取件?点击这里 ")])),_:1})])]),e("div",{class:n(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[o(r)?"bg-gray-800":"bg-gray-100"]])},[e("span",{class:n(["text-sm flex items-center",[o(r)?"text-gray-300":"text-gray-800"]])},[m(o(Ie),{class:"w-4 h-4 mr-1 text-green-400"}),t[11]||(t[11]=U(" 安全加密 "))],2),e("button",{onClick:O,class:n(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[o(r)?"text-indigo-400":"text-indigo-600"]])},[t[12]||(t[12]=U(" 发件记录 ")),m(o(De),{class:"w-4 h-4 ml-1"})],2)],2)],2),m(K,{name:"drawer"},{default:B(()=>[y.value?(M(),S("div",{key:0,class:n(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[o(r)?"bg-gray-900":"bg-white"]])},[e("div",{class:n(["flex justify-between items-center p-6 border-b",[o(r)?"border-gray-700":"border-gray-200"]])},[e("h3",{class:n(["text-2xl font-bold",[o(r)?"text-white":"text-gray-800"]])}," 发件记录 ",2),e("button",{onClick:O,class:n(["hover:text-white transition duration-300",[o(r)?"text-gray-400":"text-gray-800"]])},[m(o(Me),{class:"w-6 h-6"})],2)],2),e("div",st,[m(ze,{name:"list",tag:"div",class:"space-y-4"},{default:B(()=>[(M(!0),S(Z,null,ee(x.value,s=>(M(),S("div",{key:s.id,class:n(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[o(r)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[e("div",nt,[m(o(te),{class:n(["w-10 h-10",[o(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),e("div",lt,[e("p",{class:n(["font-medium text-lg truncate",[o(r)?"text-white":"text-gray-800"]])},C(s.filename?s.filename:"Text"),3),e("p",{class:n(["text-sm truncate",[o(r)?"text-gray-400":"text-gray-600"]])},C(s.date)+" · "+C(s.size),3)]),e("div",it,[e("button",{onClick:w=>o(oe)(s.retrieveCode),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[o(r)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[m(o(Be),{class:"w-5 h-5"})],10,ct),e("button",{onClick:w=>fe(s),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[o(r)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[m(o(Fe),{class:"w-5 h-5"})],10,dt),e("button",{onClick:w=>ve(s.id),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[o(r)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[m(o(Re),{class:"w-5 h-5"})],10,ut)])],2))),128))]),_:1})])],2)):j("",!0)]),_:1}),m(K,{name:"fade"},{default:B(()=>[z.value?(M(),S("div",pt,[e("div",{class:n(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70",[o(r)?"bg-gray-800":"bg-white"]])},[e("h3",{class:n(["text-2xl font-bold mb-6",[o(r)?"text-white":"text-gray-800"]])}," 文件详情 ",2),e("div",gt,[e("div",ht,[m(o(te),{class:n(["w-6 h-6 mr-3",[o(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([o(r)?"text-gray-300":"text-gray-800"])},[t[13]||(t[13]=e("span",{class:"font-medium"},"文件名:",-1)),U(C(z.value.filename),1)],2)]),e("div",ft,[m(o(Pe),{class:n(["w-6 h-6 mr-3",[o(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([o(r)?"text-gray-300":"text-gray-800"])},[t[14]||(t[14]=e("span",{class:"font-medium"},"发送日期:",-1)),U(C(z.value.date),1)],2)]),e("div",vt,[m(o(Ue),{class:n(["w-6 h-6 mr-3",[o(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([o(r)?"text-gray-300":"text-gray-800"])},[t[15]||(t[15]=e("span",{class:"font-medium"},"文件大小:",-1)),U(C(z.value.size),1)],2)]),e("div",xt,[m(o(je),{class:n(["w-6 h-6 mr-3",[o(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([o(r)?"text-gray-300":"text-gray-800"])},[t[16]||(t[16]=e("span",{class:"font-medium"},"过期时间:",-1)),U(C(z.value.expiration),1)],2)])]),e("div",mt,[e("div",yt,[e("h4",{class:n(["text-lg font-semibold mb-3",[o(r)?"text-white":"text-gray-800"]])}," 取件码 ",2),e("div",{class:"bg-gray-100 p-3 rounded-lg shadow-md cursor-pointer hover:bg-gray-200 transition-colors duration-300 w-full text-center",onClick:t[6]||(t[6]=s=>o(Ne)(z.value.retrieveCode))},[e("p",wt,C(z.value.retrieveCode),1)]),e("p",{class:n(["mt-2 text-sm",[o(r)?"text-gray-400":"text-gray-600"]])}," 点击复制取件码 ",2)]),e("div",bt,[e("h4",{class:n(["text-lg font-semibold mb-3",[o(r)?"text-white":"text-gray-800"]])}," 二维码 ",2),e("div",kt,[m($e,{value:me(z.value),size:128,level:"M"},null,8,["value"])]),e("p",{class:n(["mt-2 text-sm",[o(r)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)])]),e("button",{onClick:t[7]||(t[7]=s=>z.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):j("",!0)]),_:1})],32)}}}),At=se(_t,[["__scopeId","data-v-8f14eebe"]]);export{At as default}; diff --git a/themes/2024/assets/SendFileView-DqlRaD1M.css b/themes/2024/assets/SendFileView-DqlRaD1M.css deleted file mode 100644 index 5a991ee..0000000 --- a/themes/2024/assets/SendFileView-DqlRaD1M.css +++ /dev/null @@ -1 +0,0 @@ -.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.fade-enter-active[data-v-8f14eebe],.fade-leave-active[data-v-8f14eebe]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-8f14eebe],.fade-leave-to[data-v-8f14eebe]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-8f14eebe]{width:30rem}}.fade-enter-to[data-v-8f14eebe],.fade-leave-from[data-v-8f14eebe]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-8f14eebe],.drawer-leave-active[data-v-8f14eebe]{transition:transform .3s ease}.drawer-enter-from[data-v-8f14eebe],.drawer-leave-to[data-v-8f14eebe]{transform:translate(100%)}.list-enter-active[data-v-8f14eebe],.list-leave-active[data-v-8f14eebe]{transition:all .5s ease}.list-enter-from[data-v-8f14eebe],.list-leave-to[data-v-8f14eebe]{opacity:0;transform:translate(30px)} diff --git a/themes/2024/assets/SystemSettingsView-C4QzOR82.js b/themes/2024/assets/SystemSettingsView-DOa2Ilyz.js similarity index 99% rename from themes/2024/assets/SystemSettingsView-C4QzOR82.js rename to themes/2024/assets/SystemSettingsView-DOa2Ilyz.js index acb9370..eca5b64 100644 --- a/themes/2024/assets/SystemSettingsView-C4QzOR82.js +++ b/themes/2024/assets/SystemSettingsView-DOa2Ilyz.js @@ -1 +1 @@ -import{d as B,r as m,u as M,a as c,b as e,n as a,h as l,i as F,m as n,v as i,p as x,F as w,q as _,l as h,t as y,A as k,L as A,e as b}from"./index-DODrGbMr.js";const z={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},E={class:"space-y-4"},T={class:"grid grid-cols-1 gap-6"},W={class:"space-y-2"},K={class:"space-y-2"},I={class:"space-y-2"},j={class:"relative"},G={class:"space-y-2"},L={class:"space-y-2"},N=["value"],R={class:"space-y-2"},$={class:"grid grid-cols-1 gap-6 mt-8"},P={class:"space-y-2"},q={class:"space-y-2"},H={class:"space-y-4"},J={class:"space-y-2"},O={class:"space-y-4"},Q={class:"space-y-2"},X={key:0,class:"space-y-2"},Y={class:"flex items-center"},Z=["aria-checked"],ee={key:1,class:"space-y-4"},oe={class:"space-y-2"},re={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},te={class:"space-y-2"},ae={class:"space-y-2"},se={key:2,class:"space-y-4"},le={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ne={class:"space-y-2"},ie={class:"space-y-2"},de={class:"space-y-2"},ue={class:"space-y-2"},ge={class:"space-y-2"},ce={class:"space-y-2"},ye={class:"space-y-2"},be={class:"space-y-2"},pe={class:"flex items-center"},ve=["aria-checked"],me={class:"mt-8"},xe={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},he={class:"space-y-2"},fe={class:"flex items-center space-x-2"},we={class:"space-y-2"},_e={class:"flex items-center space-x-2"},ke={class:"space-y-2"},Ue={class:"flex items-center space-x-2"},Se={class:"space-y-2"},Ve={class:"flex flex-wrap gap-3"},Ce=["value"],De={class:"space-y-2"},Be={class:"flex items-center space-x-2"},Me={class:"space-y-2"},Fe={class:"flex items-center"},Ae=["aria-checked"],ze={class:"mt-8"},Ee={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Te={class:"space-y-2"},We={class:"flex items-center space-x-2"},Ke={class:"space-y-2"},Ie={class:"flex items-center space-x-2"},Le=B({__name:"SystemSettingsView",setup(je){const s=F("isDarkMode"),t=m({name:"",description:"",file_storage:"",webdav_url:"",webdav_username:"",webdav_password:"",themesChoices:[],expireStyle:[],admin_token:"",robotsText:"",keywords:"",notify_title:"",storage_path:"",notify_content:"",openUpload:1,uploadSize:1,enableChunk:0,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,themesSelect:""}),p=m(1),v=m("MB"),u=m(1),g=m("天"),U=(d,o)=>d*{秒:1,分:60,时:3600,天:86400}[o],S=()=>{k({url:"/admin/config/get",method:"get"}).then(d=>{t.value=d.detail;let o=t.value.uploadSize;o>=1024*1024*1024?(p.value=Math.round(o/(1024*1024*1024)),v.value="GB"):o>=1024*1024?(p.value=Math.round(o/(1024*1024)),v.value="MB"):(p.value=Math.round(o/1024),v.value="KB");let r=t.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=M(),V=(d,o)=>d*{KB:1024,MB:1048576,GB:1073741824}[o],C=()=>{const d={...t.value};d.uploadSize=V(p.value,v.value),u.value===0?d.max_save_seconds=7*86400:d.max_save_seconds=U(u.value,g.value),k({url:"/admin/config/update",method:"patch",data:d}).then(o=>{o.code==200?f.showAlert("保存成功","success"):f.showAlert(o.message,"error")})};return S(),(d,o)=>(b(),c("div",z,[e("h2",{class:a(["text-2xl font-bold mb-6",[l(s)?"text-white":"text-gray-800"]])}," 系统设置 ",2),e("div",{class:a(["space-y-6 rounded-lg shadow-md p-6",[l(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[e("section",E,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 基本设置 ",2),e("div",T,[e("div",W,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站名称 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[0]||(o[0]=r=>t.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",[l(s)?"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,t.value.name]])]),e("div",K,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站描述 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=r=>t.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",[l(s)?"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,t.value.description]])]),e("div",I,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 管理员密码 ",2),e("div",j,[n(e("input",{type:"password","onUpdate:modelValue":o[2]||(o[2]=r=>t.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",[l(s)?"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,t.value.admin_token]]),e("div",{class:a(["absolute inset-y-0 right-0 flex items-center pr-3 text-sm text-gray-400",[l(s)?"text-gray-500":"text-gray-400"]])},o[32]||(o[32]=[e("span",{class:"text-xs"},"留空则不修改",-1)]),2)])]),e("div",G,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 关键词 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[3]||(o[3]=r=>t.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",[l(s)?"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,t.value.keywords]])]),e("div",L,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 主题选择 ",2),n(e("select",{"onUpdate:modelValue":o[4]||(o[4]=r=>t.value.themesSelect=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",[l(s)?"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')"}},[(b(!0),c(w,null,_(t.value.themesChoices,r=>(b(),c("option",{value:r.key,key:r.key},y(r.name)+" (by "+y(r.author)+" V"+y(r.version)+") ",9,N))),128))],2),[[x,t.value.themesSelect]])]),e("div",R,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Robots.txt ",2),n(e("textarea",{"onUpdate:modelValue":o[5]||(o[5]=r=>t.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",[l(s)?"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,t.value.robotsText]])])]),e("div",$,[e("div",P,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知标题 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[6]||(o[6]=r=>t.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",[l(s)?"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,t.value.notify_title]])]),e("div",q,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知内容 ",2),n(e("textarea",{"onUpdate:modelValue":o[7]||(o[7]=r=>t.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",[l(s)?"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,t.value.notify_content]])])]),e("div",H,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 存储设置 ",2),e("div",J,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储路径 ",2),n(e("input",{type:"text",placeholder:"留空则使用默认路径,可不填写","onUpdate:modelValue":o[8]||(o[8]=r=>t.value.storage_path=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",[l(s)?"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,t.value.storage_path]])]),e("div",O,[e("div",Q,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储方式 ",2),n(e("select",{"onUpdate:modelValue":o[9]||(o[9]=r=>t.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",[l(s)?"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[33]||(o[33]=[e("option",{value:"local"},"本地存储",-1),e("option",{value:"s3"},"S3 存储",-1),e("option",{value:"webdav"},"Webdav 存储",-1)]),2),[[x,t.value.file_storage]])]),t.value.file_storage==="local"?(b(),c("div",X,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 开启切片上传(实验性功能,还在开发中,目前仅本地存储可用,可能会出现未知问题) ",2),e("div",Y,[e("button",{type:"button",onClick:o[10]||(o[10]=r=>t.value.enableChunk=t.value.enableChunk===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",[t.value.enableChunk===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.enableChunk===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",[t.value.enableChunk===1?"translate-x-5":"translate-x-0",l(s)&&t.value.enableChunk!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Z),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},y(t.value.enableChunk===1?"已开启":"已关闭"),3)])])):h("",!0),t.value.file_storage==="webdav"?(b(),c("div",ee,[e("div",oe,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav URL ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav URL","onUpdate:modelValue":o[11]||(o[11]=r=>t.value.webdav_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",[l(s)?"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,t.value.webdav_url]])]),e("div",re,[e("div",te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Username ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav Username","onUpdate:modelValue":o[12]||(o[12]=r=>t.value.webdav_username=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",[l(s)?"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,t.value.webdav_username]])]),e("div",ae,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Password ",2),n(e("input",{type:"password",placeholder:"请输入 Webdav Password","onUpdate:modelValue":o[13]||(o[13]=r=>t.value.webdav_password=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",[l(s)?"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,t.value.webdav_password]])])])])):h("",!0),t.value.file_storage==="s3"?(b(),c("div",se,[e("div",le,[e("div",ne,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 AccessKeyId ",2),n(e("input",{type:"text","onUpdate:modelValue":o[14]||(o[14]=r=>t.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",[l(s)?"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,t.value.s3_access_key_id]])]),e("div",ie,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 SecretAccessKey ",2),n(e("input",{type:"password","onUpdate:modelValue":o[15]||(o[15]=r=>t.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",[l(s)?"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,t.value.s3_secret_access_key]])]),e("div",de,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 BucketName ",2),n(e("input",{type:"text","onUpdate:modelValue":o[16]||(o[16]=r=>t.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",[l(s)?"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,t.value.s3_bucket_name]])]),e("div",ue,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 EndpointUrl ",2),n(e("input",{type:"text","onUpdate:modelValue":o[17]||(o[17]=r=>t.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",[l(s)?"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,t.value.s3_endpoint_url]])]),e("div",ge,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Region Name ",2),n(e("input",{type:"text","onUpdate:modelValue":o[18]||(o[18]=r=>t.value.s3_region_name=r),placeholder:"auto",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",[l(s)?"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,t.value.s3_region_name]])]),e("div",ce,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Signature Version ",2),n(e("select",{"onUpdate:modelValue":o[19]||(o[19]=r=>t.value.s3_signature_version=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",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[34]||(o[34]=[e("option",{value:"s3v2"},"S3v2",-1),e("option",{value:"s3v4"},"S3v4",-1)]),2),[[x,t.value.s3_signature_version]])]),e("div",ye,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Hostname ",2),n(e("input",{type:"text","onUpdate:modelValue":o[20]||(o[20]=r=>t.value.s3_hostname=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",[l(s)?"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,t.value.s3_hostname]])]),e("div",be,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 启用代理 ",2),e("div",pe,[e("button",{type:"button",onClick:o[21]||(o[21]=r=>t.value.s3_proxy=t.value.s3_proxy===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",[t.value.s3_proxy===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.s3_proxy===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",[t.value.s3_proxy===1?"translate-x-5":"translate-x-0",l(s)&&t.value.s3_proxy!==1?"bg-gray-100":"bg-white"]])},null,2)],10,ve),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},y(t.value.s3_proxy===1?"已开启":"已关闭"),3)])])])])):h("",!0)])]),e("div",me,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 上传限制 ",2),e("div",xe,[e("div",he,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟上传限制 ",2),e("div",fe,[n(e("input",{type:"number","onUpdate:modelValue":o[22]||(o[22]=r=>t.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",[l(s)?"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,t.value.uploadMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",we,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 上传数量限制 ",2),e("div",_e,[n(e("input",{type:"number","onUpdate:modelValue":o[23]||(o[23]=r=>t.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",[l(s)?"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,t.value.uploadCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"个文件",2)])]),e("div",ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 文件大小限制 ",2),e("div",Ue,[n(e("input",{type:"number","onUpdate:modelValue":o[24]||(o[24]=r=>p.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",[l(s)?"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,p.value]]),n(e("select",{"onUpdate:modelValue":o[25]||(o[25]=r=>v.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",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[35]||(o[35]=[e("option",{value:"KB"},"KB",-1),e("option",{value:"MB"},"MB",-1),e("option",{value:"GB"},"GB",-1)]),2),[[x,v.value]])])]),e("div",Se,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 过期方式 ",2),e("div",Ve,[(b(),c(w,null,_(["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[26]||(o[26]=D=>t.value.expireStyle=D),class:"peer sr-only"},null,8,Ce),[[A,t.value.expireStyle]]),e("div",{class:a(["px-4 py-2 rounded-full border-2 transition-all duration-200 select-none",[t.value.expireStyle.includes(r)?(l(s),"bg-indigo-600 border-indigo-600 text-white"):l(s)?"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"]])},y({day:"按天",hour:"按小时",minute:"按分钟",forever:"永久",count:"按次数"}[r]),3)])),64))])]),e("div",De,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 最长保存时间 ",2),e("div",Be,[n(e("input",{type:"number","onUpdate:modelValue":o[27]||(o[27]=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",[l(s)?"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[28]||(o[28]=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",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[36]||(o[36]=[e("option",{value:"秒"},"秒",-1),e("option",{value:"分"},"分",-1),e("option",{value:"时"},"时",-1),e("option",{value:"天"},"天",-1)]),2),[[x,g.value]])])]),e("div",Me,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 游客上传 ",2),e("div",Fe,[e("button",{type:"button",onClick:o[29]||(o[29]=r=>t.value.openUpload=t.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",[t.value.openUpload===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.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",[t.value.openUpload===1?"translate-x-5":"translate-x-0",l(s)&&t.value.openUpload!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Ae),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},y(t.value.openUpload===1?"已开启":"已关闭"),3)])])])]),e("div",ze,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 错误限制 ",2),e("div",Ee,[e("div",Te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟错误限制 ",2),e("div",We,[n(e("input",{type:"number","onUpdate:modelValue":o[30]||(o[30]=r=>t.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",[l(s)?"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,t.value.errorMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",Ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 错误次数限制 ",2),e("div",Ie,[n(e("input",{type:"number","onUpdate:modelValue":o[31]||(o[31]=r=>t.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",[l(s)?"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,t.value.errorCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"次",2)])])])]),e("div",{class:"flex justify-end mt-8"},[e("button",{onClick:C,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{Le as default}; +import{d as B,r as m,u as M,a as c,b as e,n as a,h as l,i as F,m as n,v as i,p as x,F as w,q as _,l as h,t as y,A as k,L as A,e as b}from"./index-Cv6iTFk7.js";const z={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},E={class:"space-y-4"},T={class:"grid grid-cols-1 gap-6"},W={class:"space-y-2"},K={class:"space-y-2"},I={class:"space-y-2"},j={class:"relative"},G={class:"space-y-2"},L={class:"space-y-2"},N=["value"],R={class:"space-y-2"},$={class:"grid grid-cols-1 gap-6 mt-8"},P={class:"space-y-2"},q={class:"space-y-2"},H={class:"space-y-4"},J={class:"space-y-2"},O={class:"space-y-4"},Q={class:"space-y-2"},X={key:0,class:"space-y-2"},Y={class:"flex items-center"},Z=["aria-checked"],ee={key:1,class:"space-y-4"},oe={class:"space-y-2"},re={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},te={class:"space-y-2"},ae={class:"space-y-2"},se={key:2,class:"space-y-4"},le={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ne={class:"space-y-2"},ie={class:"space-y-2"},de={class:"space-y-2"},ue={class:"space-y-2"},ge={class:"space-y-2"},ce={class:"space-y-2"},ye={class:"space-y-2"},be={class:"space-y-2"},pe={class:"flex items-center"},ve=["aria-checked"],me={class:"mt-8"},xe={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},he={class:"space-y-2"},fe={class:"flex items-center space-x-2"},we={class:"space-y-2"},_e={class:"flex items-center space-x-2"},ke={class:"space-y-2"},Ue={class:"flex items-center space-x-2"},Se={class:"space-y-2"},Ve={class:"flex flex-wrap gap-3"},Ce=["value"],De={class:"space-y-2"},Be={class:"flex items-center space-x-2"},Me={class:"space-y-2"},Fe={class:"flex items-center"},Ae=["aria-checked"],ze={class:"mt-8"},Ee={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Te={class:"space-y-2"},We={class:"flex items-center space-x-2"},Ke={class:"space-y-2"},Ie={class:"flex items-center space-x-2"},Le=B({__name:"SystemSettingsView",setup(je){const s=F("isDarkMode"),t=m({name:"",description:"",file_storage:"",webdav_url:"",webdav_username:"",webdav_password:"",themesChoices:[],expireStyle:[],admin_token:"",robotsText:"",keywords:"",notify_title:"",storage_path:"",notify_content:"",openUpload:1,uploadSize:1,enableChunk:0,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,themesSelect:""}),p=m(1),v=m("MB"),u=m(1),g=m("天"),U=(d,o)=>d*{秒:1,分:60,时:3600,天:86400}[o],S=()=>{k({url:"/admin/config/get",method:"get"}).then(d=>{t.value=d.detail;let o=t.value.uploadSize;o>=1024*1024*1024?(p.value=Math.round(o/(1024*1024*1024)),v.value="GB"):o>=1024*1024?(p.value=Math.round(o/(1024*1024)),v.value="MB"):(p.value=Math.round(o/1024),v.value="KB");let r=t.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=M(),V=(d,o)=>d*{KB:1024,MB:1048576,GB:1073741824}[o],C=()=>{const d={...t.value};d.uploadSize=V(p.value,v.value),u.value===0?d.max_save_seconds=7*86400:d.max_save_seconds=U(u.value,g.value),k({url:"/admin/config/update",method:"patch",data:d}).then(o=>{o.code==200?f.showAlert("保存成功","success"):f.showAlert(o.message,"error")})};return S(),(d,o)=>(b(),c("div",z,[e("h2",{class:a(["text-2xl font-bold mb-6",[l(s)?"text-white":"text-gray-800"]])}," 系统设置 ",2),e("div",{class:a(["space-y-6 rounded-lg shadow-md p-6",[l(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[e("section",E,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 基本设置 ",2),e("div",T,[e("div",W,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站名称 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[0]||(o[0]=r=>t.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",[l(s)?"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,t.value.name]])]),e("div",K,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站描述 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=r=>t.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",[l(s)?"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,t.value.description]])]),e("div",I,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 管理员密码 ",2),e("div",j,[n(e("input",{type:"password","onUpdate:modelValue":o[2]||(o[2]=r=>t.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",[l(s)?"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,t.value.admin_token]]),e("div",{class:a(["absolute inset-y-0 right-0 flex items-center pr-3 text-sm text-gray-400",[l(s)?"text-gray-500":"text-gray-400"]])},o[32]||(o[32]=[e("span",{class:"text-xs"},"留空则不修改",-1)]),2)])]),e("div",G,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 关键词 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[3]||(o[3]=r=>t.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",[l(s)?"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,t.value.keywords]])]),e("div",L,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 主题选择 ",2),n(e("select",{"onUpdate:modelValue":o[4]||(o[4]=r=>t.value.themesSelect=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",[l(s)?"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')"}},[(b(!0),c(w,null,_(t.value.themesChoices,r=>(b(),c("option",{value:r.key,key:r.key},y(r.name)+" (by "+y(r.author)+" V"+y(r.version)+") ",9,N))),128))],2),[[x,t.value.themesSelect]])]),e("div",R,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Robots.txt ",2),n(e("textarea",{"onUpdate:modelValue":o[5]||(o[5]=r=>t.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",[l(s)?"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,t.value.robotsText]])])]),e("div",$,[e("div",P,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知标题 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[6]||(o[6]=r=>t.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",[l(s)?"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,t.value.notify_title]])]),e("div",q,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知内容 ",2),n(e("textarea",{"onUpdate:modelValue":o[7]||(o[7]=r=>t.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",[l(s)?"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,t.value.notify_content]])])]),e("div",H,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 存储设置 ",2),e("div",J,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储路径 ",2),n(e("input",{type:"text",placeholder:"留空则使用默认路径,可不填写","onUpdate:modelValue":o[8]||(o[8]=r=>t.value.storage_path=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",[l(s)?"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,t.value.storage_path]])]),e("div",O,[e("div",Q,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储方式 ",2),n(e("select",{"onUpdate:modelValue":o[9]||(o[9]=r=>t.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",[l(s)?"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[33]||(o[33]=[e("option",{value:"local"},"本地存储",-1),e("option",{value:"s3"},"S3 存储",-1),e("option",{value:"webdav"},"Webdav 存储",-1)]),2),[[x,t.value.file_storage]])]),t.value.file_storage==="local"?(b(),c("div",X,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 开启切片上传(实验性功能,还在开发中,目前仅本地存储可用,可能会出现未知问题) ",2),e("div",Y,[e("button",{type:"button",onClick:o[10]||(o[10]=r=>t.value.enableChunk=t.value.enableChunk===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",[t.value.enableChunk===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.enableChunk===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",[t.value.enableChunk===1?"translate-x-5":"translate-x-0",l(s)&&t.value.enableChunk!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Z),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},y(t.value.enableChunk===1?"已开启":"已关闭"),3)])])):h("",!0),t.value.file_storage==="webdav"?(b(),c("div",ee,[e("div",oe,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav URL ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav URL","onUpdate:modelValue":o[11]||(o[11]=r=>t.value.webdav_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",[l(s)?"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,t.value.webdav_url]])]),e("div",re,[e("div",te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Username ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav Username","onUpdate:modelValue":o[12]||(o[12]=r=>t.value.webdav_username=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",[l(s)?"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,t.value.webdav_username]])]),e("div",ae,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Password ",2),n(e("input",{type:"password",placeholder:"请输入 Webdav Password","onUpdate:modelValue":o[13]||(o[13]=r=>t.value.webdav_password=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",[l(s)?"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,t.value.webdav_password]])])])])):h("",!0),t.value.file_storage==="s3"?(b(),c("div",se,[e("div",le,[e("div",ne,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 AccessKeyId ",2),n(e("input",{type:"text","onUpdate:modelValue":o[14]||(o[14]=r=>t.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",[l(s)?"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,t.value.s3_access_key_id]])]),e("div",ie,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 SecretAccessKey ",2),n(e("input",{type:"password","onUpdate:modelValue":o[15]||(o[15]=r=>t.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",[l(s)?"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,t.value.s3_secret_access_key]])]),e("div",de,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 BucketName ",2),n(e("input",{type:"text","onUpdate:modelValue":o[16]||(o[16]=r=>t.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",[l(s)?"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,t.value.s3_bucket_name]])]),e("div",ue,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 EndpointUrl ",2),n(e("input",{type:"text","onUpdate:modelValue":o[17]||(o[17]=r=>t.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",[l(s)?"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,t.value.s3_endpoint_url]])]),e("div",ge,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Region Name ",2),n(e("input",{type:"text","onUpdate:modelValue":o[18]||(o[18]=r=>t.value.s3_region_name=r),placeholder:"auto",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",[l(s)?"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,t.value.s3_region_name]])]),e("div",ce,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Signature Version ",2),n(e("select",{"onUpdate:modelValue":o[19]||(o[19]=r=>t.value.s3_signature_version=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",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[34]||(o[34]=[e("option",{value:"s3v2"},"S3v2",-1),e("option",{value:"s3v4"},"S3v4",-1)]),2),[[x,t.value.s3_signature_version]])]),e("div",ye,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Hostname ",2),n(e("input",{type:"text","onUpdate:modelValue":o[20]||(o[20]=r=>t.value.s3_hostname=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",[l(s)?"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,t.value.s3_hostname]])]),e("div",be,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 启用代理 ",2),e("div",pe,[e("button",{type:"button",onClick:o[21]||(o[21]=r=>t.value.s3_proxy=t.value.s3_proxy===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",[t.value.s3_proxy===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.s3_proxy===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",[t.value.s3_proxy===1?"translate-x-5":"translate-x-0",l(s)&&t.value.s3_proxy!==1?"bg-gray-100":"bg-white"]])},null,2)],10,ve),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},y(t.value.s3_proxy===1?"已开启":"已关闭"),3)])])])])):h("",!0)])]),e("div",me,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 上传限制 ",2),e("div",xe,[e("div",he,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟上传限制 ",2),e("div",fe,[n(e("input",{type:"number","onUpdate:modelValue":o[22]||(o[22]=r=>t.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",[l(s)?"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,t.value.uploadMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",we,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 上传数量限制 ",2),e("div",_e,[n(e("input",{type:"number","onUpdate:modelValue":o[23]||(o[23]=r=>t.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",[l(s)?"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,t.value.uploadCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"个文件",2)])]),e("div",ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 文件大小限制 ",2),e("div",Ue,[n(e("input",{type:"number","onUpdate:modelValue":o[24]||(o[24]=r=>p.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",[l(s)?"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,p.value]]),n(e("select",{"onUpdate:modelValue":o[25]||(o[25]=r=>v.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",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[35]||(o[35]=[e("option",{value:"KB"},"KB",-1),e("option",{value:"MB"},"MB",-1),e("option",{value:"GB"},"GB",-1)]),2),[[x,v.value]])])]),e("div",Se,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 过期方式 ",2),e("div",Ve,[(b(),c(w,null,_(["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[26]||(o[26]=D=>t.value.expireStyle=D),class:"peer sr-only"},null,8,Ce),[[A,t.value.expireStyle]]),e("div",{class:a(["px-4 py-2 rounded-full border-2 transition-all duration-200 select-none",[t.value.expireStyle.includes(r)?(l(s),"bg-indigo-600 border-indigo-600 text-white"):l(s)?"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"]])},y({day:"按天",hour:"按小时",minute:"按分钟",forever:"永久",count:"按次数"}[r]),3)])),64))])]),e("div",De,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 最长保存时间 ",2),e("div",Be,[n(e("input",{type:"number","onUpdate:modelValue":o[27]||(o[27]=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",[l(s)?"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[28]||(o[28]=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",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[36]||(o[36]=[e("option",{value:"秒"},"秒",-1),e("option",{value:"分"},"分",-1),e("option",{value:"时"},"时",-1),e("option",{value:"天"},"天",-1)]),2),[[x,g.value]])])]),e("div",Me,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 游客上传 ",2),e("div",Fe,[e("button",{type:"button",onClick:o[29]||(o[29]=r=>t.value.openUpload=t.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",[t.value.openUpload===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.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",[t.value.openUpload===1?"translate-x-5":"translate-x-0",l(s)&&t.value.openUpload!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Ae),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},y(t.value.openUpload===1?"已开启":"已关闭"),3)])])])]),e("div",ze,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 错误限制 ",2),e("div",Ee,[e("div",Te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟错误限制 ",2),e("div",We,[n(e("input",{type:"number","onUpdate:modelValue":o[30]||(o[30]=r=>t.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",[l(s)?"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,t.value.errorMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",Ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 错误次数限制 ",2),e("div",Ie,[n(e("input",{type:"number","onUpdate:modelValue":o[31]||(o[31]=r=>t.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",[l(s)?"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,t.value.errorCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"次",2)])])])]),e("div",{class:"flex justify-end mt-8"},[e("button",{onClick:C,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{Le as default}; diff --git a/themes/2024/assets/box-4qc9LeUs.js b/themes/2024/assets/box-D3pjVbpO.js similarity index 90% rename from themes/2024/assets/box-4qc9LeUs.js rename to themes/2024/assets/box-D3pjVbpO.js index aabf3ca..d4ad6db 100644 --- a/themes/2024/assets/box-4qc9LeUs.js +++ b/themes/2024/assets/box-D3pjVbpO.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-DODrGbMr.js";/** +import{c as a}from"./index-Cv6iTFk7.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/file-CzCZpmbi.js b/themes/2024/assets/file-C_3WBI8u.js similarity index 88% rename from themes/2024/assets/file-CzCZpmbi.js rename to themes/2024/assets/file-C_3WBI8u.js index afd3855..a1fef78 100644 --- a/themes/2024/assets/file-CzCZpmbi.js +++ b/themes/2024/assets/file-C_3WBI8u.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-DODrGbMr.js";/** +import{c as a}from"./index-Cv6iTFk7.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/fileData-CIXeVjba.js b/themes/2024/assets/fileData-BBcRSbAS.js similarity index 99% rename from themes/2024/assets/fileData-CIXeVjba.js rename to themes/2024/assets/fileData-BBcRSbAS.js index 3a8f64d..19e8a75 100644 --- a/themes/2024/assets/fileData-CIXeVjba.js +++ b/themes/2024/assets/fileData-BBcRSbAS.js @@ -1,4 +1,4 @@ -import{c as _,d as F,D as S,r as k,E as K,o as $,F as V,G as X,H as Y}from"./index-DODrGbMr.js";/** +import{c as _,d as F,D as S,r as k,E as K,o as $,F as V,G as X,H as Y}from"./index-Cv6iTFk7.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/index-DODrGbMr.js b/themes/2024/assets/index-Cv6iTFk7.js similarity index 99% rename from themes/2024/assets/index-DODrGbMr.js rename to themes/2024/assets/index-Cv6iTFk7.js index 7c85619..ca0a1b2 100644 --- a/themes/2024/assets/index-DODrGbMr.js +++ b/themes/2024/assets/index-Cv6iTFk7.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SendFileView-CnhaeT0s.js","assets/fileData-CIXeVjba.js","assets/file-CzCZpmbi.js","assets/trash-DdPsY65y.js","assets/SendFileView-DqlRaD1M.css","assets/RetrievewFileView-Bd3LCro9.js","assets/box-4qc9LeUs.js","assets/RetrievewFileView-eLn76fuM.css","assets/AdminLayout-ZenjtDj0.js","assets/AdminLayout-BA8HwEVA.css","assets/DashboardView-Bwdc9UeU.js","assets/FileManageView-DusG8LwU.js","assets/LoginView-BinjNy1N.js","assets/LoginView-CUDwFSJJ.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SendFileView-B_U1EQv_.js","assets/fileData-BBcRSbAS.js","assets/file-C_3WBI8u.js","assets/trash-BvQ_jbNG.js","assets/SendFileView-BIguT9JI.css","assets/RetrievewFileView-D7SdcE_L.js","assets/box-D3pjVbpO.js","assets/RetrievewFileView-eLn76fuM.css","assets/AdminLayout-BKo7bAwn.js","assets/AdminLayout-BA8HwEVA.css","assets/DashboardView-DCpSB9YD.js","assets/FileManageView-wzrO3Tfi.js","assets/LoginView-Cbf_aa1P.js","assets/LoginView-CUDwFSJJ.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.13 * (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/SendFileView-Cn `)}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[hi]=this[hi]={accessors:{}}).accessors,r=this.prototype;function o(i){const l=gn(i);s[l]||(Jh(r,i),s[l]=!0)}return b.isArray(t)?t.forEach(o):o(t),this}};Le.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(Le.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});b.freezeMethods(Le);function or(e,t){const n=this||Wn,s=t||n,r=Le.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 Rc(e){return!!(e&&e.__CANCEL__)}function fn(e,t,n){J.call(this,e??"canceled",J.ERR_CANCELED,t,n),this.name="CanceledError"}b.inherits(fn,J,{__CANCEL__:!0});function Cc(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Gh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Xh(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 gs=(e,t,n=3)=>{let s=0;const r=Xh(50,250);return Qh(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)},pi=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},mi=e=>(...t)=>b.asap(()=>e(...t)),Yh=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,Zh=ve.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 ep(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function tp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Tc(e,t){return e&&!ep(t)?tp(e,t):t}const gi=e=>e instanceof Le?{...e}:e;function Ut(e,t){t=t||{};const n={};function s(u,a,f,p){return b.isPlainObject(u)&&b.isPlainObject(a)?b.merge.call({caseless:p},u,a):b.isPlainObject(a)?b.merge({},a):b.isArray(a)?a.slice():a}function r(u,a,f,p){if(b.isUndefined(a)){if(!b.isUndefined(u))return s(void 0,u,f,p)}else return s(u,a,f,p)}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,f)=>r(gi(u),gi(a),f,!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 Ac=e=>{const t=Ut({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:i,auth:l}=t;t.headers=i=Le.from(i),t.url=Ec(Tc(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(ve.hasStandardBrowserEnv||ve.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(ve.hasStandardBrowserEnv&&(s&&b.isFunction(s)&&(s=s(t)),s||s!==!1&&Yh(t.url))){const u=r&&o&&Zh.read(o);u&&i.set(r,u)}return t},np=typeof XMLHttpRequest<"u",sp=np&&function(e){return new Promise(function(n,s){const r=Ac(e);let o=r.data;const i=Le.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=r,a,f,p,m,y;function _(){m&&m(),y&&y(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let x=new XMLHttpRequest;x.open(r.method.toUpperCase(),r.url,!0),x.timeout=r.timeout;function A(){if(!x)return;const P=Le.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),j={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:P,config:e,request:x};Cc(function(z){n(z),_()},function(z){s(z),_()},j),x=null}"onloadend"in x?x.onloadend=A:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(A)},x.onabort=function(){x&&(s(new J("Request aborted",J.ECONNABORTED,e,x)),x=null)},x.onerror=function(){s(new J("Network Error",J.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let L=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const j=r.transitional||Sc;r.timeoutErrorMessage&&(L=r.timeoutErrorMessage),s(new J(L,j.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,x)),x=null},o===void 0&&i.setContentType(null),"setRequestHeader"in x&&b.forEach(i.toJSON(),function(L,j){x.setRequestHeader(j,L)}),b.isUndefined(r.withCredentials)||(x.withCredentials=!!r.withCredentials),l&&l!=="json"&&(x.responseType=r.responseType),u&&([p,y]=gs(u,!0),x.addEventListener("progress",p)),c&&x.upload&&([f,m]=gs(c),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(a=P=>{x&&(s(!P||P.type?new fn(null,e,x):P),x.abort(),x=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const C=Gh(r.url);if(C&&ve.protocols.indexOf(C)===-1){s(new J("Unsupported protocol "+C+":",J.ERR_BAD_REQUEST,e));return}x.send(o||null)})},rp=(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 J?a:new fn(a instanceof Error?a.message:a))}};let i=t&&setTimeout(()=>{i=null,o(new J(`timeout ${t} of ms exceeded`,J.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}},op=function*(e,t){let n=e.byteLength;if(n{const r=ip(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})},Bs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Oc=Bs&&typeof ReadableStream=="function",cp=Bs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Pc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ap=Oc&&Pc(()=>{let e=!1;const t=new Request(ve.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),bi=64*1024,Cr=Oc&&Pc(()=>b.isReadableStream(new Response("").body)),ys={stream:Cr&&(e=>e.body)};Bs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ys[t]&&(ys[t]=b.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new J(`Response type '${t}' is not supported`,J.ERR_NOT_SUPPORT,s)})})})(new Response);const up=async e=>{if(e==null)return 0;if(b.isBlob(e))return e.size;if(b.isSpecCompliantForm(e))return(await new Request(ve.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 cp(e)).byteLength},fp=async(e,t)=>{const n=b.toFiniteNumber(e.getContentLength());return n??up(t)},dp=Bs&&(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}=Ac(e);u=u?(u+"").toLowerCase():"text";let m=rp([r,o&&o.toAbortSignal()],i),y;const _=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let x;try{if(c&&ap&&n!=="get"&&n!=="head"&&(x=await fp(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]=pi(x,gs(mi(c)));s=yi(j.body,bi,z,V)}}b.isString(f)||(f=f?"include":"omit");const A="credentials"in Request.prototype;y=new Request(t,{...p,signal:m,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:s,duplex:"half",credentials:A?f:void 0});let C=await fetch(y);const P=Cr&&(u==="stream"||u==="response");if(Cr&&(l||P&&_)){const j={};["status","statusText","headers"].forEach(N=>{j[N]=C[N]});const X=b.toFiniteNumber(C.headers.get("content-length")),[z,V]=l&&pi(X,gs(mi(l),!0))||[];C=new Response(yi(C.body,bi,z,()=>{V&&V(),_&&_()}),j)}u=u||"text";let L=await ys[b.findKey(ys,u)||"text"](C,e);return!P&&_&&_(),await new Promise((j,X)=>{Cc(j,X,{data:L,headers:Le.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:y})})}catch(A){throw _&&_(),A&&A.name==="TypeError"&&/fetch/i.test(A.message)?Object.assign(new J("Network Error",J.ERR_NETWORK,e,y),{cause:A.cause||A}):J.from(A,A&&A.code,e,y)}}),Tr={http:Th,xhr:sp,fetch:dp};b.forEach(Tr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const _i=e=>`- ${e}`,hp=e=>b.isFunction(e)||e===null||e===!1,Lc={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(_i).join(` `):" "+_i(o[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return s},adapters:Tr};function ir(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fn(null,e)}function vi(e){return ir(e),e.headers=Le.from(e.headers),e.data=or.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lc.getAdapter(e.adapter||Wn.adapter)(e).then(function(s){return ir(e),s.data=or.call(e,e.transformResponse,s),s.headers=Le.from(s.headers),s},function(s){return Rc(s)||(ir(e),s&&s.response&&(s.response.data=or.call(e,e.transformResponse,s.response),s.response.headers=Le.from(s.response.headers))),Promise.reject(s)})}const Ic="1.7.9",$s={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$s[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const wi={};$s.transitional=function(t,n,s){function r(o,i){return"[Axios v"+Ic+"] Transitional option '"+o+"'"+i+(s?". "+s:"")}return(o,i,l)=>{if(t===!1)throw new J(r(i," has been removed"+(n?" in "+n:"")),J.ERR_DEPRECATED);return n&&!wi[i]&&(wi[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}};$s.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function pp(e,t,n){if(typeof e!="object")throw new J("options must be an object",J.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 J("option "+o+" must be "+c,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+o,J.ERR_BAD_OPTION)}}const rs={assertOptions:pp,validators:$s},et=rs.validators;let Bt=class{constructor(t){this.defaults=t,this.interceptors={request:new di,response:new di}}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=Ut(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&rs.assertOptions(s,{silentJSONParsing:et.transitional(et.boolean),forcedJSONParsing:et.transitional(et.boolean),clarifyTimeoutError:et.transitional(et.boolean)},!1),r!=null&&(b.isFunction(r)?n.paramsSerializer={serialize:r}:rs.assertOptions(r,{encode:et.function,serialize:et.function},!0)),rs.assertOptions(n,{baseUrl:et.spelling("baseURL"),withXsrfToken:et.spelling("withXSRFToken")},!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=Le.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(c=c&&_.synchronous,l.unshift(_.fulfilled,_.rejected))});const u=[];this.interceptors.response.forEach(function(_){u.push(_.fulfilled,_.rejected)});let a,f=0,p;if(!c){const y=[vi.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 fn(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 Nc(function(r){t=r}),cancel:t}}};function gp(e){return function(n){return e.apply(null,n)}}function yp(e){return b.isObject(e)&&e.isAxiosError===!0}const Ar={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(Ar).forEach(([e,t])=>{Ar[t]=e});function Mc(e){const t=new Bt(e),n=uc(Bt.prototype.request,t);return b.extend(n,Bt.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Mc(Ut(e,r))},n}const he=Mc(Wn);he.Axios=Bt;he.CanceledError=fn;he.CancelToken=mp;he.isCancel=Rc;he.VERSION=Ic;he.toFormData=js;he.AxiosError=J;he.Cancel=he.CanceledError;he.all=function(t){return Promise.all(t)};he.spread=gp;he.isAxiosError=yp;he.mergeConfig=Ut;he.AxiosHeaders=Le;he.formToJSON=e=>xc(b.isHTMLForm(e)?new FormData(e):e);he.getAdapter=Lc.getAdapter;he.HttpStatusCode=Ar;he.default=he;const{Axios:Kp,AxiosError:Wp,CanceledError:zp,isCancel:Jp,CancelToken:Gp,VERSION:Xp,all:Qp,Cancel:Yp,isAxiosError:Zp,spread:em,toFormData:tm,AxiosHeaders:nm,HttpStatusCode:sm,formToJSON:rm,getAdapter:om,mergeConfig:im}=he,bp="",kc=bp,Zr=he.create({baseURL:kc,timeout:1e15,headers:{"Content-Type":"application/json"}});Zr.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e.url&&!e.url.startsWith("http")&&(e.url=`${kc}/${e.url.replace(/^\//,"")}`),e},e=>Promise.reject(e));Zr.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 Fc=Cf("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)}}}}),_p={class:"p-4"},vp={class:"flex items-start"},wp={class:"flex-shrink-0"},Ep={class:"ml-3 flex-1 pt-0.5"},Sp=["innerHTML"],xp={class:"ml-4 flex-shrink-0 flex"},Rp=["onClick"],Cp={class:"h-1 bg-white bg-opacity-25"},Tp=Vn({__name:"AlertComponent",setup(e){const t=Fc(),{alerts:n}=Tf(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:kd,error:Bd,warning:Md,info:Fd};let l;return As(()=>{l=setInterval(()=>{n.value.forEach(c=>{r(c.id)})},100)}),qr(()=>{clearInterval(l)}),(c,u)=>(qe(),tn(lf,{name:"alert-fade",tag:"div",class:"fixed top-4 left-4 z-50 w-full sm:max-w-sm md:max-w-md space-y-4 px-4 sm:px-0"},{default:us(()=>[(qe(!0),Nn(He,null,Va(Oe(n),a=>(qe(),Nn("div",{key:a.id,class:an(["w-full rounded-lg shadow-xl overflow-hidden","bg-gradient-to-r",o[a.type]])},[ke("div",_p,[ke("div",vp,[ke("div",wp,[(qe(),tn(ml(i[a.type]),{class:"h-6 w-6 text-white"}))]),ke("div",Ep,[ke("p",{class:"text-sm font-medium text-white",innerHTML:a.message},null,8,Sp)]),ke("div",xp,[ke("button",{onClick:f=>Oe(s)(a.id),class:"inline-flex text-white hover:text-gray-200 focus:outline-none transition-colors duration-200"},[u[0]||(u[0]=ke("span",{class:"sr-only"},"关闭",-1)),me(Oe($d),{class:"h-5 w-5"})],8,Rp)])])]),ke("div",Cp,[ke("div",{class:"h-full bg-white transition-all duration-100 ease-out",style:Es({width:`${a.progress}%`})},null,4)])],2))),128))]),_:1}))}}),Ap=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Op=Ap(Tp,[["__scopeId","data-v-6fdbaa84"]]),Pp={key:0,class:"loading-overlay"},Lp=Vn({__name:"App",setup(e){const t=en(!1),n=en(!1),s=Ld(),r=Fc(),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 As(()=>{const c=i();l(c!==null?c:o()),Zr.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")))})}),fu(()=>{document.documentElement.classList.toggle("dark",t.value)}),s.beforeEach((c,u,a)=>{n.value=!0,a()}),s.afterEach(()=>{setTimeout(()=>{n.value=!1},200)}),jt("isDarkMode",t),jt("setColorMode",l),jt("isLoading",n),(c,u)=>(qe(),Nn("div",{class:an(["app-container",t.value?"dark":"light"])},[me(Hd,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=a=>t.value=a)},null,8,["modelValue"]),n.value?(qe(),Nn("div",Pp,u[1]||(u[1]=[ke("div",{class:"loading-spinner"},null,-1)]))):xu("",!0),me(Oe(ac),null,{default:us(({Component:a})=>[me($u,{name:"fade",mode:"out-in"},{default:us(()=>[(qe(),tn(ml(a),{key:c.$route.fullPath}))]),_:2},1024)]),_:1}),me(Op)],2))}}),Ip="modulepreload",Np=function(e){return"/"+e},Ei={},Nt=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=Np(c),c in Ei)return;Ei[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":Ip,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)})},Mp=()=>Nt(()=>import("./SendFileView-CnhaeT0s.js"),__vite__mapDeps([0,1,2,3,4])),kp=Od({history:od("/"),routes:[{path:"/",name:"Retrieve",component:()=>Nt(()=>import("./RetrievewFileView-Bd3LCro9.js"),__vite__mapDeps([5,1,6,2,3,7]))},{path:"/send",name:"Send",component:Mp},{path:"/admin",name:"Manage",component:()=>Nt(()=>import("./AdminLayout-ZenjtDj0.js"),__vite__mapDeps([8,6,9])),redirect:"/admin/dashboard",children:[{path:"/admin/dashboard",name:"Dashboard",component:()=>Nt(()=>import("./DashboardView-Bwdc9UeU.js"),__vite__mapDeps([10,2,3]))},{path:"/admin/files",name:"FileManage",component:()=>Nt(()=>import("./FileManageView-DusG8LwU.js"),__vite__mapDeps([11,2]))},{path:"/admin/settings",name:"Settings",component:()=>Nt(()=>import("./SystemSettingsView-C4QzOR82.js"),[])}]},{path:"/login",name:"Login",component:()=>Nt(()=>import("./LoginView-BinjNy1N.js"),__vite__mapDeps([12,6,13]))}]}),eo=yf(Lp);eo.use(vf());eo.use(kp);eo.mount("#app");export{Zr as A,Tf as B,Up as C,nn as D,fl as E,He as F,Cf as G,Hn as H,qr as I,tn as J,ml as K,Bp as L,$u as T,$d as X,Ap as _,Nn as a,ke as b,qt as c,Vn as d,qe as e,Fe as f,me as g,Oe as h,Pe as i,Hp as j,us as k,xu as l,Fp as m,an as n,As as o,$p as p,Va as q,en as r,Su as s,Xc as t,Fc as u,jp as v,Sn as w,Dp as x,lf as y,Ld as z}; +`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ut(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&rs.assertOptions(s,{silentJSONParsing:et.transitional(et.boolean),forcedJSONParsing:et.transitional(et.boolean),clarifyTimeoutError:et.transitional(et.boolean)},!1),r!=null&&(b.isFunction(r)?n.paramsSerializer={serialize:r}:rs.assertOptions(r,{encode:et.function,serialize:et.function},!0)),rs.assertOptions(n,{baseUrl:et.spelling("baseURL"),withXsrfToken:et.spelling("withXSRFToken")},!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=Le.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(c=c&&_.synchronous,l.unshift(_.fulfilled,_.rejected))});const u=[];this.interceptors.response.forEach(function(_){u.push(_.fulfilled,_.rejected)});let a,f=0,p;if(!c){const y=[vi.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 fn(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 Nc(function(r){t=r}),cancel:t}}};function gp(e){return function(n){return e.apply(null,n)}}function yp(e){return b.isObject(e)&&e.isAxiosError===!0}const Ar={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(Ar).forEach(([e,t])=>{Ar[t]=e});function Mc(e){const t=new Bt(e),n=uc(Bt.prototype.request,t);return b.extend(n,Bt.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Mc(Ut(e,r))},n}const he=Mc(Wn);he.Axios=Bt;he.CanceledError=fn;he.CancelToken=mp;he.isCancel=Rc;he.VERSION=Ic;he.toFormData=js;he.AxiosError=J;he.Cancel=he.CanceledError;he.all=function(t){return Promise.all(t)};he.spread=gp;he.isAxiosError=yp;he.mergeConfig=Ut;he.AxiosHeaders=Le;he.formToJSON=e=>xc(b.isHTMLForm(e)?new FormData(e):e);he.getAdapter=Lc.getAdapter;he.HttpStatusCode=Ar;he.default=he;const{Axios:Kp,AxiosError:Wp,CanceledError:zp,isCancel:Jp,CancelToken:Gp,VERSION:Xp,all:Qp,Cancel:Yp,isAxiosError:Zp,spread:em,toFormData:tm,AxiosHeaders:nm,HttpStatusCode:sm,formToJSON:rm,getAdapter:om,mergeConfig:im}=he,bp="",kc=bp,Zr=he.create({baseURL:kc,timeout:1e15,headers:{"Content-Type":"application/json"}});Zr.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e.url&&!e.url.startsWith("http")&&(e.url=`${kc}/${e.url.replace(/^\//,"")}`),e},e=>Promise.reject(e));Zr.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 Fc=Cf("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)}}}}),_p={class:"p-4"},vp={class:"flex items-start"},wp={class:"flex-shrink-0"},Ep={class:"ml-3 flex-1 pt-0.5"},Sp=["innerHTML"],xp={class:"ml-4 flex-shrink-0 flex"},Rp=["onClick"],Cp={class:"h-1 bg-white bg-opacity-25"},Tp=Vn({__name:"AlertComponent",setup(e){const t=Fc(),{alerts:n}=Tf(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:kd,error:Bd,warning:Md,info:Fd};let l;return As(()=>{l=setInterval(()=>{n.value.forEach(c=>{r(c.id)})},100)}),qr(()=>{clearInterval(l)}),(c,u)=>(qe(),tn(lf,{name:"alert-fade",tag:"div",class:"fixed top-4 left-4 z-50 w-full sm:max-w-sm md:max-w-md space-y-4 px-4 sm:px-0"},{default:us(()=>[(qe(!0),Nn(He,null,Va(Oe(n),a=>(qe(),Nn("div",{key:a.id,class:an(["w-full rounded-lg shadow-xl overflow-hidden","bg-gradient-to-r",o[a.type]])},[ke("div",_p,[ke("div",vp,[ke("div",wp,[(qe(),tn(ml(i[a.type]),{class:"h-6 w-6 text-white"}))]),ke("div",Ep,[ke("p",{class:"text-sm font-medium text-white",innerHTML:a.message},null,8,Sp)]),ke("div",xp,[ke("button",{onClick:f=>Oe(s)(a.id),class:"inline-flex text-white hover:text-gray-200 focus:outline-none transition-colors duration-200"},[u[0]||(u[0]=ke("span",{class:"sr-only"},"关闭",-1)),me(Oe($d),{class:"h-5 w-5"})],8,Rp)])])]),ke("div",Cp,[ke("div",{class:"h-full bg-white transition-all duration-100 ease-out",style:Es({width:`${a.progress}%`})},null,4)])],2))),128))]),_:1}))}}),Ap=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Op=Ap(Tp,[["__scopeId","data-v-6fdbaa84"]]),Pp={key:0,class:"loading-overlay"},Lp=Vn({__name:"App",setup(e){const t=en(!1),n=en(!1),s=Ld(),r=Fc(),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 As(()=>{const c=i();l(c!==null?c:o()),Zr.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")))})}),fu(()=>{document.documentElement.classList.toggle("dark",t.value)}),s.beforeEach((c,u,a)=>{n.value=!0,a()}),s.afterEach(()=>{setTimeout(()=>{n.value=!1},200)}),jt("isDarkMode",t),jt("setColorMode",l),jt("isLoading",n),(c,u)=>(qe(),Nn("div",{class:an(["app-container",t.value?"dark":"light"])},[me(Hd,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=a=>t.value=a)},null,8,["modelValue"]),n.value?(qe(),Nn("div",Pp,u[1]||(u[1]=[ke("div",{class:"loading-spinner"},null,-1)]))):xu("",!0),me(Oe(ac),null,{default:us(({Component:a})=>[me($u,{name:"fade",mode:"out-in"},{default:us(()=>[(qe(),tn(ml(a),{key:c.$route.fullPath}))]),_:2},1024)]),_:1}),me(Op)],2))}}),Ip="modulepreload",Np=function(e){return"/"+e},Ei={},Nt=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=Np(c),c in Ei)return;Ei[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":Ip,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)})},Mp=()=>Nt(()=>import("./SendFileView-B_U1EQv_.js"),__vite__mapDeps([0,1,2,3,4])),kp=Od({history:od("/"),routes:[{path:"/",name:"Retrieve",component:()=>Nt(()=>import("./RetrievewFileView-D7SdcE_L.js"),__vite__mapDeps([5,1,6,2,3,7]))},{path:"/send",name:"Send",component:Mp},{path:"/admin",name:"Manage",component:()=>Nt(()=>import("./AdminLayout-BKo7bAwn.js"),__vite__mapDeps([8,6,9])),redirect:"/admin/dashboard",children:[{path:"/admin/dashboard",name:"Dashboard",component:()=>Nt(()=>import("./DashboardView-DCpSB9YD.js"),__vite__mapDeps([10,2,3]))},{path:"/admin/files",name:"FileManage",component:()=>Nt(()=>import("./FileManageView-wzrO3Tfi.js"),__vite__mapDeps([11,2]))},{path:"/admin/settings",name:"Settings",component:()=>Nt(()=>import("./SystemSettingsView-DOa2Ilyz.js"),[])}]},{path:"/login",name:"Login",component:()=>Nt(()=>import("./LoginView-Cbf_aa1P.js"),__vite__mapDeps([12,6,13]))}]}),eo=yf(Lp);eo.use(vf());eo.use(kp);eo.mount("#app");export{Zr as A,Tf as B,Up as C,nn as D,fl as E,He as F,Cf as G,Hn as H,qr as I,tn as J,ml as K,Bp as L,$u as T,$d as X,Ap as _,Nn as a,ke as b,qt as c,Vn as d,qe as e,Fe as f,me as g,Oe as h,Pe as i,Hp as j,us as k,xu as l,Fp as m,an as n,As as o,$p as p,Va as q,en as r,Su as s,Xc as t,Fc as u,jp as v,Sn as w,Dp as x,lf as y,Ld as z}; diff --git a/themes/2024/assets/trash-DdPsY65y.js b/themes/2024/assets/trash-BvQ_jbNG.js similarity index 95% rename from themes/2024/assets/trash-DdPsY65y.js rename to themes/2024/assets/trash-BvQ_jbNG.js index e411d54..bb6ff44 100644 --- a/themes/2024/assets/trash-DdPsY65y.js +++ b/themes/2024/assets/trash-BvQ_jbNG.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-DODrGbMr.js";/** +import{c as a}from"./index-Cv6iTFk7.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/index.html b/themes/2024/index.html index 1c75b34..e390e64 100644 --- a/themes/2024/index.html +++ b/themes/2024/index.html @@ -12,7 +12,7 @@ {{title}} - +