@duplicati/ngclient 0.0.233 → 0.0.234
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-h6n5A491.js → chunk-0lYdrxte.js} +1 -1
- package/{chunk-bt6lhYfG.js → chunk-1-oPQ4n-.js} +1 -1
- package/{chunk-Dz5guW4b.js → chunk-5EFCeqK3.js} +1 -1
- package/{chunk-CS2J-6VZ.js → chunk-5kQsbzck.js} +1 -1
- package/{chunk-D2G7_0hG.js → chunk-AHhgJqe4.js} +1 -1
- package/{chunk-mA4J4_nC.js → chunk-B-T54LAJ.js} +1 -1
- package/{chunk-C9OqpwwE.js → chunk-B-c3Zv6R.js} +1 -1
- package/{chunk-C9ecLR93.js → chunk-B0ETfgeR.js} +1 -1
- package/{chunk-B_cIFQAl.js → chunk-B1dNb-QT.js} +1 -1
- package/{chunk-mflQLMHH.js → chunk-B8PnvglY.js} +1 -1
- package/{chunk-CgJAbgNN.js → chunk-BAmgFjXY.js} +1 -1
- package/{chunk-B6c2NXNy.js → chunk-BDhLEYas.js} +1 -1
- package/{chunk-L8hQtTzU.js → chunk-BFVhQEGw.js} +1 -1
- package/{chunk-BmmYJhOf.js → chunk-BFquKzMb.js} +1 -1
- package/{chunk-Dk-Wgx3e.js → chunk-BGcVKmjp.js} +1 -1
- package/{chunk-jy8x4GhV.js → chunk-BHrABvoK.js} +1 -1
- package/chunk-BNG7N21y.js +1 -0
- package/{chunk-CsIAXoYP.js → chunk-BQapkAzp.js} +1 -1
- package/chunk-BRqx-u9-.js +2 -0
- package/{chunk-lymL5FDY.js → chunk-BaNH2nfC.js} +1 -1
- package/{chunk-AuCOjHXM.js → chunk-BaR3Dslz.js} +1 -1
- package/{chunk-D1pDZLJ9.js → chunk-BaknLOqq.js} +1 -1
- package/{chunk-D3PhthfU.js → chunk-Bg98dUtr.js} +1 -1
- package/{chunk-BsNCg00z.js → chunk-BiSIt2zb.js} +1 -1
- package/chunk-BkLND74M.js +1 -0
- package/{chunk-DDWDcSq2.js → chunk-BnFO-7ok.js} +1 -1
- package/{chunk-DcdpG1YG.js → chunk-BqbJuWHd.js} +1 -1
- package/chunk-C4zj812G.js +1 -0
- package/{chunk-CIw_h8oP.js → chunk-C5G4RPpS.js} +1 -1
- package/{chunk-DM11Gu0H.js → chunk-CA-0mTsq.js} +1 -1
- package/chunk-CAEYxmzQ.js +1 -0
- package/chunk-CGnsbLNG.js +1 -0
- package/chunk-CPjYiawK.js +1 -0
- package/chunk-CQHKuUqk.js +2 -0
- package/{chunk-Bgw6E0Xu.js → chunk-CSYDDxaa.js} +1 -1
- package/{chunk-B1c7h-_w.js → chunk-CTH9uShX.js} +1 -1
- package/{chunk-DWiO0A6h.js → chunk-CUNe6D-d.js} +1 -1
- package/{chunk-CGsQCBkP.js → chunk-CUaDFQyH.js} +1 -1
- package/chunk-CnyuuWJ3.js +1 -0
- package/{chunk-CuJ_uEdr.js → chunk-CsgB8OpN.js} +1 -1
- package/chunk-CspKioFm.js +4 -0
- package/{chunk-DidJB9ig.js → chunk-Cv4o9u3S.js} +1 -1
- package/chunk-CxOam2tf.js +1 -0
- package/{chunk-DD_wKpGc.js → chunk-CxUx2RFx.js} +1 -1
- package/{chunk-Bj7EyCHb.js → chunk-D0qGkLVr.js} +1 -1
- package/{chunk-Z81HNfgo.js → chunk-D4S_1RMU.js} +1 -1
- package/{chunk-C3gUxHQM.js → chunk-D5zSyubd.js} +1 -1
- package/{chunk-nuwlP4Wz.js → chunk-D6WUhpxO.js} +5 -5
- package/{chunk-CvSsZZty.js → chunk-D7C8xyJI.js} +1 -1
- package/{chunk-Ca1aaA1h.js → chunk-D9dEfxn4.js} +1 -1
- package/{chunk-ByL8ndec.js → chunk-DB1KeglF.js} +1 -1
- package/{chunk-DGvC49aU.js → chunk-DCsYP4vf.js} +1 -1
- package/chunk-DGO0_pkA.js +2 -0
- package/chunk-DKOaWS_j.js +2 -0
- package/{chunk-FTZ5atHM.js → chunk-DP2sLJDC.js} +1 -1
- package/chunk-DXh9g32e.js +1 -0
- package/{chunk-CfxBiw7I.js → chunk-DYfv4gJW.js} +1 -1
- package/chunk-DZMTCfoN.js +1 -0
- package/chunk-DcU0yXkQ.js +1 -0
- package/chunk-Dg-uYwbp.js +2 -0
- package/{chunk-C7AeY2HY.js → chunk-DmwtL4h3.js} +1 -1
- package/chunk-DnTA-m4k.js +2 -0
- package/{chunk-DhiIZLrA.js → chunk-DqoYKCmi.js} +1 -1
- package/{chunk-CIe9Bupz.js → chunk-Du0Hd0t6.js} +1 -1
- package/{chunk-DXEgz1tV.js → chunk-Dyq6iPbF.js} +1 -1
- package/chunk-DzYR8wiz.js +2 -0
- package/{chunk-aCJqF9DH.js → chunk-FZcbbWYC.js} +1 -1
- package/{chunk-CyqqlRjO.js → chunk-GKdOPH_4.js} +1 -1
- package/{chunk-CX3Axjpk.js → chunk-KNmRQWOM.js} +1 -1
- package/{chunk-BxpXVeOr.js → chunk-OIDsf_Aq.js} +1 -1
- package/{chunk-aYCYzU5Q.js → chunk-S-sgDIKw.js} +1 -1
- package/{chunk-B5Y6lgE8.js → chunk-UCY_7-Of.js} +1 -1
- package/{chunk-MDqH8T3Z.js → chunk-UUMQmD5I.js} +1 -1
- package/{chunk-DGxk44Me.js → chunk-X3dwwJIr.js} +1 -1
- package/chunk-_J1lTnCH.js +1 -0
- package/{chunk-K2iai6rC.js → chunk-i6kMmbhY.js} +1 -1
- package/chunk-oobMnyEm.js +3 -0
- package/{chunk-BstaUtD_.js → chunk-pxcB56N0.js} +1 -1
- package/{chunk-CWgXi-7W.js → chunk-sgM_r5NM.js} +1 -1
- package/{chunk-eiyaQxBt.js → chunk-umUQn7LQ.js} +1 -1
- package/{chunk-8Y8ReLEn.js → chunk-xwdrpTfz.js} +1 -1
- package/index.html +1 -1
- package/{main-3NL5M6JB.js → main-XKLDSNLY.js} +1 -1
- package/package.json +1 -1
- package/chunk-B1wZ4poV.js +0 -1
- package/chunk-BZgAzrl9.js +0 -2
- package/chunk-BaSm1lsB.js +0 -2
- package/chunk-BrtdRb9j.js +0 -1
- package/chunk-BzJX1fKw.js +0 -1
- package/chunk-C7gG_Yh_.js +0 -2
- package/chunk-CP6xnjgo.js +0 -3
- package/chunk-ChUm8bnG.js +0 -1
- package/chunk-CkRbgemk.js +0 -2
- package/chunk-ClRItSzt.js +0 -1
- package/chunk-D55uWC7G.js +0 -1
- package/chunk-DV8bRznt.js +0 -2
- package/chunk-DbbyVAGl.js +0 -1
- package/chunk-DuYKanVS.js +0 -1
- package/chunk-DwmssGG9.js +0 -2
- package/chunk-DxFBzFom.js +0 -1
- package/chunk-I5dxaHZ4.js +0 -2
- package/chunk-Y-xXBGKy.js +0 -1
- package/chunk-ksSA-rDF.js +0 -1
- package/chunk-uGh0bVbu.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import {m,C as C$1,F}from'./chunk-bt6lhYfG.js';import {J}from'./chunk-aCJqF9DH.js';import {x}from'./chunk-mA4J4_nC.js';import {T,a6 as be$1,ab as C,aw as W,e as ee,ax as De,a5 as g,G as Ge$1,N as Nt,z as za,at as h,ay as Qu,az as t,aA as y,aj as l,J as zu,h as hw,_ as _t,c as N,v,u as ue,Q as Qi,s as jC,F as Fg,i as Ig,j as jg,$ as $l,H as Hg,p as lm,r as CD,d as aT,C as CE,y as vg,a3 as KC,L as Kg,aB as sm,w as cm,x as _D,g as cT,o as oC,U as UC,l as vT,O as Od,k as iC,P as Pd,K as im,n as nC,au as Vg,av as rC}from'./main-3NL5M6JB.js';import {d}from'./chunk-DDWDcSq2.js';import {F as Fe}from'./chunk-DhiIZLrA.js';import {j as jn,m as me,G as Gn,T as Tn,Z as Ze,y as yt,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-B6c2NXNy.js';import {a as at}from'./chunk-MDqH8T3Z.js';import {L}from'./chunk-DGvC49aU.js';var Xe=()=>["/"];function be(t,o){t&1&&(Qi(0,"sh-toggle",25),Fg(1,5),Ig(2,"input",28),CD(),jg(),$l()),t&2&&(CE(2),_D());}function Ge(t,o){t&1&&(Qi(0,"span",31),nC(1,9),$l());}function Be(t,o){if(t&1&&(Qi(0,"span",31),nC(1,10),$l()),t&2){let e=iC(2);CE(),Vg(e.exportForm.controls.password.errors?.minlength.requiredLength),rC(1);}}function ve(t,o){if(t&1&&Ig(0,"sh-progress-bar",38),t&2){let e=iC(2);Kg("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),vg("value",e.calculatePasswordStrength()*(100/5));}}function ke(t,o){t&1&&(Qi(0,"span",31),nC(1,11),$l());}function Ue(t,o){t&1&&(Qi(0,"span",31),nC(1,12),$l());}function Ke(t,o){if(t&1&&(Qi(0,"span",31),nC(1,13),$l()),t&2){let e=iC(2);CE(),Vg(e.exportForm.controls.repeatPassword.errors?.minlength.requiredLength),rC(1);}}function Je(t,o){t&1&&(Fg(0,7,1),Ig(1,"sh-icon"),jg());}function He(t,o){t&1&&(Fg(0,7,2),Ig(1,"sh-icon"),jg());}function ze(t,o){t&1&&(Fg(0,14,1),Ig(1,"sh-icon",40),jg());}function Ve(t,o){t&1&&(Fg(0,14,2),Ig(1,"sh-icon"),jg());}function qe(t,o){if(t&1){let e=vT();Qi(0,"button",39),Hg("click",function(){Od(e);let a=iC(2);return Pd(a.copyPassword())}),Fg(1,14),aT(2,ze,2,0)(3,Ve,2,0),jg(),$l();}if(t&2){let e=iC(2);CE(2),cT(e.copiedPassword()?2:3);}}function je(t,o){t&1&&(Qi(0,"sh-alert",37),nC(1,15),$l());}function We(t,o){if(t&1){let e=vT();Qi(0,"div",26)(1,"sh-form-field")(2,"label",29),Fg(3,6),Ig(4,"sup"),jg(),$l(),Ig(5,"input",30),CD(),aT(6,Ge,2,0,"span",31)(7,Be,2,1,"span",31),$l(),aT(8,ve,1,9,"sh-progress-bar",32),Qi(9,"sh-form-field"),Ig(10,"input",33),CD(),aT(11,ke,2,0,"span",31)(12,Ue,2,0,"span",31)(13,Ke,2,1,"span",31),$l(),Qi(14,"div",34)(15,"button",35),Hg("click",function(){Od(e);let a=iC();return Pd(a.showPassword.set(!a.showPassword()))}),Fg(16,7),aT(17,Je,2,0)(18,He,2,0),jg(),$l(),Qi(19,"button",35),Hg("click",function(){Od(e);let a=iC();return Pd(a.generatePassword())}),Fg(20,8),Ig(21,"sh-icon"),jg(),$l(),aT(22,qe,4,1,"button",36),$l(),aT(23,je,2,0,"sh-alert",37),$l();}if(t&2){let e=iC();CE(5),vg("type",e.showPassword()?"text":"password"),_D(),CE(),cT(e.exportForm.controls.password.errors?.required?6:e.exportForm.controls.password.errors?.minlength?7:-1),CE(2),cT(e.exportForm.value.password?8:-1),CE(2),vg("type",e.showPassword()?"text":"password"),_D(),CE(),cT(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors?.required?12:e.exportForm.controls.repeatPassword.errors?.minlength?13:-1),CE(6),cT(e.showPassword()?17:18),CE(5),cT(e.showCopyPassword()?22:-1),CE(),cT(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1);}}function Qe(t,o){if(t&1&&(Qi(0,"div",27)(1,"code"),jC(2),$l()()),t&2){let e=iC();CE(2),im(e.exportedCmd());}}var I=new jn,K=class t$1{#o=T(m);#n=T(be$1);#t=T(C);#e=T(W);#i=T(ee);#r=T(De);#s=T(g);isExporting=Ge$1(false);exportType=Ge$1("file");exportedCmd=Ge$1(null);exportForm=I.group({exportPasswords:I.control(true),encryption:I.control(false,[me.required,F()]),password:I.control("",[C$1("encryption",true,[me.required,me.minLength(3)])]),repeatPassword:I.control("",[C$1("encryption",true,[me.required,me.minLength(3)])])});exportFormSignal=L(this.exportForm.valueChanges);encryptionFieldSignal=Nt(()=>(this.exportFormSignal()?.encryption??false)&&this.exportType()==="file");activeBackup=Nt(()=>this.#s.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=Ge$1(false);copiedPassword=Ge$1(false);showCopyPassword=Ge$1(false);calculatePasswordStrength=Nt(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=za(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity();});disablePasswordForCommandLine=za(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(false);});submit(){if(this.exportType()==="file"&&this.exportFormSignal()?.exportPasswords===true&&!this.exportFormSignal()?.encryption){this.#n.open(h,{data:{title:$localize`Export without encryption?`,message:$localize`Are you sure you want to export your backup without encryption?`,confirmText:$localize`Yes, write plain-text passwords`,cancelText:$localize`Cancel`},closed:o=>{o&&this.submitApproved();}});return}this.submitApproved();}submitApproved(){this.isExporting.set(true),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Qu(o=>{let e=T=>{let O=Object.entries(T);return O?"?"+O.filter(([h,E])=>E!=null).map(([h,E])=>`${encodeURIComponent(h)}=${encodeURIComponent(E)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,a=t.BASE||"";return this.#r.get(`${a}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob",headers:new y(l({},t.HEADERS??{}))})}),zu(()=>this.isExporting.set(false))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",a=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${a}`),this.#i.navigate(["/"]);},error:o=>{console.error("Failed to export backup",o);}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(zu(()=>this.isExporting.set(false))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null);},error:o=>{console.error("Failed to export backup as command line",o);}});}downloadFile(o,e){let n=window.URL.createObjectURL(o),a=document.createElement("a");a.href=n,a.download=e,a.click(),window.URL.revokeObjectURL(n);}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#a(o??""),this.copiedPassword.set(true);}async#a(o){try{await navigator.clipboard.writeText(o);}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n);}catch(n){console.error("Failed to copy text: ",n);}}}generatePassword(){this.copiedPassword.set(false);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(true);}static \u0275fac=function(e){return new(e||t$1)};static \u0275cmp=hw({type:t$1,selectors:[["app-export"]],decls:26,vars:13,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let T;T=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let h;h=$localize`Password`;let E;E=$localize`Repeat password`;let J;J=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=oC(w);let H;H=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let z;z=$localize`Passwords are required`;let V;V=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let q;q=$localize`Passwords do not match`;let j;j=$localize`Passwords are required`;let W;W=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let D;D=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,D=oC(D);let Q;return Q=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,n,a,T,O,J,w,H,z,V,q,j,W,D,Q,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],[1,"type-b",3,"valueChange","value"],["value","cmd"],["value","file"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",E,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){e&1&&(Qi(0,"header")(1,"h3"),jC(2," Export backup configuration "),Qi(3,"div",16)(4,"button",17),Fg(5,0),Ig(6,"sh-icon"),jg(),$l(),Qi(7,"button",18),Hg("click",function(){return n.submit()}),Fg(8,1),Ig(9,"sh-icon"),jg(),$l()()(),Qi(10,"p"),jC(11),$l()(),Qi(12,"form",19)(13,"sh-button-group",20),lm("valueChange",function(T){return UC(n.exportType,T)||(n.exportType=T),T}),Qi(14,"button",21),Fg(15,2),Ig(16,"sh-icon"),jg(),$l(),Qi(17,"button",22),Fg(18,3),Ig(19,"sh-icon"),jg(),$l()(),Qi(20,"sh-toggle",23),Fg(21,4),Ig(22,"input",24),CD(),jg(),$l(),aT(23,be,3,0,"sh-toggle",25),aT(24,We,24,8,"div",26),aT(25,Qe,3,1,"div",27),$l()),e&2&&(CE(4),vg("routerLink",KC(12,Xe)),CE(3),Kg("loading",n.isExporting()),vg("shTooltip",n.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),CE(4),sm("#",n.activeBackup()?.Backup?.ID,": ",n.activeBackup()?.Backup?.Name),CE(),vg("formGroup",n.exportForm),CE(),cm("value",n.exportType),CE(9),_D(),CE(),cT(n.exportType()==="file"?23:-1),CE(),cT(n.encryptionFieldSignal()?24:-1),CE(),cT(n.exportedCmd()?25:-1));},dependencies:[Gn,Tn,Ze,yt,Rn,Pn,gn,hn,_t,x,J,N,Fe,v,ue,d,at],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}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"]})};export{K as default};
|
|
1
|
+
import {m,C as C$1,F}from'./chunk-1-oPQ4n-.js';import {J}from'./chunk-FZcbbWYC.js';import {x}from'./chunk-B-T54LAJ.js';import {T,a6 as be$1,ab as C,aw as W,e as ee,ax as De,a5 as g,G as Ge$1,N as Nt,z as za,at as h,ay as Qu,az as t,aA as y,aj as l,J as zu,h as hw,_ as _t,c as N,v,u as ue,Q as Qi,s as jC,F as Fg,i as Ig,j as jg,$ as $l,H as Hg,p as lm,r as CD,d as aT,C as CE,y as vg,a3 as KC,L as Kg,aB as sm,w as cm,x as _D,g as cT,o as oC,U as UC,l as vT,O as Od,k as iC,P as Pd,K as im,n as nC,au as Vg,av as rC}from'./main-XKLDSNLY.js';import {d}from'./chunk-BnFO-7ok.js';import {F as Fe}from'./chunk-DqoYKCmi.js';import {j as jn,m as me,G as Gn,T as Tn,Z as Ze,y as yt,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-BDhLEYas.js';import {a as at}from'./chunk-UUMQmD5I.js';import {L}from'./chunk-DCsYP4vf.js';var Xe=()=>["/"];function be(t,o){t&1&&(Qi(0,"sh-toggle",25),Fg(1,5),Ig(2,"input",28),CD(),jg(),$l()),t&2&&(CE(2),_D());}function Ge(t,o){t&1&&(Qi(0,"span",31),nC(1,9),$l());}function Be(t,o){if(t&1&&(Qi(0,"span",31),nC(1,10),$l()),t&2){let e=iC(2);CE(),Vg(e.exportForm.controls.password.errors?.minlength.requiredLength),rC(1);}}function ve(t,o){if(t&1&&Ig(0,"sh-progress-bar",38),t&2){let e=iC(2);Kg("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),vg("value",e.calculatePasswordStrength()*(100/5));}}function ke(t,o){t&1&&(Qi(0,"span",31),nC(1,11),$l());}function Ue(t,o){t&1&&(Qi(0,"span",31),nC(1,12),$l());}function Ke(t,o){if(t&1&&(Qi(0,"span",31),nC(1,13),$l()),t&2){let e=iC(2);CE(),Vg(e.exportForm.controls.repeatPassword.errors?.minlength.requiredLength),rC(1);}}function Je(t,o){t&1&&(Fg(0,7,1),Ig(1,"sh-icon"),jg());}function He(t,o){t&1&&(Fg(0,7,2),Ig(1,"sh-icon"),jg());}function ze(t,o){t&1&&(Fg(0,14,1),Ig(1,"sh-icon",40),jg());}function Ve(t,o){t&1&&(Fg(0,14,2),Ig(1,"sh-icon"),jg());}function qe(t,o){if(t&1){let e=vT();Qi(0,"button",39),Hg("click",function(){Od(e);let a=iC(2);return Pd(a.copyPassword())}),Fg(1,14),aT(2,ze,2,0)(3,Ve,2,0),jg(),$l();}if(t&2){let e=iC(2);CE(2),cT(e.copiedPassword()?2:3);}}function je(t,o){t&1&&(Qi(0,"sh-alert",37),nC(1,15),$l());}function We(t,o){if(t&1){let e=vT();Qi(0,"div",26)(1,"sh-form-field")(2,"label",29),Fg(3,6),Ig(4,"sup"),jg(),$l(),Ig(5,"input",30),CD(),aT(6,Ge,2,0,"span",31)(7,Be,2,1,"span",31),$l(),aT(8,ve,1,9,"sh-progress-bar",32),Qi(9,"sh-form-field"),Ig(10,"input",33),CD(),aT(11,ke,2,0,"span",31)(12,Ue,2,0,"span",31)(13,Ke,2,1,"span",31),$l(),Qi(14,"div",34)(15,"button",35),Hg("click",function(){Od(e);let a=iC();return Pd(a.showPassword.set(!a.showPassword()))}),Fg(16,7),aT(17,Je,2,0)(18,He,2,0),jg(),$l(),Qi(19,"button",35),Hg("click",function(){Od(e);let a=iC();return Pd(a.generatePassword())}),Fg(20,8),Ig(21,"sh-icon"),jg(),$l(),aT(22,qe,4,1,"button",36),$l(),aT(23,je,2,0,"sh-alert",37),$l();}if(t&2){let e=iC();CE(5),vg("type",e.showPassword()?"text":"password"),_D(),CE(),cT(e.exportForm.controls.password.errors?.required?6:e.exportForm.controls.password.errors?.minlength?7:-1),CE(2),cT(e.exportForm.value.password?8:-1),CE(2),vg("type",e.showPassword()?"text":"password"),_D(),CE(),cT(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors?.required?12:e.exportForm.controls.repeatPassword.errors?.minlength?13:-1),CE(6),cT(e.showPassword()?17:18),CE(5),cT(e.showCopyPassword()?22:-1),CE(),cT(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1);}}function Qe(t,o){if(t&1&&(Qi(0,"div",27)(1,"code"),jC(2),$l()()),t&2){let e=iC();CE(2),im(e.exportedCmd());}}var I=new jn,K=class t$1{#o=T(m);#n=T(be$1);#t=T(C);#e=T(W);#i=T(ee);#r=T(De);#s=T(g);isExporting=Ge$1(false);exportType=Ge$1("file");exportedCmd=Ge$1(null);exportForm=I.group({exportPasswords:I.control(true),encryption:I.control(false,[me.required,F()]),password:I.control("",[C$1("encryption",true,[me.required,me.minLength(3)])]),repeatPassword:I.control("",[C$1("encryption",true,[me.required,me.minLength(3)])])});exportFormSignal=L(this.exportForm.valueChanges);encryptionFieldSignal=Nt(()=>(this.exportFormSignal()?.encryption??false)&&this.exportType()==="file");activeBackup=Nt(()=>this.#s.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=Ge$1(false);copiedPassword=Ge$1(false);showCopyPassword=Ge$1(false);calculatePasswordStrength=Nt(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=za(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity();});disablePasswordForCommandLine=za(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(false);});submit(){if(this.exportType()==="file"&&this.exportFormSignal()?.exportPasswords===true&&!this.exportFormSignal()?.encryption){this.#n.open(h,{data:{title:$localize`Export without encryption?`,message:$localize`Are you sure you want to export your backup without encryption?`,confirmText:$localize`Yes, write plain-text passwords`,cancelText:$localize`Cancel`},closed:o=>{o&&this.submitApproved();}});return}this.submitApproved();}submitApproved(){this.isExporting.set(true),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Qu(o=>{let e=T=>{let O=Object.entries(T);return O?"?"+O.filter(([h,E])=>E!=null).map(([h,E])=>`${encodeURIComponent(h)}=${encodeURIComponent(E)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,a=t.BASE||"";return this.#r.get(`${a}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob",headers:new y(l({},t.HEADERS??{}))})}),zu(()=>this.isExporting.set(false))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",a=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${a}`),this.#i.navigate(["/"]);},error:o=>{console.error("Failed to export backup",o);}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(zu(()=>this.isExporting.set(false))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null);},error:o=>{console.error("Failed to export backup as command line",o);}});}downloadFile(o,e){let n=window.URL.createObjectURL(o),a=document.createElement("a");a.href=n,a.download=e,a.click(),window.URL.revokeObjectURL(n);}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#a(o??""),this.copiedPassword.set(true);}async#a(o){try{await navigator.clipboard.writeText(o);}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n);}catch(n){console.error("Failed to copy text: ",n);}}}generatePassword(){this.copiedPassword.set(false);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(true);}static \u0275fac=function(e){return new(e||t$1)};static \u0275cmp=hw({type:t$1,selectors:[["app-export"]],decls:26,vars:13,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let T;T=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let h;h=$localize`Password`;let E;E=$localize`Repeat password`;let J;J=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=oC(w);let H;H=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let z;z=$localize`Passwords are required`;let V;V=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let q;q=$localize`Passwords do not match`;let j;j=$localize`Passwords are required`;let W;W=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let D;D=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,D=oC(D);let Q;return Q=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,n,a,T,O,J,w,H,z,V,q,j,W,D,Q,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],[1,"type-b",3,"valueChange","value"],["value","cmd"],["value","file"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",E,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){e&1&&(Qi(0,"header")(1,"h3"),jC(2," Export backup configuration "),Qi(3,"div",16)(4,"button",17),Fg(5,0),Ig(6,"sh-icon"),jg(),$l(),Qi(7,"button",18),Hg("click",function(){return n.submit()}),Fg(8,1),Ig(9,"sh-icon"),jg(),$l()()(),Qi(10,"p"),jC(11),$l()(),Qi(12,"form",19)(13,"sh-button-group",20),lm("valueChange",function(T){return UC(n.exportType,T)||(n.exportType=T),T}),Qi(14,"button",21),Fg(15,2),Ig(16,"sh-icon"),jg(),$l(),Qi(17,"button",22),Fg(18,3),Ig(19,"sh-icon"),jg(),$l()(),Qi(20,"sh-toggle",23),Fg(21,4),Ig(22,"input",24),CD(),jg(),$l(),aT(23,be,3,0,"sh-toggle",25),aT(24,We,24,8,"div",26),aT(25,Qe,3,1,"div",27),$l()),e&2&&(CE(4),vg("routerLink",KC(12,Xe)),CE(3),Kg("loading",n.isExporting()),vg("shTooltip",n.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),CE(4),sm("#",n.activeBackup()?.Backup?.ID,": ",n.activeBackup()?.Backup?.Name),CE(),vg("formGroup",n.exportForm),CE(),cm("value",n.exportType),CE(9),_D(),CE(),cT(n.exportType()==="file"?23:-1),CE(),cT(n.encryptionFieldSignal()?24:-1),CE(),cT(n.exportedCmd()?25:-1));},dependencies:[Gn,Tn,Ze,yt,Rn,Pn,gn,hn,_t,x,J,N,Fe,v,ue,d,at],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}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"]})};export{K as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {OptionsListComponent as Oe}from'./chunk-DGO0_pkA.js';import {I}from'./chunk-0lYdrxte.js';import {F as Fe}from'./chunk-DqoYKCmi.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-BDhLEYas.js';import {L}from'./chunk-DCsYP4vf.js';import {T,ab as C,e as ee$1,aw as W,G as Ge,N as Nt,J as zu,h as hw,c as N,v,Q as Qi,H as Hg,d as aT,aP as ql,n as nC,aQ as Gl,p as lm,$ as $l,F as Fg,i as Ig,j as jg,y as vg,C as CE,g as cT,w as cm,a6 as be,at as h,aZ as ee$2,U as UC,r as CD,x as _D}from'./main-XKLDSNLY.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import'./chunk-5EFCeqK3.js';import'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import'./chunk-BnFO-7ok.js';import'./chunk-UUMQmD5I.js';import'./chunk-BaknLOqq.js';var d=class r{#t=T(be);destinationTargetUrl=Ge(null);destinationTestSignal=Ge(null);encryptionForm=Z();temporaryBackupId=Ge(null);updateTargetUrl(e){this.destinationTargetUrl.set(e);}showErrorDialog(e){this.#t.open(h,{data:{title:$localize`Error occured`,message:e,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{}});}static \u0275fac=function(n){return new(n||r)};static \u0275prov=ee$2({token:r,factory:r.\u0275fac,providedIn:"root"})};function ne(r,e){r&1&&(Qi(0,"p"),nC(1,3),$l());}function oe(r,e){r&1&&(Qi(0,"sh-form-field")(1,"label",11),nC(2,4),$l(),Ig(3,"input",12),CD(),$l()),r&2&&(CE(3),_D());}var ee=new jn,Z=()=>ee.group({passphrase:ee.control("")}),f=class r{#t=T(C);#e=T(d);#n=T(ee$1);#o=T(W);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=Ge(false);settings=Ge([]);hasEncryptedBackup=Nt(()=>{let e=this.#e.destinationTestSignal();return e==="testing"||typeof e=="string"?true:e?.containsEncryptedBackupFiles??true});passphraseSignal=L(this.encryptionForm.controls.passphrase.valueChanges);showEncryptionField=Ge(false);isValidConfig=Nt(()=>{if(!this.#e.destinationTargetUrl())return false;let n=this.#e.destinationTestSignal();return !(typeof n!="string"&&(n?.containsEncryptedBackupFiles??false)&&!this.passphraseSignal())});next(){let e=this.#e.destinationTargetUrl();if(!e)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let n=this.encryptionForm.value?.passphrase??null,t=[];n?t.push({Name:"--passphrase",Value:n}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(i=>{let o=i.Name?.trim();o&&o!=="--"&&(o.startsWith("--")||(o=`--${o}`),t.push({Name:o,Value:i.Value??""}));}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:e,Settings:t}},temporary:true}).pipe(zu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:i=>{let o=i.ID;this.#e.temporaryBackupId.set(o),this.#n.navigate(["../select-config"],{relativeTo:this.#o});},error:i=>{console.error(i);}});}back(){this.#n.navigate(["../destination"],{relativeTo:this.#o});}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=hw({type:r,selectors:[["app-import-destination-encryption"]],decls:14,vars:6,consts:()=>{let e;e=$localize`Advanced options`;let n;n=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let t;t=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`The backup does not contain encrypted files.`;let o;o=$localize`Enter backup passphrase if defined.`;let P;return P=$localize`Password`,[e,n,t,i,P,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",o,"formControlName","passphrase"]]},template:function(n,t){n&1&&(Qi(0,"form",5),Hg("submit",function(){return t.next()}),aT(1,ne,2,0,"p"),aT(2,oe,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),ql(4,6),nC(5,0),Gl(),Qi(6,"app-options-list",7),lm("optionsChange",function(o){return UC(t.settings,o)||(t.settings=o),o}),$l()(),Qi(7,"div",8)(8,"button",9),Hg("click",function(){return t.back()}),Fg(9,1),Ig(10,"sh-icon"),jg(),$l(),Qi(11,"button",10),Fg(12,2),Ig(13,"sh-icon"),jg(),$l()()()),n&2&&(vg("formGroup",t.encryptionForm),CE(),cT(t.hasEncryptedBackup()?-1:1),CE(),cT(t.hasEncryptedBackup()||t.showEncryptionField()?2:-1),CE(4),cm("options",t.settings),vg("hasFreeTextSettings",true),CE(5),vg("disabled",!t.isValidConfig()));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe,N,v,I,Oe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var chunkD5MQONXY=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:Z,default:f});export{chunkD5MQONXY as c,d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {T,ab as C,a6 as be,a5 as g,e as ee$1,E as E1,N as Nt,G as Ge,z as za,at as h,J as zu,h as hw,v,_ as _t,aH as m,b2 as m$1,Q as Qi,n as nC,$ as $l,d as aT,H as Hg,C as CE,au as Vg,av as rC,g as cT,y as vg,a3 as KC,L as Kg,i as Ig,a1 as dT,k as iC,a2 as fT,F as Fg,aM as ob,j as jg,aN as ab,s as jC,K as im,aR as sb}from'./main-
|
|
1
|
+
import {T,ab as C,a6 as be,a5 as g,e as ee$1,E as E1,N as Nt,G as Ge,z as za,at as h,J as zu,h as hw,v,_ as _t,aH as m,b2 as m$1,Q as Qi,n as nC,$ as $l,d as aT,H as Hg,C as CE,au as Vg,av as rC,g as cT,y as vg,a3 as KC,L as Kg,i as Ig,a1 as dT,k as iC,a2 as fT,F as Fg,aM as ob,j as jg,aN as ab,s as jC,K as im,aR as sb}from'./main-XKLDSNLY.js';import {f}from'./chunk-CTH9uShX.js';import {d}from'./chunk-BnFO-7ok.js';import {$}from'./chunk-DCsYP4vf.js';var W=()=>["/"],Y=(n,e)=>e.FilesetID,Z=(n,e)=>e.Path;function ee(n,e){n&1&&(Qi(0,"div",6),Ig(1,"sh-progress-bar",12),Qi(2,"p"),nC(3,3),$l()());}function ie(n,e){n&1&&(Qi(0,"div",7)(1,"p"),nC(2,4),$l()());}function ne(n,e){if(n&1&&(Qi(0,"span",18),jC(1),ob(2,"bytes"),$l()),n&2){let i=iC().$implicit;CE(),im(sb(2,1,i.Size));}}function te(n,e){if(n&1&&(Qi(0,"div",16)(1,"span",17),jC(2),$l(),aT(3,ne,3,3,"span",18),$l()),n&2){let i=e.$implicit;CE(2),im(i.Path),CE(),cT(i.Size?3:-1);}}function oe(n,e){if(n&1&&(Qi(0,"sh-card",13)(1,"h3")(2,"span"),Fg(3,5),Ig(4,"span",14),ob(5,"relativeTime"),jg(),$l()(),Qi(6,"div",15),dT(7,te,4,2,"div",16,Z),$l()()),n&2){let i=iC().$implicit;CE(5),Vg(i.FilesetID)(ab(5,2,i.FilesetTime,true)),rC(3),CE(2),fT(i.Files);}}function le(n,e){if(n&1&&aT(0,oe,9,5,"sh-card",13),n&2){let i=e.$implicit;cT(i.Files?.length?0:-1);}}function ae(n,e){if(n&1&&(Qi(0,"div",8),dT(1,le,1,1,null,null,Y),$l()),n&2){let i=iC();CE(),fT(i.filesets());}}var B=class n{#e=T(C);#i=T(be);#n=T(g);#t=T(ee$1);id=E1.required();backup=Nt(()=>this.#n.getBackupById(this.id()));brokenFilesResource=$({params:()=>({id:this.id()}),stream:({params:e})=>this.#e.postApiV2BackupListBrokenFiles({requestBody:{BackupId:e.id}})});isLoading=Nt(()=>this.brokenFilesResource.isLoading());isPurging=Ge(false);filesets=Ge([]);constructor(){za(()=>{let e=this.brokenFilesResource.value();if(e){let i=(e.Data??[]).slice().sort((t,r)=>t.FilesetTime<r.FilesetTime?1:t.FilesetTime>r.FilesetTime?-1:0);this.filesets.set(i);}});}totalFiles=Nt(()=>this.filesets().reduce((e,i)=>e+(i.Files?.length??0),0));hasBrokenFiles=Nt(()=>this.totalFiles()>0);purgeBrokenFiles(){let e=this.totalFiles();e!==0&&this.#i.open(h,{data:{title:$localize`Confirm purge`,message:$localize`Are you sure you want to fully remove ${e} broken file(s)?`,confirmText:$localize`Purge broken files`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.isPurging.set(true),this.#e.postApiV2BackupPurgeBrokenFiles({requestBody:{BackupId:this.id()}}).pipe(zu(()=>this.isPurging.set(false))).subscribe({next:()=>{this.#t.navigate(["/"]);}}));}});}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hw({type:n,selectors:[["app-broken-files"]],inputs:{id:[1,"id"]},decls:10,vars:8,consts:()=>{let e;e=$localize`Purge broken files for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;i=$localize`Cancel`;let t;t=$localize` Purge broken files `;let r;r=$localize`Checking for broken files...`;let R;R=$localize`No broken files found for this backup.`;let k;return k=$localize` Version ${"\uFFFD0\uFFFD"}:INTERPOLATION: at ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:${"\uFFFD1\uFFFD"}:INTERPOLATION_1:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`,[e,i,t,r,R,k,[1,"loading-state"],[1,"empty-state"],[1,"fileset-list"],[1,"actions"],["shButton","",3,"routerLink","disabled"],["shButton","",1,"raised","error",3,"click","disabled"],[1,"primary","indeterminate"],[1,"type-a","full-width"],[1,"time"],[1,"file-list"],[1,"file"],[1,"path"],[1,"size"]]},template:function(i,t){i&1&&(Qi(0,"h3"),nC(1,0),$l(),aT(2,ee,4,0,"div",6)(3,ie,3,0,"div",7)(4,ae,3,0,"div",8),Qi(5,"div",9)(6,"button",10),nC(7,1),$l(),Qi(8,"button",11),Hg("click",function(){return t.purgeBrokenFiles()}),nC(9,2),$l()()),i&2&&(CE(),Vg(t.backup()?.Backup?.Name),rC(1),CE(),cT(t.isLoading()?2:t.hasBrokenFiles()?4:3),CE(4),vg("routerLink",KC(7,W))("disabled",t.isPurging()),CE(2),Kg("loading",t.isPurging()),vg("disabled",t.isPurging()||!t.hasBrokenFiles()||t.isLoading()));},dependencies:[v,f,d,_t,m,m$1],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h3[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{font:var(--text-20);opacity:.7;margin-left:.5rem}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{padding:2rem 0;display:flex;flex-direction:column;gap:1rem}.fileset-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin:1rem 0}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;padding-top:.5rem}.file[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:baseline}.file[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{word-break:break-all}.file[_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{white-space:nowrap;opacity:.7}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"]})};export{B as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {e as ee}from'./chunk-i6kMmbhY.js';import'./chunk-Du0Hd0t6.js';import'./chunk-BFquKzMb.js';import'./chunk-D7C8xyJI.js';import {u as ut,_ as _n,p as pt,o as on,s as sn}from'./chunk-D6WUhpxO.js';import'./chunk-1-oPQ4n-.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import'./chunk-0lYdrxte.js';import'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import {h,G,V}from'./chunk-5EFCeqK3.js';import'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import {c}from'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {T,a5 as g,a6 as be$1,D as w1,G as Ge$1,N as Nt,z as za,at as h$1,h as hw,v,c as N,i as Ig,Q as Qi,d as aT,$ as $l,C as CE,g as cT,o as oC,M as qg,R as fC,n as nC,k as iC,l as vT,H as Hg,O as Od,P as Pd,s as jC,F as Fg,j as jg,au as Vg,av as rC,L as Kg,y as vg,a1 as dT,ap as lT,a2 as fT,p as lm,U as UC,r as CD,w as cm,x as _D,K as im}from'./main-XKLDSNLY.js';import {f}from'./chunk-CTH9uShX.js';import {d}from'./chunk-BnFO-7ok.js';import {F as Fe$1}from'./chunk-DqoYKCmi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';function Ee(n,t){n&1&&(Qi(0,"div",13),Ig(1,"sh-progress-bar",14),Qi(2,"div",15)(3,"h3"),nC(4,2),$l()()());}function Fe(n,t){n&1&&(Qi(0,"sh-divider"),nC(1,5),$l());}function Ie(n,t){if(n&1&&(Qi(0,"p",20),jC(1),$l()),n&2){let e=iC().$implicit;CE(),im(e.Description);}}function Ne(n,t){if(n&1&&(Qi(0,"p",20),jC(1),$l()),n&2){let e=iC().$implicit,o=iC(3);CE(),im(o.getSimplePath(e.BaseUrl));}}function ye(n,t){if(n&1){let e=vT();Qi(0,"button",25),Hg("click",function(i){Od(e);let r=iC().$implicit,f=iC(3);return Pd(f.updateBackupsSync(r,i))}),jC(1," Update backups "),$l();}if(n&2){let e=iC(4);vg("disabled",e.isSaving());}}function he(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list-item",18),Hg("click",function(){let i=Od(e).$implicit,r=iC(3);return Pd(r.selectDestination(i))}),Qi(1,"h3",19),jC(2),$l(),aT(3,Ie,2,1,"p",20)(4,Ne,2,1,"p",20),Qi(5,"div",21),aT(6,ye,2,1,"button",22),Qi(7,"button",23),Hg("click",function(i){let r=Od(e).$implicit,f=iC(3);return Pd(f.deleteDestination(r.ID,i))}),Qi(8,"sh-icon"),jC(9,"trash"),$l()(),Qi(10,"button",24),Fg(11,6),Ig(12,"sh-icon"),jg(),$l()()();}if(n&2){let e=t.$implicit,o=iC(3);vg("targetUrl",e.BaseUrl),CE(2),im(e.Name||e.BaseUrl),CE(),cT(e.Description?3:4),CE(3),cT(o.isOutOfSync(e)?6:-1);}}function Oe(n,t){if(n&1){let e=vT();Qi(0,"sh-card",16),Hg("click",function(){Od(e);let i=iC(2);return Pd(i.selectDestination("new"))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"sh-icon"),jC(2,"plus-circle"),$l(),Qi(3,"div",15)(4,"h3"),nC(5,3),$l(),Qi(6,"p"),nC(7,4),$l()()(),aT(8,Fe,2,0,"sh-divider"),dT(9,he,13,4,"app-destination-list-item",17,lT);}if(n&2){let e=iC(2);CE(8),cT(e.destinations().length>0?8:-1),CE(),fT(e.destinations());}}function xe(n,t){if(n&1&&(Qi(0,"h2"),nC(1,1),$l(),aT(2,Ee,5,0,"div",13)(3,Oe,11,1)),n&2){let e=iC();CE(2),cT(e.isLoading()?2:3);}}function Be(n,t){n&1&&nC(0,10,1);}function Pe(n,t){n&1&&nC(0,10,2);}function Ae(n,t){n&1&&nC(0,10,3);}function Me(n,t){if(n&1){let e=vT();Qi(0,"button",37),Hg("click",function(){Od(e);let i=iC(2);return Pd(i.testDestination())}),Fg(1,10),aT(2,Be,1,0)(3,Pe,1,0)(4,Ae,1,0),jg(),$l();}if(n&2){let e=iC(2);vg("disabled",e.testSignal()=="testing"),CE(2),cT(e.testSignal()=="testing"?2:e.testResponse()?.action==="success"?3:4);}}function be(n,t){if(n&1){let e=vT();Qi(0,"div",32)(1,"sh-form-field")(2,"label"),nC(3,11),$l(),Qi(4,"input",38),lm("ngModelChange",function(i){Od(e);let r=iC(2);return UC(r.editName,i)||(r.editName=i),Pd(i)}),$l(),CD(),$l()();}if(n&2){let e=iC(2);CE(4),cm("ngModel",e.editName),_D();}}function $e(n,t){if(n&1){let e=vT();Qi(0,"app-test-url",39,0),lm("targetUrlChange",function(i){Od(e);let r=iC(2);return UC(r.editBaseUrl,i)||(r.editBaseUrl=i),Pd(i)})("testSignalChange",function(i){Od(e);let r=iC(2);return UC(r.testSignal,i)||(r.testSignal=i),Pd(i)}),$l();}if(n&2){let e=iC(2);cm("targetUrl",e.editBaseUrl)("testSignal",e.testSignal),vg("connectionStringId",e.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",true)("askToCreate",true)("testExpectation","any")("readOnlyTest",false)("moduleType","Backend");}}function ke(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list-item",40)(1,"button",41),Hg("click",function(){Od(e);let i=iC(2);return Pd(i.removeDestination())}),nC(2,12),$l()(),Qi(3,"app-single-destination",42),lm("targetUrlChange",function(i){Od(e);let r=iC(2);return UC(r.editBaseUrl,i)||(r.editBaseUrl=i),Pd(i)}),$l();}if(n&2){let e=iC(2);vg("targetUrl",e.editBaseUrl()),CE(3),cm("targetUrl",e.editBaseUrl);}}function Re(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list",43),Hg("setDestination",function(i){Od(e);let r=iC(2);return Pd(r.setDestination(i))}),$l();}}function Le(n,t){n&1&&nC(0,9,1);}function we(n,t){n&1&&nC(0,9,2);}function Ue(n,t){n&1&&nC(0,9,3);}function ve(n,t){n&1&&nC(0,9,4);}function Ge(n,t){if(n&1){let e=vT();Qi(0,"header",26)(1,"button",23),Hg("click",function(){Od(e);let i=iC();return Pd(i.cancelEdit())}),Qi(2,"sh-icon"),jC(3,"arrow-left"),$l()()(),Qi(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),nC(8,7),$l(),Qi(9,"div",30),aT(10,Me,5,2,"button",31),$l()(),aT(11,be,5,1,"div",32),aT(12,$e,2,10,"app-test-url",33),aT(13,ke,4,2)(14,Re,1,0,"app-destination-list"),$l(),Qi(15,"div",34)(16,"button",35),Hg("click",function(){Od(e);let i=iC();return Pd(i.cancelEdit())}),nC(17,8),$l(),Qi(18,"button",36),Hg("click",function(){Od(e);let i=iC();return Pd(i.testResponse()?.action==="success"||i.testResponse()?.action==="missing-folder"||!i.isUrlChanged()?i.save():i.testDestination())}),Fg(19,9),aT(20,Le,1,0)(21,we,1,0)(22,Ue,1,0)(23,ve,1,0),jg(),$l()()();}if(n&2){let e=iC();CE(8),Vg(e.selectedDestination()==="new"?"New Destination":"Edit Destination"),rC(8),CE(2),cT(e.editBaseUrl()?10:-1),CE(),cT(e.selectedDestination()!=="new"?11:-1),CE(),cT(e.editBaseUrl()?12:-1),CE(),cT(e.editBaseUrl()?13:14),CE(5),Kg("primary",e.testResponse()?.action==="success"||!e.isUrlChanged())("warn",e.isUrlChanged()&&e.testSignal()===null||e.testSignal()==="testing"||e.testResponse()?.action==="missing-folder")("error",e.testResponse()&&e.testResponse()?.action!=="success"&&e.testResponse()?.action!=="missing-folder"),vg("disabled",!e.editBaseUrl()||e.isSaving()||e.testSignal()==="testing"),CE(2),cT(e.isSaving()?20:e.testSignal()==="testing"?21:e.testResponse()?.action==="success"||e.testResponse()?.action==="missing-folder"||!e.isUrlChanged()?22:23);}}var R=class n{#e=T(ut);#t=T(g);#n=T(be$1);getSimplePath=h;backups=this.#t.backups;constructor(){this.#t.getBackups();}isSaving=this.#e.isSaving;destinations=this.#e.destinations;isLoading=this.#e.resourceDestinations.isLoading;testUrl=w1(_n);selectedDestination=Ge$1(null);selectedDestinationId=Nt(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=Ge$1(null);editDescription=Ge$1(null);editBaseUrl=Ge$1(null);initialBaseUrl=Ge$1(null);isUrlChanged=Nt(()=>{let t=this.editBaseUrl(),e=this.initialBaseUrl();return this.selectedDestination()==="new"?true:t!==e});testSignal=Ge$1(null);testResponse=Nt(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});getOutOfSyncBackupIds(t){if(!t.Backups)return [];let e=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return t.Backups.filter(o=>{let i=e.get(o.ID);return i&&i.TargetURL!==t.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(t){return this.getOutOfSyncBackupIds(t).length>0}#i=za(()=>{this.editBaseUrl(),this.testSignal.set(null);});selectDestination(t){this.selectedDestination.set(t),this.testSignal.set(null),t==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(t.Name),this.editDescription.set(t.Description),this.editBaseUrl.set(t.BaseUrl),this.initialBaseUrl.set(t.BaseUrl),this.#e.getById(t.ID).subscribe(e=>{e.Data&&(this.editName.set(e.Data.Name),this.editDescription.set(e.Data.Description),this.editBaseUrl.set(e.Data.BaseUrl??null),this.initialBaseUrl.set(e.Data.BaseUrl??null));}));}cancelEdit(){this.selectedDestination.set(null);}setDestination(t){let e=G(t??"");if(e){if(e.mapper.default){let o=e.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${t}://`);}}removeDestination(){this.editBaseUrl.set(null);}async testDestination(){(await this.testUrl()?.testDestination(false))?.action==="missing-folder"&&this.promptCreateFolder();}promptCreateFolder(){this.#n.open(h$1,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:t=>{t&&this.testUrl()?.createFolder();}});}save(){let t=this.selectedDestination();t&&this.performSave(t);}performSave(t){let e=this.editName(),o=this.editDescription(),i=this.editBaseUrl();if(t==="new"){let I=V(i??"")?.displayName??"Destination",y=this.destinations().filter(F=>F.Name?.startsWith(I)).length;e=`${I} #${y+1}`,o=null;}let r={Name:e,Description:o,BaseUrl:i};this.#e.save(t,r).subscribe(()=>{this.selectedDestination.set(null),this.#e.reload(),this.#t.getBackups(true);});}updateBackupsSync(t,e){e.stopPropagation();let o=this.getOutOfSyncBackupIds(t);this.#n.open(h$1,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#e.updateBackups(t.ID,o).subscribe(()=>{this.#e.reload(),this.#t.getBackups(true);});}});}deleteDestination(t,e){e.stopPropagation(),this.#n.open(h$1,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#e.delete(t).subscribe(()=>{this.#e.reload();});}});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-destinations"]],viewQuery:function(e,o){e&1&&qg(o.testUrl,_n,5),e&2&&fC();},decls:4,vars:1,consts:()=>{let t;t=$localize`Destinations`;let e;e=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let i;i=$localize`Configure a new storage location.`;let r;r=$localize`Or manage your saved destinations`;let f;f=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let y;y=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=oC(F);let L;L=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let U;U=$localize`Name`;let v;return v=$localize`Change`,[["testUrl",""],t,e,o,i,r,f,I,y,F,L,U,v,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button",1,"small","ghost",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button",1,"small","ghost",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button",1,"ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(e,o){e&1&&(Ig(0,"app-status-bar"),Qi(1,"section"),aT(2,xe,4,1)(3,Ge,24,13),$l()),e&2&&(CE(2),cT(o.selectedDestination()===null?2:3));},dependencies:[pt,on,sn,ee,d,v,N,f,Fe$1,c,_n,Bn,Ze,Rn,Jt],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"]})};
|
|
2
|
+
export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {h as hw,Z as lr,i as Ig}from'./main-
|
|
1
|
+
import {h as hw,Z as lr,i as Ig}from'./main-XKLDSNLY.js';var t=class o{static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-welcome"]],decls:1,vars:0,template:function(e,m){e&1&&Ig(0,"router-outlet");},dependencies:[lr],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100vh}"]})};export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as at}from'./chunk-
|
|
1
|
+
import {a as at}from'./chunk-UUMQmD5I.js';import {C}from'./chunk-B8PnvglY.js';import {O}from'./chunk-CsgB8OpN.js';import {T as T$1,e as ee,G as Ge,z as za,h as hw,v,a0 as de,c as N,Q as Qi,H as Hg,n as nC,$ as $l,a1 as dT,p as lm,s as jC,i as Ig,C as CE,a2 as fT,w as cm,y as vg,L as Kg,a3 as KC,a4 as uT,U as UC,K as im}from'./main-XKLDSNLY.js';import {U}from'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';var D=()=>({maxWidth:"520px",width:"100%"});function z(r,i){if(r&1&&(Qi(0,"div",11)(1,"sh-icon",26),jC(2,"check-circle"),$l(),Qi(3,"span"),jC(4),$l()()),r&2){let o=i.$implicit;CE(4),im(o);}}function J(r,i){if(r&1&&(Qi(0,"div",11)(1,"sh-icon",26),jC(2,"check-circle"),$l(),Qi(3,"span"),jC(4),$l()()),r&2){let o=i.$implicit;CE(4),im(o);}}var T=class r{#n=T$1(O);#e=T$1(ee);#t=T$1(C);hoveringConnect=Ge(false);skipDialogOpen=Ge(false);hasConnectionLink=Ge(false);primaryBenefits=[$localize`Zero-configuration cloud storage`,$localize`Centralized backup reporting and monitoring`,$localize`Remote management from the dashboard`,$localize`Notifications if backups stop running`];secondaryBenefits=[$localize`Get notified if your backups stop working`,$localize`Access AI powered troubleshooting`,$localize`View all backups from one place`];#i=za(()=>{let i=this.#t.state();i=="unknown"||i=="inactive"||this.setWelcomeShown();});setWelcomeShown(){this.#n.setShownWelcomePage().subscribe(()=>{this.#e.navigate([""]);});}openSkipDialog(){this.skipDialogOpen.set(true);}connect(){let i=this.hasConnectionLink()?"/welcome/connect/link":"/welcome/connect/logon";this.#e.navigate([i]);}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=hw({type:r,selectors:[["app-select"]],decls:36,vars:7,consts:()=>{let i;i=$localize`Proceed without connecting to console`;let o;o=$localize`Connect to console`;let n;n=$localize`Consolidate all your backup reports in one place.`;let l;l=$localize`I have a connection link`;let c;c=$localize`Are you sure?`;let O;O=$localize`Cancel`;let b;return b=$localize`Proceed without connecting`,[i,o,n,l,c,O,b,[1,"left"],[1,"actionables"],[1,"without-connecting",3,"click"],[1,"benefits"],[1,"benefit"],["shButton","",1,"connect","outlined","primary",3,"mouseenter","mouseleave","click"],[1,"action"],[1,"connection-link-label"],[1,"primary","raised","connection-link-check",3,"checkedChange","checked"],[3,"shTooltip"],[1,"right"],["src","assets/images/console.avif","alt",""],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"dialog-benefits-header"],[1,"dialog-benefits"],["footer",""],["type","button","shButton","",1,"outlined",3,"click"],[1,"primary"]]},template:function(o,n){o&1&&(Qi(0,"section",7)(1,"div",8)(2,"div",9),Hg("click",function(){return n.openSkipDialog()}),nC(3,0),$l(),Qi(4,"div",10),dT(5,z,5,1,"div",11,uT),$l(),Qi(7,"button",12),Hg("mouseenter",function(){return n.hoveringConnect.set(true)})("mouseleave",function(){return n.hoveringConnect.set(false)})("click",function(){return n.connect()}),Qi(8,"div",13)(9,"h2"),nC(10,1),$l(),Qi(11,"p"),nC(12,2),$l()()(),Qi(13,"div",14)(14,"sh-checkbox",15),lm("checkedChange",function(c){return UC(n.hasConnectionLink,c)||(n.hasConnectionLink=c),c}),$l(),Qi(15,"span"),nC(16,3),$l(),Qi(17,"sh-icon",16),jC(18," information "),$l()()()(),Qi(19,"section",17),Ig(20,"img",18),$l(),Qi(21,"sh-dialog",19),lm("isOpenChange",function(c){return UC(n.skipDialogOpen,c)||(n.skipDialogOpen=c),c}),Qi(22,"header",20)(23,"h3"),nC(24,4),$l()(),Qi(25,"div",21)(26,"h4",22),jC(27," You can use Duplicati without a Console connection, but connecting to the Console will expand the capabilities of Duplicati. "),$l(),Qi(28,"div",23),dT(29,J,5,1,"div",11,uT),$l()(),Qi(31,"footer",24)(32,"button",25),Hg("click",function(){return n.skipDialogOpen.set(false)}),nC(33,5),$l(),Qi(34,"button",25),Hg("click",function(){return n.setWelcomeShown()}),nC(35,6),$l()()()),o&2&&(CE(5),fT(n.primaryBenefits),CE(9),cm("checked",n.hasConnectionLink),CE(3),vg("shTooltip","Connection links are used for Enterprise and large-scale installations"),CE(2),Kg("hovering",n.hoveringConnect()),CE(2),cm("isOpen",n.skipDialogOpen),vg("options",KC(6,D)),CE(8),fT(n.secondaryBenefits));},dependencies:[v,U,de,N,at],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;color:var(--base-11)}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer;margin:0}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.dialog-benefits-header[_ngcontent-%COMP%]{margin-bottom:1rem}.dialog-benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-bottom:2rem}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;color:var(--base-11)}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.connection-link-label[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem}"]})};export{T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {T,ae as eo,bu as N,D as w1,bU as B$1,af as D1,bV as re,E as E1,bb as ce,h as hw,c as N$1,S as aC,Q as Qi,s as jC,$ as $l,Y as cC,d as aT,f as NC,C as CE,g as cT,H as Hg,aC as yg,M as qg,R as fC,l as vT,O as Od,k as iC,P as Pd,y as vg}from'./main-
|
|
1
|
+
import {T,ae as eo,bu as N,D as w1,bU as B$1,af as D1,bV as re,E as E1,bb as ce,h as hw,c as N$1,S as aC,Q as Qi,s as jC,$ as $l,Y as cC,d as aT,f as NC,C as CE,g as cT,H as Hg,aC as yg,M as qg,R as fC,l as vT,O as Od,k as iC,P as Pd,y as vg}from'./main-XKLDSNLY.js';var B=["internalInput"],K=["*"];function Q(i,T){if(i&1){let t=vT();Qi(0,"input",6,0),Hg("change",function(n){Od(t);let u=iC();return Pd(u.onInternalInputChange(n))}),$l();}if(i&2){let t=iC();vg("checked",t.checked()),yg("disabled",t.disabled()?"":null);}}var U=(()=>{class i{constructor(){this.#e=T(eo),this.#n=T(N),this.internalInput=w1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=D1(false),this.currentClassList=re(),this.color=E1(null),this.variant=E1(null),this.readonly=E1(false),this.disabled=E1(false),this.noInternalInput=E1(false),this.hostClasses=ce("checkbox",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#n;onInternalInputChange(t){if(this.disabled())return;let e=t.target;this.checked.set(e.checked);}onKeyDown(t){if(this.#n.matches(t,"checkbox.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),t.preventDefault();}}static{this.\u0275fac=function(e){return new(e||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-checkbox"]],viewQuery:function(e,n){e&1&&qg(n.internalInput,B,5),e&2&&fC();},hostVars:6,hostBindings:function(e,n){e&1&&Hg("keydown",function(L){return n.onKeyDown(L)}),e&2&&(yg("disabled",n.disabled()?"":null)("role",n.noInternalInput()?"checkbox":null)("aria-checked",n.noInternalInput()?n.checked():null)("tabindex",n.noInternalInput()?n.disabled()?"-1":"0":null),NC(n.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:K,decls:8,vars:3,consts:[["internalInput",""],[1,"box","sh-sheet"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"],[1,"label"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,n){e&1&&(aC(),Qi(0,"div",1)(1,"sh-icon",2),jC(2,"check-bold"),$l(),Qi(3,"sh-icon",3),jC(4,"minus-bold"),$l()(),Qi(5,"div",4),cC(6),$l(),aT(7,Q,2,2,"input",5)),e&2&&(NC(n.currentClassList()),CE(7),cT(n.projectedInputs().length===0&&!n.noInternalInput()?7:-1));},dependencies:[N$1],styles:[`sh-checkbox .sh-sheet{--box-bw: .0625rem;--box-bc: var(--sheet-bc);--sheet-s: var(--shape-1)}sh-checkbox{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;border:0}sh-checkbox:focus-visible>.box,sh-checkbox:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-checkbox>input.internal-input,sh-checkbox .label>input{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-checkbox>input.internal-input:focus,sh-checkbox>input.internal-input:focus-visible,sh-checkbox .label>input:focus,sh-checkbox .label>input:focus-visible{outline:none}sh-checkbox:has(.label>input)>input.internal-input{display:none}sh-checkbox .label:empty{display:none}sh-checkbox:has(input[disabled]),sh-checkbox[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-checkbox .box{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;cursor:pointer;position:relative;border:var(--box-bw) solid var(--box-bc)}sh-checkbox .box sh-icon{opacity:0;font-weight:700;transition:opacity 75ms linear}sh-checkbox .box sh-icon.indeterminate-indicator{display:none}sh-checkbox.raised:not(:has(input:checked)):not(.active) .box,sh-checkbox.flat:not(:has(input:checked)):not(.active) .box{background:transparent;border:var(--border-10);border-color:var(--box-bc)}sh-checkbox.indeterminate .box sh-icon.indeterminate-indicator{display:block}sh-checkbox.indeterminate .box sh-icon.default-indicator{display:none}sh-checkbox:has(input:checked) .box sh-icon,sh-checkbox.indeterminate .box sh-icon,sh-checkbox.active .box sh-icon{opacity:1}sh-checkbox:hover .box sh-icon{opacity:.5}
|
|
2
2
|
`],encapsulation:2});}}return i})();export{U};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {T,N as Nt,h as hw,V as Ul,s as jC,X as Wl,d as aT,C as CE,g as cT,ab as C,G as Ge,J as zu,aZ as ee,a1 as dT,k as iC,ag as Yg,a2 as fT,K as im,ap as lT}from'./main-
|
|
1
|
+
import {T,N as Nt,h as hw,V as Ul,s as jC,X as Wl,d as aT,C as CE,g as cT,ab as C,G as Ge,J as zu,aZ as ee,a1 as dT,k as iC,ag as Yg,a2 as fT,K as im,ap as lT}from'./main-XKLDSNLY.js';var l=class e{#e=T(C);isLoaded=Ge(false);crashLog=Ge(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(zu(()=>this.isLoaded.set(true))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null);}});}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})};function P(e,t){e&1&&(Ul(0,"div",0),jC(1,"Loading ..."),Wl());}function O(e,t){e&1&&(Ul(0,"div",0),jC(1,"No crash log found"),Wl());}function S(e,t){if(e&1&&(Ul(0,"li"),jC(1),Wl()),e&2){let n=t.$implicit;CE(),im(n);}}function w(e,t){if(e&1&&(Ul(0,"div",2)(1,"code")(2,"ol",3),dT(3,S,2,1,"li",null,lT),Wl()()()),e&2){let n=iC();Yg("grid-column","1 / -1")("height","auto"),CE(3),fT(n.breakIntoLines(n.crashLog()));}}var m=class e{#e=T(l);logsLoading=Nt(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load();}breakIntoLines(t){return t?t.split(`
|
|
2
2
|
`):[]}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=hw({type:e,selectors:[["app-crashlogs"]],decls:5,vars:1,consts:[[1,"loading"],[2,"white-space","pre-wrap",3,"grid-column","height"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]],template:function(n,d){n&1&&(Ul(0,"h3"),jC(1,"Crash log"),Wl(),aT(2,P,2,0,"div",0)(3,O,2,0,"div",0)(4,w,5,4,"div",1)),n&2&&(CE(2),cT(d.logsLoading()?2:d.crashLog()==null||d.crashLog()?.length===0?3:4));},styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) 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}"]})};export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {ShipTable as ot}from'./chunk-
|
|
1
|
+
import {ShipTable as ot}from'./chunk-xwdrpTfz.js';import'./chunk-Cv4o9u3S.js';import'./chunk-BnFO-7ok.js';import {T,ab as C,G as Ge,z as za,J as zu,ai as m,aj as l,h as hw,c as N,v,aJ as ci,Q as Qi,n as nC,$ as $l,i as Ig,a1 as dT,H as Hg,F as Fg,d as aT,j as jg,ag as Yg,y as vg,C as CE,a2 as fT,g as cT,l as vT,O as Od,k as iC,P as Pd,s as jC,aM as ob,K as im,aN as ab,L as Kg,ap as lT}from'./main-XKLDSNLY.js';function X(o,e){if(o&1&&(Qi(0,"li"),jC(1),$l()),o&2){let t=e.$implicit;CE(),im(t);}}function j(o,e){if(o&1&&(Qi(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),dT(4,X,2,1,"li",null,lT),$l()()()()),o&2){let t=iC().$implicit,n=iC();CE(),Yg("grid-column","1 / -1")("height","auto"),CE(3),fT(n.breakIntoLines(t.Exception));}}function K(o,e){if(o&1){let t=vT();Qi(0,"tr",9),Hg("click",function(){let _=Od(t).$index,m=iC();return Pd(m.toggleRow(_))}),Qi(1,"td"),jC(2),ob(3,"date"),$l(),Qi(4,"td",10),jC(5),$l(),Qi(6,"td"),jC(7),$l(),Qi(8,"td")(9,"button",11)(10,"sh-icon"),jC(11,"caret-down"),$l()()()(),aT(12,j,6,4,"tr");}if(o&2){let t=e.$implicit,n=e.$index,_=iC();CE(2),im(t.Timestamp?ab(3,6,t.Timestamp*1e3,"medium"):"-"),CE(3),im(t.BackupID>=0?t.BackupID:"-"),CE(2),im(t.Message),CE(2),Kg("rotated-icon",n===_.openRowIndex()),CE(3),cT(n===_.openRowIndex()?12:-1);}}function V(o,e){o&1&&nC(0,4,1);}function q(o,e){o&1&&nC(0,4,2);}var H=["BackupID","Timestamp","Message","actions"],M=class o{#e=T(C);displayedColumns=Ge(H);openRowIndex=Ge(null);noMoreItems=Ge(false);logsIsLoading=Ge(false);logs=Ge([]);pagination=Ge({offsetTime:void 0,pagesize:10});paginationEffect=za(()=>{this.pagination();this.getLogs();});ngOnInit(){this.getLogs();}getLogs(){this.logsIsLoading.set(true);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(zu(()=>this.logsIsLoading.set(false))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(true),this.logs.update(n=>[...n,...t]);}});}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e);}breakIntoLines(e){return e?e.split(`
|
|
2
2
|
`):[]}loadMore(){let e=this.logs().at(-1)?.Timestamp;this.pagination.update(t=>m(l({},t),{offsetTime:e}));}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=hw({type:o,selectors:[["app-logs-stored"]],decls:18,vars:6,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let _;_=$localize`No data available`;let m;return m=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: No more items ${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*17:2\uFFFD"}:START_BLOCK_ELSE: Load more ${"\uFFFD/*17:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,[e,t,n,_,m,[1,"type-b",3,"data","loading"],["thead",""],["table-no-rows",""],["shButton","",1,"primary","raised",3,"click","disabled"],[3,"click"],[1,"id"],["shButton","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){if(t&1&&(Qi(0,"sh-table",5)(1,"tr",6)(2,"th"),nC(3,0),$l(),Qi(4,"th"),nC(5,1),$l(),Qi(6,"th"),nC(7,2),$l(),Ig(8,"th"),$l(),dT(9,K,13,9,null,null,lT),Qi(11,"div",7),nC(12,3),$l()(),Qi(13,"footer")(14,"button",8),Hg("click",function(){return n.loadMore()}),Fg(15,4),aT(16,V,1,0)(17,q,1,0),jg(),$l()()),t&2){let _=n.logs();Yg("grid-template-columns","1fr 1fr 1fr auto"),vg("data",_)("loading",n.logsIsLoading()),CE(9),fT(_),CE(5),vg("disabled",n.logsIsLoading()||n.noMoreItems()),CE(2),cT(n.noMoreItems()?16:17);}},dependencies:[ot,N,v,ci],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) 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}footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 0 0}"]})};export{M as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {G}from'./chunk-DnTA-m4k.js';import {w as w$1}from'./chunk-B-c3Zv6R.js';import'./chunk-DGO0_pkA.js';import {e as ee$1}from'./chunk-i6kMmbhY.js';import'./chunk-Du0Hd0t6.js';import'./chunk-BFquKzMb.js';import'./chunk-D7C8xyJI.js';import {V as Ve}from'./chunk-D6WUhpxO.js';import'./chunk-1-oPQ4n-.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import'./chunk-0lYdrxte.js';import'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import'./chunk-5EFCeqK3.js';import'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {T,aw as W,e as ee,G as Ge,z as za,b9 as k$1,h as hw,Z as lr,_ as _t,a8 as To,i as Ig,d as aT,Q as Qi,$ as $l,C as CE,g as cT,aD as YC,L as Kg,k as iC,n as nC,y as vg,a3 as KC,a$ as JC}from'./main-XKLDSNLY.js';import'./chunk-CTH9uShX.js';import'./chunk-BnFO-7ok.js';import'./chunk-DqoYKCmi.js';import'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import {L}from'./chunk-DCsYP4vf.js';import'./chunk-BaknLOqq.js';var w=()=>["/restore-from-files/destination"],k=()=>["/restore-from-files/encryption"],x=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],D=t=>["/restore",t,"options"];function z(t,n){t&1&&(Qi(0,"div",7),nC(1,0),$l(),Qi(2,"div",7),nC(3,1),$l(),Qi(4,"div",8),nC(5,2),$l(),Qi(6,"div",8),nC(7,3),$l()),t&2&&(vg("routerLink",KC(4,w)),CE(2),vg("routerLink",KC(5,k)),CE(2),vg("routerLink",KC(6,x)),CE(2),vg("routerLink",KC(7,J)));}function B(t,n){if(t&1&&(Qi(0,"div",7),nC(1,4),$l(),Qi(2,"div",7),nC(3,5),$l()),t&2){let e=iC(2);vg("routerLink",JC(2,X,e.backupId())),CE(2),vg("routerLink",JC(4,D,e.backupId()));}}function U(t,n){if(t&1&&(Qi(0,"sh-stepper",6),aT(1,z,8,8)(2,B,4,6),$l()),t&2){let e=iC();CE(),cT(e.isFileRestore()?1:2);}}var f=class t{#e=T(W);#n=T(ee);#t=T(G);#i=L(this.#e.params);#o=L(this.#e.url);#r=L(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isFullWidthPage=Ge(false);paramsChanged=za(()=>{let n=this.#r(),e=this.#i()?.id,r=!!this.#o()?.find(s=>s.path==="restore-from-files"),d=!!n?.find(s=>s.path==="select-files"),R=!!n?.find(s=>s.path==="progress");this.isFullWidthPage.set(R||d),this.#t.init(e,r);});ngOnInit(){this.#n.events.subscribe(n=>{if(n instanceof k$1){let e=n.urlAfterRedirects;this.isFullWidthPage.set(e.includes("progress")||e.includes("select-files"));}});}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,r){e&2&&Kg("full-width",r.isFullWidthPage());},features:[YC([G,Ve])],decls:4,vars:1,consts:()=>{let n;n=$localize` Destination `;let e;e=$localize` Encryption `;let r;r=$localize` Select files `;let d;d=$localize` Options `;let R;R=$localize` Select files `;let s;return s=$localize`Options`,[n,e,r,d,R,s,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],["tabindex","-1","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,r){e&1&&(Ig(0,"app-status-bar"),aT(1,U,3,1,"sh-stepper",6),Qi(2,"section"),Ig(3,"router-outlet"),$l()),e&2&&(CE(),cT(r.isFullWidthPage()?-1:1));},dependencies:[w$1,ee$1,lr,_t,To],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{margin:2.5rem 2rem;width:calc(100% - 4rem)}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{padding:0 2rem}}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"]})};export{f as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {E as E1,bb as ce,h as hw,W as Eg,ag as Yg,aC as yg,f as NC}from'./main-
|
|
1
|
+
import {E as E1,bb as ce,h as hw,W as Eg,ag as Yg,aC as yg,f as NC}from'./main-XKLDSNLY.js';var d=(()=>{class s{constructor(){this.value=E1(void 0),this.color=E1(null),this.variant=E1(null),this.hostClasses=ce("progressBar",{color:this.color,variant:this.variant});}static{this.\u0275fac=function(r){return new(r||s)};}static{this.\u0275cmp=hw({type:s,selectors:[["sh-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100"],hostVars:3,hostBindings:function(r,a){r&2&&(yg("aria-valuenow",a.value()!==void 0?a.value():null),NC(a.hostClasses()));},inputs:{value:[1,"value"],color:[1,"color"],variant:[1,"variant"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(r,a){r&1&&Eg(0,"div",0),r&2&&Yg("width",a.value(),"%");},styles:[`sh-progress-bar{--pb-h: .5rem;--pb-b: var(--base-4);--pb-bg: var(--base-3);--pb-br: var(--shape-2);--pbt-bg: var(--base-6);--pbt-br: inherit;display:block;width:100%;height:var(--pb-h);position:relative;overflow:hidden;border-radius:var(--pb-br);background:var(--pb-bg)}sh-progress-bar .progress-bar{position:absolute;top:0;left:0;bottom:0;height:100%;transform-origin:top left;border-radius:var(--pbt-br);background:var(--pbt-bg)}sh-progress-bar.indeterminate .progress-bar{right:0;animation:indeterminate-progress-bar-stripes 2s linear infinite}sh-progress-bar.indeterminate:after{content:"";position:absolute;inset:0;background-color:var(--base-2);animation:indeterminate-progress-bar-stripes-background 2s linear infinite;transform-origin:top left}sh-progress-bar.primary{--pbt-bg: var(--primary-8)}sh-progress-bar.accent{--pbt-bg: var(--accent-8)}sh-progress-bar.warn{--pbt-bg: var(--warn-8)}sh-progress-bar.error{--pbt-bg: var(--error-8)}sh-progress-bar.success{--pbt-bg: var(--success-8)}sh-progress-bar.outlined{--pb-b: var(--border-10);--pb-bg: var(--base-1)}sh-progress-bar.outlined:after{background-color:inherit}sh-progress-bar.flat{--pbt-bg: var(--base-8)}sh-progress-bar.flat:after{background-color:inherit}sh-progress-bar.flat.primary{--pbt-bg: var(--primary-8)}sh-progress-bar.flat.accent{--pbt-bg: var(--accent-8)}sh-progress-bar.flat.warn{--pbt-bg: var(--warn-8)}sh-progress-bar.flat.error{--pbt-bg: var(--error-8)}sh-progress-bar.flat.success{--pbt-bg: var(--success-8)}sh-progress-bar.raised{--pbt-bg: var(--base-g3)}sh-progress-bar.raised.primary{--pbt-bg: var(--primary-g3)}sh-progress-bar.raised.accent{--pbt-bg: var(--accent-g3)}sh-progress-bar.raised.warn{--pbt-bg: var(--warn-g3)}sh-progress-bar.raised.error{--pbt-bg: var(--error-g3)}sh-progress-bar.raised.success{--pbt-bg: var(--success-g3)}@keyframes indeterminate-progress-bar-stripes-background{0%{animation-timing-function:cubic-bezier(.15,0,.515058,.409685);transform:translate(0)}25%{animation-timing-function:cubic-bezier(.31033,.284058,.8,.733712);transform:translate(37.651913%)}48.35%{animation-timing-function:cubic-bezier(.4,.627035,.6,.902026);transform:translate(84.386165%)}to{transform:translate(160.277782%)}}@keyframes indeterminate-progress-bar-stripes{0%{transform:translate(0)}20%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translate(0)}59.15%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translate(83.67142%)}to{transform:translate(200.611057%)}}
|
|
2
2
|
`],encapsulation:2});}}return s})();export{d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {i as ie,h}from'./chunk-
|
|
1
|
+
import {i as ie,h}from'./chunk-AHhgJqe4.js';import {m}from'./chunk-D7C8xyJI.js';import {c}from'./chunk-Dyq6iPbF.js';import {c as c$1}from'./chunk-D5zSyubd.js';import {T,a5 as g,I,a6 as be,a7 as l,A as v,m as m$1,e as ee,N as Nt$1,z as za,h as hw,Z as lr,_ as _t$1,a8 as To,c as N,v as v$1,Q as Qi,p as lm,i as Ig,H as Hg,d as aT,$ as $l,F as Fg,j as jg,s as jC,f as NC,w as cm,y as vg,C as CE,g as cT,a3 as KC,a9 as GC,aa as Ql,o as oC,U as UC,ab as C$1,ac as I1,G as Ge,J as zu,u as ue,n as nC,r as CD,x as _D,L as Kg,ad as Mr,ae as eo,E as E1,af as D1,D as w1,S as aC,V as Ul,Y as cC,X as Wl,ag as Yg,M as qg,R as fC,ah as fe,ai as m$2,aj as l$1,ak as dm,al as WC,l as vT,O as Od,k as iC,P as Pd,q as qe,am as si,W as Eg,an as Bg,ao as qC,a1 as dT,ap as lT,a2 as fT,K as im}from'./main-XKLDSNLY.js';import'./chunk-BnFO-7ok.js';import {w}from'./chunk-5kQsbzck.js';import {F as Fe}from'./chunk-DqoYKCmi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt,j as jn,m as me,G as Gn}from'./chunk-BDhLEYas.js';import {a as at$1}from'./chunk-UUMQmD5I.js';import {C}from'./chunk-B8PnvglY.js';import {O}from'./chunk-CsgB8OpN.js';import'./chunk-DCsYP4vf.js';var nt=["dragImageElement"],it=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],ot=["[sidenav]","[sidenav-closed-topbar]","*"];function at(o,i){o&1&&Eg(0,"div",1,0);}function st(o,i){if(o&1){let e=vT();Ul(0,"div",7),Bg("drop",function(n){Od(e);let r=iC();return Pd(r.drop(n))})("dragenter",function(){Od(e);let n=iC();return Pd(n.dragEnter())})("dragleave",function(){Od(e);let n=iC();return Pd(n.dragLeave())}),Wl();}}function rt(o,i){if(o&1){let e=vT();Ul(0,"div",8),Bg("dragstart",function(n){Od(e);let r=iC();return Pd(r.dragStart(n))})("dragend",function(n){Od(e);let r=iC();return Pd(r.dragEnd(n))})("drag",function(n){Od(e);let r=iC();return Pd(r.drag(n))})("touchstart",function(n){Od(e);let r=iC();return Pd(r.touchStart(n))})("touchmove",function(n){Od(e);let r=iC();return Pd(r.touchMove(n))})("touchend",function(n){Od(e);let r=iC();return Pd(r.touchEnd(n))})("touchcancel",function(n){Od(e);let r=iC();return Pd(r.touchCancel(n))}),Wl();}}function lt(o){let i=T(eo),e=T(qe),t=Ge(false),n=typeof MutationObserver<"u"?new MutationObserver(r=>{r.forEach(N=>{N.type==="attributes"&&N.attributeName==="class"&&t.set(i.nativeElement.classList.contains(o));});}):void 0;return si(i.nativeElement,()=>{n&&n.observe(i.nativeElement,{attributes:!0}),t.set(i.nativeElement.classList.contains(o));}),e.onDestroy(()=>{n&&n.disconnect();}),t}var Ke=(()=>{class o{constructor(){this.#e=T(Mr),this.#i=T(eo),this.openWidth=280,this.openWidthTreshold=this.openWidth*.5,this.disableDrag=E1(false),this.isOpen=D1(false),this.isOverlay=lt("overlay"),this.#n=this.#i.nativeElement.parentElement,this.#t=this.#n.getBoundingClientRect&&this.#n.getBoundingClientRect(),this.dragImageElement=w1.required("dragImageElement"),this.dragIsEnding=Ge(false),this.dragIsOnScreen=Ge(true),this.isDragging=Ge(false),this.dragPositionX=Ge(0),this.dragActualPositionX=Nt$1(()=>{let e=this.dragPositionX(),t=280,n=100,N=t/2,A=N-n/2,O=N+n/2;if(e>O){let D=e-O,f=(t-O)*(1-Math.exp(-8e-3*D));return O+f}else if(e<A){let D=A-e,f=A*(1-Math.exp(-8e-3*D));return A-f}return e}),this.draggingStyle=Nt$1(()=>!this.isOverlay()||this.disableDrag()?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=za(()=>{this.disableDrag()||(this.isDragging()?this.#e.body.classList.add("dragging"):this.#e.body.classList.remove("dragging"));}),this.scrollLockEffect=za(e=>{let t=this.isOverlay(),n=this.isOpen();t&&n&&(this.#e.body.classList.add("sh-sidenav-open"),this.#e.documentElement.classList.add("sh-sidenav-open")),e(()=>{this.#e.body.classList.remove("sh-sidenav-open"),this.#e.documentElement.classList.remove("sh-sidenav-open");});});}#e;#i;#n;#t;drop(e){e.stopPropagation(),this.#o(e.clientX-this.#t.left);}#o(e){this.isDragging.set(false),e>=this.openWidthTreshold?this.isOpen.set(true):this.isOpen.set(false);}dragEnd(e){e.clientX-this.#t.left<0&&this.#o(0),e.clientX-this.#t.left>this.openWidthTreshold&&this.#o(this.openWidthTreshold);}dragEnter(){this.dragIsOnScreen.set(true);}dragLeave(){this.dragIsOnScreen.set(false);}dragStart(e){e.stopPropagation(),this.#t=this.#n.getBoundingClientRect(),this.isDragging.set(true);}drag(e){e.stopPropagation(),this.isDragging()&&(e.clientX!==0||e.clientY!==0)&&this.dragPositionX.set(e.clientX-this.#t.left);}touchStart(e){e.stopPropagation(),this.isDragging.set(true),this.#t=this.#n.getBoundingClientRect(),this.dragPositionX.set(0);}touchMove(e){e.stopPropagation(),this.isDragging()&&this.dragPositionX.set(e.touches[0].clientX-this.#t.left);}touchEnd(e){e.stopPropagation(),this.#o(e.changedTouches[0].clientX-this.#t.left);}touchCancel(e){e.stopPropagation(),this.isDragging.set(false);}static{this.\u0275fac=function(t){return new(t||o)};}static{this.\u0275cmp=hw({type:o,selectors:[["sh-sidenav"]],viewQuery:function(t,n){t&1&&qg(n.dragImageElement,nt,5),t&2&&fC();},hostVars:6,hostBindings:function(t,n){t&2&&Kg("open",n.isOpen())("closed",!n.isOpen())("is-dragging",n.isDragging());},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:ot,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],["role","navigation",1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(t,n){t&1&&(aC(it),aT(0,at,2,0,"div",1),aT(1,st,1,0,"div",2),Ul(2,"div",3),cC(3),Wl(),Ul(4,"div",4),aT(5,rt,1,0,"div",5),Ul(6,"div",6),cC(7,1),Wl(),Ul(8,"main"),cC(9,2),Wl()()),t&2&&(cT(n.isOverlay()&&!n.disableDrag()?0:-1),CE(),cT(n.isOverlay()&&n.isDragging()?1:-1),CE(3),Yg("transform",!n.disableDrag()&&n.draggingStyle()),CE(),cT(n.isOverlay()&&!n.disableDrag()?5:-1));},styles:[`html.sh-sidenav-open,body.sh-sidenav-open{overflow:hidden}sh-sidenav{--sidenav-width: 17.5rem;--sidenav-wrap-w: 100vw;--sidenav-wrap-h: 100vh;display:flex;width:var(--sidenav-wrap-w);height:var(--sidenav-wrap-h)}sh-sidenav .sidenav{width:var(--sidenav-width);transition:width .2s linear;height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto;overscroll-behavior:contain}sh-sidenav .main-wrap{position:relative;z-index:1;flex:1 0;display:block;height:100%;overflow:auto;padding:1rem 1rem 1rem 0;background-color:var(--base-1)}sh-sidenav main{overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto;border:var(--border-10);border-radius:var(--shape-3);height:calc(100vh - 2rem);box-shadow:var(--box-shadow-35)}sh-sidenav .closed-topbar{display:none;min-height:3.75rem;background-color:var(--base-1);align-items:center;justify-content:space-between;padding:0 1rem;border-bottom:var(--border-10);z-index:10000;position:relative;touch-action:none;overscroll-behavior:none}sh-sidenav .dragable{display:none}sh-sidenav .drag-image{display:none}sh-sidenav.simple{border-radius:0}sh-sidenav.simple .main-wrap{padding:0}sh-sidenav.simple .main-wrap main{height:100vh;border-radius:0;border-width:0 0 0 1px}sh-sidenav.simple.closed{--sidenav-width: 6.25rem}sh-sidenav.overlay{overflow:hidden}sh-sidenav.overlay .drag-image{display:block;width:.25rem;height:40%;background-color:var(--base-2);border-radius:.125rem;box-shadow:none;position:fixed;top:0;left:-9999px}sh-sidenav.overlay .sidenav{position:fixed;z-index:0}sh-sidenav.overlay .dragable{position:absolute;top:0;left:0;bottom:0;z-index:9999;width:50px;padding-right:30px;display:flex;align-items:center;justify-content:center;cursor:grab}sh-sidenav.overlay .dragable:active{cursor:grabbing}sh-sidenav.overlay .dragable:after{content:"";display:block;width:.25rem;height:40%;background-color:var(--base-2);border-radius:.125rem}sh-sidenav.overlay .dragable:hover:after{background-color:var(--base-4)}sh-sidenav.overlay .dropping-surface{position:fixed;inset:0;z-index:100000}sh-sidenav.overlay .main-wrap{z-index:1;padding:0;display:flex;height:100vh;position:relative;flex-direction:column;transform:translate(0);transition:transform .2s linear;overflow:hidden;overscroll-behavior:none}sh-sidenav.overlay.is-dragging{-webkit-user-select:none;user-select:none;cursor:grabbing}sh-sidenav.overlay.is-dragging .main-wrap{transition:none}sh-sidenav.overlay.is-dragging>*{cursor:grabbing}sh-sidenav.overlay.is-dragging .dragable{cursor:grabbing}sh-sidenav.overlay.open .main-wrap{transform:translate(var(--sidenav-width));box-shadow:var(--box-shadow-10);border-left:var(--border-10)}sh-sidenav.overlay.open main{overflow-y:hidden}sh-sidenav.overlay .closed-topbar{display:flex}sh-sidenav.overlay .closed-topbar:empty{display:none}sh-sidenav.overlay main{border:0;box-shadow:none;flex:1;height:auto;min-height:0;border-radius:0}
|
|
2
2
|
`],encapsulation:2});}}return o})();var _t=["scroller"];function ct(o,i){o&1&&(Qi(0,"sh-icon"),jC(1,"bell-ringing"),$l());}function dt(o,i){o&1&&(Qi(0,"sh-icon"),jC(1,"bell"),$l());}function ut(o,i){if(o&1&&Ig(0,"app-notification",8),o&2){iC(2);let e=qC(6);vg("index",0)("notification",e.content);}}function gt(o,i){if(o&1&&(Qi(0,"div",11),jC(1),$l()),o&2){iC(3);let e=qC(6);CE(),Ql(" ",e.content.content," ");}}function pt(o,i){if(o&1&&(Qi(0,"sh-alert")(1,"div",10),jC(2),$l(),aT(3,gt,2,1,"div",11),$l()),o&2){iC(2);let e=qC(6);NC(e.content.type||"error"),CE(2),im(e.content.title),CE(),cT(e.content.content?3:-1);}}function ht(o,i){if(o&1&&(Qi(0,"div",6),aT(1,ut,1,2,"app-notification",8)(2,pt,4,4,"sh-alert",9),$l()),o&2){iC();let e=qC(6);CE(),cT(e.type==="notification"?1:2);}}function mt(o,i){if(o&1){let e=vT();Qi(0,"div",7)(1,"div",12)(2,"h6",13),Fg(3,2),Qi(4,"button",5),Hg("click",function(){Od(e);let n=iC();return Pd(n.toggleNotifications())}),Ig(5,"sh-icon"),$l(),jg(),$l(),Qi(6,"div",14,0)(8,"div",15),Ig(9,"app-notifications"),$l()()()();}}function St(o,i){if(o&1&&(Qi(0,"div",20),jC(1),$l()),o&2){let e=iC().$implicit;CE(),Ql(" ",e.content," ");}}function Ct(o,i){if(o&1){let e=vT();Qi(0,"sh-alert",18,1),Hg("click",function(){let n=Od(e).$implicit,r=iC(2);return Pd(r.deleteAlertByIndex(n.id))}),Qi(2,"div",19),jC(3),$l(),aT(4,St,2,1,"div",20),$l();}if(o&2){let e=i.$implicit;NC(e.type),vg("id",e.id),CE(3),im(e.title),CE(),cT(e.content?4:-1);}}function Tt(o,i){o&1&&(Qi(0,"p",17),nC(1,4),$l());}function Et(o,i){if(o&1){let e=vT();Qi(0,"div",7)(1,"div",12)(2,"h6",13),Fg(3,3),Qi(4,"button",5),Hg("click",function(){Od(e);let n=iC();return Pd(n.toggleAlerts())}),Ig(5,"sh-icon"),$l(),jg(),$l(),Qi(6,"div",14,0)(8,"div",15),dT(9,Ct,5,5,"sh-alert",16,lT,false,Tt,2,0,"p",17),$l()()()();}if(o&2){let e=iC();CE(9),fT(e.alertHistory());}}var et=new jn,J=class o{#e=T(fe);#i=T(l);isSubmitting=Ge(false);messageSent=Ge(false);form=et.group({message:et.control("",[me.required])});notifications=this.#i.notifications;shownMessage=Ge(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=Nt$1(()=>this.alertHistory().filter(i=>i.isOpen).length);scroller=w1("scroller");isAlertsOpen=D1(false);isNotificationsOpen=D1(false);previousHistoryCount=Ge(null);previousNotificationsCount=Ge(null);constructor(){za(()=>{let i=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==i.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(i.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(n=>m$2(l$1({},n),{countDown:n.countDown-1}));},1e3)):i.length&&this.previousHistoryCount()!==i.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:i[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(i.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(n=>m$2(l$1({},n),{countDown:n.countDown-1}));},1e3));}),za(()=>{this.alertHistoryIsOpen(),this.scrollToBottom();});}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null;}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(false):(this.isAlertsOpen.set(true),this.isNotificationsOpen.set(false),this.resetPreviewMessage());}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(false);}deleteAlertByIndex(i){this.#e.removeAlert(i);}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight);}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&qg(t.scroller,_t,5),e&2&&fC();},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let i;i=$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",""],i,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&&(Qi(0,"button",5),Hg("click",function(){return t.toggleAlerts()}),Qi(1,"sh-icon"),jC(2,"info"),$l()(),Qi(3,"button",5),Hg("click",function(){return t.toggleNotifications()}),aT(4,ct,2,0,"sh-icon")(5,dt,2,0,"sh-icon"),$l(),dm(6),aT(7,ht,3,1,"div",6),aT(8,mt,10,0,"div",7),aT(9,Et,12,1,"div",7)),e&2){NC(t.alertHistory().length?"error":""),CE(3),NC(t.notifications().length?"error":""),CE(),cT(t.notifications().length?4:5),CE(2);let n=WC(t.shownMessage());CE(),cT(n?7:-1),CE(),cT(t.isNotificationsOpen()?8:-1),CE(),cT(t.isAlertsOpen()?9:-1);}},dependencies:[Gn,ue,N,v$1,ie,h],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}"]})};function ft(o,i){o&1&&(Qi(0,"sh-icon",14),jC(1,"check"),$l());}function Ft(o,i){o&1&&(Qi(0,"sh-icon",15),jC(1,"prohibit"),$l());}function At(o,i){if(o&1){let e=vT();Qi(0,"button",20),Hg("click",function(){Od(e);let n=iC();return Pd(n.updatePassphrase())}),nC(1,5),$l();}if(o&2){let e=iC();Kg("loading",e.isUpdating());}}function Ot(o,i){if(o&1){let e=vT();Qi(0,"button",21),Hg("click",function(){Od(e);let n=iC();return Pd(n.updatePassphrase())}),nC(1,6),$l();}if(o&2){let e=iC();Kg("loading",e.isUpdating()),vg("disabled",true);}}var K=class o{#e=T(C$1);closed=I1();isUpdating=Ge(false);passphrase=Ge("");repeatPassphrase=Ge("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(true),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(zu(()=>this.isUpdating.set(false))).subscribe({next:()=>this.closed.emit()}));}cancel(){this.isUpdating.set(true),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(zu(()=>this.isUpdating.set(false))).subscribe({next:()=>this.closed.emit()});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let i;i=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let n;n=$localize`Change passphrase`;let r;r=$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? `,r=oC(r);let N;N=$localize`Passphrase`;let A;A=$localize`Repeat passphrase`;let O;O=$localize`Not now thanks`;let D;D=$localize` Yes, update passphrase now `;let E;return E=$localize` Yes, update passphrase now `,[n,r,N,A,O,D,E,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",i,"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,"loading"],["shButton","","shTooltip",t,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(Qi(0,"header",7)(1,"h3"),nC(2,0),$l()(),Qi(3,"div",8)(4,"sh-alert",9),Fg(5,1),Ig(6,"br")(7,"br"),jg(),$l(),Qi(8,"sh-form-field")(9,"label",10),nC(10,2),$l(),Qi(11,"input",11),lm("ngModelChange",function(r){return UC(t.passphrase,r)||(t.passphrase=r),r}),$l(),CD(),$l(),Qi(12,"sh-form-field")(13,"label",12),nC(14,3),$l(),Qi(15,"input",13),lm("ngModelChange",function(r){return UC(t.repeatPassphrase,r)||(t.repeatPassphrase=r),r}),$l(),CD(),aT(16,ft,2,0,"sh-icon",14)(17,Ft,2,0,"sh-icon",15),$l()(),Qi(18,"footer",16)(19,"button",17),Hg("click",function(){return t.cancel()}),nC(20,4),$l(),aT(21,At,2,2,"button",18)(22,Ot,2,3,"button",19),$l()),e&2&&(CE(11),cm("ngModel",t.passphrase),_D(),CE(4),vg("disabled",t.passphrase().length===0),cm("ngModel",t.repeatPassphrase),_D(),CE(),cT(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),CE(3),Kg("loading",t.isUpdating()),CE(2),cT(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22));},dependencies:[Bn,Ze,Rn,Jt,ue,Fe,N,at$1,v$1],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"]})};var vt=()=>({exact:true});function Nt(o,i){o&1&&(Qi(0,"sh-icon"),jC(1,"sun"),$l());}function Pt(o,i){o&1&&(Qi(0,"sh-icon"),jC(1,"moon"),$l());}function Dt(o,i){if(o&1){let e=vT();Qi(0,"button",26),Hg("click",function(){Od(e);let n=iC();return Pd(n.logout())}),Fg(1,8),Ig(2,"sh-icon"),jg(),$l();}}var _e=class o{#e=T(m);#i=T(g);#n=T(I);#t=T(be);#o=T(l);#r=T(v);#a=T(O);#s=T(m$1);#l=T(ee);#_=T(C);relayIsEnabled=this.#n.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;sidenavType=this.#e.sidenavType;hasShownPasswordDialog=false;machineName=Nt$1(()=>{let i=this.#a.serverSettings();if(i&&i["--machine-name"])return i["--machine-name"];if(i&&i["machine-name"])return i["machine-name"];let e=this.#s.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#s.systemInfo()?.MachineName??"Unknown"});ngOnInit(){this.#o.init(),this.#i.getBackups(true);}serverSettingsEffect=za(()=>{if(!this.hasShownPasswordDialog&&(this.#a.askForInitialPasswordConfig()&&(this.hasShownPasswordDialog=true,this.#t.open(K,{maxWidth:"500px"})),this.#a.showWelcomePage())){let i=this.#_.state();i=="inactive"?this.#l.navigate(["/welcome"]):i!="unknown"&&this.#a.setShownWelcomePage();}});toggleBodyClass(){this.#e.toggleBodyClass();}changeDefaultClientTo(i){this.#c(i),window.location.replace(`/${i}`);}logout(){this.#r.logout();}#c(i){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+i+"; expires="+e.toUTCString()+"; path=/";}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-layout"]],decls:44,vars:11,consts:()=>{let i;i=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let n;n=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:link-simple${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Destinations `;let r;r=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let N;N=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let A;A=$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:`,A=oC(A);let O;O=$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:`,O=oC(O);let D;return D=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[i,e,t,n,r,N,A,O,D,[3,"isOpenChange","isOpen","disableDrag"],["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","/destinations","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","",1,"machine-name",3,"title"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(Qi(0,"sh-sidenav",9),lm("isOpenChange",function(r){return UC(t.isNavOpen,r)||(t.isNavOpen=r),r}),Qi(1,"div",10)(2,"header"),Ig(3,"app-logo"),Qi(4,"button",11),Hg("click",function(){return t.toggleBodyClass()}),aT(5,Nt,2,0,"sh-icon")(6,Pt,2,0,"sh-icon"),$l()(),Qi(7,"sh-list",12)(8,"button",13),Fg(9,0),Ig(10,"sh-icon"),jg(),$l(),Qi(11,"button",14),Fg(12,1),Ig(13,"sh-icon"),jg(),$l(),Qi(14,"button",15),Fg(15,2),Ig(16,"sh-icon"),jg(),$l(),Qi(17,"button",16),Fg(18,3),Ig(19,"sh-icon"),jg(),$l(),Qi(20,"button",17),Fg(21,4),Ig(22,"sh-icon"),jg(),$l()(),Ig(23,"div",18),Qi(24,"sh-list",19)(25,"div",20)(26,"sh-icon"),jC(27,"desktop"),$l(),jC(28),$l(),Ig(29,"sh-divider"),Qi(30,"button",21),Fg(31,5),Ig(32,"sh-icon"),jg(),$l(),Qi(33,"a",22),Fg(34,6),Ig(35,"sh-icon")(36,"sh-icon",23),jg(),$l(),Qi(37,"a",24),Fg(38,7),Ig(39,"sh-icon")(40,"sh-icon",23),jg(),$l(),aT(41,Dt,3,0,"button",25),$l()(),Ig(42,"router-outlet")(43,"app-service-hub"),$l()),e&2&&(NC(t.sidenavType()),cm("isOpen",t.isNavOpen),vg("disableDrag",true),CE(5),cT(t.isDarkMode()?5:6),CE(3),vg("routerLinkActiveOptions",KC(10,vt)),CE(17),vg("title",GC(t.machineName())),CE(3),Ql(" ",t.machineName()," "),CE(13),cT(t.relayIsEnabled()?-1:41));},dependencies:[lr,_t$1,To,Ke,N,c,v$1,c$1,J,w],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}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}"]})};
|
|
3
3
|
export{_e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import('./chunk-D6WUhpxO.js').then(function(n){return n.c})},{path:"destination",loadComponent:()=>import('./chunk-Dg-uYwbp.js')},{path:"source-data",loadComponent:()=>import('./chunk-D6WUhpxO.js').then(function(n){return n.b})},{path:"schedule",loadComponent:()=>import('./chunk-D6WUhpxO.js').then(function(n){return n.d})},{path:"options",loadComponent:()=>import('./chunk-CnyuuWJ3.js')}];export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {ShipTable as ot}from'./chunk-
|
|
1
|
+
import {ShipTable as ot}from'./chunk-xwdrpTfz.js';import'./chunk-Cv4o9u3S.js';import {T,ab as C,a6 as be,a5 as g,e as ee,E as E1,N as Nt,G as Ge,z as za,ai as m,aj as l,at as h,J as zu,h as hw,v as v$1,_ as _t,aH as m$1,b2 as m$2,Q as Qi,n as nC,$ as $l,d as aT,H as Hg,p as lm,C as CE,au as Vg,av as rC,g as cT,y as vg,a3 as KC,L as Kg,w as cm,o as oC,U as UC,i as Ig,l as vT,O as Od,k as iC,P as Pd,a1 as dT,a2 as fT,s as jC,aM as ob,K as im,aN as ab,aR as sb}from'./main-XKLDSNLY.js';import {d}from'./chunk-BnFO-7ok.js';import {$}from'./chunk-DCsYP4vf.js';import {U}from'./chunk-BaknLOqq.js';var Se=()=>["/"],ce=(l,n)=>n.Version;function Ce(l,n){l&1&&(Qi(0,"div",12),Ig(1,"sh-progress-bar",20),Qi(2,"p"),nC(3,4),$l()());}function me(l,n){l&1&&(Qi(0,"div",13)(1,"p"),nC(2,5),$l()());}function pe(l,n){if(l&1){let e=vT();Qi(0,"tr",29),Hg("click",function(i){let r=Od(e).$implicit,C=iC(2);return Pd(C.toggleSelected(r.Version,i))}),Qi(1,"td")(2,"sh-checkbox",24),Hg("click",function(i){let r=Od(e).$implicit,C=iC(2);return Pd(C.toggleSelected(r.Version,i))}),$l()(),Qi(3,"td"),jC(4),$l(),Qi(5,"td"),jC(6),ob(7,"relativeTime"),$l(),Qi(8,"td"),jC(9),ob(10,"relativeTime"),$l(),Qi(11,"td"),jC(12),ob(13,"bytes"),$l(),Qi(14,"td"),jC(15),$l(),Qi(16,"td"),jC(17),$l()();}if(l&2){let e=n.$implicit;CE(2),vg("checked",e.Selected),CE(2),im(e.Version),CE(2),im(ab(7,7,e.Time,true)),CE(3),im(ab(10,10,e.Time,false)),CE(3),im(sb(13,13,e.FileSizes)),CE(3),im(e.FileCount),CE(2),im(e.Label);}}function Te(l,n){if(l&1){let e=vT();Qi(0,"sh-table",21),lm("sortByColumnChange",function(i){Od(e);let r=iC();return UC(r.sortByColumn,i)||(r.sortByColumn=i),Pd(i)}),Qi(1,"tr",22)(2,"th",23)(3,"sh-checkbox",24),Hg("click",function(){Od(e);let i=iC();return Pd(i.toggleSelect())}),$l()(),Qi(4,"th",25),nC(5,6),$l(),Qi(6,"th",25),nC(7,7),$l(),Qi(8,"th",25),nC(9,8),$l(),Qi(10,"th",26),nC(11,9),$l(),Qi(12,"th",27),nC(13,10),$l(),Qi(14,"th",28),nC(15,11),$l()(),dT(16,pe,18,15,"tr",null,ce),$l();}if(l&2){let e=iC();vg("data",e.versions())("loading",e.isLoading()),cm("sortByColumn",e.sortByColumn),CE(3),Kg("indeterminate",e.indeterminate()),vg("checked",e.allSelected()),CE(13),fT(e.versions());}}var v=class l$1{#e=T(C);#n=T(be);#t=T(g);#i=T(ee);id=E1.required();backup=Nt(()=>{this.#t.backups();return this.#t.getBackupById(this.id())});versionsResource=$({params:()=>({id:this.id()}),stream:({params:n})=>this.#e.postApiV2BackupListFilesets({requestBody:{BackupId:n.id}})});isLoading=Nt(()=>this.versionsResource.isLoading());isDeleting=Ge(false);performCompact=Ge(true);versions=Ge([]);constructor(){za(()=>{let n=this.versionsResource.value();if(n){let e=(n.Data??[]).slice().sort((t,i)=>t.Time<i.Time?1:t.Time>i.Time?-1:0);this.versions.set(e.map(t=>m(l({},t),{Selected:false})));}});}selectedItems=Nt(()=>this.versions().filter(n=>n.Selected));allSelected=Nt(()=>this.selectedItems().length===this.versions().length&&this.versions().length>0);noneSelected=Nt(()=>this.selectedItems().length===0);indeterminate=Nt(()=>this.selectedItems().length>0&&!this.allSelected());sortByColumn=Ge("version");toggleSelected(n,e){e?.stopPropagation(),this.versions.update(t=>t.map(i=>i.Version===n?m(l({},i),{Selected:!i.Selected}):i));}toggleSelect(){this.allSelected()?this.selectNone():this.selectAll();}selectAll(){this.versions.update(n=>n.map(e=>m(l({},e),{Selected:true})));}selectNone(){this.versions.update(n=>n.map(e=>m(l({},e),{Selected:false})));}deleteVersions(){let n=this.selectedItems();if(n.length===0)return;let e=n.length,t=n.map(i=>i.Version);this.#n.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete ${e} version(s)?`,confirmText:$localize`Delete versions`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.isDeleting.set(true),this.#e.postApiV2BackupDeleteVersions({requestBody:{BackupId:this.id(),Versions:t,SuppressCompact:!this.performCompact()}}).pipe(zu(()=>this.isDeleting.set(false))).subscribe({next:()=>{this.#i.navigate(["/"]);}}));}});}static \u0275fac=function(e){return new(e||l$1)};static \u0275cmp=hw({type:l$1,selectors:[["app-delete-versions"]],inputs:{id:[1,"id"]},decls:13,vars:11,consts:()=>{let n;n=$localize`Delete versions from ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`Cancel`;let t;t=$localize`{VAR_PLURAL, plural, =1 {1 version} other {{INTERPOLATION} versions}}`,t=oC(t,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let i;i=$localize` Delete ${t}:ICU@@85461926550041466: `;let r;r=$localize`Compact after deletion`;let C;C=$localize`Fetching versions from destination...`;let $;$=$localize`No versions found for this backup.`;let b;b=$localize`Version`;let B;B=$localize`Timestamp`;let G;G=$localize`When`;let k;k=$localize`Size`;let x;x=$localize`Files`;let F;return F=$localize`Label`,[n,e,i,r,C,$,b,B,G,k,x,F,[1,"loading-state"],[1,"empty-state"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"actions"],["shButton","",3,"routerLink","disabled"],["shButton","",1,"raised","error",3,"click","disabled"],[1,"sub-actions"],[1,"primary","raised",3,"checkedChange","checked"],[1,"primary","indeterminate"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["size","min-content"],[1,"primary","raised",3,"click","checked"],["size","min-content","shSort","version"],["size","min-content","shSort","size"],["size","min-content","shSort","files"],["size","1fr","shSort","label"],[3,"click"]]},template:function(e,t){e&1&&(Qi(0,"h3"),nC(1,0),$l(),aT(2,Ce,4,0,"div",12)(3,me,3,0,"div",13)(4,Te,18,6,"sh-table",14),Qi(5,"div",15)(6,"button",16),nC(7,1),$l(),Qi(8,"button",17),Hg("click",function(){return t.deleteVersions()}),nC(9,2),$l()(),Qi(10,"div",18)(11,"sh-checkbox",19),lm("checkedChange",function(r){return UC(t.performCompact,r)||(t.performCompact=r),r}),nC(12,3),$l()()),e&2&&(CE(),Vg(t.backup()?.Backup?.Name),rC(1),CE(),cT(t.isLoading()?2:t.versions().length===0?3:4),CE(4),vg("routerLink",KC(10,Se))("disabled",t.isDeleting()),CE(2),Kg("loading",t.isDeleting()),vg("disabled",t.isDeleting()||t.selectedItems().length===0||t.isLoading()),CE(),Vg(t.selectedItems().length)(t.selectedItems().length),rC(9),CE(2),cm("checked",t.performCompact));},dependencies:[v$1,U,d,ot,_t,m$1,m$2],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}sh-table[_ngcontent-%COMP%]{padding:2rem 0}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{padding:2rem 0;display:flex;flex-direction:column;gap:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding-top:2rem}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding-top:.5rem;padding-bottom:2rem}"]})};export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {v}from'./chunk-
|
|
1
|
+
import {v}from'./chunk-D0qGkLVr.js';import {v as ve}from'./chunk-KNmRQWOM.js';import {x}from'./chunk-B-T54LAJ.js';import'./chunk-DqoYKCmi.js';import {T,e as ee,G as Ge,b9 as k,h as hw,v as v$1,c as N,Z as lr,a8 as To,_ as _t,Q as Qi,F as Fg,i as Ig,j as jg,$ as $l,d as aT,C as CE,g as cT,l as vT,n as nC,aP as ql,H as Hg,O as Od,k as iC,P as Pd,aQ as Gl,y as vg,au as Vg,av as rC}from'./main-XKLDSNLY.js';function W(u,S){if(u&1){let n=vT();Qi(0,"sh-menu",16)(1,"button",17),nC(2,2),$l(),ql(3,18),Qi(4,"button",19),Hg("click",function(){Od(n);let e=iC();return Pd(e.updateLogLevel("Disabled"))}),Fg(5,3),Ig(6,"sh-icon"),jg(),$l(),Qi(7,"button",19),Hg("click",function(){Od(n);let e=iC();return Pd(e.updateLogLevel("Verbose"))}),Fg(8,4),Ig(9,"sh-icon"),jg(),$l(),Qi(10,"button",19),Hg("click",function(){Od(n);let e=iC();return Pd(e.updateLogLevel("ExplicitOnly"))}),Fg(11,5),Ig(12,"sh-icon"),jg(),$l(),Qi(13,"button",19),Hg("click",function(){Od(n);let e=iC();return Pd(e.updateLogLevel("Profiling"))}),Fg(14,6),Ig(15,"sh-icon"),jg(),$l(),Qi(16,"button",19),Hg("click",function(){Od(n);let e=iC();return Pd(e.updateLogLevel("Retry"))}),Fg(17,7),Ig(18,"sh-icon"),jg(),$l(),Qi(19,"button",19),Hg("click",function(){Od(n);let e=iC();return Pd(e.updateLogLevel("Information"))}),Fg(20,8),Ig(21,"sh-icon"),jg(),$l(),Qi(22,"button",19),Hg("click",function(){Od(n);let e=iC();return Pd(e.updateLogLevel("DryRun"))}),Fg(23,9),Ig(24,"sh-icon"),jg(),$l(),Qi(25,"button",19),Hg("click",function(){Od(n);let e=iC();return Pd(e.updateLogLevel("Warning"))}),Fg(26,10),Ig(27,"sh-icon"),jg(),$l(),Qi(28,"button",19),Hg("click",function(){Od(n);let e=iC();return Pd(e.updateLogLevel("Error"))}),Fg(29,11),Ig(30,"sh-icon"),jg(),$l(),Gl(),$l();}if(u&2){let n=iC();vg("openIndicator",true),CE(2),Vg(n.logLevelByLabel()),rC(2);}}var O=class u{#n=T(ee);#e=T(v);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=Ge(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof k&&this.currentUrl.set(S.urlAfterRedirects);});}updateLogLevel(S){this.#e.isPolling.set(true),this.#e.updateLogLevel(S);}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=hw({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,m,[1,"filters"],[1,"type-b"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(Qi(0,"div",12)(1,"sh-button-group",13)(2,"button",14),Fg(3,0),Ig(4,"sh-icon"),jg(),$l(),Qi(5,"button",15),Fg(6,1),Ig(7,"sh-icon"),jg(),$l()(),aT(8,W,31,2,"sh-menu",16),$l(),Ig(9,"router-outlet")),n&2&&(CE(8),cT(o.currentUrl().startsWith("/about/logs/live")?8:-1));},dependencies:[v$1,x,N,ve,lr,To,_t],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"]})};export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {w as w$1}from'./chunk-B-c3Zv6R.js';import {e as ee}from'./chunk-i6kMmbhY.js';import'./chunk-Du0Hd0t6.js';import'./chunk-BFquKzMb.js';import'./chunk-D7C8xyJI.js';import {V as Ve}from'./chunk-D6WUhpxO.js';import'./chunk-1-oPQ4n-.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import'./chunk-0lYdrxte.js';import'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import'./chunk-5EFCeqK3.js';import'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {T,aw as W,a5 as g,ab as C,z as za,aE as jo,h as hw,Z as lr,_ as _t,a8 as To,i as Ig,Q as Qi,d as aT,n as nC,$ as $l,C as CE,g as cT,y as vg,aF as XC,aD as YC,s as jC,k as iC,aa as Ql}from'./main-XKLDSNLY.js';import'./chunk-CTH9uShX.js';import {d}from'./chunk-BnFO-7ok.js';import'./chunk-DqoYKCmi.js';import'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import {L}from'./chunk-DCsYP4vf.js';import'./chunk-BaknLOqq.js';var G=(i,e)=>[i,e,"general"],$=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"schedule"],F=(i,e)=>[i,e,"options"];function w(i,e){if(i&1&&(Qi(0,"p"),jC(1),$l()),i&2){let t=iC();CE(),Ql("Editing: ",t.backupName());}}function J(i,e){i&1&&Ig(0,"sh-progress-bar",7);}function X(i,e){i&1&&(Qi(0,"section"),Ig(1,"router-outlet"),$l());}var P=class i{#t=T(W);#e=T(Ve);#i=T(g);#n=T(C);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=L(this.#t.params);#o=L(this.#t.url);paramsChanged=za(()=>{let e=this.#a()?.id,t=!!this.#o()?.find(n=>n.path==="backup-draft");e!=this.#e.backupId()&&(this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults());});getDefaults(){this.#n.getApiV1Backupdefaults().pipe(jo(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(true);}});}getBackup(e,t=false){let n=a=>{this.#e.mapScheduleToForm(a.Schedule??null),a.Backup&&(this.#e.mapGeneralToForm(a.Backup),this.#e.mapDestinationToForm(a.Backup),this.#e.mapSourceDataToForm(a.Backup),this.#e.mapOptionsToForms(a.Backup),this.#e.storeMetadata(a.Backup,t)),this.#e.finishedLoading.set(true);};if(t){this.isDraft.set(t);let a=this.#i.draftBackups().find(d=>d.id===e);if(!a){alert("Backup not found");return}n(a.data);}else this.#n.getApiV1BackupById({id:e}).subscribe({next:n});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=hw({type:i,selectors:[["app-backup"]],features:[YC([Ve])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Destination `;let n;n=$localize` Source Data `;let a;a=$localize` Schedule `;let d;return d=$localize` Options `,[e,t,n,a,d,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(Ig(0,"app-status-bar"),Qi(1,"header"),aT(2,w,2,1,"p"),Qi(3,"sh-stepper",5)(4,"div",6),nC(5,0),$l(),Qi(6,"div",6),nC(7,1),$l(),Qi(8,"div",6),nC(9,2),$l(),Qi(10,"div",6),nC(11,3),$l(),Qi(12,"div",6),nC(13,4),$l()()(),aT(14,J,1,0,"sh-progress-bar",7)(15,X,2,0,"section")),t&2&&(CE(2),cT(n.isNew()?-1:2),CE(2),vg("routerLink",XC(7,G,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),vg("routerLink",XC(10,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),vg("routerLink",XC(13,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),vg("routerLink",XC(16,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),vg("routerLink",XC(19,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),cT(n.finishedLoading()?15:14));},dependencies:[lr,_t,To,ee,w$1,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"]})};export{P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d}from'./chunk-BNG7N21y.js';import'./chunk-DGO0_pkA.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import'./chunk-0lYdrxte.js';import {J}from'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import {N as Ne,E as Ee}from'./chunk-5EFCeqK3.js';import'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import {D}from'./chunk-Cv4o9u3S.js';import {T,ab as C,e as ee,ah as fe,a5 as g,G as Ge$1,N as Nt,ai as m,aj as l,J as zu,h as hw,v,c as N,aH as m$1,b2 as m$2,Q as Qi,n as nC,$ as $l,d as aT,H as Hg,i as Ig,F as Fg,j as jg,C as CE,g as cT,y as vg,l as vT,a1 as dT,p as lm,O as Od,k as iC,U as UC,P as Pd,a2 as fT,w as cm,r as CD,s as jC,x as _D,L as Kg,aa as Ql,ar as Zp,aM as ob,au as Vg,aR as sb,av as rC,aN as ab}from'./main-XKLDSNLY.js';import {f}from'./chunk-CTH9uShX.js';import {d as d$1}from'./chunk-BnFO-7ok.js';import {F as Fe$1}from'./chunk-DqoYKCmi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BDhLEYas.js';import {a as at}from'./chunk-UUMQmD5I.js';import {U}from'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';var Oe=(n,t)=>t.BackupId;function Fe(n,t){n&1&&(Qi(0,"div",14),Ig(1,"sh-progress-bar",20),Qi(2,"p"),nC(3,3),$l()());}function Pe(n,t){n&1&&(Qi(0,"div",15)(1,"p"),nC(2,4),$l()());}function Me(n,t){if(n&1){let e=vT();Qi(0,"sh-icon",33),Hg("click",function(){Od(e);let o=iC(3);return Pd(o.searchTerm.set(""))}),jC(1,"x-circle"),$l();}}function he(n,t){if(n&1){let e=vT();Qi(0,"div",27)(1,"sh-form-field")(2,"input",28),lm("ngModelChange",function(o){Od(e);let c=iC(2);return UC(c.searchTerm,o)||(c.searchTerm=o),Pd(o)}),$l(),CD(),Qi(3,"sh-icon",29),jC(4,"magnifying-glass"),$l(),aT(5,Me,2,0,"sh-icon",30),$l()(),Qi(6,"div",31)(7,"button",32),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.selectAll())}),nC(8,6),$l(),Qi(9,"button",32),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.selectNone())}),nC(10,7),$l()();}if(n&2){let e=iC(2);CE(2),cm("ngModel",e.searchTerm),_D(),CE(3),cT(e.searchTerm()?5:-1),CE(2),vg("disabled",e.allSelected()),CE(2),vg("disabled",e.noneSelected());}}function Le(n,t){if(n&1&&(Qi(0,"div"),nC(1,8),ob(2,"bytes"),$l()),n&2){let e=iC().$implicit;CE(2),Vg(sb(2,1,e.Metadata?.SourceFilesSize)),rC(1);}}function ye(n,t){if(n&1&&(Qi(0,"div"),nC(1,9),ob(2,"bytes"),$l()),n&2){let e=iC().$implicit;CE(2),Vg(sb(2,1,e.Metadata?.TargetFilesSize)),rC(1);}}function Ae(n,t){if(n&1&&(Qi(0,"div"),nC(1,10),ob(2,"relativeTime"),$l()),n&2){let e=iC().$implicit;CE(2),Vg(ab(2,1,e.Metadata?.LastBackupFinished,false)),rC(1);}}function Re(n,t){if(n&1){let e=vT();Qi(0,"sh-card",34),Hg("click",function(){let o=Od(e).$implicit,c=iC(2);return Pd(c.toggleSelected(o.BackupId))}),Qi(1,"sh-checkbox",35),lm("checkedChange",function(o){let c=Od(e).$implicit;return UC(c.Selected,o)||(c.Selected=o),Pd(o)}),Qi(2,"h3"),jC(3),Qi(4,"sh-chip",36),Ig(5,"img",37),jC(6),$l()()(),Qi(7,"div",38),aT(8,Le,3,3,"div"),aT(9,ye,3,3,"div"),aT(10,Ae,3,4,"div"),$l()();}if(n&2){let e=t.$implicit,i=iC(2);Kg("unmatched",e.Match===false),CE(),cm("checked",e.Selected),CE(2),Ql(" ",e.Name," "),CE(2),vg("src",i.getBackendIcon(e.TargetURLDisplay),Zp),CE(),Ql(" ",i.getBackendType(e.TargetURLDisplay)," "),CE(2),cT(e.Metadata?.SourceFilesSize?8:-1),CE(),cT(e.Metadata?.TargetFilesSize?9:-1),CE(),cT(e.Metadata?.LastBackupFinished?10:-1);}}function Ge(n,t){if(n&1){let e=vT();Qi(0,"sh-toggle",26),lm("checkedChange",function(o){Od(e);let c=iC(2);return UC(c.saveNow,o)||(c.saveNow=o),Pd(o)}),Fg(1,11),Ig(2,"sh-icon",39),jg(),$l();}if(n&2){let e=iC(2);vg("color","primary"),cm("checked",e.saveNow),CE(2),vg("shTooltip","Save backups without editing the configuration");}}function De(n,t){n&1&&(Qi(0,"sh-toggle",25),Fg(1,12),Ig(2,"sh-icon",39),jg(),$l()),n&2&&(vg("color","primary")("checked",true)("disabled",true),CE(2),vg("shTooltip","Save now can only be disabled when importing a single backup"));}function ke(n,t){if(n&1){let e=vT();aT(0,he,11,4),Qi(1,"div",21),dT(2,Re,11,9,"sh-card",22,Oe),$l(),Qi(4,"div",23),aT(5,Ge,3,3,"sh-toggle",24)(6,De,3,4,"sh-toggle",25),Qi(7,"sh-toggle",26),lm("checkedChange",function(o){Od(e);let c=iC();return UC(c.importMetadata,o)||(c.importMetadata=o),Pd(o)}),nC(8,5),$l()();}if(n&2){let e=iC();cT(e.configs().length>1?0:-1),CE(2),fT(e.configsSorted()),CE(3),cT(e.selectedItems().length<=1?5:6),CE(2),vg("color","primary"),cm("checked",e.importMetadata);}}function $e(n,t){n&1&&nC(0,2,1);}function be(n,t){n&1&&nC(0,2,2);}var w=class n{#t=T(d);#n=T(C);#e=T(ee);#i=T(fe);#o=T(g);getBackendType=Ne;getBackendIcon=Ee;isLoading=Ge$1(true);isImporting=Ge$1(false);configs=Ge$1([]);saveNow=Ge$1(false);importMetadata=Ge$1(false);searchTerm=Ge$1("");allSelected=Nt(()=>this.selectedItems().length===this.configs().length);noneSelected=Nt(()=>this.selectedItems().length===0);configsSorted=Nt(()=>{let t=this.searchTerm().toLowerCase();return this.configs().map(e=>m(l({},e),{Match:t?e.Name?.toLowerCase().includes(t):null})).sort((e,i)=>(e.Name??"").localeCompare(i.Name??"")).sort((e,i)=>e.Match===i.Match?0:e.Match?-1:1)});ngOnInit(){let t=this.#t.temporaryBackupId();if(!t){this.#e.navigate(["/backup/import-destination/destination"]);return}this.#n.postApiV1BackupByIdRestoreTaskConfig({id:t}).pipe(zu(()=>this.isLoading.set(false))).subscribe({next:e=>{let i=e.sort((o,c)=>(o.Name??"").localeCompare(c.Name??"")).map(o=>m(l({},o),{Selected:e.length===1}));this.configs.set(i);},error:e=>{this.#t.showErrorDialog(e.message||"Failed to fetch configurations");}});}toggleSelected(t){this.configs.update(e=>e.map(i=>i.BackupId===t?m(l({},i),{Selected:!i.Selected}):i));}selectAll(){this.configs.update(t=>t.map(e=>m(l({},e),{Selected:true})));}selectNone(){this.configs.update(t=>t.map(e=>m(l({},e),{Selected:false})));}selectedItems=Nt(()=>this.configs().filter(t=>t.Selected));import(){let t=this.selectedItems();if(t.length===0)return;let e=this.importMetadata(),i=this.saveNow()||t.length!==1;this.isImporting.set(true);let o=c=>{if(c>=t.length){this.isImporting.set(false),this.#i.success($localize`Successfully imported ${t.length} backup(s)`),this.#e.navigate(["/"]);return}let N=t[c];this.#n.postApiV1BackupByIdImportfromtemp({requestBody:{BackupId:N.BackupId,ImportMetadata:e,Direct:i}}).subscribe({next:u=>{if(i)this.configs.update(I=>I.filter(G=>G.BackupId!==N.BackupId)),o(c+1);else {this.isImporting.set(false);let I=this.#o.addDraftBackup(u.data);this.#e.navigate(["/backup-draft",I]);}},error:u=>{this.isImporting.set(false),this.#t.showErrorDialog(`Failed to import ${N.Name}: ${u.message}`);}});};o(0);}back(){this.#e.navigate(["/backup/import-destination/encryption"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-import-destination-select-config"]],decls:14,vars:4,consts:()=>{let t;t=$localize`Select configurations to import`;let e;e=$localize`Back`;let i;i=$localize`${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Importing... ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE: Import selected ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let o;o=$localize`Fetching backup configurations from destination...`;let c;c=$localize`No backup configurations found at this destination.`;let N;N=$localize`Import metadata`;let u;u=$localize`Search for destination...`;let I;I=$localize`Select all`;let G;G=$localize`Select none`;let K;K=$localize` Source size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize` Target size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let J;J=$localize` Last backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let X;X=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let z;return z=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,e,i,o,c,N,I,G,K,U,J,X,z,[1,"content-wrapper"],[1,"loading-state"],[1,"empty-state"],[1,"actions"],["shButton","",3,"click","disabled"],[1,"spacer"],["shButton","",1,"primary","raised",3,"click","disabled"],[1,"primary","indeterminate"],[1,"config-list"],[1,"type-a","actionable","full-width",3,"unmatched"],[1,"options"],[3,"color","checked"],[3,"color","checked","disabled"],[3,"checkedChange","color","checked"],[1,"search-area"],["type","text","placeholder",u,3,"ngModelChange","ngModel"],["prefix",""],["suffix","",1,"clear-search"],[1,"list-actions"],["shButton","",1,"small",3,"click","disabled"],["suffix","",1,"clear-search",3,"click"],[1,"type-a","actionable","full-width",3,"click"],[1,"primary","raised",3,"checkedChange","checked"],[1,"small","provider"],["alt","",1,"provider-icon",3,"src"],[1,"metadata"],[1,"small",3,"shTooltip"]]},template:function(e,i){e&1&&(Qi(0,"div",13)(1,"h2"),nC(2,0),$l(),aT(3,Fe,4,0,"div",14)(4,Pe,3,0,"div",15)(5,ke,9,4),Qi(6,"div",16)(7,"button",17),Hg("click",function(){return i.back()}),nC(8,1),$l(),Ig(9,"div",18),Qi(10,"button",19),Hg("click",function(){return i.import()}),Fg(11,2),aT(12,$e,1,0)(13,be,1,0),jg(),$l()()()),e&2&&(CE(3),cT(i.isLoading()?3:i.configs().length===0?4:5),CE(4),vg("disabled",i.isImporting()),CE(3),vg("disabled",i.isImporting()||i.selectedItems().length===0||i.isLoading()),CE(2),cT(i.isImporting()?12:13));},dependencies:[v,f,J,U,Bn,Ze,Rn,Jt,d$1,at,N,D,Fe$1,m$1,m$2],styles:["[_nghost-%COMP%]{display:block;padding:2rem;max-width:50rem;margin:0 auto}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{text-align:center;padding:4rem 2rem}.loading-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:1rem;color:var(--color-on-surface-variant)}h2[_ngcontent-%COMP%]{margin-bottom:2rem}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-bottom:2rem}.list-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;margin-bottom:.5rem;justify-content:flex-end}.clear-search[_ngcontent-%COMP%]{opacity:.6;cursor:pointer}.config-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%]{padding:1rem;cursor:pointer;display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card.unmatched[_ngcontent-%COMP%]{opacity:.4}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;flex-grow:1}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .provider[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .metadata[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-left:1.75rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.options[_ngcontent-%COMP%]{margin-bottom:2rem;display:flex;flex-direction:column;gap:1rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:2rem}.actions[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1}"]})};export{w as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=[{path:"",loadComponent:()=>import('./chunk-CA-0mTsq.js'),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import('./chunk-BiSIt2zb.js')},{path:"live",loadComponent:()=>import('./chunk-DmwtL4h3.js')}]}],t=o;export{t as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {G}from'./chunk-DnTA-m4k.js';import'./chunk-DGO0_pkA.js';import'./chunk-BFquKzMb.js';import {s as sn,o as on,p as pt,_ as _n,V as Ve}from'./chunk-D6WUhpxO.js';import'./chunk-1-oPQ4n-.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import'./chunk-0lYdrxte.js';import'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import {V,G as G$1}from'./chunk-5EFCeqK3.js';import'./chunk-GKdOPH_4.js';import {v as ve$1}from'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {T,e as ee,aw as W,a6 as be,bF as ve,D as w1,G as Ge,N as Nt,at as h,h as hw,v,c as N,a0 as de,u as ue,l as vT,ak as dm,Q as Qi,H as Hg,n as nC,$ as $l,d as aT,p as lm,O as Od,U as UC,P as Pd,F as Fg,i as Ig,j as jg,al as WC,C as CE,g as cT,w as cm,y as vg,o as oC,aD as YC,M as qg,R as fC,k as iC,s as jC,aP as ql,aQ as Gl,ao as qC,r as CD,a3 as KC,x as _D}from'./main-XKLDSNLY.js';import'./chunk-CTH9uShX.js';import'./chunk-BnFO-7ok.js';import {F as Fe}from'./chunk-DqoYKCmi.js';import {B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt,a as Zt}from'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';var Oe=["formRef"],Re=["testUrl"],Ne=()=>({maxWidth:"700px",width:"100%"});function De(o,i){if(o&1){let e=vT();Qi(0,"button",24),Hg("click",function(){Od(e);let t=iC();return Pd(t.openTargetUrlDialog())}),Fg(1,5),Ig(2,"sh-icon"),jg(),$l();}}function Ie(o,i){if(o&1){let e=vT();Qi(0,"button",24),Hg("click",function(){Od(e);let t=iC(2);return Pd(t.copyTargetUrl())}),Fg(1,7),Ig(2,"sh-icon"),jg(),$l();}}function fe(o,i){if(o&1){let e=vT();Qi(0,"sh-menu")(1,"button",15)(2,"sh-icon"),jC(3,"dots-three-vertical"),$l()(),ql(4,25),Qi(5,"button",24),Hg("click",function(){Od(e);let t=iC();return Pd(t.openTargetUrlDialog())}),Fg(6,6),Ig(7,"sh-icon"),jg(),$l(),aT(8,Ie,3,0,"button",15),Gl(),$l();}if(o&2){iC();let e=qC(0);CE(8),cT(e?8:-1);}}function he(o,i){if(o&1){let e=vT();Qi(0,"app-destination-list-item",17)(1,"button",20),Hg("click",function(){Od(e);let t=iC();return Pd(t.removeDestination())}),nC(2,8),$l()();}if(o&2){iC();let e=qC(12);vg("destination",e);}}function ye(o,i){if(o&1){let e=vT();Qi(0,"app-destination-list",26),Hg("setDestination",function(t){Od(e);let s=iC();return Pd(s.setDestination(t))}),$l();}}function Me(o,i){if(o&1){let e=vT();Qi(0,"app-single-destination",27),lm("targetUrlChange",function(t){Od(e);let s=iC();return UC(s.targetUrlModel,t)||(s.targetUrlModel=t),Pd(t)}),$l();}if(o&2){let e=iC();cm("targetUrl",e.targetUrlModel);}}function Pe(o,i){o&1&&(Fg(0,4,1),Ig(1,"sh-icon",22),jg());}function Ae(o,i){o&1&&(Fg(0,4,2),Ig(1,"sh-icon"),jg());}function Le(o,i){if(o&1){let e=vT();Qi(0,"sh-dialog",28),lm("isOpenChange",function(t){Od(e);let s=iC();return UC(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),Pd(t)}),Qi(1,"header",29)(2,"div",30)(3,"h2"),nC(4,9),$l(),Qi(5,"sh-alert",31),nC(6,10),$l()()(),Qi(7,"div",32)(8,"sh-form-field")(9,"textarea",33),lm("ngModelChange",function(t){Od(e);let s=iC();return UC(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),Pd(t)}),$l(),CD(),$l()(),Qi(10,"footer",34)(11,"button",20),Hg("click",function(){Od(e);let t=iC();return Pd(t.closeTargetUrlDialog(false))}),jC(12,"Cancel"),$l(),Qi(13,"button",35),Hg("click",function(){Od(e);let t=iC();return Pd(t.closeTargetUrlDialog(true))}),Fg(14,11),Ig(15,"sh-icon"),jg(),$l()()();}if(o&2){let e=iC();cm("isOpen",e.targetUrlDialogOpen),vg("options",KC(3,Ne)),CE(9),cm("ngModel",e.targetUrlCtrl),_D();}}var x=class o{#i=T(ee);#o=T(W);#n=T(be);injector=T(ve);#e=T(G);formRef=w1.required("formRef");testUrlComponent=w1.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=Ge(null);targetUrlInitial=Ge(null);targetUrlDialogOpen=Ge(false);toggleNewDestination=Ge(true);selectedDestinationType=Nt(()=>{let i=this.#e.destinationTargetUrl();return i?V(i):null});selectedDestinationTypeOption=Nt(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,sourceDescription:i.sourceDescription??null,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"");}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(i=false){this.targetUrlDialogOpen.set(false);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e);}setDestination(i){let e=G$1(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`);}}removeDestination(){this.#e.updateTargetUrl(null);}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent});}next(){let i=this.testSignal();if(i===null){this.#n.open(h,{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:n=>{n?this.testUrlComponent()?.testDestination(false)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(h,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}});}):this.#t();}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(h,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t();}});return}this.#t();}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&qg(n.formRef,Oe,5)(n.testUrlComponent,Re,5),e&2&&fC(2);},features:[YC([Ve])],decls:25,vars:18,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22: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/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23: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/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=oC(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"current-destination",3,"destination"],[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"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=vT();dm(0),Qi(1,"form",12,0),Hg("submit",function(){return n.next()}),Qi(3,"header")(4,"h3",13)(5,"span"),nC(6,2),$l(),Qi(7,"div",14),aT(8,De,3,0,"button",15)(9,fe,9,1,"sh-menu"),$l()(),Qi(10,"app-test-url",16,1),lm("targetUrlChange",function(g){return Od(t),UC(n.targetUrlModel,g)||(n.targetUrlModel=g),Pd(g)})("testSignalChange",function(g){return Od(t),UC(n.testSignal,g)||(n.testSignal=g),Pd(g)}),$l(),dm(12),aT(13,he,3,1,"app-destination-list-item",17),$l(),aT(14,ye,1,0,"app-destination-list"),aT(15,Me,1,1,"app-single-destination",18),Qi(16,"div",19)(17,"button",20),Hg("click",function(){return n.goBack()}),Fg(18,3),Ig(19,"sh-icon"),jg(),$l(),Qi(20,"button",21),Fg(21,4),aT(22,Pe,2,0,"sh-icon",22)(23,Ae,2,0,"sh-icon"),jg(),$l()()(),aT(24,Le,16,4,"sh-dialog",23);}if(e&2){let t=WC(!!n.targetUrlModel());CE(8),cT(t?9:8),CE(2),cm("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),vg("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",false)("testExpectation","containsBackup")("readOnlyTest",true)("moduleType","Backend"),CE(2);let s=WC(n.selectedDestinationTypeOption());CE(),cT(s?13:-1),CE(),cT(t?-1:14),CE(),cT(t?15:-1),CE(5),vg("disabled",n.testSignal()=="testing"||!t),CE(2),cT(n.testSignal()=="testing"?22:23),CE(2),cT(n.targetUrlDialogOpen()?24:-1);}},dependencies:[sn,on,pt,Bn,Tn,Ze,Rn,Pn,Jt,Zt,v,Fe,ve$1,N,de,ue,_n],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}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}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"]})};
|
|
2
|
+
export{x as default};
|