27 lines
22 KiB
Python
27 lines
22 KiB
Python
import{c as V,d as ce,r as I,o as de,w as ze,a as S,b as e,e as M,_ as ue,u as Te,f as Ie,g as m,n as l,h as s,i as Ae,t as C,j as E,k as j,l as B,m as J,v as se,T as K,p as De,F as oe,q as ae,s as N,x as $e,X as re,y as Fe,z as Pe,A as L}from"./index-DVYjJiZ2.js";import{u as Ue,S as ne,C as Re,c as je,a as Be,Q as Le,b as X,E as Ve}from"./clipboard-CRcPorkx.js";import{F as le}from"./file-D9qp8qCA.js";import{T as He}from"./trash-B-2Q70HV.js";/**
|
||
* @license lucide-vue-next v0.445.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Y=V("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 qe=V("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 Ee=V("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 Ne=V("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"}]]);/**
|
||
* @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 We=V("TerminalIcon",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),Ge=ce({__name:"BorderProgressBar",props:{progress:{}},setup(D){const z=D,U=I(null),a=I(null);let u=null;const w=()=>{if(!u||!a.value||!U.value)return;const g=U.value.clientWidth,f=U.value.clientHeight;a.value.width=g,a.value.height=f;const d=4,n=8;u.lineWidth=d;const v=u.createLinearGradient(0,0,g,f);v.addColorStop(0,"#4f46e5"),v.addColorStop(.5,"#7c3aed"),v.addColorStop(1,"#db2777"),u.strokeStyle="rgba(229, 231, 235, 0.2)",k(u,d/2,d/2,g-d,f-d,n),u.stroke();const b=((g+f)*2-8*n+2*Math.PI*n)*z.progress/100;u.strokeStyle=v,u.lineCap="round",u.lineJoin="round",u.beginPath();let c=b;const x=d/2,T=g-d,$=f-d;if(c>0){const p=Math.min(T-2*n,c);u.moveTo(n+x,x),u.lineTo(p+n+x,x),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/n);u.arc(T-n+x,n+x,n,-Math.PI/2,p-Math.PI/2,!1),c-=p*n}if(c>0){const p=Math.min($-2*n,c);u.lineTo(T+x,p+n+x),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/n);u.arc(T-n+x,$-n+x,n,0,p,!1),c-=p*n}if(c>0){const p=Math.min(T-2*n,c);u.lineTo(T-p-n+x,$+x),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/n);u.arc(n+x,$-n+x,n,Math.PI/2,Math.PI/2+p,!1),c-=p*n}if(c>0){const p=Math.min($-2*n,c);u.lineTo(x,$-p-n+x),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/n);u.arc(n+x,n+x,n,Math.PI,Math.PI+p,!1)}u.stroke()};function k(g,f,d,n,v,y){g.beginPath(),g.moveTo(f+y,d),g.lineTo(f+n-y,d),g.arcTo(f+n,d,f+n,d+y,y),g.lineTo(f+n,d+v-y),g.arcTo(f+n,d+v,f+n-y,d+v,y),g.lineTo(f+y,d+v),g.arcTo(f,d+v,f,d+v-y,y),g.lineTo(f,d+y),g.arcTo(f,d,f+y,d,y),g.closePath()}return de(()=>{a.value&&(u=a.value.getContext("2d"),w())}),ze(()=>z.progress,w),(g,f)=>(M(),S("div",{class:"border-progress-container",ref_key:"container",ref:U},[e("canvas",{ref_key:"canvas",ref:a,class:"border-progress-canvas"},null,512)],512))}}),Oe=ue(Ge,[["__scopeId","data-v-2fbf5085"]]),ie=D=>D>=1024*1024*1024?Math.round(D/(1024*1024*1024))+"GB":D>=1024*1024?Math.round(D/(1024*1024))+"MB":Math.round(D/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"},st=["value"],ot={key:0,class:"flex items-center space-x-2"},at={class:"relative flex-grow"},rt=["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"},gt={class:"flex-shrink-0 flex space-x-2"},pt=["onClick"],ht=["onClick"],ft=["onClick"],mt={key:0,class:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-3 sm:p-4 overflow-y-auto"},xt={class:"flex items-center justify-between"},vt={class:"p-4 sm:p-6"},yt={class:"flex items-center mb-3 sm:mb-4"},bt={class:"ml-3 sm:ml-4"},wt={class:"grid grid-cols-2 gap-3 sm:gap-4"},kt={class:"flex items-center"},_t={class:"flex items-center"},Ct={class:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6"},St={class:"space-y-3 sm:space-y-4"},Mt={class:"bg-gradient-to-br from-indigo-500 to-purple-600 rounded-xl p-4 sm:p-5 text-white"},zt={class:"flex items-center justify-between mb-3 sm:mb-4"},Tt={class:"text-2xl sm:text-3xl font-bold tracking-wider text-center"},It={class:"flex items-center justify-between mb-2 sm:mb-3"},At={class:"bg-white p-3 sm:p-4 rounded-lg shadow-sm mb-3 sm:mb-4"},Dt=ce({__name:"SendFileView",setup(D){const z=JSON.parse(localStorage.getItem("config")||"{}"),U=Pe(),a=Ae("isDarkMode"),u=Ue(),w=I("file"),k=I(null),g=I(""),f=I(null),d=I("day"),n=I("1"),v=I(0),y=I(!1),b=I(null),c=Te(),x=Ie(()=>u.shareData),T=I(""),$=()=>{var r;(r=f.value)==null||r.click()},p=async r=>{const t=r.target;if(t.files&&t.files.length>0){const i=t.files[0];if(k.value=i,!O())return;T.value=await W(i),console.log(T.value)}},ge=async r=>{var t;if((t=r.dataTransfer)!=null&&t.files&&r.dataTransfer.files.length>0){const i=r.dataTransfer.files[0];if(k.value=i,!O())return;T.value=await W(i)}},pe=async r=>{var i;const t=(i=r.clipboardData)==null?void 0:i.items;if(t)for(const o of t)if(o.kind==="file"){const h=o.getAsFile();if(h){if(h.size===0){c.showAlert("无法读取空文件","error");return}if(h.type.startsWith("image/")){if(k.value=h,!O())return;try{T.value=await W(h),c.showAlert("已从剪贴板添加图片:"+h.name,"success")}catch(_){c.showAlert("文件处理失败","error"),console.error("File hash calculation failed:",_)}}else c.showAlert("目前仅支持粘贴图片文件","warning");break}}else w.value="text",t[0].getAsString(h=>{g.value+=h})},W=async r=>new Promise(t=>{const o=new FileReader;let h=0;const _=Math.ceil(r.size/2097152);o.onload=async F=>{const A=new Uint8Array(F.target.result);try{if(window.isSecureContext){const P=await crypto.subtle.digest("SHA-256",A),Q=Array.from(new Uint8Array(P)).map(q=>q.toString(16).padStart(2,"0")).join("");h++,h<_?R():t(Q)}else{const P=Z(r);t(P)}}catch{const H=Z(r);t(H)}};const R=()=>{const F=h*2097152,A=F+2097152>=r.size?r.size:F+2097152;o.readAsArrayBuffer(r.slice(F,A))};R()}),Z=r=>{const t=`${r.name}-${r.size}-${r.lastModified}`;let i=0;for(let o=0;o<t.length;o++){const h=t.charCodeAt(o);i=(i<<5)-i+h,i=i&i}return Math.abs(i).toString(16).padStart(64,"0")},he=(r=d.value)=>{switch(r){case"day":return"输入天数";case"hour":return"输入小时数";case"minute":return"输入分钟数";case"count":return"输入查看次数";case"forever":return"永久";default:return"输入值"}},G=(r=d.value)=>{switch(r){case"day":return"天";case"hour":return"小时";case"minute":return"分钟";case"count":return"次";case"forever":return"永久";default:return""}},fe=async r=>{var t,i;try{const h=Math.ceil(r.size/5242880),_=await L.post("chunk/upload/init/",{file_name:r.name,file_size:r.size,chunk_size:5242880,file_hash:T.value});if(_.code!==200)throw new Error("初始化切片上传失败");if(_.detail.existed)return _;const R=_.detail.upload_id;for(let A=0;A<h;A++){const P=A*5242880,H=Math.min(P+5242880,r.size),Q=r.slice(P,H),q=new FormData;if(q.append("chunk",new Blob([Q],{type:r.type})),(await L.post(`chunk/upload/chunk/${R}/${A}`,q,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:Se=>{const Me=Math.round((A*5242880+Se.loaded)*100/r.size);v.value=Me}})).code!==200)throw new Error(`切片 ${A} 上传失败`)}const F=await L.post(`chunk/upload/complete/${R}`,{expire_value:n.value?parseInt(n.value):1,expire_style:d.value});if(F.code!==200)throw new Error("完成上传失败");return F}catch(o){throw console.error("切片上传失败:",o),(i=(t=o.response)==null?void 0:t.data)!=null&&i.detail?c.showAlert(o.response.data.detail,"error"):c.showAlert("上传失败,请稍后重试","error"),o}},me=async r=>{const t=new FormData,i={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:h=>{const _=Math.round(h.loaded*100/h.total);v.value=_}};return t.append("file",r),t.append("expire_value",n.value),t.append("expire_style",d.value),await L.post("share/file/",t,i)},xe=()=>z.openUpload===0&&localStorage.getItem("token")===null?(c.showAlert("游客上传功能已关闭","error"),!1):!0,ve=r=>r.size>z.uploadSize?(c.showAlert(`文件大小超过限制 (${ie(z.uploadSize)})`,"error"),k.value=null,!1):!0,ee=(r,t)=>{if(r==="forever"||r==="count")return!0;const i=z.max_save_seconds||0;if(i===0)return!0;let o=0;switch(r){case"minute":o=parseInt(t)*60;break;case"hour":o=parseInt(t)*3600;break;case"day":o=parseInt(t)*86400;break;default:return!1}return o<=i},O=()=>!(!xe()||!ve(k.value)||!ee(d.value,n.value)),ye=async()=>{var r,t;if(w.value==="file"&&!k.value){c.showAlert("请选择要上传的文件","error");return}if(w.value==="text"&&!g.value.trim()){c.showAlert("请输入要发送的文本","error");return}if(d.value!=="forever"&&!n.value){c.showAlert("请输入过期值","error");return}if(!ee(d.value,n.value)){const i=Math.floor(z.max_save_seconds/86400);c.showAlert(`过期时间不能超过${i}天`,"error");return}try{let i;if(w.value==="file")z.enableChunk?i=await fe(k.value):i=await me(k.value);else{const o=new FormData;o.append("text",g.value),o.append("expire_value",n.value),o.append("expire_style",d.value),i=await L.post("share/text/",o,{headers:{"Content-Type":"multipart/form-data"}})}if(i&&i.code===200){const o=i.detail.code,h=i.detail.name,_={id:Date.now(),filename:h,date:new Date().toISOString().split("T")[0],size:w.value==="text"?`${(g.value.length/1024).toFixed(2)} KB`:`${(k.value.size/(1024*1024)).toFixed(1)} MB`,expiration:d.value==="forever"?"永久":`${n.value}${G()}后过期`,retrieveCode:o};u.addShareData(_),c.showAlert(`文件发送成功!取件码:${o}`,"success"),k.value=null,g.value="",n.value="",v.value=0,b.value=_,await X(o)}else throw new Error("服务器响应异常")}catch(i){console.error("发送失败:",i),(t=(r=i.response)==null?void 0:r.data)!=null&&t.detail?c.showAlert(i.response.data.detail,"error"):c.showAlert("发送失败,请稍后重试","error")}finally{v.value=0}},be=()=>{U.push("/")},te=()=>{y.value=!y.value},we=r=>{b.value=r},ke=r=>{const t=u.shareData.findIndex(i=>i.id===r);t!==-1&&u.deleteShareData(t)},_e=window.location.origin+"/#/",Ce=r=>`${_e}?code=${r.retrieveCode}`;return de(()=>{console.log("SendFileView mounted")}),(r,t)=>{const i=$e("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(pe,["prevent"])},[e("div",{class:l(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[s(a)?"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",[s(a)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:be},C(s(z).name),3),e("form",{onSubmit:E(ye,["prevent"]),class:"space-y-8"},[e("div",Je,[e("button",{type:"button",onClick:t[0]||(t[0]=o=>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]=o=>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)]),m(K,{name:"fade",mode:"out-in"},{default:j(()=>[w.value==="file"?(M(),S("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",[s(a)?"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(ge,["prevent"])},[e("input",{id:"file-upload",type:"file",class:"hidden",onChange:p,ref_key:"fileInput",ref:f},null,544),v.value>0?(M(),S("div",Xe,[m(Oe,{progress:v.value},null,8,["progress"])])):B("",!0),m(s(Ee),{class:l(["w-16 h-16 transition-colors duration-300",s(a)?"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",s(a)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[e("span",Ye,C(k.value?k.value.name:"点击或拖放文件到此处上传"),1)],2),e("p",{class:l(["mt-2 text-xs",s(a)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+C(s(ie)(s(z).uploadSize)),3)],34)])):(M(),S("div",Ze,[w.value==="text"?(M(),S("div",et,[J(e("textarea",{id:"text-content","onUpdate:modelValue":t[3]||(t[3]=o=>g.value=o),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",s(a)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[se,g.value]])])):B("",!0)]))]),_:1}),e("div",tt,[e("label",{class:l(["text-sm font-medium",s(a)?"text-gray-300":"text-gray-700"])}," 过期方式 ",2),J(e("select",{"onUpdate:modelValue":t[4]||(t[4]=o=>d.value=o),class:l(["px-4 py-2 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500",s(a)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},[(M(!0),S(oe,null,ae(s(z).expireStyle,o=>(M(),S("option",{value:o,key:o},C(G(o)),9,st))),128))],2),[[De,d.value]]),d.value!=="forever"?(M(),S("div",ot,[e("div",at,[J(e("input",{"onUpdate:modelValue":t[5]||(t[5]=o=>n.value=o),type:"number",placeholder:he(),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",s(a)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},null,10,rt),[[se,n.value]]),e("span",{class:l(["absolute right-3 top-1/2 transform -translate-y-1/2",s(a)?"text-gray-300":"text-gray-700"])},C(G()),3)])])):B("",!0)]),e("button",nt,[t[11]||(t[11]=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,[m(s(Ne),{class:"w-6 h-6 mr-2"}),t[10]||(t[10]=e("span",null,"安全寄送",-1))])])],32),e("div",it,[m(i,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:j(()=>t[12]||(t[12]=[N(" 需要取件?点击这里 ")])),_:1})])]),e("div",{class:l(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[s(a)?"bg-gray-800":"bg-gray-100"]])},[e("span",{class:l(["text-sm flex items-center",[s(a)?"text-gray-300":"text-gray-800"]])},[m(s(ne),{class:"w-4 h-4 mr-1 text-green-400"}),t[13]||(t[13]=N(" 安全加密 "))],2),e("button",{onClick:te,class:l(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[s(a)?"text-indigo-400":"text-indigo-600"]])},[t[14]||(t[14]=N(" 发件记录 ")),m(s(Re),{class:"w-4 h-4 ml-1"})],2)],2)],2),m(K,{name:"drawer"},{default:j(()=>[y.value?(M(),S("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",[s(a)?"bg-gray-900":"bg-white"]])},[e("div",{class:l(["flex justify-between items-center p-6 border-b",[s(a)?"border-gray-700":"border-gray-200"]])},[e("h3",{class:l(["text-2xl font-bold",[s(a)?"text-white":"text-gray-800"]])}," 发件记录 ",2),e("button",{onClick:te,class:l(["hover:text-white transition duration-300",[s(a)?"text-gray-400":"text-gray-800"]])},[m(s(re),{class:"w-6 h-6"})],2)],2),e("div",ct,[m(Fe,{name:"list",tag:"div",class:"space-y-4"},{default:j(()=>[(M(!0),S(oe,null,ae(x.value,o=>(M(),S("div",{key:o.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",[s(a)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[e("div",dt,[m(s(le),{class:l(["w-10 h-10",[s(a)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),e("div",ut,[e("p",{class:l(["font-medium text-lg truncate",[s(a)?"text-white":"text-gray-800"]])},C(o.filename?o.filename:"Text"),3),e("p",{class:l(["text-sm truncate",[s(a)?"text-gray-400":"text-gray-600"]])},C(o.date)+" · "+C(o.size),3)]),e("div",gt,[e("button",{onClick:h=>s(X)(o.retrieveCode),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[s(a)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[m(s(Y),{class:"w-5 h-5"})],10,pt),e("button",{onClick:h=>we(o),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[s(a)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[m(s(Ve),{class:"w-5 h-5"})],10,ht),e("button",{onClick:h=>ke(o.id),class:l(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[s(a)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[m(s(He),{class:"w-5 h-5"})],10,ft)])],2))),128))]),_:1})])],2)):B("",!0)]),_:1}),m(K,{name:"fade"},{default:j(()=>[b.value?(M(),S("div",mt,[e("div",{class:l(["w-full max-w-2xl rounded-2xl shadow-2xl transform transition-all duration-300 ease-out overflow-hidden",[s(a)?"bg-gray-900 bg-opacity-70":"bg-white bg-opacity-95"]])},[e("div",{class:l(["px-4 sm:px-6 py-3 sm:py-4 border-b",[s(a)?"border-gray-800":"border-gray-100"]])},[e("div",xt,[e("h3",{class:l(["text-lg sm:text-xl font-semibold",[s(a)?"text-white":"text-gray-900"]])}," 文件详情 ",2),e("button",{onClick:t[6]||(t[6]=o=>b.value=null),class:"p-1.5 sm:p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"},[m(s(re),{class:l(["w-4 h-4 sm:w-5 sm:h-5",[s(a)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])])],2),e("div",vt,[e("div",{class:l(["rounded-xl p-3 sm:p-4 mb-4 sm:mb-6",[s(a)?"bg-gray-800 bg-opacity-50":"bg-gray-50 bg-opacity-95"]])},[e("div",yt,[e("div",{class:l(["p-2 sm:p-3 rounded-lg",[s(a)?"bg-gray-800":"bg-white"]])},[m(s(le),{class:l(["w-5 h-5 sm:w-6 sm:h-6",[s(a)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2),e("div",bt,[e("h4",{class:l(["font-medium text-sm sm:text-base",[s(a)?"text-white":"text-gray-900"]])},C(b.value.filename),3),e("p",{class:l(["text-xs sm:text-sm",[s(a)?"text-gray-400":"text-gray-500"]])},C(b.value.size)+" · "+C(b.value.date),3)])]),e("div",wt,[e("div",kt,[m(s(qe),{class:l(["w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1.5 sm:mr-2",[s(a)?"text-gray-400":"text-gray-500"]])},null,8,["class"]),e("span",{class:l(["text-xs sm:text-sm",[s(a)?"text-gray-300":"text-gray-600"]])},C(b.value.expiration),3)]),e("div",_t,[m(s(ne),{class:l(["w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1.5 sm:mr-2",[s(a)?"text-gray-400":"text-gray-500"]])},null,8,["class"]),e("span",{class:l(["text-xs sm:text-sm",[s(a)?"text-gray-300":"text-gray-600"]])}," 安全加密 ",2)])])],2),e("div",Ct,[e("div",St,[e("div",Mt,[e("div",zt,[t[15]||(t[15]=e("h4",{class:"font-medium text-sm sm:text-base"},"取件码",-1)),e("button",{onClick:t[7]||(t[7]=o=>s(je)(b.value.retrieveCode)),class:"p-1.5 sm:p-2 rounded-full hover:bg-white/10 transition-colors"},[m(s(Y),{class:"w-4 h-4 sm:w-5 sm:h-5"})])]),e("p",Tt,C(b.value.retrieveCode),1)]),e("div",{class:l(["rounded-xl p-3 sm:p-4",[s(a)?"bg-gray-800 bg-opacity-50":"bg-gray-50 bg-opacity-95"]])},[e("div",It,[e("h4",{class:l(["font-medium text-sm sm:text-base flex items-center",[s(a)?"text-white":"text-gray-900"]])},[m(s(We),{class:"w-4 h-4 sm:w-5 sm:h-5 mr-1.5 sm:mr-2 text-indigo-500"}),t[16]||(t[16]=N(" wget下载 "))],2),e("button",{onClick:t[8]||(t[8]=o=>s(Be)(b.value.retrieveCode)),class:"p-1.5 sm:p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"},[m(s(Y),{class:l(["w-4 h-4 sm:w-5 sm:h-5",[s(a)?"text-gray-400":"text-gray-500"]])},null,8,["class"])])]),e("p",{class:l(["text-xs sm:text-sm font-mono break-all",[s(a)?"text-gray-300":"text-gray-600"]])}," 点击复制wget命令 ",2)],2)]),e("div",{class:l(["rounded-xl p-4 sm:p-5 flex flex-col items-center",[s(a)?"bg-gray-800 bg-opacity-50":"bg-gray-50 bg-opacity-95"]])},[e("div",At,[m(Le,{value:Ce(b.value),size:140,level:"M",class:"sm:w-[160px] sm:h-[160px]"},null,8,["value"])]),e("p",{class:l(["text-xs sm:text-sm",[s(a)?"text-gray-400":"text-gray-500"]])}," 扫描二维码快速取件 ",2)],2)])]),e("div",{class:l(["px-4 sm:px-6 py-3 sm:py-4 border-t",[s(a)?"border-gray-800":"border-gray-100"]])},[e("button",{onClick:t[9]||(t[9]=o=>s(X)(b.value.retrieveCode)),class:"w-full bg-indigo-600 hover:bg-indigo-700 text-white px-4 sm:px-6 py-2 sm:py-3 rounded-lg text-sm sm:text-base font-medium transition-colors"}," 复制取件链接 ")],2)],2)])):B("",!0)]),_:1})],32)}}}),jt=ue(Dt,[["__scopeId","data-v-0b7e24c7"]]);export{jt as default};
|