@duplicati/ngclient 0.0.132 → 0.0.134
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/assets/spk.css +0 -3
- package/{chunk-DXY7PV4P.js → chunk-3UUTPGTW.js} +1 -1
- package/{chunk-HPZ6HLJE.js → chunk-4VPA3END.js} +1 -1
- package/chunk-4WUC2NLU.js +1 -0
- package/{chunk-3TKRL3US.js → chunk-5MMV45NA.js} +1 -1
- package/chunk-5XSYLFRW.js +1 -0
- package/{chunk-6HRKFGKD.js → chunk-62DY5NTG.js} +1 -1
- package/chunk-6HFJTYBK.js +1 -0
- package/{chunk-6XD3ZTV3.js → chunk-7J7GUBLS.js} +1 -1
- package/{chunk-T3KWCIYP.js → chunk-B6DE3TTE.js} +1 -1
- package/{chunk-3NGXNVFE.js → chunk-BC3MLJH3.js} +1 -1
- package/chunk-BHSG643V.js +1 -0
- package/{chunk-WYY5FAMC.js → chunk-BKHSNMGE.js} +1 -1
- package/{chunk-FJ2TDPI3.js → chunk-CFESUDFC.js} +1 -1
- package/{chunk-UXQ6EH3H.js → chunk-CRALFIWB.js} +1 -1
- package/{chunk-F47NJAFQ.js → chunk-D3OE4S5N.js} +1 -1
- package/chunk-DE64A2ZS.js +1 -0
- package/chunk-DNBOZ26J.js +1 -0
- package/{chunk-BTTHW7KA.js → chunk-EQS67O4J.js} +1 -1
- package/{chunk-X7GQQCVS.js → chunk-EVINCUTE.js} +1 -1
- package/{chunk-2ASDVUFT.js → chunk-EWZGGCZ7.js} +1 -1
- package/{chunk-M65WTTXI.js → chunk-FATQ7BT6.js} +1 -1
- package/chunk-FZTQVXG4.js +1 -0
- package/chunk-G6LCHQJE.js +1 -0
- package/chunk-GORQL5YP.js +1 -0
- package/chunk-HD37ILAE.js +6 -0
- package/{chunk-XH2AUUSU.js → chunk-HE5L47WR.js} +1 -1
- package/{chunk-NPPD4I4N.js → chunk-HLBBIEIQ.js} +1 -1
- package/chunk-HMK6M2N7.js +1 -0
- package/{chunk-XLVTJGQW.js → chunk-HWUEL5ZO.js} +1 -1
- package/{chunk-4IODEYNF.js → chunk-IDAED3OA.js} +1 -1
- package/{chunk-MAHKEFZE.js → chunk-IPC6G72N.js} +1 -1
- package/{chunk-DLVU5GHR.js → chunk-JDCGGJ7O.js} +1 -1
- package/chunk-JHVU3HSL.js +1 -0
- package/{chunk-ENGSZPK6.js → chunk-MDO4PWV6.js} +1 -1
- package/{chunk-FBULENUD.js → chunk-NZD6UMYZ.js} +1 -1
- package/chunk-O3JEFNCL.js +1 -0
- package/chunk-OHEFY2D6.js +1 -0
- package/{chunk-ZJQCMD5B.js → chunk-OTM4ZTG4.js} +1 -1
- package/{chunk-ULGBY3HN.js → chunk-PEPDXQBY.js} +1 -1
- package/{chunk-WZIEF5KL.js → chunk-PSPK4OPB.js} +1 -1
- package/{chunk-JADCKIQ4.js → chunk-QNWYJ7OR.js} +1 -1
- package/chunk-SAISKISU.js +1 -0
- package/chunk-SMNWIGMY.js +1 -0
- package/chunk-SSMDFXE3.js +1 -0
- package/{chunk-52WBX72O.js → chunk-TIPHYMRQ.js} +1 -1
- package/chunk-TTFJPAWM.js +1 -0
- package/chunk-UWF5JLY2.js +1 -0
- package/{chunk-33FTKAPW.js → chunk-UZTRBMWL.js} +1 -1
- package/{chunk-PTDOM6EA.js → chunk-V6WRFB7W.js} +1 -1
- package/{chunk-5CYNJ3KI.js → chunk-VFVXE2DC.js} +1 -1
- package/{chunk-DXX4SHGM.js → chunk-VG6LA5R3.js} +1 -1
- package/{chunk-AKQVOUES.js → chunk-VVJBMGZR.js} +1 -1
- package/{chunk-Q6YWYUN4.js → chunk-WBYTRHI7.js} +1 -1
- package/chunk-WESN3ZUC.js +1 -0
- package/chunk-XZWXLEK2.js +3 -0
- package/{chunk-ZF3UEKWP.js → chunk-Y4IRFRVB.js} +1 -1
- package/{chunk-D4QBTQXT.js → chunk-Y7OD7PZG.js} +1 -1
- package/{chunk-DSRTEY6R.js → chunk-YW7YXFSC.js} +1 -1
- package/{chunk-4JHY2ZIQ.js → chunk-ZIJ7ZEHR.js} +1 -1
- package/{chunk-TKOD3RB3.js → chunk-ZQYPQTU3.js} +2 -2
- package/{chunk-UEX6XU6A.js → chunk-ZUXVEXBA.js} +1 -1
- package/index.html +2 -2
- package/locale/messages.cs.json +15 -2
- package/locale/messages.da.json +36 -25
- package/locale/messages.de.json +169 -77
- package/locale/messages.en_GB.json +13 -2
- package/locale/messages.es.json +13 -2
- package/locale/messages.fr.json +14 -2
- package/locale/messages.it.json +184 -157
- package/locale/messages.ja_JP.json +16 -2
- package/locale/messages.nl_NL.json +184 -157
- package/locale/messages.pl.json +13 -2
- package/locale/messages.pt.json +12 -2
- package/locale/messages.pt_BR.json +13 -2
- package/locale/messages.zh-Hans.json +459 -0
- package/locale/messages.zh_CN.json +157 -157
- package/{main-MG43J5KN.js → main-RQTAFLAT.js} +1 -1
- package/package.json +1 -1
- package/styles-4QA7NM7N.css +1 -0
- package/chunk-2W4JV5JL.js +0 -1
- package/chunk-2YHX57UE.js +0 -1
- package/chunk-3UMUFU7J.js +0 -1
- package/chunk-53F47EOA.js +0 -1
- package/chunk-5ER6KMMG.js +0 -1
- package/chunk-6FOROLCM.js +0 -3
- package/chunk-AUWIW323.js +0 -1
- package/chunk-EKL346XU.js +0 -1
- package/chunk-FQAHXSGY.js +0 -1
- package/chunk-FX2XKS5C.js +0 -1
- package/chunk-GXCMYX2K.js +0 -1
- package/chunk-LGC2UEAO.js +0 -1
- package/chunk-LLV2UR7Z.js +0 -1
- package/chunk-NKYXZEX2.js +0 -1
- package/chunk-NQVDTTCD.js +0 -6
- package/chunk-NVMLEB3O.js +0 -1
- package/chunk-QB3BX6FC.js +0 -1
- package/chunk-RIMBSV7X.js +0 -1
- package/chunk-RNYYB7Z7.js +0 -1
- package/chunk-TQPOMS6Q.js +0 -1
- package/chunk-ZXT5JBAK.js +0 -1
- package/styles-YRN2WTKF.css +0 -1
package/assets/spk.css
CHANGED
|
@@ -59,7 +59,6 @@ spk-icon.fill {
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
spk-icon {
|
|
62
|
-
/* use !important to prevent issues with browser extensions that change fonts */
|
|
63
62
|
font-family: "spk" !important;
|
|
64
63
|
speak: never;
|
|
65
64
|
font-style: normal;
|
|
@@ -68,7 +67,6 @@ spk-icon {
|
|
|
68
67
|
text-transform: none;
|
|
69
68
|
line-height: 1;
|
|
70
69
|
|
|
71
|
-
/* Enable Ligatures ================ */
|
|
72
70
|
letter-spacing: 0;
|
|
73
71
|
-webkit-font-feature-settings: "liga";
|
|
74
72
|
-moz-font-feature-settings: "liga=1";
|
|
@@ -78,7 +76,6 @@ spk-icon {
|
|
|
78
76
|
-webkit-font-variant-ligatures: discretionary-ligatures;
|
|
79
77
|
font-variant-ligatures: discretionary-ligatures;
|
|
80
78
|
|
|
81
|
-
/* Better Font Rendering =========== */
|
|
82
79
|
-webkit-font-smoothing: antialiased;
|
|
83
80
|
-moz-osx-font-smoothing: grayscale;
|
|
84
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as D}from"./chunk-
|
|
1
|
+
import{g as D}from"./chunk-7J7GUBLS.js";import{a as X}from"./chunk-CFESUDFC.js";import{h as x}from"./chunk-DE64A2ZS.js";import"./chunk-HWUEL5ZO.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import{a as g}from"./chunk-67XQIEG5.js";import"./chunk-NZD6UMYZ.js";import"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-BHSG643V.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{a as I,b as G,c as W,d as h,e as y,f as v}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{q as w,v as K}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-4VPA3END.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-JDCGGJ7O.js";import{Gc as N,Hb as _,Ib as F,Oa as l,Ob as E,X as c,_a as $,_b as L,la as A,pb as O,pc as M,qb as k,qc as T,rc as R,ub as r,vb as t,wb as n,xb as a}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var b=()=>["/restore-from-files/destination"],z=()=>["/restore-from-files/encryption"],B=()=>["/restore-from-files/select-files"],U=()=>["/restore-from-files/options"],j=e=>["/restore-draft",e,"select-files"],H=e=>["/restore-draft",e,"options"],V=e=>["/restore",e,"select-files"],q=e=>["/restore",e,"options"],J=e=>["/restore",e,"progress"];function Q(e,i){e&1&&(t(0,"div",9),_(1,0),a(2,"spk-radio"),F(),n(),t(3,"div",9),_(4,1),a(5,"spk-radio"),F(),n(),t(6,"div",9),_(7,2),a(8,"spk-radio"),F(),n(),t(9,"div",9),_(10,3),a(11,"spk-radio"),F(),n()),e&2&&(r("routerLink",T(4,b)),l(3),r("routerLink",T(5,z)),l(3),r("routerLink",T(6,B)),l(3),r("routerLink",T(7,U)))}function Y(e,i){if(e&1&&(t(0,"div",9),_(1,4),a(2,"spk-radio"),F(),n(),t(3,"div",9),_(4,5),a(5,"spk-radio"),F(),n()),e&2){let o=E();r("routerLink",R(2,j,o.backupId())),l(3),r("routerLink",R(4,H,o.backupId()))}}function Z(e,i){if(e&1&&(t(0,"div",9),_(1,6),a(2,"spk-radio"),F(),n(),t(3,"div",9),_(4,7),a(5,"spk-radio"),F(),n()),e&2){let o=E();r("routerLink",R(2,V,o.backupId())),l(3),r("routerLink",R(4,q,o.backupId()))}}function ee(e,i){if(e&1&&(t(0,"div",9),_(1,8),a(2,"spk-radio"),F(),n()),e&2){let o=E();r("routerLink",R(1,J,o.backupId()))}}var f=class e{#o=c(G);#t=c(h);#e=c(D);#n=g(this.#o.params);#i=g(this.#o.url);#a=g(this.#o.children[0].url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;isProgressPage=A(!1);paramsChanged=N(()=>{let i=this.#a(),o=this.#n()?.id,s=!!this.#i()?.find(S=>S.path==="restore-draft"),p=!!this.#i()?.find(S=>S.path==="restore-from-files"),u=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(u),this.#e.init(o,p,p||s)});ngOnInit(){this.#t.events.subscribe(i=>{if(i instanceof I){let o=i.urlAfterRedirects;this.isProgressPage.set(o.includes("progress"))}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=$({type:e,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(o,s){o&2&&L("full-width",s.isProgressPage())},features:[M([D,x])],decls:8,vars:2,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let o;o=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let p;p=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let u;u=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let S;S=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let P;P=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let C;C=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let m;return m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Progress `,[i,o,s,p,u,S,P,C,m,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(o,s){o&1&&(a(0,"app-status-bar"),t(1,"spk-stepper"),O(2,Q,12,8)(3,Y,6,6)(4,Z,6,6),O(5,ee,3,3,"div",9),n(),t(6,"section"),a(7,"router-outlet"),n()),o&2&&(l(2),k(s.isFileRestore()?2:s.isDraft()?3:4),l(3),k(s.isProgressPage()?5:-1))},dependencies:[K,w,X,W,y,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{la as o}from"./chunk-GP2W7XZF.js";import{a as s}from"./chunk-
|
|
1
|
+
import{la as o}from"./chunk-GP2W7XZF.js";import{a as s}from"./chunk-JDCGGJ7O.js";import{X as e,bb as n}from"./chunk-67YRCRMI.js";var m=class i{#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||i)};static \u0275pipe=n({name:"relativeTime",type:i,pure:!0})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as dt,b as Dt,c as mt}from"./chunk-HD37ILAE.js";import"./chunk-L6BZ6TEU.js";import"./chunk-5MMV45NA.js";import"./chunk-JHVU3HSL.js";import{h as gt}from"./chunk-DE64A2ZS.js";import"./chunk-HWUEL5ZO.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import{a as b}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-BHSG643V.js";import{c as st,e as Ft,f as lt,g as ct,i as ut,j as _t,r as pt,s as Tt}from"./chunk-ZCT7SRIM.js";import{b as Z,d as tt}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as et,b as nt,d as it,e as ot,l as at,o as rt}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as d,F as L,Fc as $,Hb as D,Ib as m,Jb as N,Kb as z,Lb as X,Mb as W,Mc as J,Nb as _,Oa as F,Ob as l,Wb as j,X as p,Xb as H,_a as V,_b as Q,ba as c,bc as O,ca as u,cc as U,dc as q,fa as K,gc as k,hc as E,ic as A,la as T,pb as S,qb as f,qc as Y,rb as P,sb as M,tb as h,ub as I,vb as a,wb as r,xb as g,yb as x,zb as B}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var Ct=["formRef"],St=()=>({maxWidth:"700px",width:"100%"});function ft(o,i){o&1&&(D(0,2,2),g(1,"spk-icon"),m())}function Nt(o,i){o&1&&N(0,2,3)}function Ot(o,i){if(o&1){let t=d();D(0,2,1),a(1,"button",16),_("click",function(){c(t);let e=l();return u(e.testDestination())}),S(2,ft,2,0)(3,Nt,1,0),r(),m()}if(o&2){let t=l();F(),Q("loader",t.testLoading())("success",t.successfulTest()),F(),f(t.successfulTest()?2:3)}}function It(o,i){if(o&1){let t=d();a(0,"p",22),_("click",function(){c(t);let e=l();return u(e.removeDestination())}),D(1,5),g(2,"strong")(3,"br")(4,"span",23),m(),r()}if(o&2){let t,n=l();F(4),z((t=n.selectedDestinationType())==null?null:t.displayName),X(1)}}function kt(o,i){if(o&1){let t=d();a(0,"div",29),_("click",function(){let e=c(t).$implicit,s=l(2);return u(s.setDestination(e.key))}),a(1,"h3"),O(2),r(),a(3,"p"),O(4),r()()}if(o&2){let t=i.$implicit;F(2),U(t.displayName),F(2),U(t.description)}}function Et(o,i){if(o&1){let t=d();a(0,"button",30,1),_("click",function(){let e=c(t).$implicit,s=l(2);return u(s.setDestination(e.key))}),O(2),r()}if(o&2){let t=i.$implicit;F(2),q(" ",t.displayName," ")}}function At(o,i){if(o&1&&(a(0,"div",24),M(1,kt,5,2,"div",25,P),r(),a(3,"spk-menu",26)(4,"button",27),N(5,6),r(),x(6,15),M(7,Et,3,1,"button",28,P),B(),r()),o&2){let t=l();F(),h(t.destinationTypeOptionsFocused()),F(2),I("searchable",!0),F(4),h(t.destinationTypeOptionsNotFocused())}}function $t(o,i){if(o&1){let t=d();a(0,"app-single-destination",31),A("targetUrlChange",function(e){c(t);let s=l();return E(s.targetUrlModel,e)||(s.targetUrlModel=e),u(e)}),r()}if(o&2){let t=l();k("targetUrl",t.targetUrlModel),I("useBackupState",!0)}}function yt(o,i){if(o&1){let t=d();a(0,"spk-dialog",32),A("isOpenChange",function(e){c(t);let s=l();return E(s.targetUrlDialogOpen,e)||(s.targetUrlDialogOpen=e),u(e)}),a(1,"header",33)(2,"h2"),N(3,7),r(),a(4,"spk-alert",34),N(5,8),r()(),a(6,"div",35)(7,"spk-form-field")(8,"textarea",36),A("ngModelChange",function(e){c(t);let s=l();return E(s.targetUrlCtrl,e)||(s.targetUrlCtrl=e),u(e)}),r()()(),a(9,"footer",37)(10,"button",19),_("click",function(){c(t);let e=l();return u(e.closeTargetUrlDialog(!1))}),O(11,"Cancel"),r(),a(12,"button",38),_("click",function(){c(t);let e=l();return u(e.closeTargetUrlDialog(!0))}),D(13,9),g(14,"spk-icon"),m(),r()()()}if(o&2){let t=l();k("isOpen",t.targetUrlDialogOpen),I("options",Y(3,St)),F(8),k("ngModel",t.targetUrlCtrl)}}var y=new pt,jt=(o={destinations:[]})=>y.group({destinations:y.array(o.destinations)}),Ht=({key:o,customGroup:i,dynamicGroup:t,advancedGroup:n})=>y.group({destinationType:y.control(o),custom:i,dynamic:t,advanced:n}),R=class o{#e=p(tt);#n=p(Z);#t=p(gt);#o=p(Dt);#i=p(ot);#a=p(dt);injector=p(K);formRef=J.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=T(null);targetUrlInitial=T(null);targetUrlDialogOpen=T(!1);toggleNewDestination=T(!0);successfulTest=T(!1);testLoading=T(!1);destinationTypeOptionsInFocus=T(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#o.destinationTypeOptions;destinationTypeOptionsFocused=$(()=>{let i=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return i.map(n=>t.find(e=>e.key===n))});selectedDestinationType=$(()=>{let i=this.#t.targetUrlModel();if(!i)return null;let t=i.split("://")[0];return this.destinationTypeOptions().find(e=>t===e.key)});destinationTypeOptionsNotFocused=$(()=>{let i=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!i.includes(n.key))});openTargetUrlDialog(){let i=this.#t.targetUrlModel();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||t===n||!t||this.#t.setTargetUrl(t)}testDestination(i=0){let t=this.#t.targetUrlModel();t&&(this.testLoading.set(!0),this.#a.testDestination(t,i,!0).pipe(L(()=>this.testLoading.set(!1))).subscribe({next:n=>{if(n.action==="success"){this.#t.isNew()&&(n.containsBackup===!0?this.#i.open(b,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):n.anyFilesFound===!0&&this.#i.open(b,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(n.action==="generic-error"){this.successfulTest.set(!1);return}let e=t.includes("?");n.action==="trust-cert"&&this.#t.setTargetUrl(t+`${e?"&":"?"}accept-specified-ssl-hash=${n.certData}`),n.action==="approve-host-key"&&this.#t.setTargetUrl(t+`${e?"&":"?"}ssh-fingerprint=${n.reportedHostKey}`),n.testAgain&&this.testDestination(n.destinationIndex)}}))}setDestination(i){this.#t.setTargetUrl(`${i}://`)}removeDestination(){this.#t.setTargetUrl(null)}goBack(){this.#e.navigate(["general"],{relativeTo:this.#n.parent})}next(){this.#t.isNew()||this.#t.submit(!0),this.#e.navigate(["source-data"],{relativeTo:this.#n.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=V({type:o,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&j(n.formRef,Ct,5),t&2&&H()},decls:24,vars:5,consts:()=>{let i;i=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,i=W(i);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let e;e=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let s;s=$localize`Other destinations`;let w;w=$localize`Edit target URL`;let G;G=$localize` Be careful, this will overwrite everything you have in your destination. `;let v;return v=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],i,t,n,e,s,w,G,v,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,n){if(t&1){let e=d();a(0,"form",10,0),_("submit",function(){return c(e),u(n.next())}),a(2,"header")(3,"h3",11),D(4,2),a(5,"div",12),S(6,Ot,4,5,"button",13),a(7,"spk-menu")(8,"button",14),g(9,"spk-icon"),r(),x(10,15),a(11,"button",16),_("click",function(){return c(e),u(n.openTargetUrlDialog())}),g(12,"spk-icon"),r(),B(),r()(),m(),r(),S(13,It,5,1,"p"),r(),S(14,At,9,1),S(15,$t,1,2,"app-single-destination",17),a(16,"div",18)(17,"button",19),_("click",function(){return c(e),u(n.goBack())}),D(18,3),g(19,"spk-icon"),m(),r(),a(20,"button",20),D(21,4),g(22,"spk-icon"),m(),r()()(),S(23,yt,15,4,"spk-dialog",21)}if(t&2){let e=!!n.targetUrlModel();F(6),f(e?6:-1),F(7),f(e?13:-1),F(),f(e?-1:14),F(),f(e?15:-1),F(8),f(n.targetUrlDialogOpen()?23:-1)}},dependencies:[mt,Tt,_t,st,Ft,lt,ut,ct,at,rt,et,it,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}"],changeDetection:0})};export{jt as createDestinationForm,Ht as createDestinationFormGroup,R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as O,c as P,e as E,i as v,k as N,s as I}from"./chunk-ZCT7SRIM.js";import{l as y,o as X,t as Y}from"./chunk-
|
|
1
|
+
import{a as O,c as P,e as E,i as v,k as N,s as I}from"./chunk-ZCT7SRIM.js";import{l as y,o as X,t as Y}from"./chunk-DNBOZ26J.js";import{Bb as x,Fc as m,Gc as h,Jb as F,Kb as A,Lb as D,Lc as c,Nb as W,Oa as s,Ob as M,Pb as T,Qb as d,Zb as j,_a as f,ba as $,bc as G,ca as k,db as w,ec as U,gc as g,hc as _,ic as C,la as l,ob as b,pc as S,rb as z,sb as R,tb as V,ub as p,vb as u,wb as a,yb as B,zb as L}from"./chunk-67YRCRMI.js";var Q=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ee=["label","[prefix]","[suffix]"];function te(i,e){if(i&1&&G(0),i&2){let t=e.$implicit,n=M();U("",t.label,"",n.hasPerSecond()?"/s":"")}}var ne=[{value:"bytes",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],ie=["throttle-upload","throttle-download"],H=class i{customId=c();inputType=c();timespan=l(0);unit=l("MB");sizeOptions=l(ne);readonly=l(!1);hasPerSecond=m(()=>{let e=this.inputType();return e&&ie.includes(e)});onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});writeValue(e){if(e){let t=e.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);t?(this.timespan.set(parseInt(t[1],10)),this.unit.set(t[2].toUpperCase())):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:ee,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&(T(Q),u(0,"div",0),d(1,0,["ngProjectAs","label",5,["label"]]),a(),u(2,"spk-form-field")(3,"input",1),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(4,1),d(5,2),a(),u(6,"spk-select",2)(7,"input",3),C("ngModelChange",function(o){return _(n.unit,o)||(n.unit=o),o}),a(),w(8,te,1,2,"ng-template"),a()),t&2&&(s(2),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),j("--miw",0),p("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),s(),g("ngModel",n.unit))},dependencies:[Y,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var oe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],se=["label","[prefix]","[suffix]"];function ae(i,e){if(i&1){let t=x();u(0,"button",7),W("click",function(){let r=$(t).$implicit,o=M();return k(o.updateUnit(r.value))}),F(1,1),a()}if(i&2){let t=e.$implicit;s(),A(t.label),D(1)}}var le=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],re=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pe=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],K=class i{customId=c();inputType=c();timespan=l(0);#e="D";unit=l(this.#e);unitLabel=m(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=m(()=>{let e=this.inputType();return e&&pe.includes(e.replace("--",""))});timeOptions=m(()=>this.isShortTime()?le:re);readonly=l(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});inputTypeEffect=h(()=>{let e=this.timeOptions(),t=this.isShortTime()?"s":"D";this.#e=t,this.unit.set(t)});updateUnit(e){this.unit.set(e)}writeValue(e){let t=this.isShortTime();if(e){let n=t?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,r=e.match(n);r?(this.timespan.set(parseInt(r[1],10)),this.unit.set(r[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:se,decls:11,vars:6,consts:()=>{let e;e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[e,t,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["spk-button","","type","button",1,"trigger"],["menu",""],["spk-button","","type","button",1,"small"],["spk-button","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(T(oe),d(0,0,["ngProjectAs","label",5,["label"]]),u(1,"spk-form-field")(2,"input",2),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(3,1),d(4,2),a(),u(5,"spk-menu",3)(6,"button",4),F(7,0),a(),B(8,5),R(9,ae,2,1,"button",6,z),L(),a()),t&2&&(s(),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),p("openIndicator",!0),s(2),A(n.unitLabel()),D(7),s(2),V(n.timeOptions()))},dependencies:[X,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{H as a,K as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as a,f as b}from"./chunk-7J7GUBLS.js";import"./chunk-HWUEL5ZO.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-67XQIEG5.js";import"./chunk-FC45TEB6.js";import"./chunk-BHSG643V.js";import"./chunk-ZCT7SRIM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as W}from"./chunk-
|
|
1
|
+
import{a as W}from"./chunk-CFESUDFC.js";import"./chunk-NZD6UMYZ.js";import{a as z}from"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-BHSG643V.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{e as S}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as g,g as E,h as R,k as G,p as w}from"./chunk-DNBOZ26J.js";import{h as X}from"./chunk-XD6MBGQY.js";import"./chunk-4VPA3END.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-JDCGGJ7O.js";import{Hb as y,Ib as A,Jb as s,Kb as I,Lb as B,Oa as a,Ob as d,X as u,_a as T,bc as r,db as O,ec as L,mb as M,nb as P,pb as F,qb as N,qc as m,rb as x,rc as v,sb as $,tb as D,ub as _,vb as t,wb as i,xb as l,yb as b,zb as h}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var j=()=>[R,E,g,S],K=()=>["/restore-from-files"],q=()=>["/restore/from-config"],V=n=>["/restore",n];function H(n,o){if(n&1&&(t(0,"spk-card",5),l(1,"img",10),t(2,"div",7)(3,"h3"),s(4,1),i(),t(5,"p"),r(6),i()(),t(7,"button",8),y(8,2),l(9,"spk-icon"),A(),i()()),n&2){let e=o.$implicit;a(4),I((e.Backup==null?null:e.Backup.Name)??"Backup name missing"),B(4),a(2),L(" ",(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceSizeString)??"-"," / ",(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount)??"-"," "),a(),_("routerLink",v(4,V,e.Backup==null?null:e.Backup.ID))}}function J(n,o){if(n&1&&$(0,H,10,6,"spk-card",5,x),n&2){let e=d(2);D(e.backups())}}function Q(n,o){n&1&&(b(0),s(1,3),h())}function U(n,o){if(n&1&&F(0,J,2,0)(1,Q,2,0,"ng-container"),n&2){let e=d();N(e.backups().length?0:1)}}function Y(n,o){n&1&&(t(0,"div",11),l(1,"spk-progress-bar",12),t(2,"div",7)(3,"h3"),s(4,4),i()()())}var f=class n{#e=u(z);#t=u(X);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(o){this.#t.postApiV1BackupByIdRestore({id:o.Backup?.ID,requestBody:{}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=T({type:n,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let o;o=$localize`Where do you want to restore from?`;let e;e=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let k;k=$localize`No backups founds`;let C;return C=$localize`Loading backups...`,[o,e,p,k,C,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(e,p){e&1&&(l(0,"app-status-bar"),t(1,"section")(2,"h2"),s(3,0),i(),t(4,"spk-card",5),l(5,"img",6),t(6,"div",7)(7,"h3"),r(8,"Direct restore from backup files"),i(),t(9,"p"),r(10,"Point to your backup files and restore from there."),i()(),t(11,"button",8),r(12," Start "),t(13,"spk-icon"),r(14,"play-circle"),i()()(),t(15,"spk-card",5),l(16,"img",9),t(17,"div",7)(18,"h3"),r(19,"Restore from configuration"),i(),t(20,"p"),r(21,"Load destination from an exported job or a storage provider"),i()(),t(22,"button",8),r(23," Start "),t(24,"spk-icon"),r(25,"play-circle"),i()()(),t(26,"spk-divider"),r(27,"Or existing"),i(),O(28,U,2,1)(29,Y,5,0),M(30,28,j,null,29),i()),e&2&&(a(11),_("routerLink",m(3,K)),a(11),_("routerLink",m(4,q)),a(8),P(!p.backupsLoading()))},dependencies:[W,R,E,G,g,w,S],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-8)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-4VPA3END.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-JDCGGJ7O.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as RelativeTimePipe};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-XLVTJGQW.js";import{a as Be}from"./chunk-4JHY2ZIQ.js";import{a as oe}from"./chunk-67XQIEG5.js";import{a as te}from"./chunk-FC45TEB6.js";import{a as J}from"./chunk-2YHX57UE.js";import{b as Ae,c as y,e as L,f as $,i as ve,j as b,l as we,o as D,q as A,r as v,s as Ge,t as w}from"./chunk-ZCT7SRIM.js";import{b as R,d as N}from"./chunk-DQM3ATT4.js";import{A as De,a as I,e as Me,g as k,l as ye,p as Le,q as $e,t as be}from"./chunk-5ER6KMMG.js";import{h as M}from"./chunk-XD6MBGQY.js";import{la as H}from"./chunk-GP2W7XZF.js";import{B as Fe,Bb as B,E as ee,F as T,Gc as q,Hb as u,Ib as F,J as me,Jb as E,Kb as Te,Lb as Ee,N as Se,Nb as O,O as X,Oa as m,Ob as x,S as de,X as p,_a as h,_b as Oe,ba as f,bc as j,ca as C,db as ge,ec as fe,gc as Ce,hc as Re,i as _e,ic as Ne,la as _,o as ce,pb as z,pc as Pe,qb as Y,qc as he,ub as S,uc as Ie,vb as r,wb as l,wc as ke,x as Z,xb as c,y as ue,yb as K,zb as U}from"./chunk-67YRCRMI.js";var xe=new v,Xe=()=>xe.group({passphrase:xe.control("")}),ie=class a{#t=p(M);#e=p(P);#o=p(N);#n=p(R);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(T(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#o.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let o;return o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,o,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",3),O("submit",function(){return t.next()}),r(1,"spk-form-field")(2,"label",4),E(3,0),l(),c(4,"input",5),l(),r(5,"div",6)(6,"button",7),O("click",function(){return t.back()}),u(7,1),c(8,"spk-icon"),F(),l(),r(9,"button",8),u(10,2),c(11,"spk-icon"),F(),l()()()),e&2&&S("formGroup",t.encryptionForm)},dependencies:[w,b,y,L,$,D,A,ye,I,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Ke=()=>({standalone:!0});function Ue(a,i){a&1&&c(0,"spk-progress-bar",7)}function je(a,i){if(a&1&&(r(0,"div",14),j(1),Ie(2,"date"),l()),a&2){let e=i.$implicit;m(),fe("",e.Version,": ",ke(2,2,e.Time,"medium"))}}function qe(a,i){a&1&&c(0,"spk-progress-bar",7)}function He(a,i){if(a&1&&(r(0,"app-file-tree",13)(1,"label",15),E(2,4),l(),c(3,"input",16),l()),a&2){let e=x(2);S("rootPaths",e.rootPaths())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function Je(a,i){if(a&1){let e=B();r(0,"spk-select",11),O("cleared",function(){f(e);let o=x();return C(o.abortLoading())}),r(1,"input",12),Ne("ngModelChange",function(o){f(e);let n=x();return Re(n.selectOption,o)||(n.selectOption=o),C(o)}),l(),ge(2,je,3,5,"ng-template"),l(),z(3,qe,1,0,"spk-progress-bar",7),z(4,He,4,4,"app-file-tree",13)}if(a&2){let e=x();S("options",e.versionOptions())("isClearable",!1),m(),Ce("ngModel",e.selectOption),S("ngModelOptions",he(6,Ke)),m(2),Y(e.isDraft()||e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),m(),Y(e.showFileTree()?4:-1)}}var se=new v,ze=()=>se.group({filesToRestore:se.control(""),passphrase:se.control(null)}),re=class a{#t=p(M);#e=p(P);#o=p(J);#n=p(N);#i=p(R);#s=p(H);#r=null;#a=null;selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=_(!1);backupSettings=_(null);rootPaths=_([]);loadingRootPath=_(!1);isRepairing=_(!1);loadingEffect=q(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=q(()=>{let i=this.backupId(),e=this.isRepairing(),t=this.selectOption();if(!t||!i)return;let n=this.versionOptions()?.find(d=>d.Version===parseInt(t))?.Time??null;if(!n||e)return;let s={id:i+"",time:n};this.backupSettings.set(s),this.getRootPath(s)});repairEffect=q(()=>{let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#a===n)return;this.#a=n,this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(X(this.abortLoading$),T(()=>{this.#a=null})).subscribe(s=>{let d=s.ID;var G=window.setInterval(()=>{this.#t.getApiV1TaskByTaskid({taskid:d}).subscribe(W=>{W.Status==="Completed"&&(clearInterval(G),this.isRepairing.set(!1))})},1e3)})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#r===t||(this.#r=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(X(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#r=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}):this.#t.getApiV1BackupByIdFiles(e).pipe(X(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}))}abortLoading$=new _e;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#s.transform(t.Time,"medium")}`:""}}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#n.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-select-files"]],features:[Pe([H])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize`Select an option...`;let n;return n=$localize`Path`,[["formRef",""],i,e,t,n,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","backupSettings","multiSelect","showFiles"],[1,"custom-option"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",5,0),O("submit",function(){return f(o),C(t.next())}),r(2,"h3",6),E(3,1),l(),z(4,Ue,1,0,"spk-progress-bar",7)(5,Je,5,7),r(6,"div",8)(7,"button",9),O("click",function(){return f(o),C(t.back())}),u(8,2),c(9,"spk-icon"),F(),l(),r(10,"button",10),u(11,3),c(12,"spk-icon"),F(),l()()()}e&2&&(S("formGroup",t.selectFilesForm),m(4),Y(t.versionOptionsLoading()?4:5),m(5),Te(t.isFileRestore()?"Back":"Exit"),Ee(8))},dependencies:[Ge,b,y,L,$,ve,w,D,A,H,Q,k,I,be,Le],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var P=class a{#t=p(N);#e=p(R);#o=p(J);#n=p(Me);#i=p(M);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=ze();optionsForm=Ye();encryptionForm=Xe();optionsFormSignal=oe(this.optionsForm.valueChanges);selectFilesFormSignal=oe(this.selectFilesForm.valueChanges);selectOption=_(null);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isDraft=_(!1);isFileRestore=_(!1);isFullWidthPage=_(!1);init(i,e=!1,t=!1){this.backupId.set(i),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>`${s}*`)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(T(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.navigate(["./progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#n.open(te,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#s(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Fe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||s||e===0?ce(()=>t):ue(1e3).pipe(Se(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#o.hasV2ListOperations()?Z([this.#i.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);this.versionOptions.set((o.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder",d=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(d=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(d=$localize`The backup storage folder was not found.`),s&&(d=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(te,{data:{title:$localize`Failed to load backup filesets`,message:d,confirmText:$localize`OK`,cancelText:void 0},closed:G=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):Z([this.#i.getApiV1BackupById({id:e}),this.#i.getApiV1BackupByIdFilesets({id:e}).pipe(me(3))]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)}})}#s(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=de({token:a,factory:a.\u0275fac,providedIn:"root"})};var V=new v,Ye=()=>V.group({restoreFrom:V.control("orignal"),restoreFromPath:V.control(""),handleExisting:V.control("overwrite"),permissions:V.control(!1)}),ae=class a{#t=p(P);#e=p(N);#o=p(R);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let d;d=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let G;G=$localize`Permissions`;let W;W=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let le;le=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let pe;return pe=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,d,G,W,le,pe,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",12,0),O("submit",function(){return f(o),C(t.submit())}),r(2,"h3",13),E(3,1),l(),r(4,"app-toggle-card",14),K(5,15),E(6,2),U(),r(7,"spk-radio",16),u(8,3),c(9,"input",17),F(),l(),r(10,"spk-radio",16),u(11,4),c(12,"input",18),F(),l(),r(13,"app-file-tree",19)(14,"label",20),j(15,"Path"),l(),c(16,"input",21),l()(),r(17,"app-toggle-card",14),K(18,15),E(19,5),U(),r(20,"spk-radio",16),u(21,6),c(22,"input",22),F(),l(),r(23,"spk-radio",16),u(24,7),c(25,"input",23),F(),l()(),r(26,"app-toggle-card"),K(27,15),E(28,8),U(),r(29,"spk-toggle",24),u(30,9),c(31,"input",25),F(),l()(),r(32,"div",26)(33,"button",27),O("click",function(){return f(o),C(t.goBack())}),u(34,10),c(35,"spk-icon"),F(),l(),r(36,"button",28),u(37,11),c(38,"spk-icon"),F(),l()()()}if(e&2){let o;S("formGroup",t.optionsForm),m(4),S("disallowToggle",!0),m(9),S("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation"),m(4),S("disallowToggle",!0),m(19),Oe("loader",t.isSubmitting())}},dependencies:[w,b,y,Ae,we,L,$,D,A,Be,Q,De,$e,k,I],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ye as a,ae as b,Xe as c,ie as d,ze as e,re as f,P as g};
|
|
1
|
+
import{a as Q}from"./chunk-HWUEL5ZO.js";import{a as Be}from"./chunk-ZIJ7ZEHR.js";import{a as oe}from"./chunk-67XQIEG5.js";import{a as te}from"./chunk-FC45TEB6.js";import{a as J}from"./chunk-BHSG643V.js";import{b as Ae,c as y,e as L,f as $,i as ve,j as b,l as we,o as D,q as A,r as v,s as Ge,t as w}from"./chunk-ZCT7SRIM.js";import{b as R,d as N}from"./chunk-DQM3ATT4.js";import{A as De,a as I,e as Me,g as k,l as ye,p as Le,q as $e,t as be}from"./chunk-DNBOZ26J.js";import{h as M}from"./chunk-XD6MBGQY.js";import{la as H}from"./chunk-GP2W7XZF.js";import{B as Fe,Bb as B,E as ee,F as T,Gc as q,Hb as u,Ib as F,J as me,Jb as E,Kb as Te,Lb as Ee,N as Se,Nb as O,O as X,Oa as m,Ob as x,S as de,X as p,_a as h,_b as Oe,ba as f,bc as j,ca as C,db as ge,ec as fe,gc as Ce,hc as Re,i as _e,ic as Ne,la as _,o as ce,pb as z,pc as Pe,qb as Y,qc as he,ub as S,uc as Ie,vb as r,wb as l,wc as ke,x as Z,xb as c,y as ue,yb as K,zb as U}from"./chunk-67YRCRMI.js";var xe=new v,Xe=()=>xe.group({passphrase:xe.control("")}),ie=class a{#t=p(M);#e=p(P);#o=p(N);#n=p(R);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(T(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#o.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let o;return o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,o,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",3),O("submit",function(){return t.next()}),r(1,"spk-form-field")(2,"label",4),E(3,0),l(),c(4,"input",5),l(),r(5,"div",6)(6,"button",7),O("click",function(){return t.back()}),u(7,1),c(8,"spk-icon"),F(),l(),r(9,"button",8),u(10,2),c(11,"spk-icon"),F(),l()()()),e&2&&S("formGroup",t.encryptionForm)},dependencies:[w,b,y,L,$,D,A,ye,I,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Ke=()=>({standalone:!0});function Ue(a,i){a&1&&c(0,"spk-progress-bar",7)}function je(a,i){if(a&1&&(r(0,"div",14),j(1),Ie(2,"date"),l()),a&2){let e=i.$implicit;m(),fe("",e.Version,": ",ke(2,2,e.Time,"medium"))}}function qe(a,i){a&1&&c(0,"spk-progress-bar",7)}function He(a,i){if(a&1&&(r(0,"app-file-tree",13)(1,"label",15),E(2,4),l(),c(3,"input",16),l()),a&2){let e=x(2);S("rootPaths",e.rootPaths())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function Je(a,i){if(a&1){let e=B();r(0,"spk-select",11),O("cleared",function(){f(e);let o=x();return C(o.abortLoading())}),r(1,"input",12),Ne("ngModelChange",function(o){f(e);let n=x();return Re(n.selectOption,o)||(n.selectOption=o),C(o)}),l(),ge(2,je,3,5,"ng-template"),l(),z(3,qe,1,0,"spk-progress-bar",7),z(4,He,4,4,"app-file-tree",13)}if(a&2){let e=x();S("options",e.versionOptions())("isClearable",!1),m(),Ce("ngModel",e.selectOption),S("ngModelOptions",he(6,Ke)),m(2),Y(e.isDraft()||e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),m(),Y(e.showFileTree()?4:-1)}}var se=new v,ze=()=>se.group({filesToRestore:se.control(""),passphrase:se.control(null)}),re=class a{#t=p(M);#e=p(P);#o=p(J);#n=p(N);#i=p(R);#s=p(H);#r=null;#a=null;selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=_(!1);backupSettings=_(null);rootPaths=_([]);loadingRootPath=_(!1);isRepairing=_(!1);loadingEffect=q(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=q(()=>{let i=this.backupId(),e=this.isRepairing(),t=this.selectOption();if(!t||!i)return;let n=this.versionOptions()?.find(d=>d.Version===parseInt(t))?.Time??null;if(!n||e)return;let s={id:i+"",time:n};this.backupSettings.set(s),this.getRootPath(s)});repairEffect=q(()=>{let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#a===n)return;this.#a=n,this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(X(this.abortLoading$),T(()=>{this.#a=null})).subscribe(s=>{let d=s.ID;var G=window.setInterval(()=>{this.#t.getApiV1TaskByTaskid({taskid:d}).subscribe(W=>{W.Status==="Completed"&&(clearInterval(G),this.isRepairing.set(!1))})},1e3)})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#r===t||(this.#r=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(X(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#r=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}):this.#t.getApiV1BackupByIdFiles(e).pipe(X(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}))}abortLoading$=new _e;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#s.transform(t.Time,"medium")}`:""}}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#n.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-select-files"]],features:[Pe([H])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize`Select an option...`;let n;return n=$localize`Path`,[["formRef",""],i,e,t,n,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","backupSettings","multiSelect","showFiles"],[1,"custom-option"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",5,0),O("submit",function(){return f(o),C(t.next())}),r(2,"h3",6),E(3,1),l(),z(4,Ue,1,0,"spk-progress-bar",7)(5,Je,5,7),r(6,"div",8)(7,"button",9),O("click",function(){return f(o),C(t.back())}),u(8,2),c(9,"spk-icon"),F(),l(),r(10,"button",10),u(11,3),c(12,"spk-icon"),F(),l()()()}e&2&&(S("formGroup",t.selectFilesForm),m(4),Y(t.versionOptionsLoading()?4:5),m(5),Te(t.isFileRestore()?"Back":"Exit"),Ee(8))},dependencies:[Ge,b,y,L,$,ve,w,D,A,H,Q,k,I,be,Le],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var P=class a{#t=p(N);#e=p(R);#o=p(J);#n=p(Me);#i=p(M);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=ze();optionsForm=Ye();encryptionForm=Xe();optionsFormSignal=oe(this.optionsForm.valueChanges);selectFilesFormSignal=oe(this.selectFilesForm.valueChanges);selectOption=_(null);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isDraft=_(!1);isFileRestore=_(!1);isFullWidthPage=_(!1);init(i,e=!1,t=!1){this.backupId.set(i),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>`${s}*`)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(T(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.navigate(["./progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#n.open(te,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#s(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Fe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||s||e===0?ce(()=>t):ue(1e3).pipe(Se(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#o.hasV2ListOperations()?Z([this.#i.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);this.versionOptions.set((o.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder",d=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(d=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(d=$localize`The backup storage folder was not found.`),s&&(d=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(te,{data:{title:$localize`Failed to load backup filesets`,message:d,confirmText:$localize`OK`,cancelText:void 0},closed:G=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):Z([this.#i.getApiV1BackupById({id:e}),this.#i.getApiV1BackupByIdFilesets({id:e}).pipe(me(3))]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)}})}#s(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=de({token:a,factory:a.\u0275fac,providedIn:"root"})};var V=new v,Ye=()=>V.group({restoreFrom:V.control("orignal"),restoreFromPath:V.control(""),handleExisting:V.control("overwrite"),permissions:V.control(!1)}),ae=class a{#t=p(P);#e=p(N);#o=p(R);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let d;d=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let G;G=$localize`Permissions`;let W;W=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let le;le=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let pe;return pe=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,d,G,W,le,pe,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",12,0),O("submit",function(){return f(o),C(t.submit())}),r(2,"h3",13),E(3,1),l(),r(4,"app-toggle-card",14),K(5,15),E(6,2),U(),r(7,"spk-radio",16),u(8,3),c(9,"input",17),F(),l(),r(10,"spk-radio",16),u(11,4),c(12,"input",18),F(),l(),r(13,"app-file-tree",19)(14,"label",20),j(15,"Path"),l(),c(16,"input",21),l()(),r(17,"app-toggle-card",14),K(18,15),E(19,5),U(),r(20,"spk-radio",16),u(21,6),c(22,"input",22),F(),l(),r(23,"spk-radio",16),u(24,7),c(25,"input",23),F(),l()(),r(26,"app-toggle-card"),K(27,15),E(28,8),U(),r(29,"spk-toggle",24),u(30,9),c(31,"input",25),F(),l()(),r(32,"div",26)(33,"button",27),O("click",function(){return f(o),C(t.goBack())}),u(34,10),c(35,"spk-icon"),F(),l(),r(36,"button",28),u(37,11),c(38,"spk-icon"),F(),l()()()}if(e&2){let o;S("formGroup",t.optionsForm),m(4),S("disallowToggle",!0),m(9),S("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation"),m(4),S("disallowToggle",!0),m(19),Oe("loader",t.isSubmitting())}},dependencies:[w,b,y,Ae,we,L,$,D,A,Be,Q,De,$e,k,I],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ye as a,ae as b,Xe as c,ie as d,ze as e,re as f,P as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
1
|
+
import{a as B}from"./chunk-VFVXE2DC.js";import{a as b}from"./chunk-RHW5QVAY.js";import{a as h}from"./chunk-BHSG643V.js";import{a as d}from"./chunk-OQHMS5HM.js";import{h as k}from"./chunk-XD6MBGQY.js";import{E as s,F as n,Fc as p,Gc as o,P as u,S as c,X as i,la as a}from"./chunk-67YRCRMI.js";var m="backupListOrderBy",f="backupListShowActualTimes",S=[{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 (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],y=class l{#i=i(d);#l=i(k);#o=i(h);#e=i(B);#u=null;#t=a([]);#a=a([]);#r=a(!1);#n=a(null);#d=a(null);#c=a(this.#i.getItemParsed(f,!0)??"relative");#s=a(this.#i.getItemParsed(m,!0)??"id");orderByOptions=a(S);orderBy=this.#s.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#r.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#d.asReadonly();draftBackups=this.#t.asReadonly();#p=p(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#k=o(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=b();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.setItemParsed(m,e,!0),this.#s.set(e),this.#e.isConnectionMethodSet()&&(this.#p()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#i.setItemParsed(f,e,!0),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.#p()){this.#e.subscribe("backuplist",this.#s());return}let t=this.#u,r=Date.now(),g=t&&r-t<15*60*1e3;t&&r-t<100||!e&&g&&this.#a().length||(this.#u=r,this.#r.set(!0),this.#l.getApiV1Backups({orderBy:this.#s()}).pipe(s(1),u(v=>this.#a.set(v)),n(()=>this.#r.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#l.postApiV1BackupByIdStart({id:e}).pipe(s(1),u(()=>this.getBackups(!0)),n(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#l.deleteApiV1BackupById(e).pipe(s(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as re}from"./chunk-67XQIEG5.js";import{a as ne}from"./chunk-
|
|
1
|
+
import{b as re}from"./chunk-67XQIEG5.js";import{a as ne}from"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import{a as ie}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-BHSG643V.js";import{a as te}from"./chunk-3Q5JEF3K.js";import{b as oe,e as ae,i as le,s as _e}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{d as q,e as H}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as J,e as Q,g as Y,i as Z}from"./chunk-DNBOZ26J.js";import{h as ee}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{B as y,Bb as g,F as O,Fc as B,Jb as c,Kb as D,Lb as S,Lc as j,Mb as F,Nb as x,Oa as r,Ob as p,X as E,_a as $,_b as I,ba as C,bc as u,ca as m,gc as h,hc as L,ic as M,jc as w,kc as G,la as P,lc as X,n as U,pb as f,qb as T,qc as v,r as K,rc as z,ub as A,uc as V,vb as i,wb as o,xc as W}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function ue(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,4),o(),i(3,"p"),c(4,5),o(),i(5,"spk-checkbox",11),u(6," Delete local database "),i(7,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteLocalDb,e)||(a.deleteLocalDb=e),m(e)}),o()()()}if(l&2){let t=p();r(7),h("ngModel",t.deleteLocalDb)}}function Ee(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,6),o(),i(3,"p"),c(4,7),V(5,"bytes"),o(),i(6,"spk-checkbox",11),u(7," Delete remote files "),i(8,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),m(e)}),o()()()}if(l&2){let t=p(),n=X(0),e=(n==null||n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFileSize)??0;r(5),D(t.fileCount())(t.fileCount())(W(5,4,e,!0,!0)),S(4),r(3),h("ngModel",t.deleteRemoteFiles)}}var b=class l{#t=E(ee);#n=E(Q);#e=E(ne);#i=E(q);id=j.required();backup=B(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(K(()=>!0),y(()=>U(!1)))});fileCount=B(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFileCount??"0",10));deleteLocalDb=P(!1);deleteRemoteFiles=P(!1);isDeleting=P(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),n=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(ie,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:n}).pipe(O(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=$({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let n;n=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let k;k=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let N;N=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let R;return R=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,n,e,a,k,N,R,["spk-button","",3,"routerLink"],[1,"actions"],["spk-button","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,n){if(t&1){let e=g();w(0),i(1,"h3"),c(2,0),o(),f(3,ue,8,1,"section"),i(4,"section")(5,"h4"),c(6,1),o(),i(7,"p"),c(8,2),o(),i(9,"button",8),u(10," Export configuration "),i(11,"spk-icon"),u(12,"caret-right"),o()()(),f(13,Ee,9,8,"section"),i(14,"div",9)(15,"button",8),c(16,3),o(),i(17,"button",10),x("click",function(){return C(e),m(n.deleteBackup())}),u(18,"Delete backup"),o()()}if(t&2){let e=G(n.backup()),a=n.noLocalDbResource.value();r(2),D(e==null||e.Backup==null?null:e.Backup.Name),S(2),r(),T(a?3:-1),r(6),A("routerLink",z(8,ce,n.id())),r(4),T(a?13:-1),r(2),A("routerLink",v(10,se)),r(2),I("loader",n.isDeleting())}},dependencies:[Z,Y,J,te,_e,oe,ae,le,H],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as c}from"./chunk-XD6MBGQY.js";import{F as a,Fc as e,P as p,S as u,X as l,la as o}from"./chunk-67YRCRMI.js";var m=class r{#e=l(c);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=e(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=e(()=>{let s={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#s)??[]},t=this.systemInfo()?.GenericModules?.map(i=>({displayName:i.DisplayName??i.Key,options:i.Options?.map(this.#s)??[]}))??[],n=this.systemInfo()?.CompressionModules?.map(i=>({displayName:i.DisplayName??i.Key,options:i.Options?.map(this.#s)??[]}))??[],d=this.systemInfo()?.EncryptionModules?.map(i=>({displayName:i.DisplayName??i.Key,options:i.Options?.map(this.#s)??[]}))??[];return[s,...t,...n,...d]});allOptions=e(()=>this.allOptionsGrouped().reduce((s,t)=>[...s,...t.options],[]));hasWebSocket=e(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=e(()=>{let s=this.systemInfo()?.APIExtensions??[];return s.includes("v2:backup:list-filesets")&&s.includes("v2:backup:list-folder")});hasV2TestOperations=e(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=e(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=e(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasBackupListSubscribeOption=e(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=e(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));defaultOAuthUrl=e(()=>{let s=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return s.endsWith("/refresh")?s.slice(0,-8):s});defaultOAuthUrlV2=e(()=>{let s=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return s.endsWith("/refresh")?s.slice(0,-8):s});preload(s=!1){let t=this.#e.getApiV1Systeminfo().pipe(p(n=>{this.systemInfo.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return t;t.subscribe()}preloadFilterGroups(s=!1){let t=this.#e.getApiV1SysteminfoFiltergroups().pipe(p(n=>{this.filterGroups.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return t;t.subscribe()}#s(s){return{name:s.Name,type:s.Type,shortDescription:s.ShortDescription??void 0,longDescription:s.LongDescription??void 0,deprecatedDescription:s.Deprecated??!1?s.DeprecationMessage??void 0:void 0,options:s.ValidValues,defaultValue:s.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z}from"./chunk-U44OBOIE.js";import{a as x,c as w,d as B,e as U,f as X}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as K,f as V,o as h}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-U44OBOIE.js";import{a as x,c as w,d as B,e as U,f as X}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as K,f as V,o as h}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as R,Hb as l,Ib as s,Jb as b,Kb as y,Lb as v,Nb as u,Oa as p,Ob as c,X as T,_a as D,ba as a,ca as S,la as $,pb as P,qb as N,ub as G,vb as i,wb as t,xb as _,yb as M,zb as f}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function W(g,F){if(g&1){let n=R();i(0,"spk-menu",15)(1,"button",16),b(2,2),t(),M(3,17),i(4,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"spk-icon"),s(),t(),i(7,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"spk-icon"),s(),t(),i(10,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"spk-icon"),s(),t(),i(13,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"spk-icon"),s(),t(),i(16,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Retry"))}),l(17,7),_(18,"spk-icon"),s(),t(),i(19,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Information"))}),l(20,8),_(21,"spk-icon"),s(),t(),i(22,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"spk-icon"),s(),t(),i(25,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Warning"))}),l(26,10),_(27,"spk-icon"),s(),t(),i(28,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Error"))}),l(29,11),_(30,"spk-icon"),s(),t(),f(),t()}if(g&2){let n=c();G("openIndicator",!0),p(2),y(n.logLevelByLabel()),v(2)}}var O=class g{#n=T(B);#e=T(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=$(this.#n.url);constructor(){this.#n.events.subscribe(F=>{F instanceof x&&this.currentUrl.set(F.urlAfterRedirects)})}updateLogLevel(F){this.#e.isPolling.set(!0),this.#e.updateLogLevel(F)}static \u0275fac=function(n){return new(n||g)};static \u0275cmp=D({type:g,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let F;F=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Disabled `;let C;C=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Explicit only `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Profiling `;let k;k=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Retry `;let I;I=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Information `;let E;E=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Dry run `;let A;A=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SPK_ICON: Error `,[F,n,o,e,C,L,d,k,I,E,A,m,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["spk-button","","type","button"],["menu",""],["spk-button","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"spk-button-group")(2,"button",13),l(3,0),_(4,"spk-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"spk-icon"),s(),t()(),P(8,W,31,2,"spk-menu",15),t(),_(9,"router-outlet")),n&2&&(p(8),N(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[V,K,h,w,X,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ce}from"./chunk-FBULENUD.js";import{a as ge}from"./chunk-T3KWCIYP.js";import{a as me}from"./chunk-5CYNJ3KI.js";import{a as de}from"./chunk-2YHX57UE.js";import{c as Ee,e as Oe,i as fe,k as Ae,s as v}from"./chunk-ZCT7SRIM.js";import{b as oe}from"./chunk-OQHMS5HM.js";import{a as ae,b as se,e as le,g as re,i as _e,l as pe,p as ue,q as Se,s as ce,t as Te}from"./chunk-5ER6KMMG.js";import{h as A}from"./chunk-XD6MBGQY.js";import{a as Pe}from"./chunk-HPZ6HLJE.js";import{la as ie}from"./chunk-GP2W7XZF.js";import{Bb as k,F as L,Fc as y,Hb as E,Ib as O,Jb as u,Kc as $,Mb as Q,Nb as S,Oa as r,Ob as d,X as T,Zb as ee,_a as f,_b as m,ba as N,bc as g,ca as M,dc as G,ec as z,gc as h,hc as b,ic as B,la as c,pb as I,qb as D,rb as Z,sb as q,tb as J,ub as R,uc as X,vb as s,vc as te,wb as l,wc as ne,xb as C}from"./chunk-67YRCRMI.js";function ke(a,n){if(a&1){let i=k();s(0,"spk-radio",10),S("click",function(){let t=N(i).$implicit,o=d();return M(o.pauseOption.set(t.value))}),g(1),l()}if(a&2){let i=n.$implicit,e=d();m("active",e.pauseOption()===i.value),r(),G(" ",i.label," ")}}var he=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],x=class a{#e=T(A);pauseOptions=c(he);closed=$();isSubmitting=c(!1);pauseTransfers=c(!1);pauseOption=c(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,i=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:i,pauseTransfers:n}).pipe(L(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let i;i=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let t;t=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,i,e,t,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(i,e){i&1&&(s(0,"header",5)(1,"h3"),u(2,0),l()(),s(3,"div",6)(4,"div",7),q(5,ke,2,3,"spk-radio",8,Z),l(),s(7,"div",9)(8,"spk-checkbox",10),S("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),u(9,1),l(),s(10,"spk-alert",11),u(11,2),l()()(),s(12,"footer",12)(13,"button",13),S("click",function(){return e.closed.emit()}),u(14,3),l(),s(15,"button",14),S("click",function(){return e.submit()}),u(16,4),l()()),i&2&&(r(5),J(e.pauseOptions()),r(3),m("active",e.pauseTransfers()),r(7),m("loader",e.isSubmitting()))},dependencies:[v,Se,_e,se],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Me={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},be=["mbps","gbps"],Ie=8,V=1024,w=V*1024,W=w*1024,Y=W*1024,De=Y*1024,Be={B:1,KB:V,MB:w,GB:W,TB:Y,PB:De},ye=1e3,K=ye*1e3,H=K*1e3,Ue=[{threshold:De,unitPrefix:"PByte"},{threshold:Y,unitPrefix:"TByte"},{threshold:W,unitPrefix:"GByte"},{threshold:w,unitPrefix:"MByte"},{threshold:V,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],U=class a{#e=T(A);closed=$();isSubmitting=c(!1);sizeOptions=c([...be]);maxUpload=c(0);maxDownload=c(0);maxUploadUnit=c("mbps");maxDownloadUnit=c("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(n,i){let t=n*(Be[i.toUpperCase()]||w)*Ie;return t===0?{value:0,unit:"mbps"}:t>=H?{value:parseFloat((t/H).toFixed(2)),unit:"gbps"}:{value:parseFloat((t/K).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(n,i){let e=0;switch(i){case"gbps":e=n*H;break;case"mbps":e=n*K;break}let t=e/Ie;if(t===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:o,unitPrefix:_}of Ue)if(t>=o)return{valueForApi:Math.round(t/o),unitPrefixForApi:_};return{valueForApi:Math.round(t),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let i=n?.["max-upload-speed"],e=n?.["max-download-speed"];if(i&&i!==""){let t=i.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),_=t[2],p=this.convertToBitsPerSecondUnits(o,_);this.maxUpload.set(p.value),this.maxUploadUnit.set(p.unit)}else console.warn("Unexpected max-upload-speed format from API:",i),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let t=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),_=t[2],p=this.convertToBitsPerSecondUnits(o,_);this.maxDownload.set(p.value),this.maxDownloadUnit.set(p.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:n=>{console.error("Failed to get server settings:",n),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let i=n.clipboardData?.getData("text/plain");if(!i)return;let e=i.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n="",i="",e=this.maxUpload()??0,t=this.maxUploadUnit(),o=this.maxDownload()??0,_=this.maxDownloadUnit();if(e>0){let{valueForApi:p,unitPrefixForApi:P}=this.convertFromBitsPerSecondUnits(e,t),F=Me[P];F?n=`${p}${F}`:console.error(`Invalid unit prefix for API submission (upload): ${P}. Defaulting to empty string.`)}if(o){let{valueForApi:p,unitPrefixForApi:P}=this.convertFromBitsPerSecondUnits(o,_),F=Me[P];F?i=`${p}${F}`:console.error(`Invalid unit prefix for API submission (download): ${P}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":i}}).pipe(L(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:p=>{console.error("Failed to submit throttle settings:",p)}})}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let n;n=$localize`Throttle network speed`;let i;i=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let t;t=$localize`Max download speed`;let o;o=$localize`Cancel`;let _;return _=$localize` Update settings `,[n,i,e,t,o,_,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(i,e){i&1&&(s(0,"header")(1,"h3"),u(2,0),l(),s(3,"p"),u(4,1),l()(),s(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),u(9,2),l(),s(10,"spk-form-field")(11,"input",9),S("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),B("ngModelChange",function(o){return b(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),s(12,"spk-select",10)(13,"input",11),B("ngModelChange",function(o){return b(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),s(14,"div",8)(15,"label"),u(16,3),l(),s(17,"spk-form-field")(18,"input",9),S("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),B("ngModelChange",function(o){return b(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),s(19,"spk-select",10)(20,"input",11),B("ngModelChange",function(o){return b(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()()()(),s(21,"footer",12)(22,"button",13),S("click",function(){return e.closed.emit(!1)}),u(23,4),l(),s(24,"button",14),S("click",function(){return e.submit()}),u(25,5),l()()),i&2&&(r(11),h("ngModel",e.maxUpload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),h("ngModel",e.maxUploadUnit),r(5),h("ngModel",e.maxDownload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),h("ngModel",e.maxDownloadUnit),r(4),m("loader",e.isSubmitting()))},dependencies:[v,Ee,Ae,Oe,fe,pe,Te],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Le(a,n){if(a&1&&(s(0,"div"),g(1),l(),C(2,"spk-progress-bar",11)),a&2){let i=d();r(),z("",i.statusData().actionText," - ",i.statusData().statusText),r(),R("value",i.statusData().progress*100)}}function Ge(a,n){if(a&1&&(s(0,"div",7),g(1),s(2,"spk-icon"),g(3,"clock"),l(),g(4),X(5,"relativeTime"),X(6,"date"),l()),a&2){let i,e=d();r(),G(" ",(i=e.nextBackup().backup)==null||i.Backup==null?null:i.Backup.Name," - "),r(3),z(" ",te(5,3,e.nextBackup().time)," at ",ne(6,5,e.nextBackup().time,"shortTime")," ")}}function $e(a,n){a&1&&(s(0,"div",7),u(1,1),l())}function ve(a,n){a&1&&(s(0,"div",8),E(1,2),C(2,"spk-spinner"),O(),l()),a&2&&(r(2),ee("--spinner-size","12px")("--spinner-thickness","2px"))}function xe(a,n){if(a&1){let i=k();s(0,"button",10),S("click",function(){N(i);let t=d(2);return M(t.abort())}),E(1,3),C(2,"spk-icon"),O(),l()}}function we(a,n){if(a&1){let i=k();s(0,"button",10),S("click",function(){N(i);let t=d(2);return M(t.stop())}),E(1,4),C(2,"spk-icon"),O(),l()}}function ze(a,n){if(a&1&&I(0,xe,3,0,"button",12)(1,we,3,0,"button",12),a&2){let i=d();D(i.isStopping()?0:1)}}function Xe(a,n){a&1&&(E(0,0,1),C(1,"spk-icon"),O())}function He(a,n){a&1&&(E(0,0,2),C(1,"spk-icon"),O())}var Re=new Date,j=class a{#e=T(A);#t=T(Ce);#n=T(le);#a=T(ge);#s=T(oe);#l=T(de);#i=T(me);minsAgo=Re.setMinutes(Re.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=y(()=>this.#i.serverState()?.ActiveTask?.Item1);isStopping=y(()=>this.runningTask()==this.#o());#o=c(-1);pgState=y(()=>this.#i.serverState());nextBackup=y(()=>{let n=this.#a.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});openThrottleSettingsDialog(){this.#n.open(U,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(x,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let n=this.runningTask();n&&(this.#o.set(n),this.#e.postApiV1TaskByTaskidStop({taskid:n}).subscribe())}abort(){let n=this.runningTask();n&&this.#e.postApiV1TaskByTaskidAbort({taskid:n}).subscribe()}ngAfterViewInit(){let n=this.#s.relayIsEnabled()||!this.#l.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-status-bar"]],decls:15,vars:5,consts:()=>{let n;n=$localize`${"\uFFFD*10:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*10:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*11:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*11:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=Q(n);let i;i=$localize`No scheduled tasks`;let e;e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Abort `;let o;return o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Stop `,[n,i,e,t,o,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"],["spk-button",""]]},template:function(i,e){if(i&1&&(s(0,"div",5)(1,"div",6),I(2,Le,3,3)(3,Ge,7,8,"div",7)(4,$e,2,0,"div",7)(5,ve,3,4,"div",8),l(),s(6,"div",9),I(7,ze,2,1),s(8,"button",10),S("click",function(){return e.pauseResume()}),E(9,0),I(10,Xe,2,0)(11,He,2,0),O(),l(),s(12,"button",10),S("click",function(){return e.openThrottleSettingsDialog()}),s(13,"spk-icon"),g(14,"speedometer"),l()()()()),i&2){let t;r(2),D((t=e.serverState())!=null&&t.ActiveTask&&(!((t=e.statusData())==null||t.task==null)&&t.task.Status)&&((t=e.statusData())==null||t.task==null?null:t.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(t=e.serverState())!=null&&t.ActiveTask?5:4),r(5),D(e.runningTask()?7:-1),r(),m("loader",e.isResuming()),r(2),D(e.clientIsRunning()?10:11)}},dependencies:[ue,Pe,ie,ae,re,ce],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{j as a};
|
|
1
|
+
import{a as Ce}from"./chunk-NZD6UMYZ.js";import{a as ge}from"./chunk-B6DE3TTE.js";import{a as me}from"./chunk-VFVXE2DC.js";import{a as de}from"./chunk-BHSG643V.js";import{c as Ee,e as Oe,i as fe,k as Ae,s as v}from"./chunk-ZCT7SRIM.js";import{b as oe}from"./chunk-OQHMS5HM.js";import{a as ae,b as se,e as le,g as re,i as _e,l as pe,p as ue,q as Se,s as ce,t as Te}from"./chunk-DNBOZ26J.js";import{h as A}from"./chunk-XD6MBGQY.js";import{a as Pe}from"./chunk-4VPA3END.js";import{la as ie}from"./chunk-GP2W7XZF.js";import{Bb as k,F as L,Fc as y,Hb as E,Ib as O,Jb as u,Kc as $,Mb as Q,Nb as S,Oa as r,Ob as d,X as T,Zb as ee,_a as f,_b as m,ba as N,bc as g,ca as M,dc as G,ec as z,gc as h,hc as b,ic as B,la as c,pb as I,qb as D,rb as Z,sb as q,tb as J,ub as R,uc as X,vb as s,vc as te,wb as l,wc as ne,xb as C}from"./chunk-67YRCRMI.js";function ke(a,n){if(a&1){let i=k();s(0,"spk-radio",10),S("click",function(){let t=N(i).$implicit,o=d();return M(o.pauseOption.set(t.value))}),g(1),l()}if(a&2){let i=n.$implicit,e=d();m("active",e.pauseOption()===i.value),r(),G(" ",i.label," ")}}var he=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],x=class a{#e=T(A);pauseOptions=c(he);closed=$();isSubmitting=c(!1);pauseTransfers=c(!1);pauseOption=c(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,i=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:i,pauseTransfers:n}).pipe(L(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let i;i=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let t;t=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,i,e,t,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(i,e){i&1&&(s(0,"header",5)(1,"h3"),u(2,0),l()(),s(3,"div",6)(4,"div",7),q(5,ke,2,3,"spk-radio",8,Z),l(),s(7,"div",9)(8,"spk-checkbox",10),S("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),u(9,1),l(),s(10,"spk-alert",11),u(11,2),l()()(),s(12,"footer",12)(13,"button",13),S("click",function(){return e.closed.emit()}),u(14,3),l(),s(15,"button",14),S("click",function(){return e.submit()}),u(16,4),l()()),i&2&&(r(5),J(e.pauseOptions()),r(3),m("active",e.pauseTransfers()),r(7),m("loader",e.isSubmitting()))},dependencies:[v,Se,_e,se],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Me={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},be=["mbps","gbps"],Ie=8,V=1024,w=V*1024,W=w*1024,Y=W*1024,De=Y*1024,Be={B:1,KB:V,MB:w,GB:W,TB:Y,PB:De},ye=1e3,K=ye*1e3,H=K*1e3,Ue=[{threshold:De,unitPrefix:"PByte"},{threshold:Y,unitPrefix:"TByte"},{threshold:W,unitPrefix:"GByte"},{threshold:w,unitPrefix:"MByte"},{threshold:V,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],U=class a{#e=T(A);closed=$();isSubmitting=c(!1);sizeOptions=c([...be]);maxUpload=c(0);maxDownload=c(0);maxUploadUnit=c("mbps");maxDownloadUnit=c("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(n,i){let t=n*(Be[i.toUpperCase()]||w)*Ie;return t===0?{value:0,unit:"mbps"}:t>=H?{value:parseFloat((t/H).toFixed(2)),unit:"gbps"}:{value:parseFloat((t/K).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(n,i){let e=0;switch(i){case"gbps":e=n*H;break;case"mbps":e=n*K;break}let t=e/Ie;if(t===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:o,unitPrefix:_}of Ue)if(t>=o)return{valueForApi:Math.round(t/o),unitPrefixForApi:_};return{valueForApi:Math.round(t),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let i=n?.["max-upload-speed"],e=n?.["max-download-speed"];if(i&&i!==""){let t=i.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),_=t[2],p=this.convertToBitsPerSecondUnits(o,_);this.maxUpload.set(p.value),this.maxUploadUnit.set(p.unit)}else console.warn("Unexpected max-upload-speed format from API:",i),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let t=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),_=t[2],p=this.convertToBitsPerSecondUnits(o,_);this.maxDownload.set(p.value),this.maxDownloadUnit.set(p.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:n=>{console.error("Failed to get server settings:",n),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let i=n.clipboardData?.getData("text/plain");if(!i)return;let e=i.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n="",i="",e=this.maxUpload()??0,t=this.maxUploadUnit(),o=this.maxDownload()??0,_=this.maxDownloadUnit();if(e>0){let{valueForApi:p,unitPrefixForApi:P}=this.convertFromBitsPerSecondUnits(e,t),F=Me[P];F?n=`${p}${F}`:console.error(`Invalid unit prefix for API submission (upload): ${P}. Defaulting to empty string.`)}if(o){let{valueForApi:p,unitPrefixForApi:P}=this.convertFromBitsPerSecondUnits(o,_),F=Me[P];F?i=`${p}${F}`:console.error(`Invalid unit prefix for API submission (download): ${P}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":i}}).pipe(L(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:p=>{console.error("Failed to submit throttle settings:",p)}})}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let n;n=$localize`Throttle network speed`;let i;i=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let t;t=$localize`Max download speed`;let o;o=$localize`Cancel`;let _;return _=$localize` Update settings `,[n,i,e,t,o,_,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(i,e){i&1&&(s(0,"header")(1,"h3"),u(2,0),l(),s(3,"p"),u(4,1),l()(),s(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),u(9,2),l(),s(10,"spk-form-field")(11,"input",9),S("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),B("ngModelChange",function(o){return b(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),s(12,"spk-select",10)(13,"input",11),B("ngModelChange",function(o){return b(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),s(14,"div",8)(15,"label"),u(16,3),l(),s(17,"spk-form-field")(18,"input",9),S("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),B("ngModelChange",function(o){return b(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),s(19,"spk-select",10)(20,"input",11),B("ngModelChange",function(o){return b(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()()()(),s(21,"footer",12)(22,"button",13),S("click",function(){return e.closed.emit(!1)}),u(23,4),l(),s(24,"button",14),S("click",function(){return e.submit()}),u(25,5),l()()),i&2&&(r(11),h("ngModel",e.maxUpload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),h("ngModel",e.maxUploadUnit),r(5),h("ngModel",e.maxDownload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),h("ngModel",e.maxDownloadUnit),r(4),m("loader",e.isSubmitting()))},dependencies:[v,Ee,Ae,Oe,fe,pe,Te],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Le(a,n){if(a&1&&(s(0,"div"),g(1),l(),C(2,"spk-progress-bar",11)),a&2){let i=d();r(),z("",i.statusData().actionText," - ",i.statusData().statusText),r(),R("value",i.statusData().progress*100)}}function Ge(a,n){if(a&1&&(s(0,"div",7),g(1),s(2,"spk-icon"),g(3,"clock"),l(),g(4),X(5,"relativeTime"),X(6,"date"),l()),a&2){let i,e=d();r(),G(" ",(i=e.nextBackup().backup)==null||i.Backup==null?null:i.Backup.Name," - "),r(3),z(" ",te(5,3,e.nextBackup().time)," at ",ne(6,5,e.nextBackup().time,"shortTime")," ")}}function $e(a,n){a&1&&(s(0,"div",7),u(1,1),l())}function ve(a,n){a&1&&(s(0,"div",8),E(1,2),C(2,"spk-spinner"),O(),l()),a&2&&(r(2),ee("--spinner-size","12px")("--spinner-thickness","2px"))}function xe(a,n){if(a&1){let i=k();s(0,"button",10),S("click",function(){N(i);let t=d(2);return M(t.abort())}),E(1,3),C(2,"spk-icon"),O(),l()}}function we(a,n){if(a&1){let i=k();s(0,"button",10),S("click",function(){N(i);let t=d(2);return M(t.stop())}),E(1,4),C(2,"spk-icon"),O(),l()}}function ze(a,n){if(a&1&&I(0,xe,3,0,"button",12)(1,we,3,0,"button",12),a&2){let i=d();D(i.isStopping()?0:1)}}function Xe(a,n){a&1&&(E(0,0,1),C(1,"spk-icon"),O())}function He(a,n){a&1&&(E(0,0,2),C(1,"spk-icon"),O())}var Re=new Date,j=class a{#e=T(A);#t=T(Ce);#n=T(le);#a=T(ge);#s=T(oe);#l=T(de);#i=T(me);minsAgo=Re.setMinutes(Re.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=y(()=>this.#i.serverState()?.ActiveTask?.Item1);isStopping=y(()=>this.runningTask()==this.#o());#o=c(-1);pgState=y(()=>this.#i.serverState());nextBackup=y(()=>{let n=this.#a.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});openThrottleSettingsDialog(){this.#n.open(U,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(x,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let n=this.runningTask();n&&(this.#o.set(n),this.#e.postApiV1TaskByTaskidStop({taskid:n}).subscribe())}abort(){let n=this.runningTask();n&&this.#e.postApiV1TaskByTaskidAbort({taskid:n}).subscribe()}ngAfterViewInit(){let n=this.#s.relayIsEnabled()||!this.#l.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-status-bar"]],decls:15,vars:5,consts:()=>{let n;n=$localize`${"\uFFFD*10:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*10:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*11:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*11:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=Q(n);let i;i=$localize`No scheduled tasks`;let e;e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Abort `;let o;return o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Stop `,[n,i,e,t,o,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"],["spk-button",""]]},template:function(i,e){if(i&1&&(s(0,"div",5)(1,"div",6),I(2,Le,3,3)(3,Ge,7,8,"div",7)(4,$e,2,0,"div",7)(5,ve,3,4,"div",8),l(),s(6,"div",9),I(7,ze,2,1),s(8,"button",10),S("click",function(){return e.pauseResume()}),E(9,0),I(10,Xe,2,0)(11,He,2,0),O(),l(),s(12,"button",10),S("click",function(){return e.openThrottleSettingsDialog()}),s(13,"spk-icon"),g(14,"speedometer"),l()()()()),i&2){let t;r(2),D((t=e.serverState())!=null&&t.ActiveTask&&(!((t=e.statusData())==null||t.task==null)&&t.task.Status)&&((t=e.statusData())==null||t.task==null?null:t.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(t=e.serverState())!=null&&t.ActiveTask?5:4),r(5),D(e.runningTask()?7:-1),r(),m("loader",e.isResuming()),r(2),D(e.clientIsRunning()?10:11)}},dependencies:[ue,Pe,ie,ae,re,ce],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{j as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-BHSG643V.js";import{a as w,n as D}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import{ea as b}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Ab as u,Bb as M,Fc as A,Jb as P,Nb as k,Oa as l,Ob as s,X as O,Yb as C,Zb as E,_a as h,_b as S,ba as x,bc as a,ca as T,cc as N,db as m,la as _,pb as d,qb as f,rc as p,sb as I,sc as F,tb as v,ub as g,vb as c,wb as r,yc as $}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var V=e=>({children:e,level:0}),Y=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),z=(e,t)=>t.id;function B(e,t){if(e&1&&(c(0,"spk-icon"),a(1,"caret-down"),r()),e&2){let n=s().$implicit;S("open",n.isOpen())}}function G(e,t){e&1&&(c(0,"spk-icon"),a(1,"dot"),r())}function U(e,t){e&1&&u(0)}function X(e,t){if(e&1&&m(0,U,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);g("ngTemplateOutlet",i)("ngTemplateOutletContext",p(5,Y,F(2,j,n.children,o.level+1)))}}function q(e,t){if(e&1){let n=M();c(0,"div",4,1),k("click",function(){let i=x(n).$implicit,L=s(2);return T(i.children.length>0&&L.toggleNode(i))}),d(2,B,2,2,"spk-icon",5)(3,G,2,0,"spk-icon"),c(4,"div",6),a(5),r()(),d(6,X,1,7,"ng-container")}if(e&2){let n=t.$implicit;S("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),f(n.children.length>0?2:3),l(3),N(n.text),l(),f(n.isOpen()?6:-1)}}function H(e,t){if(e&1&&(c(0,"spk-list"),I(1,q,7,7,null,null,z),r()),e&2){let n=t.$implicit;E("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function J(e,t){e&1&&u(0)}var y=class e{#e=O(R);treeStructure=A(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:_(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:_(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=h({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),m(2,H,3,2,"ng-template",null,0,$)(4,J,1,0,"ng-container",3)),n&2){let i=C(3);l(4),g("ngTemplateOutlet",i)("ngTemplateOutletContext",p(4,Y,p(2,V,o.treeStructure())))}},dependencies:[D,w,b],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-IVP5ZHDB.js";import{c as F,d as G,e as T,f as A,j as R,o as D,q,r as V,t as $}from"./chunk-ZCT7SRIM.js";import{d as x}from"./chunk-OQHMS5HM.js";import{d as N}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as I,b as k,g as O,l as P}from"./chunk-
|
|
1
|
+
import{a as Q}from"./chunk-IVP5ZHDB.js";import{c as F,d as G,e as T,f as A,j as R,o as D,q,r as V,t as $}from"./chunk-ZCT7SRIM.js";import{d as x}from"./chunk-OQHMS5HM.js";import{d as N}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as I,b as k,g as O,l as P}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as y,F as c,Gc as E,Mc as M,Nb as L,Oa as m,Wb as S,X as l,Xb as v,_a as h,_b as b,ba as g,bc as r,ca as f,la as p,pb as C,qb as _,ub as w,vb as o,wb as i,xb as a}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var z=["passwordInput"];function B(s,e){s&1&&(o(0,"spk-alert",2),r(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new V,d=class s{#e=l(N);#t=l(x);failedLogin=p(!1);isLoading=p(!1);loginForm=u.group({user:u.control(""),pass:u.control("",G.required)});passwordInput=M("passwordInput");passwordEffect=E(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=h({type:s,selectors:[["app-login"]],viewQuery:function(t,n){t&1&&S(n.passwordInput,z,5),t&2&&v()},decls:18,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(t,n){if(t&1){let j=y();o(0,"form",1),L("submit",function(){return g(j),f(n.submit())}),C(1,B,2,0,"spk-alert",2),o(2,"div",3),a(3,"app-logo"),i(),o(4,"div",4),a(5,"input",5),o(6,"spk-form-field")(7,"label",6),r(8," Password "),o(9,"a",7)(10,"spk-icon"),r(11,"question"),i()()(),a(12,"input",8,0),i(),o(14,"button",9),r(15," Login "),o(16,"spk-icon"),r(17,"arrow-right"),i()()()()}t&2&&(w("formGroup",n.loginForm),m(),_(n.failedLogin()?1:-1),m(13),b("loader",n.isLoading()))},dependencies:[$,R,F,T,A,D,q,Q,P,I,O,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}"],changeDetection:0})};export{d as default};
|