7 lines
20 KiB
JavaScript
7 lines
20 KiB
JavaScript
import{d as H,w as Y,c as oe,h as S,g as p,z as r,k as re,u as a,M as Ve,l as ne,I as o,p as $e,v as h,G as I,f as w,j as t,n as M,C as d,N as Z,i as j,O as ee,P as R,D as c,E as Me,F as A,J as q,Q as ze,L as te,K as Fe,x as C}from"./index-BhaIiTEj.js";import{P as ie,r as je,c as De,_ as U,a as Be,b as O,d as z,t as b}from"./Sonner.vue_vue_type_script_setup_true_lang-BwfWndxy.js";import{_ as ae}from"./Label.vue_vue_type_script_setup_true_lang-D-_Evs0_.js";import{_ as se}from"./Textarea.vue_vue_type_script_setup_true_lang-CwxB1PfH.js";import{_ as K,a as X,b as G}from"./CardTitle.vue_vue_type_script_setup_true_lang-DBp3brf1.js";import{_ as Pe,a as Ie,b as Se,c as Te,d as Le,e as Ne}from"./DialogTitle.vue_vue_type_script_setup_true_lang-CF3XyDt2.js";import{i as ue,c as Ee}from"./Teleport-DV_BGdH0.js";import{u as de,d as le}from"./useForwardExpose-CRFbVhil.js";import{_ as He}from"./NavBar.vue_vue_type_script_setup_true_lang-B5iz8PFz.js";import{_ as Re}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./utils-BNRHOSl8.js";const T=100,[Ae,qe]=Ee("ProgressRoot"),E=i=>typeof i=="number";function Ue(i,_){return ue(i)||E(i)&&!Number.isNaN(i)&&i<=_&&i>=0?i:(console.error(`Invalid prop \`value\` of value \`${i}\` supplied to \`ProgressRoot\`. The \`value\` prop must be:
|
|
- a positive number
|
|
- less than the value passed to \`max\` (or ${T} if no \`max\` prop is set)
|
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
|
|
Defaulting to \`null\`.`),null)}function Oe(i){return E(i)&&!Number.isNaN(i)&&i>0?i:(console.error(`Invalid prop \`max\` of value \`${i}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${T}\`.`),T)}var Ke=H({__name:"ProgressRoot",props:{modelValue:{type:[Number,null],required:!1},max:{type:Number,required:!1,default:T},getValueLabel:{type:Function,required:!1,default:(i,_)=>E(i)?`${Math.round(i/_*T)}%`:void 0},getValueText:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue","update:max"],setup(i,{emit:_}){const u=i,V=_;de();const n=le(u,"modelValue",V,{passive:u.modelValue===void 0}),g=le(u,"max",V,{passive:u.max===void 0});Y(()=>n.value,async v=>{const m=Ue(v,u.max);m!==v&&(await Ve(),n.value=m)},{immediate:!0}),Y(()=>u.max,v=>{const m=Oe(u.max);m!==v&&(g.value=m)},{immediate:!0});const f=oe(()=>ue(n.value)?"indeterminate":n.value===g.value?"complete":"loading");return qe({modelValue:n,max:g,progressState:f}),(v,m)=>(p(),S(a(ie),{"as-child":v.asChild,as:v.as,"aria-valuemax":a(g),"aria-valuemin":0,"aria-valuenow":E(a(n))?a(n):void 0,"aria-valuetext":v.getValueText?.(a(n),a(g)),"aria-label":v.getValueLabel(a(n),a(g)),role:"progressbar","data-state":f.value,"data-value":a(n)??void 0,"data-max":a(g)},{default:r(()=>[re(v.$slots,"default",{modelValue:a(n)})]),_:3},8,["as-child","as","aria-valuemax","aria-valuenow","aria-valuetext","aria-label","data-state","data-value","data-max"]))}}),Xe=Ke,Ge=H({__name:"ProgressIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const _=i,u=Ae();return de(),(V,n)=>(p(),S(a(ie),ne(_,{"data-state":a(u).progressState.value,"data-value":a(u).modelValue?.value??void 0,"data-max":a(u).max.value}),{default:r(()=>[re(V.$slots,"default")]),_:3},16,["data-state","data-value","data-max"]))}}),Je=Ge;const Qe=H({__name:"Progress",props:{modelValue:{default:0},max:{},getValueLabel:{},getValueText:{},asChild:{type:Boolean},as:{},class:{}},setup(i){const _=i,u=je(_,"class");return(V,n)=>(p(),S(a(Xe),ne({"data-slot":"progress"},a(u),{class:a(De)("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",_.class)}),{default:r(()=>[o(a(Je),{"data-slot":"progress-indicator",class:"bg-primary h-full w-full flex-1 transition-all",style:$e(`transform: translateX(-${100-(_.modelValue??0)}%);`)},null,8,["style"])]),_:1},16,["class"]))}}),We={class:"min-h-screen bg-gradient-to-br from-blue-50 via-white to-purple-50"},Ye={class:"container mx-auto px-4 py-6"},Ze={class:"max-w-4xl mx-auto"},et={class:"w-full"},tt={class:"flex gap-2 mb-6"},at={class:"space-y-4"},st={class:"space-y-3"},lt={class:"space-y-0.5"},ot={class:"text-xs text-gray-500"},rt={key:0,class:"mt-4"},nt={class:"flex items-center justify-between mb-2"},it={class:"text-xs font-medium text-gray-700"},ut={class:"space-y-1.5 max-h-40 overflow-y-auto"},dt={class:"flex items-center space-x-2 flex-1 min-w-0"},vt={class:"w-7 h-7 rounded bg-blue-100 flex items-center justify-center flex-shrink-0"},ct={class:"flex-1 min-w-0"},mt={class:"text-xs font-medium text-gray-900 truncate"},pt={class:"text-xs text-gray-500"},ft=["onClick"],xt={class:"space-y-3"},gt={class:"mt-2 flex justify-between text-sm text-gray-500"},_t={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},bt={class:"flex flex-wrap gap-1.5"},ht=["onClick"],wt={class:"flex flex-wrap gap-1.5"},yt=["onClick"],kt={class:"flex gap-2 pt-2"},Ct={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24"},Vt={key:0,class:"space-y-2 mt-3 p-3 bg-blue-50 rounded-lg"},$t={class:"flex justify-between text-xs font-medium"},Mt={class:"text-blue-600"},zt={class:"text-blue-700"},Ft={class:"flex flex-col items-center mb-4"},jt={class:"py-6"},Dt={class:"bg-gradient-to-br from-blue-50 to-purple-50 p-6 rounded-xl border-2 border-blue-200 shadow-inner"},Bt={class:"text-center"},Pt={class:"text-3xl font-mono font-bold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 tracking-[0.3em] mb-4"},It={class:"mt-6 space-y-2 bg-gray-50 p-4 rounded-lg"},St={key:0,class:"flex items-center text-sm text-gray-600"},Tt={key:1,class:"flex items-center text-sm text-gray-600"},Lt=H({__name:"UploadPage",setup(i){const _=ze(),u=Me(),{config:V}=u,n=h("file"),g=h(!1),f=h([]),v=h(""),m=h("time"),D=h("7"),B=h("3"),P=h(""),$=h(!1),y=h(0),L=h(!1),k=h(null),N=h(null),ve=oe(()=>{const l=f.value.reduce((e,s)=>e+s.size,0);return I.formatFileSize(l)}),ce=()=>{N.value?.click()},me=l=>{const s=l.target.files;s&&J(Array.from(s))},pe=l=>{g.value=!1;const e=l.dataTransfer?.files;e&&J(Array.from(e))},J=l=>{const e=l.filter(x=>!f.value.some(F=>F.name===x.name&&F.size===x.size));e.length>0&&(f.value.push(...e),b.success(`添加了 ${e.length} 个文件`));const s=e.filter(x=>!u.validateFileSize(x));s.length>0&&b.warning(`${s.length} 个文件超过 ${u.getFileSizeLimit()} 限制`),u.validateFileCount(f.value)||b.warning(`最多只能上传 ${V.value.upload?.max_batch_files||10} 个文件`)},fe=l=>{f.value.splice(l,1)},Q=()=>{f.value=[],N.value&&(N.value.value="")},xe=async()=>{if(f.value.length===0){b.warning("请先选择要上传的文件");return}$.value=!0,y.value=0;try{const l=new FormData;f.value.forEach(x=>{l.append("files",x)});const e={expire_type:m.value,[m.value==="time"?"expire_days":"max_downloads"]:m.value==="time"?parseInt(D.value):parseInt(B.value),remark:P.value.trim()||void 0};Object.entries(e).forEach(([x,F])=>{F!==void 0&&l.append(x,String(F))});const s=await te.uploadFiles(l,{onUploadProgress:x=>{x.total&&(y.value=Math.round(x.loaded/x.total*100))}});if(s.data.code===200)k.value=s.data.data,L.value=!0,b.success("文件上传成功!");else throw new Error(s.data.msg||"上传失败")}catch(l){W(l,"文件上传失败")}finally{$.value=!1,y.value=0}},ge=async()=>{try{const l=await navigator.clipboard.readText();l.trim()?(v.value=l,b.success("已粘贴文本内容")):b.warning("剪贴板中没有内容")}catch{b.error("读取剪贴板失败")}},_e=async()=>{if(!v.value.trim()){b.warning("请输入文本内容");return}$.value=!0,y.value=0;const l=setInterval(()=>{y.value<90&&(y.value+=10)},100);try{const e={content:v.value.trim(),expire_type:m.value,[m.value==="time"?"expire_days":"max_downloads"]:m.value==="time"?parseInt(D.value):parseInt(B.value),remark:P.value.trim()||void 0},s=await te.uploadText(e);if(s.data.code===200)y.value=100,k.value=s.data.data,L.value=!0,b.success("文本保存成功!");else throw new Error(s.data.msg||"保存失败")}catch(e){W(e,"文本保存失败")}finally{clearInterval(l),$.value=!1,y.value=0}},W=(l,e)=>{l.response?.status>=400&&l.response?.status<500?b.error(l.response?.data?.msg||e):(console.error(`${e}:`,l),b.error(l.response?.data?.msg||`${e},请重试`))},be=async()=>{k.value?.pickup_code&&(await I.copyToClipboard(k.value.pickup_code)?b.success("取件码已复制到剪贴板"):b.error("复制失败,请手动复制"))},he=()=>{L.value=!1,k.value=null,n.value==="file"?Q():v.value="",m.value="time",D.value="7",B.value="3",P.value=""},we=()=>$.value?n.value==="file"?`上传中... ${y.value}%`:`保存中... ${y.value}%`:n.value==="file"?`上传 ${f.value.length} 个文件`:"保存文本",ye=l=>I.formatFileSize(l),ke=l=>I.formatDate(l),Ce=l=>{const e=I.getFileTypeIcon(l),s={image:()=>C("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[C("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})]),video:()=>C("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[C("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})]),audio:()=>C("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[C("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"})]),archive:()=>C("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[C("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 8l4 4 4-4m6-4v12a2 2 0 01-2 2H7a2 2 0 01-2-2V4a2 2 0 012-2h10a2 2 0 012 2z"})]),file:()=>C("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[C("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})])};return s[e]||s.file};return(l,e)=>(p(),w("div",We,[o(He,{showDescription:!0}),t("div",Ye,[t("div",Ze,[t("div",et,[t("div",tt,[t("button",{onClick:e[0]||(e[0]=s=>n.value="file"),class:M(["flex-1 flex items-center justify-center py-2.5 px-4 text-sm font-medium rounded-lg transition-colors",n.value==="file"?"bg-blue-600 text-white":"bg-white text-gray-700 border border-gray-300 hover:bg-gray-50"])},[...e[11]||(e[11]=[t("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1),d(" 文件上传 ",-1)])],2),t("button",{onClick:e[1]||(e[1]=s=>n.value="text"),class:M(["flex-1 flex items-center justify-center py-2.5 px-4 text-sm font-medium rounded-lg transition-colors",n.value==="text"?"bg-blue-600 text-white":"bg-white text-gray-700 border border-gray-300 hover:bg-gray-50"])},[...e[12]||(e[12]=[t("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1),d(" 文本保存 ",-1)])],2)]),t("div",at,[Z(t("div",st,[o(a(U),{class:"shadow-sm"},{default:r(()=>[o(a(K),{class:"pb-2"},{default:r(()=>[o(a(X),{class:"text-base font-semibold"},{default:r(()=>[...e[13]||(e[13]=[d("选择文件",-1)])]),_:1}),o(a(G),{class:"text-xs"},{default:r(()=>[...e[14]||(e[14]=[d(" 支持拖拽或点击选择,可批量上传 ",-1)])]),_:1})]),_:1}),o(a(O),{class:"pt-2"},{default:r(()=>[t("div",{class:M(["border-2 border-dashed rounded-lg p-6 text-center transition-colors cursor-pointer",{"border-blue-500 bg-blue-50":g.value,"border-gray-300 hover:border-blue-400 hover:bg-gray-50":!g.value}]),onClick:ce,onDragover:e[2]||(e[2]=R(s=>g.value=!0,["prevent"])),onDragleave:e[3]||(e[3]=R(s=>g.value=!1,["prevent"])),onDrop:R(pe,["prevent"])},[t("input",{ref_key:"fileInput",ref:N,type:"file",multiple:"",class:"hidden",onChange:me},null,544),(p(),w("svg",{class:M(["mx-auto h-10 w-10 mb-2",g.value?"text-blue-600":"text-gray-400"]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...e[15]||(e[15]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"},null,-1)])],2)),t("div",lt,[t("p",{class:M(["text-sm font-medium",g.value?"text-blue-600":"text-gray-700"])},c(g.value?"释放文件到此处":"点击或拖拽文件到此处"),3),t("p",ot," 支持任意格式文件,单文件最大 "+c(a(u).getFileSizeLimit())+",最多 "+c(a(V).upload?.max_batch_files||10)+" 个文件 ",1)])],34),f.value.length>0?(p(),w("div",rt,[t("div",nt,[t("h3",it," 已选择 "+c(f.value.length)+" 个文件 ("+c(ve.value)+") ",1),o(a(z),{onClick:Q,variant:"ghost",size:"sm",class:"h-7 text-xs"},{default:r(()=>[...e[16]||(e[16]=[d(" 清空 ",-1)])]),_:1})]),t("div",ut,[(p(!0),w(A,null,q(f.value,(s,x)=>(p(),w("div",{key:x,class:"flex items-center justify-between p-2 bg-gray-50 rounded hover:bg-gray-100"},[t("div",dt,[t("div",vt,[(p(),S(Fe(Ce(s.name)),{class:"w-3.5 h-3.5 text-blue-600"}))]),t("div",ct,[t("p",mt,c(s.name),1),t("p",pt,c(ye(s.size)),1)])]),t("button",{onClick:F=>fe(x),class:"p-1 text-gray-400 hover:text-red-600 transition-colors"},[...e[17]||(e[17]=[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,ft)]))),128))])])):j("",!0)]),_:1})]),_:1})],512),[[ee,n.value==="file"]]),Z(t("div",xt,[o(a(U),{class:"shadow-sm"},{default:r(()=>[o(a(K),{class:"pb-2"},{default:r(()=>[o(a(X),{class:"text-base font-semibold"},{default:r(()=>[...e[18]||(e[18]=[d("输入文本内容",-1)])]),_:1}),o(a(G),{class:"text-xs"},{default:r(()=>[...e[19]||(e[19]=[d(" 输入要保存和分享的文本 ",-1)])]),_:1})]),_:1}),o(a(O),{class:"pt-2"},{default:r(()=>[t("div",null,[o(a(se),{modelValue:v.value,"onUpdate:modelValue":e[4]||(e[4]=s=>v.value=s),placeholder:"请输入要保存的文本内容...",class:"min-h-[180px] resize-none text-sm",rows:"8"},null,8,["modelValue"]),t("div",gt,[t("span",null,c(v.value.length)+" 个字符",1),o(a(z),{onClick:ge,variant:"ghost",size:"sm"},{default:r(()=>[...e[20]||(e[20]=[t("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})],-1),d(" 粘贴 ",-1)])]),_:1})])])]),_:1})]),_:1})],512),[[ee,n.value==="text"]]),(n.value==="file"?f.value.length>0:v.value.trim())?(p(),S(a(U),{key:0,class:"shadow-sm border-t-2 border-t-blue-500"},{default:r(()=>[o(a(K),{class:"pb-3"},{default:r(()=>[o(a(X),{class:"text-base font-semibold"},{default:r(()=>[d(c(n.value==="file"?"上传":"保存")+"配置",1)]),_:1}),o(a(G),{class:"text-xs"},{default:r(()=>[...e[21]||(e[21]=[d("设置过期策略和备注信息",-1)])]),_:1})]),_:1}),o(a(O),{class:"space-y-4 pt-0"},{default:r(()=>[t("div",null,[o(a(ae),{class:"text-sm font-semibold text-gray-900 mb-3 block"},{default:r(()=>[...e[22]||(e[22]=[d("过期策略",-1)])]),_:1}),t("div",_t,[t("div",null,[e[23]||(e[23]=t("div",{class:"text-xs text-gray-600 mb-2 font-medium"},"按时间过期",-1)),t("div",bt,[(p(!0),w(A,null,q(a(u).getExpireOptions().filter(s=>s.value>0),s=>(p(),w("button",{key:"time-"+s.value,onClick:x=>{m.value="time",D.value=String(s.value)},class:M(["px-2.5 py-1 text-xs font-medium rounded-full transition-all",m.value==="time"&&D.value===String(s.value)?"bg-blue-600 text-white shadow-sm":"bg-gray-100 text-gray-700 hover:bg-gray-200"])},c(s.label)+"后 ",11,ht))),128))])]),t("div",null,[e[24]||(e[24]=t("div",{class:"text-xs text-gray-600 mb-2 font-medium"},"按次数删除",-1)),t("div",wt,[(p(!0),w(A,null,q(a(u).getDownloadOptions().filter(s=>s.value>0),s=>(p(),w("button",{key:"download-"+s.value,onClick:x=>{m.value="download",B.value=String(s.value)},class:M(["px-2.5 py-1 text-xs font-medium rounded-full transition-all",m.value==="download"&&B.value===String(s.value)?"bg-purple-600 text-white shadow-sm":"bg-gray-100 text-gray-700 hover:bg-gray-200"])},c(s.label)+"后删除 ",11,yt))),128))])])])]),t("div",null,[o(a(ae),{for:"remark",class:"text-sm font-semibold text-gray-900 mb-2 block"},{default:r(()=>[...e[25]||(e[25]=[d("备注(可选)",-1)])]),_:1}),o(a(se),{id:"remark",modelValue:P.value,"onUpdate:modelValue":e[5]||(e[5]=s=>P.value=s),placeholder:"添加备注说明...",class:"resize-none text-sm h-16",rows:"2"},null,8,["modelValue"])]),t("div",kt,[o(a(z),{onClick:e[6]||(e[6]=s=>n.value==="file"?xe():_e()),disabled:$.value||(n.value==="file"?f.value.length===0:!v.value.trim()),class:"flex-1 bg-blue-600 hover:bg-blue-700"},{default:r(()=>[$.value?(p(),w("svg",Ct,[...e[26]||(e[26]=[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):j("",!0),d(" "+c(we()),1)]),_:1},8,["disabled"]),o(a(z),{onClick:e[7]||(e[7]=s=>a(_).push("/")),variant:"outline"},{default:r(()=>[...e[27]||(e[27]=[d(" 返回 ",-1)])]),_:1})]),$.value?(p(),w("div",Vt,[t("div",$t,[t("span",Mt,c(n.value==="file"?"上传":"保存")+"进度",1),t("span",zt,c(y.value)+"%",1)]),o(a(Qe),{value:y.value,class:"h-2"},null,8,["value"]),e[28]||(e[28]=t("p",{class:"text-xs text-blue-600 text-center"},"请勿关闭页面",-1))])):j("",!0)]),_:1})]),_:1})):j("",!0)])]),o(a(Pe),{open:L.value},{default:r(()=>[o(a(Ie),{class:"sm:max-w-[500px]",onInteractOutside:e[9]||(e[9]=s=>s.preventDefault()),onEscapeKeyDown:e[10]||(e[10]=s=>s.preventDefault())},{default:r(()=>[o(a(Se),null,{default:r(()=>[t("div",Ft,[e[29]||(e[29]=t("div",{class:"w-16 h-16 rounded-full bg-green-100 flex items-center justify-center mb-4"},[t("svg",{class:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})])],-1)),o(a(Te),{class:"text-2xl text-gray-900 text-center"},{default:r(()=>[d(c(n.value==="file"?"文件上传成功":"文本保存成功"),1)]),_:1})]),o(a(Le),{class:"text-center"},{default:r(()=>[...e[30]||(e[30]=[d(" 您的内容已成功保存,请妥善保管取件码 ",-1)])]),_:1})]),_:1}),t("div",jt,[t("div",Dt,[t("div",Bt,[e[32]||(e[32]=t("p",{class:"text-sm text-gray-600 mb-3 font-medium"},"取件码",-1)),t("p",Pt,c(k.value?.pickup_code),1),o(a(z),{onClick:be,class:"w-full bg-gradient-to-r from-blue-500 to-purple-500 hover:from-blue-600 hover:to-purple-600 text-white shadow-lg"},{default:r(()=>[...e[31]||(e[31]=[t("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),d(" 复制取件码 ",-1)])]),_:1})])]),t("div",It,[k.value?.expire_at?(p(),w("div",St,[e[33]||(e[33]=t("svg",{class:"w-4 h-4 mr-2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),d(" 过期时间: "+c(ke(k.value.expire_at)),1)])):j("",!0),k.value?.max_downloads?(p(),w("div",Tt,[e[34]||(e[34]=t("svg",{class:"w-4 h-4 mr-2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)),d(" 最大访问次数: "+c(k.value.max_downloads),1)])):j("",!0)])]),o(a(Ne),{class:"sm:space-x-2 space-y-2 sm:space-y-0"},{default:r(()=>[o(a(z),{onClick:he,variant:"outline",class:"w-full sm:w-auto"},{default:r(()=>[d(" 继续"+c(n.value==="file"?"上传":"保存"),1)]),_:1}),o(a(z),{onClick:e[8]||(e[8]=s=>a(_).push("/")),class:"w-full sm:w-auto bg-gradient-to-r from-blue-500 to-purple-500 hover:from-blue-600 hover:to-purple-600 text-white"},{default:r(()=>[...e[35]||(e[35]=[d(" 返回首页 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])])]),o(a(Be))]))}}),Jt=Re(Lt,[["__scopeId","data-v-4101ad79"]]);export{Jt as default};
|