Files
filecodebox/themes/2024/assets/SendFileView-DBPnDoZR.js
T
2025-03-06 00:25:02 +08:00

27 lines
22 KiB
Python

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