Files
filecodebox/themes/2024/assets/SendFileView-CnhaeT0s.js
T
2025-03-02 15:15:02 +08:00

22 lines
20 KiB
Python

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<I?R():t(Q)};const R=()=>{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<w;D++){const V=D*5242880,X=Math.min(V+5242880,i.size),Q=i.slice(V,X),H=new FormData;if(H.append("chunk",new Blob([Q],{type:i.type})),(await L.post(`/chunk/upload/chunk/${R}/${D}`,H,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:ye=>{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};