@duplicati/ngclient 0.0.221 → 0.0.223
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-I5DD3Q6J.js → chunk-22JSUCD3.js} +1 -1
- package/{chunk-BMACDVWX.js → chunk-2CKH2RVA.js} +1 -1
- package/{chunk-IQL3REGJ.js → chunk-2KD757N6.js} +1 -1
- package/{chunk-MTL3FBSM.js → chunk-2VLJLCTO.js} +1 -1
- package/{chunk-OPHQNXYO.js → chunk-2YUSBRXY.js} +1 -1
- package/{chunk-OCUE5GMT.js → chunk-35ZRBDWM.js} +1 -1
- package/{chunk-JP2Z2HMH.js → chunk-3BIHFX4H.js} +1 -1
- package/chunk-3D6EL52D.js +1 -0
- package/chunk-4IRGFIAU.js +1 -0
- package/chunk-4J64RICN.js +1 -0
- package/{chunk-DSYNIXJF.js → chunk-5E3B4AEF.js} +1 -1
- package/{chunk-ANSV4G2K.js → chunk-5W4BSVZJ.js} +1 -1
- package/chunk-6JGOGUIX.js +1 -0
- package/chunk-6RIKNAXD.js +1 -0
- package/{chunk-WJBMMY2Y.js → chunk-6V4CDRLK.js} +1 -1
- package/{chunk-OLWLWDXZ.js → chunk-7AXKIK5Z.js} +1 -1
- package/{chunk-CZVTBPNE.js → chunk-7SP45FHP.js} +1 -1
- package/{chunk-E4NQOMJX.js → chunk-AFHEXZUZ.js} +1 -1
- package/{chunk-F3JYPWPK.js → chunk-AXG7WHBS.js} +1 -1
- package/{chunk-736PM4LG.js → chunk-AXLO5KWF.js} +1 -1
- package/{chunk-EKVZKEQJ.js → chunk-B4QFOJXL.js} +1 -1
- package/{chunk-TCXCC5BM.js → chunk-BPHX6VXP.js} +1 -1
- package/{chunk-DE4JIJWO.js → chunk-CEDH3C4K.js} +1 -1
- package/{chunk-VKQQDCUN.js → chunk-CJKZ27FM.js} +1 -1
- package/{chunk-YCJYEQF7.js → chunk-COEGVUM3.js} +1 -1
- package/chunk-CQJRBQ6I.js +1 -0
- package/{chunk-YMFI2Q2X.js → chunk-CUYURNCQ.js} +1 -1
- package/{chunk-ELCA5MKF.js → chunk-CWBB6FON.js} +1 -1
- package/{chunk-FR5RTIOE.js → chunk-DT3A5ZZG.js} +1 -1
- package/{chunk-ACTJSKQZ.js → chunk-EAVDZEBJ.js} +1 -1
- package/{chunk-FD5CKX3J.js → chunk-F5RBSCC2.js} +1 -1
- package/{chunk-JSZIISFS.js → chunk-FNWC6U3F.js} +1 -1
- package/{chunk-QDDVZ4CR.js → chunk-FQINMZH2.js} +1 -1
- package/chunk-FXBX5QMR.js +1 -0
- package/{chunk-23SRH7FI.js → chunk-GA3CAVSK.js} +1 -1
- package/chunk-GBSP3YAH.js +2 -0
- package/{chunk-GW34KK5A.js → chunk-GBUTPGY5.js} +1 -1
- package/{chunk-JPCUISZG.js → chunk-GNKCBZMS.js} +1 -1
- package/{chunk-N2AU7VKX.js → chunk-HDDAGHHE.js} +1 -1
- package/{chunk-RDLRXAJU.js → chunk-HDGXP6C6.js} +1 -1
- package/chunk-HLHUPBCV.js +1 -0
- package/chunk-HPXIWKIK.js +1 -0
- package/chunk-HWOUAWOE.js +1 -0
- package/{chunk-TVFRVP7K.js → chunk-JB26UVQP.js} +1 -1
- package/chunk-JLANSXSK.js +1 -0
- package/chunk-JYRKUYG6.js +1 -0
- package/chunk-K5XGRFWJ.js +4 -0
- package/{chunk-77IXQ4GU.js → chunk-KI2HT2TI.js} +1 -1
- package/{chunk-N2GI5QYJ.js → chunk-LNKXSLIG.js} +1 -1
- package/chunk-MJPEKJ3T.js +2 -0
- package/{chunk-RGFJ5UMA.js → chunk-N3TVNDVH.js} +1 -1
- package/chunk-NDOIWI7D.js +1 -0
- package/chunk-NFATJ2CP.js +1 -0
- package/{chunk-PPSQGUOL.js → chunk-O5RZGVMD.js} +1 -1
- package/chunk-OETM3ZQK.js +1 -0
- package/chunk-OQGMZ5Z4.js +1 -0
- package/{chunk-TISQKN7N.js → chunk-PDGW22XJ.js} +1 -1
- package/{chunk-IMQUTGIK.js → chunk-PEOYNJJM.js} +1 -1
- package/{chunk-CAQ3XMFP.js → chunk-PNQ5BDQN.js} +1 -1
- package/chunk-PVSB5UU6.js +1 -0
- package/{chunk-AXQQEOTT.js → chunk-QGAOYLQU.js} +1 -1
- package/{chunk-APSPCDGV.js → chunk-QLW7KAXY.js} +1 -1
- package/chunk-QZEIAQ3M.js +1 -0
- package/chunk-R6FKSUPU.js +1 -0
- package/{chunk-FBU3EBFO.js → chunk-RDT3GMNM.js} +1 -1
- package/{chunk-UTXZPAY6.js → chunk-RM2KGG7J.js} +1 -1
- package/chunk-RTGUYIWH.js +11 -0
- package/{chunk-PIGMTUUT.js → chunk-SKLSR5GH.js} +1 -1
- package/{chunk-JPMKWWZP.js → chunk-SL34UKL5.js} +1 -1
- package/{chunk-FDYBIC4O.js → chunk-SZLRIYOM.js} +1 -1
- package/chunk-TI76HSL2.js +1 -0
- package/{chunk-5KJPC3V5.js → chunk-TOV6NJCD.js} +1 -1
- package/chunk-TPKKLIFK.js +1 -0
- package/{chunk-IG7XUEED.js → chunk-UOMUNAOT.js} +1 -1
- package/{chunk-LE24LKH7.js → chunk-UXIWNORE.js} +1 -1
- package/{chunk-KZTFESBJ.js → chunk-V2M5YF4E.js} +1 -1
- package/{chunk-O2SMJYPC.js → chunk-V2UO7ES2.js} +1 -1
- package/{chunk-6JS7B4FW.js → chunk-VNXFTYQQ.js} +1 -1
- package/{chunk-4E7D5F6K.js → chunk-WJVFREPL.js} +1 -1
- package/{chunk-XBAZKJ47.js → chunk-WKQ3ICDB.js} +1 -1
- package/{chunk-OJVUCHRP.js → chunk-WULWYGYR.js} +1 -1
- package/chunk-X5W2K6AN.js +2 -0
- package/{chunk-GKGMP6VF.js → chunk-XWML36YQ.js} +1 -1
- package/{chunk-BKEJZADV.js → chunk-XXXS73XL.js} +1 -1
- package/{chunk-ZC23RK4J.js → chunk-YF6JHIN5.js} +1 -1
- package/{chunk-3L3SRTPU.js → chunk-YFA6MJ2B.js} +1 -1
- package/{chunk-IRT2UBDI.js → chunk-YKF5ZW55.js} +1 -1
- package/{chunk-F2ZC26DC.js → chunk-ZKIZ7IIA.js} +1 -1
- package/{chunk-BLSV7CNZ.js → chunk-ZTENLO77.js} +1 -1
- package/{chunk-6NVCDJR6.js → chunk-ZYYLNYSK.js} +1 -1
- package/index.html +1 -1
- package/main-NENDDABN.js +1 -0
- package/package.json +1 -1
- package/chunk-43WATFQS.js +0 -11
- package/chunk-4J6L5OV3.js +0 -1
- package/chunk-5JGSXUKD.js +0 -1
- package/chunk-5YE4H57F.js +0 -1
- package/chunk-5ZRRLJA4.js +0 -1
- package/chunk-ACTATISC.js +0 -1
- package/chunk-COI6UMB5.js +0 -1
- package/chunk-DHFLXFWF.js +0 -1
- package/chunk-ESLC5LVP.js +0 -1
- package/chunk-F3ETZKLK.js +0 -1
- package/chunk-G2BDKU26.js +0 -2
- package/chunk-NPFPMA4P.js +0 -1
- package/chunk-O56QUSSI.js +0 -2
- package/chunk-OL7ADIFI.js +0 -1
- package/chunk-QQWV3FEH.js +0 -1
- package/chunk-SACQFUJE.js +0 -1
- package/chunk-TQTOIWBK.js +0 -4
- package/chunk-TWAHUXIN.js +0 -1
- package/chunk-TZ7MW3NZ.js +0 -2
- package/chunk-UZ4POLDC.js +0 -1
- package/chunk-XPVATEBM.js +0 -1
- package/chunk-XWTB7XRI.js +0 -1
- package/chunk-YPNN5FBK.js +0 -1
- package/chunk-YWBZLU6M.js +0 -1
- package/chunk-YYD2JU6T.js +0 -1
- package/chunk-ZNYN6ES6.js +0 -1
- package/main-IUT3IXX4.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _e}from"./chunk-
|
|
1
|
+
import{a as _e}from"./chunk-JB26UVQP.js";import"./chunk-FQINMZH2.js";import"./chunk-ZTENLO77.js";import"./chunk-ZKIZ7IIA.js";import"./chunk-AXG7WHBS.js";import{a as se}from"./chunk-AXLO5KWF.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-QGAOYLQU.js";import"./chunk-RM2KGG7J.js";import{a as b}from"./chunk-PEOYNJJM.js";import"./chunk-5W4BSVZJ.js";import"./chunk-QZEIAQ3M.js";import{a as le,b as m}from"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import{B as ae,H as ie,Y as ne,c as Q,e as Y,i as Z,s as x,v as ee,z as te}from"./chunk-CJKZ27FM.js";import{d as oe}from"./chunk-5E3B4AEF.js";import{b as q,e as j}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as F,D as G,Db as d,E as g,Eb as n,F as L,Fb as i,G as p,Gb as c,Rc as E,Ta as _,Ub as u,Vb as h,Wb as A,Xb as H,Yb as J,_b as T,hb as V,lc as C,nc as K,oc as D,q as y,qa as s,sa as P,tc as X,uc as z,vc as W,xb as w,yb as U}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{refresh_lock_info:!0}}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loading",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loading",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loading",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loading",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-JYRKUYG6.js";import{c as j,e as V}from"./chunk-VNXFTYQQ.js";import{z as b}from"./chunk-CJKZ27FM.js";import{a as x,d as v}from"./chunk-5E3B4AEF.js";import{ma as L}from"./chunk-YF6JHIN5.js";import{$ as a,Gc as W,Hb as N,Ib as C,Ic as $,Jb as _,N as R,Rc as p,Ta as M,Ub as A,Vb as w,W as h,Wb as P,Xb as F,Yb as G,f as m,g as y,hb as I,qa as n,sa as O}from"./chunk-K5XGRFWJ.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=O(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),W(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),G(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var T=class r{dialog=a(b);#e=a(v);#n=n("disconnected");#s=n(null);#t=n(-1);#i=n(0);#a=n(!1);#u=new y;connectionStatus=this.#n.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=a(j).relayIsEnabled()?"94s":"299s";start(){this.#a.set(!0),this.#u=new y,this.#r()}stop(){this.#u.next(),this.#u.complete(),this.#a.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#a()||this.reconnect()}#r(){this.#n.set("connecting"),this.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(R(this.#u)).subscribe({next:e=>{e&&this.#d(e),this.#c()},error:e=>{let s=this.#i()+1,u=Math.min(5e3*s,3e4);this.#i.set(s),s>3&&this.#n.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(u),setTimeout(()=>{this.#r()},u)}})}#d(e){this.#n.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#i.set(0)}#c(){this.#a()&&this.#r()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var l=!1,k=class r{#e=a(V);#n=a(D);dialog=a(b);#s=null;#t=n("disconnected");#i=n(null);#a=n(null);#u=n(null);#o=n(null);#r=n(null);#d=n(null);#c=n(null);#h=void 0;#l=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#i.asReadonly();serverProgress=this.#a.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#l.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#r.asReadonly();notificationState=this.#d.asReadonly();remoteControlState=this.#c.asReadonly();#S=null;taskCompleted=new m(e=>{this.#S=e});#f=0;#p=null;start(){this.shouldConnect.set(!0),this.#m()}#m(){this.#p&&(clearTimeout(this.#p),this.#p=null);let e=this.#e.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let u=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#n.hasWebSocketAuth()?`${t}//${u}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${u}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{l&&console.log("WebSocket connection established"),this.#n.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#g()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let i=JSON.parse(d.data);if(i.Success){l&&console.log("WebSocket authentication successful"),this.#g();return}else if(i?.Type==="legacystatus")l&&console.log("WebSocket authentication successful"),this.#g();else{console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"),this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:o=>{console.error("Error refreshing token after WebSocket auth failed",o)}});return}}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(d.data),c=i?.Type;if(c==="legacystatus"||c==null)l&&console.log("Received legacy status update:",i),this.#i.set(i);else if(c==="reply"){let o=i;o.Success||console.error("WebSocket reply error:",o.Message)}else if(c==="progress"){let o=i;l&&console.log("Received progress update:",o.Data),this.#a.set(o.Data)}else if(c==="serversettings"){let o=i;l&&console.log("Received server settings update:",o.Data),this.#u.set(o.Data)}else if(c==="taskqueue"){let o=i;l&&console.log("Received task update:",o.Data),this.#o.set(o.Data)}else if(c==="taskcompleted"){let o=i;l&&console.log("Received task completed:",o.Data),this.#S?.next(o.Data)}else if(c==="backuplist"){let o=i;l&&console.log("Received backup list update:",o.Data),this.#r.set(o.Data)}else if(c==="notifications"){let o=i;l&&console.log("Received notification update:",o.Data),this.#d.set(o.Data)}else if(c==="remotecontrol"){let o=i;l&&console.log("Received remote control update:",o.Data),this.#c.set(o.Data)}else console.warn("Unknown WebSocket message type:",c)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#s.onclose=d=>{l&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var i=d.code===4401;i&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:c=>{console.error("Error refreshing token",c)}}),this.shouldConnect()&&(this.#h||(this.#h=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#h.component.reconnectTimer.set(15e3)),this.#p&&clearTimeout(this.#p),this.#p=setTimeout(()=>this.#m(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#g(){this.#t.set("connected");let e=this.#l();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#h&&this.#h.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#f}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#l(),u=s[e];(!u||JSON.stringify(u)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#l.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#l();t[e]&&(delete t[e],this.#l.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#f}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var q=10,J=class r{#e=a(k);#n=a(T);#s=a(v);#t=a(D);#i=n("longpoll");#a=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#i()==="websocket");#o={};#r=null;#d=!1;#c=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#c.unshift(e),this.#c.length>q&&this.#c.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#i()==="websocket"?this.#e.connectionStatus():this.#n.connectionStatus());isConnectionMethodSet=this.#a.asReadonly();serverState=p(()=>this.#i()==="websocket"?this.#e.serverState():this.#n.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#i()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#n.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#n.stop()):(this.#n.reconnectIfNeeded(),this.#e.stop()),this.#i.set(e),this.#a.set(!0)}getConnectionMethod(){return this.#i()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#c.find(u=>u.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#h()})}#h(){this.#d||this.#u()||(this.#d=!0,this.#l())}#l(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#S();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#c.unshift(s),this.#c.length>q&&this.#c.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#r=window.setTimeout(()=>{this.#l()},1e3)},error:s=>{this.#r=window.setTimeout(()=>{this.#l()},3e3)}})}#S(){this.#r!==null&&(clearTimeout(this.#r),this.#r=null),this.#d=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{k as a,J as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-AXLO5KWF.js";import{a as _}from"./chunk-COEGVUM3.js";import{a as C}from"./chunk-PEOYNJJM.js";import{b as B}from"./chunk-AFHEXZUZ.js";import{a as R}from"./chunk-JYRKUYG6.js";import{z}from"./chunk-CJKZ27FM.js";import{d as $}from"./chunk-5E3B4AEF.js";import{$ as a,G as f,M as S,Rc as c,W as P,l as h,q as k,qa as g,sa as d}from"./chunk-K5XGRFWJ.js";import{a as n,b as r}from"./chunk-7CGTOI24.js";var m={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Lock:$localize`Locking remote data …`,Backup_Complete:$localize`Backup complete!`,Backup_RemoteSynchronization:$localize`Synchronizing secondary destination(s) …`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_Download:$localize`Downloading files …`,Restore_PatchWithRemoteFiles:$localize`Patching files with remote data …`,Restore_VerifyRestoredFiles:$localize`Verifying restored files …`,Restore_Finaluze:$localize`Finalizing restore …`,Restore_Complete:$localize`Restore complete!`,Recreate_Begin:$localize`Starting database recreate …`,Recreate_Delete:$localize`Deleting old database …`,Recreate_Create:$localize`Creating new database …`,Recreate_Download:$localize`Downloading files …`,Recreate_Process:$localize`Processing files …`,Recreate_Complete:$localize`Database recreate complete!`,Verify_Begin:$localize`Starting verification …`,Verify_Download:$localize`Downloading files …`,Verify_Process:$localize`Processing files …`,Verify_Complete:$localize`Verification complete!`,BugReport_Begin:$localize`Starting bug report …`,BugReport_Gathering:$localize`Gathering information …`,BugReport_Complete:$localize`Bug report complete!`,List_Begin:$localize`Starting list …`,List_Download:$localize`Downloading files …`,List_Process:$localize`Processing files …`,List_Complete:$localize`List complete!`,Delete_Begin:$localize`Starting delete …`,Delete_Download:$localize`Downloading files …`,Delete_Process:$localize`Processing files …`,Delete_Complete:$localize`Delete complete!`,Compact_Begin:$localize`Starting compact …`,Compact_Download:$localize`Downloading files …`,Compact_Process:$localize`Processing files …`,Compact_Complete:$localize`Compact complete!`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,ReadLockInfo_Running:$localize`Reading lock info …`,Error:$localize`Error!`};var b=class p{#i=a(_);#t=a($);#o=a(F);#e=a(B);#c=a(z);#g=a(R);#l=g(!1);#s=g(null);statusData=this.#s.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(n({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");runningBackupId=c(()=>{let e=this.statusData();return!!(this.serverState()?.ActiveTask&&e?.task?.Status&&e?.task?.Status!=="Completed")?e?.BackupID??null:null});isResuming=g(!1);isFetching=this.#l.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#m=d(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#h=d(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#r(r(n({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#n()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#n()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(f(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open(C,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#n(){this.#l.set(!0),this.#t.getApiV1Progressstate().pipe(S(e=>{let i=e.TaskID??null;return i===null?h(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(k(t=>r(n({},e),{task:t??null})))}),f(()=>this.#l.set(!1))).subscribe({next:e=>{this.#r(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#r(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#s.set(r(n({},e),{progress:this.#p(e),statusText:this.#d(e),fileStatusText:this.#u(e),fileCountProgressText:this.#f(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.Phase==="Backup_RemoteSynchronization"?i=e.OverallProgress>0?e.OverallProgress:0:e.OverallProgress>0&&(i=e.OverallProgress);return i}#a(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileProgress:e.CurrentFileoffset)??0,t=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileSize:e.CurrentFilesize)??0;if(!e.CurrentFilename)return"";let o=e.CurrentFilename.length>42?"..."+e.CurrentFilename.slice(-42):e.CurrentFilename,l=(i/t*100).toFixed(1);return $localize`${o} | File processed: ${this.#i.transform(i)}/${this.#i.transform(t)} - ${l}%`}#f(e){return $localize`Files processed ${e.ProcessedFileCount}/${e.TotalFileCount}`}#d(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?m[e.Phase]??e.Phase:"Running \u2026",e.TotalFileCount===0)return i;if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,u=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",s=this.#a(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${s}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${s}`:i=`${u}${o} files (${this.#i.transform(l)}) to go ${s}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#a(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}else if(e.Phase==="Backup_RemoteSynchronization"){let t=e.RemoteSyncDestinationCount??0,o=e.RemoteSyncDestinationIndex??0,l=t>1?` (${o}/${t})`:"";if(e.TotalFileCount>0){let u=e.TotalFileCount-e.ProcessedFileCount,s=e.TotalFileSize-e.ProcessedFileSize,D=this.#a(e);i=`Synchronizing secondary destination${l}: ${u} files (${this.#i.transform(s)}) to go ${D}`}else l&&(i=`${m[e.Phase]}`.replace("\u2026",`${l} \u2026`))}}return i}static \u0275fac=function(i){return new(i||p)};static \u0275prov=P({token:p,factory:p.\u0275fac,providedIn:"root"})};export{m as a,b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-5W4BSVZJ.js";import{b as B}from"./chunk-AFHEXZUZ.js";import{a as k}from"./chunk-JYRKUYG6.js";import{d as b}from"./chunk-5E3B4AEF.js";import{$ as s,E as i,G as u,O as c,Rc as d,W as o,qa as a,sa as p}from"./chunk-K5XGRFWJ.js";var y="backupListOrderBy",v="backupListShowActualTimes",D=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (descending)`},{value:"-name",label:$localize`Backup name (descending)`},{value:"-lastrun",label:$localize`Last run time (descending)`},{value:"-nextrun",label:$localize`Next run time (descending)`},{value:"-schedule",label:$localize`Is scheduled (descending)`},{value:"-backend",label:$localize`Destination type (descending)`},{value:"-sourcesize",label:$localize`Source size (descending)`},{value:"-destinationsize",label:$localize`Destination size (descending)`},{value:"-duration",label:$localize`Duration (descending)`}],g=class l{#s=s(b);#o=s(k);#e=s(B);#u=null;#t=a([]);#a=a([]);#l=a(!1);#n=a(null);#p=a(null);#c=r(v,"relative");#i=r(y,"id");orderByOptions=a(D);orderBy=this.#i.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#l.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#p.asReadonly();draftBackups=this.#t.asReadonly();#r=d(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=p(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=m();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.set(e),this.#e.isConnectionMethodSet()&&(this.#r()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#r()){this.#e.subscribe("backuplist",this.#i());return}let t=this.#u,n=Date.now(),h=t&&n-t<900*1e3;t&&n-t<100||!e&&h&&this.#a().length||(this.#u=n,this.#l.set(!0),this.#s.getApiV1Backups({orderBy:this.#i()}).pipe(i(1),c(f=>this.#a.set(f)),u(()=>this.#l.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#s.postApiV1BackupByIdStart({id:e}).pipe(i(1),c(()=>this.getBackups(!0)),u(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#s.deleteApiV1BackupById(e).pipe(i(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=o({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-XWML36YQ.js";import{$ as p,kb as m}from"./chunk-K5XGRFWJ.js";var c=class s{#n=p(u);transform(r,t=!1,...d){if(!r)return"";let n=/^\s*(?:(\d+)\.)?(\d{1,2}):(\d{2}):(\d{2})(?:\.\d+)?\s*$/.exec(r);if(!n)return"";let e=parseInt(n[1]??"0",10),i=parseInt(n[2],10),o=parseInt(n[3],10),a=parseInt(n[4],10);return t?`${e?`${e}d `:""}${i}h ${o}m ${a}s`:this.#n.duration({days:e,hours:i,minutes:o,seconds:a}).humanize()}static \u0275fac=function(t){return new(t||s)};static \u0275pipe=m({name:"durationFormat",type:s,pure:!0})};export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-XWML36YQ.js";import{ha as o}from"./chunk-YF6JHIN5.js";import{$ as e,kb as i}from"./chunk-K5XGRFWJ.js";var m=class n{#t=e(s);#r=e(o);convertTimestamp(t){let r=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(t);if(r){let[a,p,f,c,d,u,h]=r;return`${p}-${f}-${c}T${d}:${u}:${h}Z`}return t}transform(t,r=!1,...a){return t?r?this.#r.transform(t,"short"):(this.#t.locale(),typeof t=="string"&&(t=this.convertTimestamp(t)),this.#t(t).fromNow()):"N/A"}static \u0275fac=function(r){return new(r||n)};static \u0275pipe=i({name:"relativeTime",type:n,pure:!0})};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g}from"./chunk-
|
|
1
|
+
import{g}from"./chunk-KI2HT2TI.js";import"./chunk-MJPEKJ3T.js";import{a as G}from"./chunk-JB26UVQP.js";import"./chunk-FQINMZH2.js";import"./chunk-ZTENLO77.js";import"./chunk-ZKIZ7IIA.js";import{q as b}from"./chunk-RTGUYIWH.js";import"./chunk-PNQ5BDQN.js";import"./chunk-TPKKLIFK.js";import"./chunk-X5W2K6AN.js";import"./chunk-AXG7WHBS.js";import"./chunk-AXLO5KWF.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-QGAOYLQU.js";import"./chunk-RM2KGG7J.js";import"./chunk-PEOYNJJM.js";import"./chunk-5W4BSVZJ.js";import"./chunk-QZEIAQ3M.js";import{b as u}from"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import{R as v}from"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import{a as h,b as y,c as I,d as W,e as $,f as A}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as p,Ac as F,Bc as E,Cc as m,Db as l,Eb as i,Fb as o,Gb as C,Ta as _,Wb as a,ac as T,hb as L,lc as M,qa as P,sa as N,xb as O,yb as S}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var w=()=>["/restore-from-files/destination"],k=()=>["/restore-from-files/encryption"],x=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],D=t=>["/restore",t,"options"];function z(t,n){t&1&&(i(0,"div",7),a(1,0),o(),i(2,"div",7),a(3,1),o(),i(4,"div",8),a(5,2),o(),i(6,"div",8),a(7,3),o()),t&2&&(l("routerLink",E(4,w)),_(2),l("routerLink",E(5,k)),_(2),l("routerLink",E(6,x)),_(2),l("routerLink",E(7,J)))}function B(t,n){if(t&1&&(i(0,"div",7),a(1,4),o(),i(2,"div",7),a(3,5),o()),t&2){let e=T(2);l("routerLink",m(2,X,e.backupId())),_(2),l("routerLink",m(4,D,e.backupId()))}}function U(t,n){if(t&1&&(i(0,"sh-stepper",6),O(1,z,8,8)(2,B,4,6),o()),t&2){let e=T();_(),S(e.isFileRestore()?1:2)}}var f=class t{#e=p(y);#n=p(W);#t=p(g);#i=u(this.#e.params);#o=u(this.#e.url);#r=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isFullWidthPage=P(!1);paramsChanged=N(()=>{let n=this.#r(),e=this.#i()?.id,r=!!this.#o()?.find(s=>s.path==="restore-from-files"),d=!!n?.find(s=>s.path==="select-files"),R=!!n?.find(s=>s.path==="progress");this.isFullWidthPage.set(R||d),this.#t.init(e,r)});ngOnInit(){this.#n.events.subscribe(n=>{if(n instanceof h){let e=n.urlAfterRedirects;this.isFullWidthPage.set(e.includes("progress")||e.includes("select-files"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=L({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,r){e&2&&M("full-width",r.isFullWidthPage())},features:[F([g,b])],decls:4,vars:1,consts:()=>{let n;n=$localize` Destination `;let e;e=$localize` Encryption `;let r;r=$localize` Select files `;let d;d=$localize` Options `;let R;R=$localize` Select files `;let s;return s=$localize`Options`,[n,e,r,d,R,s,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],["tabindex","-1","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,r){e&1&&(C(0,"app-status-bar"),O(1,U,3,1,"sh-stepper",6),i(2,"section"),C(3,"router-outlet"),o()),e&2&&(_(),S(r.isFullWidthPage()?-1:1))},dependencies:[v,G,I,$,A],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{margin:2.5rem 2rem;width:calc(100% - 4rem)}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{padding:0 2rem}}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{f as default};
|