@duplicati/ngclient 0.0.160 → 0.0.161
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/sh.woff2 +0 -0
- package/{chunk-F6ME3VE6.js → chunk-2KU5X7TN.js} +1 -1
- package/{chunk-JTSI7UN4.js → chunk-2MIEBBFN.js} +1 -1
- package/{chunk-EKL66TNH.js → chunk-2PUCHKOK.js} +1 -1
- package/{chunk-4NBLWONL.js → chunk-2YGOHGD2.js} +1 -1
- package/{chunk-EWLAEWGN.js → chunk-3S7YCGEK.js} +1 -1
- package/{chunk-LVTEOKA4.js → chunk-3V4DGTSM.js} +1 -1
- package/{chunk-SDXU6VMB.js → chunk-4FWCJIJ4.js} +1 -1
- package/{chunk-NM7WJRU7.js → chunk-4KEA3KF7.js} +1 -1
- package/chunk-4NOWNXOS.js +1 -0
- package/{chunk-4XH2XMUL.js → chunk-5CTM5KYC.js} +1 -1
- package/{chunk-XLDVUBTQ.js → chunk-5LX6M65H.js} +1 -1
- package/{chunk-GCCJSS4C.js → chunk-6XI3IP27.js} +1 -1
- package/{chunk-4IXUXIXV.js → chunk-A366Q7F5.js} +1 -1
- package/{chunk-TX6PGD4I.js → chunk-AUR4SBGD.js} +1 -1
- package/chunk-AVTEJPQ4.js +1 -0
- package/{chunk-PHQBBCUL.js → chunk-B32YSHV5.js} +1 -1
- package/{chunk-PULERFBI.js → chunk-BF2IYOUB.js} +1 -1
- package/{chunk-CCKT2GLS.js → chunk-BK2MSH26.js} +1 -1
- package/{chunk-72QJ345F.js → chunk-BZ2XGEV5.js} +1 -1
- package/{chunk-2J4H7C6W.js → chunk-C7EUC34O.js} +1 -1
- package/{chunk-GOVVHVP2.js → chunk-CSL7HCLZ.js} +1 -1
- package/{chunk-SWD3HS57.js → chunk-CTAP3SAA.js} +1 -1
- package/{chunk-TIGMPMCF.js → chunk-DJQOPNQJ.js} +1 -1
- package/{chunk-UTOT5S6Z.js → chunk-DUCPSWRQ.js} +1 -1
- package/{chunk-DUHMJQLC.js → chunk-E6H2XELA.js} +1 -1
- package/chunk-EYFTFGJS.js +1 -0
- package/{chunk-ERFIISF6.js → chunk-F5Z5ZAIL.js} +1 -1
- package/{chunk-C6F6FP4R.js → chunk-FSG362SU.js} +1 -1
- package/{chunk-D4F7SID5.js → chunk-G6VJHFTW.js} +1 -1
- package/{chunk-UST7PIBI.js → chunk-GMUNZKVL.js} +1 -1
- package/{chunk-66TRUOH6.js → chunk-H44BDPZE.js} +1 -1
- package/{chunk-YHUSOICR.js → chunk-H7ZKBS2Q.js} +1 -1
- package/{chunk-ZBVBVQO7.js → chunk-HHU5JW5J.js} +1 -1
- package/{chunk-IXN3WMCO.js → chunk-HJBNADRP.js} +1 -1
- package/{chunk-USYSNGYO.js → chunk-HYQ6MPYI.js} +1 -1
- package/chunk-IUK3B6GX.js +1 -0
- package/{chunk-5WDKKAXO.js → chunk-K2BANUEJ.js} +1 -1
- package/{chunk-RFQCUMV5.js → chunk-KIIJBHZE.js} +1 -1
- package/{chunk-7RM3VKDO.js → chunk-KXJZEADJ.js} +1 -1
- package/chunk-MBYGBVHF.js +1 -0
- package/{chunk-6YGURBW6.js → chunk-MHPSC3FM.js} +1 -1
- package/chunk-MTNOIKEK.js +1 -0
- package/{chunk-V4JPJPZI.js → chunk-MWXDEOZO.js} +1 -1
- package/{chunk-DQGMVICD.js → chunk-NCDXMDW5.js} +1 -1
- package/{chunk-QX3IRESN.js → chunk-NSAY2K7E.js} +1 -1
- package/{chunk-MBRRLME5.js → chunk-NSPJ3ZXL.js} +1 -1
- package/{chunk-2QJVTZ56.js → chunk-OJ3H3ZRA.js} +1 -1
- package/chunk-P6IZFXXC.js +1 -0
- package/{chunk-4OBQWIWP.js → chunk-PFZASYQH.js} +1 -1
- package/chunk-QF5WMLMJ.js +1 -0
- package/chunk-QWNOIRT4.js +1 -0
- package/{chunk-TZAOQANG.js → chunk-R2FAS2C3.js} +1 -1
- package/chunk-RPUPXDQE.js +1 -0
- package/{chunk-7LYN2XHO.js → chunk-S4OFJD2F.js} +1 -1
- package/{chunk-TDJOG66Y.js → chunk-SPMSFKWG.js} +1 -1
- package/{chunk-V7LUGECS.js → chunk-SWAQMTBY.js} +1 -1
- package/{chunk-EMRD3UKA.js → chunk-TI6AQ6OL.js} +1 -1
- package/chunk-U562AGPC.js +1 -0
- package/chunk-U7GOWS7E.js +1 -0
- package/chunk-XJ7KXQWK.js +1 -0
- package/{chunk-5EOS64VG.js → chunk-XXVFRNSP.js} +1 -1
- package/{chunk-3NFAL4U4.js → chunk-YCORZV4Z.js} +1 -1
- package/{chunk-ZMTLDG46.js → chunk-YPJRYB54.js} +1 -1
- package/{chunk-RZVBW5HI.js → chunk-YYJFEUNT.js} +1 -1
- package/{chunk-KXM6LF3X.js → chunk-Z7WHLTVV.js} +1 -1
- package/index.html +2 -2
- package/main-L6FT73U5.js +1 -0
- package/package.json +1 -1
- package/styles-FD7LUDV4.css +1 -0
- package/chunk-GNKFIYOX.js +0 -1
- package/chunk-GZ4YKLCY.js +0 -1
- package/chunk-H3UUJ5EW.js +0 -1
- package/chunk-K6V2N3GS.js +0 -1
- package/chunk-KATY4JFV.js +0 -1
- package/chunk-OQ3CIW34.js +0 -1
- package/chunk-OXKNUQ4S.js +0 -1
- package/chunk-Q65KFDJ5.js +0 -1
- package/chunk-QF4DQYEP.js +0 -1
- package/chunk-TYUEMPMP.js +0 -1
- package/chunk-UZVZ7QY6.js +0 -1
- package/chunk-WXTYJ7CH.js +0 -1
- package/chunk-YX7ZJ2VA.js +0 -1
- package/main-OUD7GLNU.js +0 -1
- package/styles-DYNNLJCR.css +0 -1
package/assets/sh.woff2
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as M}from"./chunk-
|
|
1
|
+
import{d as M}from"./chunk-6XI3IP27.js";import{e as E}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as P}from"./chunk-RPUPXDQE.js";import"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{Db as i,Eb as a,Gb as r,Hb as l,Ib as c,Sa as C,Vb as d,_ as u,ac as h,bc as m,cb as g,nc as T,xb as f,yb as O}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var L=["*",[["","footer",""]]],v=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-custom-card"]],ngContentSelectors:v,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(h(L),r(0,"div",0),c(1,"img",1),r(2,"header")(3,"div",2),c(4,"img",3),T(5," Duplicati "),l()(),r(6,"main"),m(7),r(8,"footer"),m(9,1),l()()(),c(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function N(t,n){t&1&&(i(0,"h3"),d(1,0),a())}function y(t,n){t&1&&(i(0,"h3"),d(1,1),a(),i(2,"button",3),d(3,2),a())}var p=class t{#e=u(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(i(0,"app-custom-card"),f(1,N,2,0,"h3")(2,y,4,0),a()),e&2&&(C(),O(o.isLoggingOut()?1:2))},dependencies:[s,P,E],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as re}from"./chunk-Z27IQRKV.js";import{a as le}from"./chunk-
|
|
1
|
+
import{c as re}from"./chunk-Z27IQRKV.js";import{a as le}from"./chunk-2YGOHGD2.js";import"./chunk-BK2MSH26.js";import{a as _e}from"./chunk-3V4DGTSM.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5LX6M65H.js";import{a as ae}from"./chunk-LN26XMBJ.js";import"./chunk-S4OFJD2F.js";import"./chunk-6XI3IP27.js";import{d as j,e as q}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as ne,D as ie,b as H,e as Q,i as Y,s as Z,u as ee,z as te}from"./chunk-RPUPXDQE.js";import{i as oe}from"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as C,B as I,Bc as J,Cb as N,Cc as X,Db as i,Eb as o,Fc as z,H as K,Ic as V,Mb as g,Qc as M,Sa as r,Vb as c,Wb as A,Wc as W,Xb as L,Yb as F,Zb as $,_ as u,cb as y,ea as p,fa as P,kc as x,n as k,nc as E,pa as T,r as U,sc as S,tc as D,uc as h,vc as G,wc as w,xb as m,xc as v,yb as f}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function Ee(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,"sh-checkbox",11),E(6," Delete local database "),i(7,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteLocalDb,e)||(a.deleteLocalDb=e),P(e)}),o()()()}if(l&2){let t=C();r(7),S("ngModel",t.deleteLocalDb)}}function ue(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,6),o(),i(3,"p"),c(4,7),z(5,"bytes"),o(),i(6,"sh-checkbox",11),E(7," Delete remote files "),i(8,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),P(e)}),o()()()}if(l&2){let t=C(),n=v(0),e=(n==null||n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)??0;r(5),A(t.fileCount())(t.fileCount())(V(5,4,e,!0,!0)),L(4),r(3),S("ngModel",t.deleteRemoteFiles)}}var B=class l{#t=u(oe);#n=u(te);#e=u(le);#i=u(j);id=W.required();backup=M(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(U(()=>!0),I(()=>k(!1)))});fileCount=M(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=T(!1);deleteRemoteFiles=T(!1);isDeleting=T(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),n=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(_e,{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(K(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=y({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 b;b=$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 R;R=$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 O;return O=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,n,e,a,b,R,O,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,n){if(t&1){let e=g();G(0),i(1,"h3"),c(2,0),o(),m(3,Ee,8,1,"section"),i(4,"section")(5,"h4"),c(6,1),o(),i(7,"p"),c(8,2),o(),i(9,"button",8),E(10," Export configuration "),i(11,"sh-icon"),E(12,"caret-right"),o()()(),m(13,ue,9,8,"section"),i(14,"div",9)(15,"button",8),c(16,3),o(),i(17,"button",10),$("click",function(){return p(e),P(n.deleteBackup())}),E(18,"Delete backup"),o()()}if(t&2){let e=w(n.backup()),a=n.noLocalDbResource.value();r(2),A(e==null||e.Backup==null?null:e.Backup.Name),L(2),r(),f(a?3:-1),r(6),N("routerLink",X(8,ce,n.id())),r(4),f(a?13:-1),r(2),N("routerLink",J(10,se)),r(2),x("loader",n.isDeleting())}},dependencies:[ie,ne,ee,Z,H,Q,Y,q,ae],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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as mt}from"./chunk-ERFIISF6.js";import{a as Ot,b as pt,c as Rt}from"./chunk-4OBQWIWP.js";import"./chunk-DUHMJQLC.js";import"./chunk-ZBVBVQO7.js";import{a as Et}from"./chunk-C6F6FP4R.js";import{h as Ct}from"./chunk-2J4H7C6W.js";import"./chunk-USYSNGYO.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-6YGURBW6.js";import"./chunk-Z27IQRKV.js";import"./chunk-CCKT2GLS.js";import{a as R}from"./chunk-LVTEOKA4.js";import"./chunk-6Q6SSTBK.js";import"./chunk-XLDVUBTQ.js";import"./chunk-LN26XMBJ.js";import"./chunk-GCCJSS4C.js";import{b as nt,d as it}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as St,G as dt,J as Dt,c as ot,e as at,f as st,g as Ft,i as rt,j as lt,s as _t,u as ct,w as Tt,y as ut,z as gt}from"./chunk-QF4DQYEP.js";import"./chunk-2QJVTZ56.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as l,Ab as L,Ac as Z,Bb as x,Bc as tt,Cb as N,Db as s,Eb as F,Fb as g,Jb as G,Kb as w,Mb as C,Qc as k,Sa as r,Tb as T,Ub as u,Vb as h,Wb as f,Xb as $,Xc as et,Yb as b,Zb as d,_ as O,cb as K,ea as _,fa as c,gc as j,hc as Q,ja as X,kc as q,nc as I,oc as B,pa as p,pc as Y,sc as A,tc as M,uc as P,xb as D,yb as E,zb as y}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Nt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function ht(i,n){if(i&1){let t=C();T(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),u()}if(i&2){let t=l();r(),q("loader",t.testSignal()=="testing"),N("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=C();T(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),F(),u()}}function $t(i,n){i&1&&(s(0,"sh-alert"),T(1,5),g(2,"sh-icon",31),u(),F())}function At(i,n){i&1&&(s(0,"sh-alert",21),T(1,6),g(2,"sh-icon",31),u(),F())}function Mt(i,n){if(i&1&&(s(0,"sh-alert",22),T(1,7),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1&&(s(0,"sh-alert",23),T(1,8),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function yt(i,n){if(i&1){let t=C();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),T(1,9),g(2,"strong")(3,"br")(4,"span",33),u(),F()}if(i&2){let t,o=l();r(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Lt(i,n){if(i&1){let t=C();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),F(),s(3,"p"),I(4),F()()}if(i&2){let t=n.$implicit;r(2),B(t.displayName),r(2),B(t.description)}}function xt(i,n){if(i&1){let t=C();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),F()}if(i&2){let t=n.$implicit;r(2),Y(" ",t.displayName," ")}}function Gt(i,n){if(i&1&&(s(0,"div",34),L(1,Lt,5,2,"div",35,y),F(),s(3,"sh-menu",36)(4,"button",37),h(5,10),F(),G(6,19),L(7,xt,3,1,"button",38,y),w(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),N("searchable",!0),r(4),x(t.destinationTypeOptions())}}function wt(i,n){if(i&1){let t=C();s(0,"app-single-destination",41),P("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(T(0,4,1),g(1,"sh-icon",28),u())}function Bt(i,n){i&1&&(T(0,4,2),g(1,"sh-icon"),u())}function kt(i,n){if(i&1){let t=C();s(0,"sh-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),h(3,11),F(),s(4,"sh-alert",22),h(5,12),F()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),P("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),F(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),T(13,13),g(14,"sh-icon"),u(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),N("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(gt);#a=O(Ot);injector=O(X);#t=O(mt);#s=O(pt);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=k(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=k(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Et(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,this.#t.backupId(),n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let m=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(R,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=K({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&j(o.formRef,Nt,5),t&2&&Q()},features:[Z([Ct])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=b(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=b(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let m;m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$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 W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;return J=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,m,U,V,W,z,H,J,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=C();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),T(4,2),s(5,"div",16),D(6,ht,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),F(),G(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),F(),D(13,ft,3,0,"button",18),w(),F()(),u(),F(),D(14,$t,3,0,"sh-alert")(15,At,3,0,"sh-alert",21)(16,Mt,3,1,"sh-alert",22)(17,Pt,3,1,"sh-alert",23),D(18,yt,5,1,"p"),F(),D(19,Gt,9,1),D(20,wt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),T(23,3),g(24,"sh-icon"),u(),F(),s(25,"button",27),T(26,4),D(27,bt,2,0,"sh-icon",28)(28,Bt,2,0,"sh-icon"),u(),F()()(),D(29,kt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),E(e?6:-1),r(7),E(e?13:-1),r(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),E(e?18:-1),r(),E(e?-1:19),r(),E(e?20:-1),r(5),N("disabled",o.testSignal()=="testing"||!e),r(2),E(o.testSignal()=="testing"?27:28),r(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Rt,_t,lt,ot,at,st,rt,Ft,St,dt,Dt,ct,ut,Tt],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%] sh-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}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.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}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{v as default};
|
|
1
|
+
import{g as mt}from"./chunk-F5Z5ZAIL.js";import{a as Ot,b as pt,c as Rt}from"./chunk-PFZASYQH.js";import"./chunk-E6H2XELA.js";import"./chunk-HHU5JW5J.js";import{a as Et}from"./chunk-FSG362SU.js";import{h as Ct}from"./chunk-C7EUC34O.js";import"./chunk-HYQ6MPYI.js";import"./chunk-YCORZV4Z.js";import"./chunk-4VY6SMSL.js";import"./chunk-MHPSC3FM.js";import"./chunk-Z27IQRKV.js";import"./chunk-BK2MSH26.js";import{a as R}from"./chunk-3V4DGTSM.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5LX6M65H.js";import"./chunk-LN26XMBJ.js";import"./chunk-6XI3IP27.js";import{b as nt,d as it}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as St,G as dt,J as Dt,c as ot,e as at,f as st,g as Ft,i as rt,j as lt,s as _t,u as ct,w as Tt,y as ut,z as gt}from"./chunk-RPUPXDQE.js";import"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as l,Ab as L,Ac as Z,Bb as x,Bc as tt,Cb as N,Db as s,Eb as F,Fb as g,Jb as G,Kb as w,Mb as C,Qc as k,Sa as r,Tb as T,Ub as u,Vb as h,Wb as f,Xb as $,Xc as et,Yb as b,Zb as d,_ as O,cb as K,ea as _,fa as c,gc as j,hc as Q,ja as X,kc as q,nc as I,oc as B,pa as p,pc as Y,sc as A,tc as M,uc as P,xb as D,yb as E,zb as y}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Nt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function ht(i,n){if(i&1){let t=C();T(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),u()}if(i&2){let t=l();r(),q("loader",t.testSignal()=="testing"),N("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=C();T(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),F(),u()}}function $t(i,n){i&1&&(s(0,"sh-alert"),T(1,5),g(2,"sh-icon",31),u(),F())}function At(i,n){i&1&&(s(0,"sh-alert",21),T(1,6),g(2,"sh-icon",31),u(),F())}function Mt(i,n){if(i&1&&(s(0,"sh-alert",22),T(1,7),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1&&(s(0,"sh-alert",23),T(1,8),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function yt(i,n){if(i&1){let t=C();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),T(1,9),g(2,"strong")(3,"br")(4,"span",33),u(),F()}if(i&2){let t,o=l();r(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Lt(i,n){if(i&1){let t=C();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),F(),s(3,"p"),I(4),F()()}if(i&2){let t=n.$implicit;r(2),B(t.displayName),r(2),B(t.description)}}function xt(i,n){if(i&1){let t=C();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),F()}if(i&2){let t=n.$implicit;r(2),Y(" ",t.displayName," ")}}function Gt(i,n){if(i&1&&(s(0,"div",34),L(1,Lt,5,2,"div",35,y),F(),s(3,"sh-menu",36)(4,"button",37),h(5,10),F(),G(6,19),L(7,xt,3,1,"button",38,y),w(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),N("searchable",!0),r(4),x(t.destinationTypeOptions())}}function wt(i,n){if(i&1){let t=C();s(0,"app-single-destination",41),P("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(T(0,4,1),g(1,"sh-icon",28),u())}function Bt(i,n){i&1&&(T(0,4,2),g(1,"sh-icon"),u())}function kt(i,n){if(i&1){let t=C();s(0,"sh-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),h(3,11),F(),s(4,"sh-alert",22),h(5,12),F()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),P("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),F(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),T(13,13),g(14,"sh-icon"),u(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),N("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(gt);#a=O(Ot);injector=O(X);#t=O(mt);#s=O(pt);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=k(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=k(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Et(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,this.#t.backupId(),n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let m=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(R,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=K({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&j(o.formRef,Nt,5),t&2&&Q()},features:[Z([Ct])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=b(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=b(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let m;m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$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 W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;return J=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,m,U,V,W,z,H,J,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=C();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),T(4,2),s(5,"div",16),D(6,ht,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),F(),G(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),F(),D(13,ft,3,0,"button",18),w(),F()(),u(),F(),D(14,$t,3,0,"sh-alert")(15,At,3,0,"sh-alert",21)(16,Mt,3,1,"sh-alert",22)(17,Pt,3,1,"sh-alert",23),D(18,yt,5,1,"p"),F(),D(19,Gt,9,1),D(20,wt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),T(23,3),g(24,"sh-icon"),u(),F(),s(25,"button",27),T(26,4),D(27,bt,2,0,"sh-icon",28)(28,Bt,2,0,"sh-icon"),u(),F()()(),D(29,kt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),E(e?6:-1),r(7),E(e?13:-1),r(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),E(e?18:-1),r(),E(e?-1:19),r(),E(e?20:-1),r(5),N("disabled",o.testSignal()=="testing"||!e),r(2),E(o.testSignal()=="testing"?27:28),r(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Rt,_t,lt,ot,at,st,rt,Ft,St,dt,Dt,ct,ut,Tt],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%] sh-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}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.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}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
1
|
+
import{a as B}from"./chunk-BK2MSH26.js";import{a as m}from"./chunk-6Q6SSTBK.js";import{a as k}from"./chunk-5LX6M65H.js";import{a as r}from"./chunk-S4OFJD2F.js";import{i as b}from"./chunk-OJ3H3ZRA.js";import{F as i,H as u,Qc as p,R as c,Rc as d,V as o,_ as s,pa as a}from"./chunk-QONLYWYC.js";var y="backupListOrderBy",v="backupListShowActualTimes",D=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (descending)`},{value:"-name",label:$localize`Backup name (descending)`},{value:"-lastrun",label:$localize`Last run time (descending)`},{value:"-nextrun",label:$localize`Next run time (descending)`},{value:"-schedule",label:$localize`Is scheduled (descending)`},{value:"-backend",label:$localize`Destination type (descending)`},{value:"-sourcesize",label:$localize`Source size (descending)`},{value:"-destinationsize",label:$localize`Destination size (descending)`},{value:"-duration",label:$localize`Duration (descending)`}],g=class l{#s=s(b);#o=s(k);#e=s(B);#u=null;#t=a([]);#a=a([]);#l=a(!1);#n=a(null);#p=a(null);#c=r(v,"relative");#i=r(y,"id");orderByOptions=a(D);orderBy=this.#i.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#l.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#p.asReadonly();draftBackups=this.#t.asReadonly();#r=p(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=d(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=m();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.set(e),this.#e.isConnectionMethodSet()&&(this.#r()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#r()){this.#e.subscribe("backuplist",this.#i());return}let t=this.#u,n=Date.now(),h=t&&n-t<900*1e3;t&&n-t<100||!e&&h&&this.#a().length||(this.#u=n,this.#l.set(!0),this.#s.getApiV1Backups({orderBy:this.#i()}).pipe(i(1),c(f=>this.#a.set(f)),u(()=>this.#l.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#s.postApiV1BackupByIdStart({id:e}).pipe(i(1),c(()=>this.getBackups(!0)),u(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#s.deleteApiV1BackupById(e).pipe(i(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=o({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as C}from"./chunk-
|
|
1
|
+
import{g as C}from"./chunk-F5Z5ZAIL.js";import"./chunk-E6H2XELA.js";import"./chunk-HHU5JW5J.js";import"./chunk-FSG362SU.js";import{a as w}from"./chunk-KXJZEADJ.js";import{h as k}from"./chunk-C7EUC34O.js";import"./chunk-HYQ6MPYI.js";import"./chunk-YCORZV4Z.js";import"./chunk-4VY6SMSL.js";import{b as u}from"./chunk-Z27IQRKV.js";import"./chunk-H7ZKBS2Q.js";import"./chunk-2YGOHGD2.js";import"./chunk-BK2MSH26.js";import"./chunk-3V4DGTSM.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5LX6M65H.js";import"./chunk-LN26XMBJ.js";import"./chunk-S4OFJD2F.js";import"./chunk-6XI3IP27.js";import{a as A,b as $,c as M,d as I,e as G,f as W}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{L as v,Q as y}from"./chunk-RPUPXDQE.js";import"./chunk-OJ3H3ZRA.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{$b as O,Ac as N,Bc as R,Cb as _,Cc as p,Db as i,Eb as n,Fb as s,Rc as L,Sa as r,Tb as F,Ub as l,_ as c,cb as P,kc as D,pa as f,xb as E,yb as g}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,o){t&1&&(i(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),i(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),i(6,"div",7),F(7,2),s(8,"sh-radio"),l(),n(),i(9,"div",7),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,o){if(t&1&&(i(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),i(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,o){if(t&1&&(i(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#o=c(I);#t=c(C);#i=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=L(()=>{let o=this.#s(),e=this.#i()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!o?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#o.events.subscribe(o=>{if(o instanceof A){let e=o.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&D("full-width",a.isProgressPage())},features:[N([C,k])],decls:4,vars:1,consts:()=>{let o;o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[o,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),i(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,v,w,M,G,W],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-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{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as v}from"./chunk-
|
|
1
|
+
import{B as v}from"./chunk-RPUPXDQE.js";import{$b as l,Db as i,Eb as o,Mb as _,Qc as D,Sa as n,Vc as T,Wc as h,Zb as g,cb as x,ea as u,fa as C,nc as r,oc as m,xb as s,yb as d}from"./chunk-QONLYWYC.js";import{a as f}from"./chunk-EUDKD2JW.js";function y(e,a){if(e&1&&(i(0,"p"),r(1),o()),e&2){let t=l();n(),m(t._data().message)}}function S(e,a){if(e&1){let t=_();i(0,"button",5),g("click",function(){u(t);let p=l();return C(p.close("cancel"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().cancelText)}}function k(e,a){if(e&1){let t=_();i(0,"button",6),g("click",function(){u(t);let p=l();return C(p.close("confirm"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().confirmText)}}var w={title:$localize`Are you sure?`,confirmText:void 0,cancelText:$localize`Cancel`},b=class e{data=h();_data=D(()=>f(f({},w),this.data()));closed=T();close(a="confirm"){this.closed.emit(a==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:8,vars:4,consts:[["header",""],["content",""],["footer",""],["shButton","",1,""],["shButton","",1,"raised","primary"],["shButton","",1,"",3,"click"],["shButton","",1,"raised","primary",3,"click"]],template:function(t,c){t&1&&(i(0,"header",0)(1,"h3"),r(2),o()(),i(3,"div",1),s(4,y,2,1,"p"),o(),i(5,"footer",2),s(6,S,2,1,"button",3),s(7,k,2,1,"button",4),o()),t&2&&(n(2),m(c._data().title),n(2),d(c._data().message?4:-1),n(2),d(c._data().cancelText?6:-1),n(),d(c._data().confirmText?7:-1))},dependencies:[v],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ye,b as $e}from"./chunk-UTOT5S6Z.js";import{a as we}from"./chunk-D4F7SID5.js";import{a as He}from"./chunk-6YGURBW6.js";import"./chunk-Z27IQRKV.js";import{a as J}from"./chunk-5EOS64VG.js";import"./chunk-YHUSOICR.js";import{a as ve}from"./chunk-4NBLWONL.js";import"./chunk-CCKT2GLS.js";import"./chunk-LVTEOKA4.js";import"./chunk-6Q6SSTBK.js";import{a as Re}from"./chunk-XLDVUBTQ.js";import"./chunk-LN26XMBJ.js";import{a as be}from"./chunk-GXGIGJ4W.js";import"./chunk-7LYN2XHO.js";import{b as Ce,d as Ge}from"./chunk-GCCJSS4C.js";import{c as pe,e as Se,f as ge}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as Y,F as Pe,G as Ie,I as Le,P as De,X as Me,c as Te,d as me,e as he,i as Fe,r as Ee,s as Ae,t as Oe,u as M,w as B,x as Ne,z as fe}from"./chunk-QF4DQYEP.js";import{h as V}from"./chunk-2QJVTZ56.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as c,Ab as te,Bb as ne,Bc as ce,Cb as O,Db as a,Eb as o,Fb as _,H as j,Jb as ie,Kb as oe,Mb as E,Qc as U,Rc as Q,Sa as r,Tb as g,Ub as C,Vb as f,Vc as ue,Xc as de,Yb as v,Zb as T,Zc as K,_ as S,cb as D,ea as m,fa as h,gc as ae,hc as se,kc as k,mc as L,nc as u,oc as q,pa as A,pc as b,sc as y,tc as $,uc as H,vc as re,wc as le,xb as d,xc as w,yb as p,yc as _e,zb as ee}from"./chunk-QONLYWYC.js";import{a as z,b as W}from"./chunk-EUDKD2JW.js";var Be=["scroller"];function Ye(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell-ringing"),o())}function Ve(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell"),o())}function Je(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=w(6);O("index",0)("notification",e.content)}}function Xe(i,n){if(i&1&&(a(0,"div",11),u(1),o()),i&2){c(3);let e=w(6);r(),b(" ",e.content.content," ")}}function ze(i,n){if(i&1&&(a(0,"sh-alert")(1,"div",10),u(2),o(),d(3,Xe,2,1,"div",11),o()),i&2){c(2);let e=w(6);L(e.content.type||"error"),r(2),q(e.content.title),r(),p(e.content.content?3:-1)}}function We(i,n){if(i&1&&(a(0,"div",6),d(1,Je,1,2,"app-notification",8)(2,ze,4,4,"sh-alert",9),o()),i&2){c();let e=w(6);r(),p(e.type==="notification"?1:2)}}function je(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,2),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleNotifications())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function qe(i,n){if(i&1&&(a(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),b(" ",e.content," ")}}function Qe(i,n){if(i&1){let e=E();a(0,"sh-alert",18,1),T("click",function(){let s=m(e).$implicit,l=c(2);return h(l.deleteAlertByIndex(s.id))}),a(2,"div",19),u(3),o(),d(4,qe,2,1,"div",20),o()}if(i&2){let e=n.$implicit;L(e.type),O("id",e.id),r(3),q(e.title),r(),p(e.content?4:-1)}}function Ke(i,n){i&1&&(a(0,"p",17),f(1,4),o())}function Ze(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,3),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleAlerts())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),te(9,Qe,5,5,"sh-alert",16,ee,!1,Ke,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var xe=new Ee,x=class i{#e=S(Ne);#t=S(J);isSubmitting=A(!1);messageSent=A(!1);form=xe.group({message:xe.control("",[me.required])});notifications=this.#t.notifications;shownMessage=A(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=U(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=de("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=A(null);previousNotificationsCount=A(null);constructor(){Q(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ae(t.scroller,Be,5),e&2&&se()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let s=E();a(0,"button",5),T("click",function(){return m(s),h(t.toggleAlerts())}),a(1,"sh-icon"),u(2,"info"),o()(),a(3,"button",5),T("click",function(){return m(s),h(t.toggleNotifications())}),d(4,Ye,2,0,"sh-icon")(5,Ve,2,0,"sh-icon"),o(),re(6),d(7,We,3,1,"div",6),d(8,je,10,0,"div",7),d(9,Ze,12,1,"div",7)}if(e&2){L(t.alertHistory().length?"error":""),r(3),L(t.notifications().length?"error":""),r(),p(t.notifications().length?4:5),r(2);let s=le(t.shownMessage());r(),p(s?7:-1),r(),p(t.isNotificationsOpen()?8:-1),r(),p(t.isAlertsOpen()?9:-1)}},dependencies:[Oe,B,M,Y,$e,ye],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function et(i,n){i&1&&(a(0,"sh-icon",14),u(1,"check"),o())}function tt(i,n){i&1&&(a(0,"sh-icon",15),u(1,"prohibit"),o())}function nt(i,n){if(i&1){let e=E();a(0,"button",20),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();k("loader",e.isUpdating())}}function it(i,n){if(i&1){let e=E();a(0,"button",21),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();k("loader",e.isUpdating()),O("disabled",!0)}}var X=class i{#e=S(V);closed=ue();isUpdating=A(!1);passphrase=A("");repeatPassphrase=A("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let s;s=$localize`Change passphrase`;let l;l=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,l=v(l);let P;P=$localize`Passphrase`;let I;I=$localize`Repeat passphrase`;let R;R=$localize`Not now thanks`;let G;G=$localize` Yes, update passphrase now `;let F;return F=$localize` Yes, update passphrase now `,[s,l,P,I,R,G,F,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(a(0,"header",7)(1,"h3"),f(2,0),o()(),a(3,"div",8)(4,"sh-alert",9),g(5,1),_(6,"br")(7,"br"),C(),o(),a(8,"sh-form-field")(9,"label",10),f(10,2),o(),a(11,"input",11),H("ngModelChange",function(l){return $(t.passphrase,l)||(t.passphrase=l),l}),o()(),a(12,"sh-form-field")(13,"label",12),f(14,3),o(),a(15,"input",13),H("ngModelChange",function(l){return $(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),d(16,et,2,0,"sh-icon",14)(17,tt,2,0,"sh-icon",15),o()(),a(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),d(21,nt,2,2,"button",18)(22,it,2,3,"button",19),o()),e&2&&(r(11),y("ngModel",t.passphrase),r(4),O("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),k("loader",t.isUpdating()),r(2),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Ae,Te,he,Fe,B,Ie,M,Me],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var ot=()=>({exact:!0});function at(i,n){i&1&&(a(0,"sh-icon",26),u(1,"x-bold"),o())}function st(i,n){i&1&&(a(0,"sh-icon",27),u(1,"list-bold"),o())}function rt(i,n){if(i&1){let e=E();ie(0,10),a(1,"button",25),T("click",function(){m(e);let s=c();return h(s.toggleNav())}),d(2,at,2,0,"sh-icon",26)(3,st,2,0,"sh-icon",27),o(),oe()}if(i&2){let e=c();r(2),p(e.isNavOpen()?2:3)}}function lt(i,n){i&1&&(a(0,"sh-icon"),u(1,"sun"),o())}function _t(i,n){i&1&&(a(0,"sh-icon"),u(1,"moon"),o())}function ct(i,n){if(i&1){let e=E();a(0,"button",28),T("click",function(){m(e);let s=c();return h(s.changeDefaultClientTo("ngax"))}),g(1,7),_(2,"sh-icon"),C(),o(),a(3,"button",28),T("click",function(){m(e);let s=c();return h(s.logout())}),g(4,8),_(5,"sh-icon"),C(),o()}}var Z=class i{#e=S(we);#t=S(V);#i=S(ve);#o=S(Ce);#a=S(fe);#s=S(J);#r=S(Ge);#l=S(He);#n=S(Re);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;sidenavType=this.#e.sidenavType;machineName=U(()=>{let n=this.#l.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#n.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#n.systemInfo()?.MachineName??"Unknown"});ngOnInit(){return this.#s.init(),this.#i.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:n=>{let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&this.#a.open(X,{maxWidth:"500px"})}})}toggleNav(){this.#e.toggleNav()}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#r.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-layout"]],decls:43,vars:12,consts:()=>{let n;n=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let s;s=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let l;l=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=v(P);let I;I=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=v(I);let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Use old UI `;let G;return G=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,s,l,P,I,R,G,[3,"isOpenChange","isOpen","disableDrag"],["sidenav-closed-topbar",""],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],["action","",1,"machine-name",3,"title"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["shButton","",1,"small","toggle-sidebar",3,"click"],[1,"cross"],[1,"burger"],["action","",3,"click"]]},template:function(e,t){e&1&&(a(0,"sh-sidenav",9),H("isOpenChange",function(l){return $(t.isNavOpen,l)||(t.isNavOpen=l),l}),d(1,rt,4,1,"ng-container",10),a(2,"div",11)(3,"header"),_(4,"app-logo"),a(5,"button",12),T("click",function(){return t.toggleBodyClass()}),d(6,lt,2,0,"sh-icon")(7,_t,2,0,"sh-icon"),o()(),a(8,"sh-list",13)(9,"button",14),g(10,0),_(11,"sh-icon"),C(),o(),a(12,"button",15),g(13,1),_(14,"sh-icon"),C(),o(),a(15,"button",16),g(16,2),_(17,"sh-icon"),C(),o(),a(18,"button",17),g(19,3),_(20,"sh-icon"),C(),o(),_(21,"sh-divider"),a(22,"div",18)(23,"sh-icon"),u(24,"desktop"),o(),u(25),o()(),_(26,"div",19),a(27,"sh-list",20),d(28,ct,6,0),_(29,"sh-divider"),a(30,"button",21),g(31,4),_(32,"sh-icon"),C(),o(),a(33,"a",22),g(34,5),_(35,"sh-icon")(36,"sh-icon",23),C(),o(),a(37,"a",24),g(38,6),_(39,"sh-icon")(40,"sh-icon",23),C(),o()()(),_(41,"router-outlet")(42,"app-service-hub"),o()),e&2&&(L(t.sidenavType()),y("isOpen",t.isNavOpen),O("disableDrag",!0),r(),p(t.isMobile()?1:-1),r(5),p(t.isDarkMode()?6:7),r(3),O("routerLinkActiveOptions",ce(11,ot)),r(13),O("title",_e(t.machineName())),r(3),b(" ",t.machineName()," "),r(3),p(t.relayIsEnabled()?-1:28))},dependencies:[pe,Se,ge,De,M,Le,Y,Pe,x,be],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}.toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{position:absolute;inset:auto}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{Z as default};
|
|
1
|
+
import{a as ye,b as $e}from"./chunk-DUCPSWRQ.js";import{a as we}from"./chunk-G6VJHFTW.js";import{a as He}from"./chunk-MHPSC3FM.js";import"./chunk-Z27IQRKV.js";import{a as J}from"./chunk-XXVFRNSP.js";import"./chunk-H7ZKBS2Q.js";import{a as ve}from"./chunk-2YGOHGD2.js";import"./chunk-BK2MSH26.js";import"./chunk-3V4DGTSM.js";import"./chunk-6Q6SSTBK.js";import{a as Re}from"./chunk-5LX6M65H.js";import"./chunk-LN26XMBJ.js";import{a as be}from"./chunk-GXGIGJ4W.js";import"./chunk-S4OFJD2F.js";import{b as Ce,d as Ge}from"./chunk-6XI3IP27.js";import{c as pe,e as Se,f as ge}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as Y,F as Pe,G as Ie,I as Le,P as De,X as Me,c as Te,d as me,e as he,i as Fe,r as Ee,s as Ae,t as Oe,u as M,w as B,x as Ne,z as fe}from"./chunk-RPUPXDQE.js";import{i as V}from"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as c,Ab as te,Bb as ne,Bc as ce,Cb as O,Db as a,Eb as o,Fb as _,H as j,Jb as ie,Kb as oe,Mb as E,Qc as U,Rc as Q,Sa as r,Tb as g,Ub as C,Vb as f,Vc as ue,Xc as de,Yb as v,Zb as T,Zc as K,_ as S,cb as D,ea as m,fa as h,gc as ae,hc as se,kc as k,mc as L,nc as u,oc as q,pa as A,pc as b,sc as y,tc as $,uc as H,vc as re,wc as le,xb as d,xc as w,yb as p,yc as _e,zb as ee}from"./chunk-QONLYWYC.js";import{a as z,b as W}from"./chunk-EUDKD2JW.js";var Be=["scroller"];function Ye(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell-ringing"),o())}function Ve(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell"),o())}function Je(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=w(6);O("index",0)("notification",e.content)}}function Xe(i,n){if(i&1&&(a(0,"div",11),u(1),o()),i&2){c(3);let e=w(6);r(),b(" ",e.content.content," ")}}function ze(i,n){if(i&1&&(a(0,"sh-alert")(1,"div",10),u(2),o(),d(3,Xe,2,1,"div",11),o()),i&2){c(2);let e=w(6);L(e.content.type||"error"),r(2),q(e.content.title),r(),p(e.content.content?3:-1)}}function We(i,n){if(i&1&&(a(0,"div",6),d(1,Je,1,2,"app-notification",8)(2,ze,4,4,"sh-alert",9),o()),i&2){c();let e=w(6);r(),p(e.type==="notification"?1:2)}}function je(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,2),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleNotifications())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function qe(i,n){if(i&1&&(a(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),b(" ",e.content," ")}}function Qe(i,n){if(i&1){let e=E();a(0,"sh-alert",18,1),T("click",function(){let s=m(e).$implicit,l=c(2);return h(l.deleteAlertByIndex(s.id))}),a(2,"div",19),u(3),o(),d(4,qe,2,1,"div",20),o()}if(i&2){let e=n.$implicit;L(e.type),O("id",e.id),r(3),q(e.title),r(),p(e.content?4:-1)}}function Ke(i,n){i&1&&(a(0,"p",17),f(1,4),o())}function Ze(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,3),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleAlerts())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),te(9,Qe,5,5,"sh-alert",16,ee,!1,Ke,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var xe=new Ee,x=class i{#e=S(Ne);#t=S(J);isSubmitting=A(!1);messageSent=A(!1);form=xe.group({message:xe.control("",[me.required])});notifications=this.#t.notifications;shownMessage=A(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=U(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=de("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=A(null);previousNotificationsCount=A(null);constructor(){Q(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ae(t.scroller,Be,5),e&2&&se()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let s=E();a(0,"button",5),T("click",function(){return m(s),h(t.toggleAlerts())}),a(1,"sh-icon"),u(2,"info"),o()(),a(3,"button",5),T("click",function(){return m(s),h(t.toggleNotifications())}),d(4,Ye,2,0,"sh-icon")(5,Ve,2,0,"sh-icon"),o(),re(6),d(7,We,3,1,"div",6),d(8,je,10,0,"div",7),d(9,Ze,12,1,"div",7)}if(e&2){L(t.alertHistory().length?"error":""),r(3),L(t.notifications().length?"error":""),r(),p(t.notifications().length?4:5),r(2);let s=le(t.shownMessage());r(),p(s?7:-1),r(),p(t.isNotificationsOpen()?8:-1),r(),p(t.isAlertsOpen()?9:-1)}},dependencies:[Oe,B,M,Y,$e,ye],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function et(i,n){i&1&&(a(0,"sh-icon",14),u(1,"check"),o())}function tt(i,n){i&1&&(a(0,"sh-icon",15),u(1,"prohibit"),o())}function nt(i,n){if(i&1){let e=E();a(0,"button",20),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();k("loader",e.isUpdating())}}function it(i,n){if(i&1){let e=E();a(0,"button",21),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();k("loader",e.isUpdating()),O("disabled",!0)}}var X=class i{#e=S(V);closed=ue();isUpdating=A(!1);passphrase=A("");repeatPassphrase=A("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let s;s=$localize`Change passphrase`;let l;l=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,l=v(l);let P;P=$localize`Passphrase`;let I;I=$localize`Repeat passphrase`;let R;R=$localize`Not now thanks`;let G;G=$localize` Yes, update passphrase now `;let F;return F=$localize` Yes, update passphrase now `,[s,l,P,I,R,G,F,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(a(0,"header",7)(1,"h3"),f(2,0),o()(),a(3,"div",8)(4,"sh-alert",9),g(5,1),_(6,"br")(7,"br"),C(),o(),a(8,"sh-form-field")(9,"label",10),f(10,2),o(),a(11,"input",11),H("ngModelChange",function(l){return $(t.passphrase,l)||(t.passphrase=l),l}),o()(),a(12,"sh-form-field")(13,"label",12),f(14,3),o(),a(15,"input",13),H("ngModelChange",function(l){return $(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),d(16,et,2,0,"sh-icon",14)(17,tt,2,0,"sh-icon",15),o()(),a(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),d(21,nt,2,2,"button",18)(22,it,2,3,"button",19),o()),e&2&&(r(11),y("ngModel",t.passphrase),r(4),O("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),k("loader",t.isUpdating()),r(2),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Ae,Te,he,Fe,B,Ie,M,Me],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var ot=()=>({exact:!0});function at(i,n){i&1&&(a(0,"sh-icon",26),u(1,"x-bold"),o())}function st(i,n){i&1&&(a(0,"sh-icon",27),u(1,"list-bold"),o())}function rt(i,n){if(i&1){let e=E();ie(0,10),a(1,"button",25),T("click",function(){m(e);let s=c();return h(s.toggleNav())}),d(2,at,2,0,"sh-icon",26)(3,st,2,0,"sh-icon",27),o(),oe()}if(i&2){let e=c();r(2),p(e.isNavOpen()?2:3)}}function lt(i,n){i&1&&(a(0,"sh-icon"),u(1,"sun"),o())}function _t(i,n){i&1&&(a(0,"sh-icon"),u(1,"moon"),o())}function ct(i,n){if(i&1){let e=E();a(0,"button",28),T("click",function(){m(e);let s=c();return h(s.changeDefaultClientTo("ngax"))}),g(1,7),_(2,"sh-icon"),C(),o(),a(3,"button",28),T("click",function(){m(e);let s=c();return h(s.logout())}),g(4,8),_(5,"sh-icon"),C(),o()}}var Z=class i{#e=S(we);#t=S(V);#i=S(ve);#o=S(Ce);#a=S(fe);#s=S(J);#r=S(Ge);#l=S(He);#n=S(Re);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;sidenavType=this.#e.sidenavType;machineName=U(()=>{let n=this.#l.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#n.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#n.systemInfo()?.MachineName??"Unknown"});ngOnInit(){return this.#s.init(),this.#i.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:n=>{let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&this.#a.open(X,{maxWidth:"500px"})}})}toggleNav(){this.#e.toggleNav()}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#r.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-layout"]],decls:43,vars:12,consts:()=>{let n;n=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let s;s=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let l;l=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=v(P);let I;I=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=v(I);let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Use old UI `;let G;return G=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,s,l,P,I,R,G,[3,"isOpenChange","isOpen","disableDrag"],["sidenav-closed-topbar",""],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],["action","",1,"machine-name",3,"title"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["shButton","",1,"small","toggle-sidebar",3,"click"],[1,"cross"],[1,"burger"],["action","",3,"click"]]},template:function(e,t){e&1&&(a(0,"sh-sidenav",9),H("isOpenChange",function(l){return $(t.isNavOpen,l)||(t.isNavOpen=l),l}),d(1,rt,4,1,"ng-container",10),a(2,"div",11)(3,"header"),_(4,"app-logo"),a(5,"button",12),T("click",function(){return t.toggleBodyClass()}),d(6,lt,2,0,"sh-icon")(7,_t,2,0,"sh-icon"),o()(),a(8,"sh-list",13)(9,"button",14),g(10,0),_(11,"sh-icon"),C(),o(),a(12,"button",15),g(13,1),_(14,"sh-icon"),C(),o(),a(15,"button",16),g(16,2),_(17,"sh-icon"),C(),o(),a(18,"button",17),g(19,3),_(20,"sh-icon"),C(),o(),_(21,"sh-divider"),a(22,"div",18)(23,"sh-icon"),u(24,"desktop"),o(),u(25),o()(),_(26,"div",19),a(27,"sh-list",20),d(28,ct,6,0),_(29,"sh-divider"),a(30,"button",21),g(31,4),_(32,"sh-icon"),C(),o(),a(33,"a",22),g(34,5),_(35,"sh-icon")(36,"sh-icon",23),C(),o(),a(37,"a",24),g(38,6),_(39,"sh-icon")(40,"sh-icon",23),C(),o()()(),_(41,"router-outlet")(42,"app-service-hub"),o()),e&2&&(L(t.sidenavType()),y("isOpen",t.isNavOpen),O("disableDrag",!0),r(),p(t.isMobile()?1:-1),r(5),p(t.isDarkMode()?6:7),r(3),O("routerLinkActiveOptions",ce(11,ot)),r(13),O("title",_e(t.machineName())),r(3),b(" ",t.machineName()," "),r(3),p(t.relayIsEnabled()?-1:28))},dependencies:[pe,Se,ge,De,M,Le,Y,Pe,x,be],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}.toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{position:absolute;inset:auto}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-5LX6M65H.js";import{I as k,u as D}from"./chunk-RPUPXDQE.js";import"./chunk-OJ3H3ZRA.js";import{ea as A}from"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as s,Ab as I,Bb as v,Cb as g,Cc as _,Db as c,Dc as $,Eb as l,Jc as R,Lb as u,Mb as M,Qc as b,Sa as r,Vb as N,Zb as E,_ as T,cb as x,ea as h,fa as y,hb as m,ic as C,jc as P,kc as S,nc as a,oc as F,pa as p,xb as d,yb as f}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Y=e=>({children:e,level:0}),L=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),V=(e,t)=>t.id;function z(e,t){if(e&1&&(c(0,"sh-icon"),a(1,"caret-down"),l()),e&2){let n=s().$implicit;S("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"sh-icon"),a(1,"dot"),l())}function J(e,t){e&1&&u(0)}function U(e,t){if(e&1&&m(0,J,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);g("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,L,$(2,j,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=M();c(0,"div",4,1),E("click",function(){let i=h(n).$implicit,G=s(2);return y(i.children.length>0&&G.toggleNode(i))}),d(2,z,2,2,"sh-icon",5)(3,B,2,0,"sh-icon"),c(4,"div",6),a(5),l()(),d(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;S("cannot-toggle",n.children.length===0)("open",n.isOpen()),r(2),f(n.children.length>0?2:3),r(3),F(n.text),r(),f(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"sh-list"),I(1,X,7,7,null,null,V),l()),e&2){let n=t.$implicit;P("padding-left",n.level*.25,"rem"),r(),v(n.children)}}function H(e,t){e&1&&u(0)}var O=class e{#e=T(w);treeStructure=b(()=>{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:p(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:p(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=x({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"),N(1,2),l(),m(2,q,3,2,"ng-template",null,0,R)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);r(4),g("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,L,_(2,Y,o.treeStructure())))}},dependencies:[k,D,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}sh-list[_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-E6H2XELA.js";import"./chunk-HHU5JW5J.js";import"./chunk-FSG362SU.js";import"./chunk-HYQ6MPYI.js";import"./chunk-3V4DGTSM.js";import"./chunk-5LX6M65H.js";import"./chunk-RPUPXDQE.js";import"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as OptionsListComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-KXJZEADJ.js";import{b as h}from"./chunk-Z27IQRKV.js";import"./chunk-H7ZKBS2Q.js";import"./chunk-2YGOHGD2.js";import"./chunk-BK2MSH26.js";import"./chunk-3V4DGTSM.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5LX6M65H.js";import"./chunk-LN26XMBJ.js";import"./chunk-S4OFJD2F.js";import"./chunk-6XI3IP27.js";import{b as M,e as O}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B,u as R}from"./chunk-RPUPXDQE.js";import{i as A}from"./chunk-OJ3H3ZRA.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{Ab as T,Bb as g,Db as F,Eb as a,Fb as _,Qc as L,Sa as i,Tb as c,Ub as d,Vb as l,Yb as p,Zb as I,_ as C,cb as f,nc as E,pa as r,pc as N,xb as s,yb as u,zb as S}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";function $(e,t){e&1&&l(0,2,1)}function P(e,t){e&1&&l(0,2,2)}function k(e,t){e&1&&l(0,2,3)}function v(e,t){e&1&&l(0,2,4)}function U(e,t){if(e&1&&(E(0),_(1,"br")),e&2){let n=t.$implicit;N(" ",n," ")}}var D=class e{#t=C(A);#e=C(M);#n=h(this.#e.params);runId=L(()=>this.#n()?.runId);offset=r(0);status=r("starting");messageLog=r([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=f({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=p(o),[t,n,o,[1,"back"],["type","button","shButton","","routerLink","../",1,"small"],["type","button","shButton","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(_(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"sh-icon"),d(),a()(),F(6,"h3"),c(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),d(),a(),F(9,"div",6),c(10,2),s(11,$,1,0),s(12,P,1,0),s(13,k,1,0),s(14,v,1,0),d(),a(),F(15,"code"),T(16,U,2,1,null,null,S),a()()),n&2&&(i(11),u(o.status()==="starting"?11:-1),i(),u(o.status()==="started"?12:-1),i(),u(o.status()==="finished"?13:-1),i(),u(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[b,R,B,O],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{i as l}from"./chunk-OJ3H3ZRA.js";import{H as a,Qc as s,R as u,V as p,_ as d,pa as o}from"./chunk-QONLYWYC.js";var m=class r{#s=d(l);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},t=this.systemInfo()?.GenericModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],i=this.systemInfo()?.CompressionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],c=this.systemInfo()?.EncryptionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[];return[e,...t,...i,...c]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(u(i=>{this.systemInfo.set(i)}),a(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(u(i=>{this.filterGroups.set(i)}),a(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as T}from"./chunk-ABYM5HWA.js";import{a as P,
|
|
1
|
+
import{d as T}from"./chunk-ABYM5HWA.js";import{a as P,d as O,i as b}from"./chunk-OJ3H3ZRA.js";import{Aa as o,za as y}from"./chunk-5ZSBXGHQ.js";import{B as A,F as l,H as N,R as g,V as a,_ as i,f as I,k as S,n as E,pa as n,r as R,za as v}from"./chunk-QONLYWYC.js";var c=class r{platformId=i(v);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return o(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,s=!1){if(!o(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${s?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return y(this.platformId)?localStorage.length:0}getItem(e){return o(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!o(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){o(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!o(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){o(this.platformId)||localStorage.clear()}clear(){if(!o(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return o(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac})};var f=class r{#i=i(c);#r=n(null);#t=window.self!==window.top;#s=n(this.#t);relayIsEnabled=this.#s.asReadonly();config=this.#r.asReadonly();configLoaded=this.#t?new S:null;isLoading=n(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#o(),this.#t&&(this.#s.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),s=JSON.parse(t);if(!s?.accessToken||!s?.clientId){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof s.clientId!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof s.accessToken!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}let m=this.#i.getItem("locale")??"en-US",p=s.locale??"en-US";m!==p&&(this.#i.setItem("locale",p),window.location.reload()),this.#r.set(s),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#o(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#r.set(e)}clearConfig(){this.#r.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};var u="PROXY_AUTHED_FAKE_TOKEN",h="refreshNonce",d="v1:persist:duplicati:refreshNonce",L=class r{#i=i(T);#r=i(O);#t=i(b);#s=i(f);#e=n(null);#o=n(!1);token=this.#e.asReadonly();isLoggingOut=this.#o.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(h);return}t?localStorage.setItem(d,e||""):sessionStorage.setItem(h,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(h),t=localStorage.getItem(d),s=e||t;return{requestBody:s?{requestBody:{Nonce:s}}:void 0,local:s===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(l(1),g(s=>{s.AccessToken?(this.#e.set(s.AccessToken),this.setRefreshNonce(s.RefreshNonce,t)):this.#e.set(null)}))}refreshToken(){if(this.#s.relayIsEnabled())return this.#e.set(u),new I(s=>{s.next({AccessToken:u}),s.complete()});let{requestBody:e,local:t}=this.getRefreshNonceBody();return this.#t.postApiV1AuthRefresh(e).pipe(l(1),g(s=>{s.AccessToken&&(this.#e.set(s.AccessToken),this.setRefreshNonce(s.RefreshNonce,t))}))}checkProxyAuthed(){let e=new P({"custom-proxy-check":"true"});return this.#r.get("/api/v1/systeminfo",{headers:e}).pipe(R(()=>(this.#e.set(u),!0)),A(()=>E(!1)))}logout(){this.#o.set(!0);let{requestBody:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(h),t&&localStorage.removeItem(d),this.#t.postApiV1AuthRefreshLogout(e).pipe(l(1),N(()=>{this.#o.set(!1),this.#e.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a,f as b,u as c,L as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z}from"./chunk-GXGIGJ4W.js";import{a as Q}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-GXGIGJ4W.js";import{a as Q}from"./chunk-S4OFJD2F.js";import{d as B}from"./chunk-6XI3IP27.js";import{d as E}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as q,D as $,G as j,b as x,c as O,d as P,e as I,f as T,j as F,o as D,q as G,r as k,t as R,u as A,w as V}from"./chunk-RPUPXDQE.js";import"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{Cb as _,Db as t,Eb as o,Fb as s,H as u,Mb as M,Rc as N,Sa as c,Xc as y,Zb as w,_ as p,cb as h,ea as g,fa as f,gc as L,hc as v,kc as S,nc as r,pa as m,xb as C,yb as b}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var X=["passwordInput"];function H(a,e){a&1&&(t(0,"sh-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. "),o())}var l=new k,d=class a{#e=p(E);#t=p(B);rememberMe=Q("rememberMe",!1,!0);failedLogin=m(!1);successLogin=m(!1);isLoading=m(!1);loginForm=l.group({user:l.control(""),pass:l.control("",P.required),rememberMe:l.control(this.rememberMe())});passwordInput=y("passwordInput");passwordEffect=N(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(e=>this.rememberMe.set(e??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass,n=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!n&&e&&(this.isLoading.set(!0),this.#t.login(e,this.rememberMe()).pipe(u(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=h({type:a,selectors:[["app-login"]],viewQuery:function(n,i){n&1&&L(i.passwordInput,X,5),n&2&&v()},decls:24,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[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"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(n,i){if(n&1){let J=M();t(0,"form",1),w("submit",function(){return g(J),f(i.submit())}),C(1,H,2,0,"sh-alert",2),t(2,"div",3),s(3,"app-logo"),o(),t(4,"div",4)(5,"div",5),s(6,"input",6),t(7,"sh-form-field")(8,"label",7),r(9," Password "),t(10,"a",8)(11,"sh-icon"),r(12,"question"),o()()(),s(13,"input",9,0),o(),t(15,"button",10),r(16," Login "),t(17,"sh-icon"),r(18,"arrow-right"),o()()(),t(19,"sh-checkbox",11),r(20," Keep me logged in "),s(21,"input",12),o(),t(22,"div",13),s(23,"label",14),o()()()}n&2&&(_("formGroup",i.loginForm),c(),b(i.failedLogin()&&!i.successLogin()?1:-1),c(14),S("loader",i.isLoading()))},dependencies:[R,F,O,x,I,T,D,G,z,j,A,q,V,$],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:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-2YGOHGD2.js";import"./chunk-BK2MSH26.js";import{a as z}from"./chunk-3V4DGTSM.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5LX6M65H.js";import"./chunk-S4OFJD2F.js";import"./chunk-6XI3IP27.js";import{d as O,e as M}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as U,G as x,H as V,V as j,b as E,c as A,e as R,f as b,j as y,o as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-RPUPXDQE.js";import{i as J}from"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{Bc as N,Cb as p,Db as a,Eb as n,Fb as u,H as g,Sa as l,Tb as D,Ub as h,Vb as _,Yb as I,Zb as d,_ as s,cb as f,kc as P,pa as c,xb as C,yb as S}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),n(),u(3,"input",15),n())}var F=new v,T=class m{#t=s(L);#o=s(w);#n=s(J);#i=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),i=JSON.parse(t);if(typeof i=="object"&&i!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,i="";for(let r=0;r<t;r++)i+=String.fromCharCode(e[r]);return btoa(i)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#n.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#i.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let i;return i=$localize`Passphrase`,[o,e,t,i,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),n(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),n()(),h(),n()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),n(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),n(),u(14,"input",11),n(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),n(),u(18,"input",13),n()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,B,$,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-YPJRYB54.js";import"./chunk-NSAY2K7E.js";import"./chunk-RPUPXDQE.js";import"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as I,e as A}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as V,G as x,W as J,c as B,e as G,f as y,j as b,o as $,q as P,r as v,t as L,u as k,x as w}from"./chunk-
|
|
1
|
+
import{d as I,e as A}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as V,G as x,W as J,c as B,e as G,f as y,j as b,o as $,q as P,r as v,t as L,u as k,x as w}from"./chunk-RPUPXDQE.js";import{i as X}from"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{Bc as M,Cb as _,Db as r,Eb as i,Fb as p,H as g,P as T,Sa as F,Tb as C,Ub as E,Vb as f,Yb as O,Zb as m,_ as u,cb as R,kc as h,nc as N,pa as c,xb as S,yb as D}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),f(2,2),i(),p(3,"input",12),i())}var a=new v,d=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),C(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),E(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),f(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loader",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,b,B,G,y,$,P,A,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as y}from"./chunk-Z27IQRKV.js";import{a as w}from"./chunk-
|
|
1
|
+
import{b as y}from"./chunk-Z27IQRKV.js";import{a as w}from"./chunk-BK2MSH26.js";import{a as b}from"./chunk-5LX6M65H.js";import"./chunk-6XI3IP27.js";import"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as U,K as $,u as k}from"./chunk-RPUPXDQE.js";import{i as x}from"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as c,Cb as L,Db as a,Eb as r,Fb as d,H as g,Mb as E,Pa as O,Qc as I,Sa as l,Tb as M,Ub as R,Vb as T,Wb as f,Xb as F,Zb as N,_ as p,cb as P,ea as m,fa as C,kc as v,nc as u,oc as D,pa as S,r as G,xb as s,yb as _}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";function V(n,o){n&1&&d(0,"sh-progress-bar",3)}function B(n,o){if(n&1&&(a(0,"a",7),M(1,2),d(2,"sh-icon"),R(),r()),n&2){let e,t,i=c(2);L("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),f((t=i.serverState())==null?null:t.UpdatedVersion),F(1)}}function J(n,o){if(n&1){let e=E();a(0,"button",6),N("click",function(){m(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(n&2){let e,t=c();v("loader",t.checkingForUpdates()),l(2),_((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function X(n,o){if(n&1){let e=E();a(0,"button",6),N("click",function(){m(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function z(n,o){n&1&&d(0,"sh-progress-bar",3)}var h=class n{#e=p(x);#t=p(w);#n=p(b);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#t.serverState;duplicatiVersion=I(()=>this.#n.systemInfo()?.ServerVersionName??"Unknown");generalInfo=y(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),g(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(g(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,t,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),T(3,0),r(),a(4,"p"),T(5,1),r(),a(6,"div",4),s(7,J,3,3)(8,X,2,0,"button",5),s(9,z,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;_(t.isLoading()?0:-1),l(5),f(t.duplicatiVersion()),F(5),l(2),_(((i=t.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=t.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),_(((A=t.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),D(t.generalInfo())}},dependencies:[$,U,k],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-5LX6M65H.js";import{b as $,d as j}from"./chunk-6XI3IP27.js";import{z as f}from"./chunk-RPUPXDQE.js";import{i as b}from"./chunk-OJ3H3ZRA.js";import{qa as L}from"./chunk-5ZSBXGHQ.js";import{Fc as F,Gb as N,Hb as C,Hc as W,Ib as M,Q as E,Qc as p,Rc as G,Sa as O,Tb as I,Ub as _,V as h,Vb as w,Wb as A,Xb as P,_ as r,cb as R,f as m,i as k,pa as s}from"./chunk-QONLYWYC.js";var S=class i{reconnectTimer=s(15e3);countdown=s(0);connectTimerEffect=G(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,n){t&1&&(N(0,"header",2)(1,"h3"),w(2,0),C()(),N(3,"div",3)(4,"p"),I(5,1),M(6,"strong"),F(7,"number"),_(),C()()),t&2&&(O(7),A(W(7,1,n.countdown(),"2.0-0")),P(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var v=class i{dialog=r(f);#t=r(b);#i=s("disconnected");#n=s(null);#e=s(-1);#c=s(0);#l=s(!1);#u=new k;connectionStatus=this.#i.asReadonly();serverState=this.#n.asReadonly();#s=void 0;duration=r($).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new k,this.#o()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#o(){this.#i.set("connecting"),this.#t.getApiV1Serverstate({lastEventId:this.#e(),longpoll:this.#e()>=0,duration:this.duration}).pipe(E(this.#u)).subscribe({next:e=>{e&&this.#r(e),this.#a()},error:e=>{let n=this.#c()+1,a=Math.min(5e3*n,3e4);this.#c.set(n),n>3&&this.#i.set("disconnected"),this.#s||(this.#s=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#s.component.reconnectTimer.set(a),setTimeout(()=>{this.#o()},a)}})}#r(e){this.#i.set("connected"),this.#n.set(e),this.#e.set(e.LastEventID??-1),this.#c.set(0)}#a(){this.#l()&&this.#o()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=h({token:i,factory:i.\u0275fac,providedIn:"root"})};var u=!1,T=class i{#t=r(j);#i=r(D);dialog=r(f);#n=null;#e=s("disconnected");#c=s(null);#l=s(null);#u=s(null);#s=s(null);#o=void 0;#r=s({legacystatus:!0});shouldConnect=s(!0);connectionStatus=this.#e.asReadonly();serverState=this.#c.asReadonly();serverProgress=this.#l.asReadonly();subscriptions=this.#r.asReadonly();serverTaskQueue=this.#u.asReadonly();backupListState=this.#s.asReadonly();#a=null;taskCompleted=new m(e=>{this.#a=e});#h=0;start(){this.#d(),this.shouldConnect.set(!0)}#d(){let e=this.#t.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(n=":8200");let a=window.location.hostname,g=this.#i.hasWebSocketAuth()?`${t}//${a}${n}/notifications`:`${t}//${a}${n}/notifications?token=${e}`;this.#e.set("connecting"),this.#n=new WebSocket(g),this.#n.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#e.set("authenticating"),this.#n?.send(JSON.stringify({Version:1,Token:e}))):this.#p()},this.#n.onmessage=d=>{if(this.#e()==="authenticating")try{let o=JSON.parse(d.data);o.Success?(u&&console.log("WebSocket authentication successful"),this.#p()):(console.error("WebSocket authentication failed:",o.Message),this.#e.set("disconnected"));return}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#e.set("disconnected");return}try{let o=JSON.parse(d.data),l=o?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",o),this.#c.set(o);else if(l==="reply"){let c=o;c.Success||console.error("WebSocket reply error:",c.Message)}else if(l==="progress"){let c=o;u&&console.log("Received progress update:",c.Data),this.#l.set(c.Data)}else if(l==="taskqueue"){let c=o;u&&console.log("Received task update:",c.Data),this.#u.set(c.Data)}else if(l==="taskcompleted"){let c=o;u&&console.log("Received task completed:",c.Data),this.#a?.next(c.Data)}else if(l==="backuplist"){let c=o;u&&console.log("Received backup list update:",c.Data),this.#s.set(c.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#n.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#e.set("disconnected"),this.shouldConnect()&&(this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#o.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#d(),5e3))},this.#n.onerror=d=>{console.error("WebSocket error",d),this.#e.set("disconnected")}}#p(){this.#e.set("connected");let e=this.#r();Object.keys(e).length>0&&Object.entries(e).forEach(([t,n])=>{n!=null&&this.sendSubscribeRequest(t,n)}),this.#o&&this.#o.close()}stop(){this.shouldConnect.set(!1),this.#n?.close()}reconnect(){this.#n?.close(),this.start()}reconnectIfNeeded(){this.#n?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#n?.send(JSON.stringify({Version:1,Id:`req-${++this.#h}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let n=this.#r(),a=n[e];(!a||JSON.stringify(a)!==JSON.stringify(t||!0))&&(n[e]=t||!0,this.#r.set(n),this.#e()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#r();t[e]&&(delete t[e],this.#r.set(t),this.#e()=="connected"&&this.#n?.send(JSON.stringify({Version:1,Id:`req-${++this.#h}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=h({token:i,factory:i.\u0275fac,providedIn:"root"})};var x=10,q=class i{#t=r(T);#i=r(v);#n=r(b);#e=r(D);#c=s("longpoll");#l=s(!1);#u=p(()=>this.#e.hasTaskCompletedOption()&&this.#c()==="websocket");#s={};#o=null;#r=!1;#a=[];constructor(){this.#t.subscribe("taskcompleted"),this.#t.taskCompleted.subscribe(e=>{if(this.#a.unshift(e),this.#a.length>x&&this.#a.pop(),!e.ID)return;let t=this.#s[e.ID];t&&(t.forEach(n=>{n.next(e),n.complete()}),delete this.#s[e.ID])})}connectionStatus=p(()=>this.#c()==="websocket"?this.#t.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=p(()=>this.#c()==="websocket"?this.#t.serverState():this.#i.serverState());progressState=this.#t.serverProgress;taskQueueState=this.#t.serverTaskQueue;activeTaskQueueState=p(()=>this.#c()==="websocket"?this.#t.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#t.backupListState());setConnectionMethod(e){e==="websocket"?(this.#t.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#t.stop()),this.#c.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#c()}subscribe(e,t=null){this.#t.subscribe(e,t)}unsubscribe(e){this.#t.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let n=this.#a.find(a=>a.ID===e);if(n){t.next(n),t.complete();return}this.#s[e]=this.#s[e]||[],this.#s[e].push(t),this.#h()})}#h(){this.#r||this.#u()||(this.#r=!0,this.#d())}#d(){let e=Object.keys(this.#s).map(n=>parseInt(n,10));if(e.length===0){this.#p();return}let t=Math.min(...e);this.#n.getApiV1TaskByTaskid({taskid:t}).subscribe({next:n=>{n.TaskFinished!=null&&(this.#a.unshift(n),this.#a.length>x&&this.#a.pop(),this.#s[t].forEach(g=>{g.next(n),g.complete()}),delete this.#s[t])},complete:()=>{this.#o=window.setTimeout(()=>{this.#d()},1e3)},error:n=>{this.#o=window.setTimeout(()=>{this.#d()},3e3)}})}#p(){this.#o!==null&&(clearTimeout(this.#o),this.#o=null),this.#r=!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=h({token:i,factory:i.\u0275fac,providedIn:"root"})};export{q as a};
|