mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-08-17 21:25:47 +02:00
2 lines
3.7 KiB
JavaScript
2 lines
3.7 KiB
JavaScript
System.register(["./index-legacy.js?v=1769066082311","./public-legacy.js?v=1769066082311","./page_layout-legacy.js?v=1769066082311","./ResourceManagerWindow-legacy.js?v=1769066082311","./naive-legacy.js?v=1769066082311","./vue-legacy.js?v=1769066082311","./common-legacy.js?v=1769066082311","./__commonjsHelpers__-legacy.js?v=1769066082311","./CalcSize.vue_vue_type_script_setup_true_lang-legacy.js?v=1769066082311","./soft-legacy2.js?v=1769066082311","./soft-legacy.js?v=1769066082311","./site-legacy.js?v=1769066082311","./index-legacy38.js?v=1769066082311","./file-legacy2.js?v=1769066082311","./index.vue_vue_type_script_setup_true_lang-legacy7.js?v=1769066082311"],function(e,a){"use strict";var l,t,i,u,n,s,c,o,p,r,d,f,m,k,v,g,_,h,y,b,x,M,j,w,C,B,P,R;return{setters:[e=>{l=e._},e=>{t=e.f,i=e.a,u=e.h},e=>{n=e.aa,s=e.aE,c=e.x,o=e._,p=e.m},e=>{r=e.R},e=>{d=e.av,f=e.au,m=e.aC},e=>{k=e.k,v=e.P,g=e.i,_=e.r,h=e.av,y=e.R,b=e.V,x=e.W,M=e.a3,j=e.S,w=e.U,C=e.j,B=e.a4,P=e.ak,R=e.F},null,null,null,null,null,null,null,null,null],execute:function(){const a={class:"p-20px"},S={class:"flex items-center gap-16px mb-16px"},U={class:"p-20px"},N={class:"mb-16px text-14px"},q={class:"flex items-center gap-20px"},z={class:"text-13px"};e("default",k({__name:"Backup",setup(e,{expose:k}){const{t:D}=v(),F=g("fileStore"),{currentPath:O,backupForm:T}=F,W=_(!1),E=_(!1),H=_([]);k({open(){T.value.path="",W.value=!0,L()},close(){W.value=!1,H.value=[]}});const V=_(!1),A=h("resourceManagerRef"),G=_([{key:"time",title:D("file.backupModal.backupTime"),width:160,render:e=>n(e.time)},{key:"path",title:D("file.backupModal.backupPath"),ellipsis:{tooltip:!0}},{key:"name",title:D("file.backupModal.backupName"),width:120,ellipsis:{tooltip:!0},render:e=>e.name||"--"},t({width:100,options:e=>[{label:D("Public.Btn.Delete"),onClick:()=>{i({title:D("file.backupModal.deleteBackup"),content:D("file.backupModal.deleteConfirm"),onConfirm:async()=>{await s.post("/files?action=del_path_premissions",{id:e.id},{requestOptions:{loading:D("file.backupModal.deletingBackup"),successMessage:!0}}),L()}})}}]})]);function I(){A.value?.open()}function J(e){T.value.path=e}function K(){T.value.path?V.value=!0:p.warning(D("file.backupModal.pleaseSelectPath"))}async function L(){try{E.value=!0;const{message:e}=await s.post("/files?action=get_all_back");c(e)?H.value=e.map(e=>({id:Number(e[0]),time:Number(e[2]),name:e[1],path:e[3]})):H.value=[]}finally{E.value=!1}}async function Q(){try{await s.post("/files?action=back_path_permissions",T.value,{requestOptions:{loading:D("file.backupModal.executingBackup"),successMessage:!0}}),L(),T.value.path="",T.value.remark=""}catch(e){console.warn(e)}}return(e,t)=>{const i=f,n=o,s=m,c=d,p=u,k=l;return b(),y(R,null,[x(k,{show:w(W),"onUpdate:show":t[1]||(t[1]=e=>P(W)?W.value=e:null),title:w(D)("file.backupModal.title"),width:"700"},{default:M(()=>[j("div",a,[j("div",S,[x(c,null,{default:M(()=>[x(i,{value:w(T).path,"onUpdate:value":t[0]||(t[0]=e=>w(T).path=e)},null,8,["value"]),x(s,{onClick:I},{icon:M(()=>[x(n,{name:"file-dir",size:"20"})]),_:1})]),_:1}),x(s,{type:"primary",onClick:K},{default:M(()=>[C(B(w(D)("file.backupModal.backupButton")),1)]),_:1})]),x(p,{loading:w(E),"max-height":370,data:w(H),columns:w(G)},null,8,["loading","data","columns"])])]),_:1},8,["show","title"]),x(k,{show:w(V),"onUpdate:show":t[3]||(t[3]=e=>P(V)?V.value=e:null),title:w(D)("file.backupModal.confirmTitle"),width:320,footer:!0,onConfirm:Q},{default:M(()=>[j("div",U,[j("div",N,B(w(D)("file.backupModal.enterBackupName")),1),j("div",q,[j("div",z,B(w(D)("file.backupModal.remarks")),1),x(i,{class:"flex-1",value:w(T).remark,"onUpdate:value":t[2]||(t[2]=e=>w(T).remark=e)},null,8,["value"])])])]),_:1},8,["show","title"]),x(r,{ref_key:"resourceManagerRef",ref:A,"current-path":w(O),onChooseDir:J},null,8,["current-path"])],64)}}}))}}});
|