@duplicati/ngclient 0.0.183 → 0.0.185
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-ZCSLL22M.js → chunk-27ICL4CS.js} +1 -1
- package/{chunk-OQ3SKNS2.js → chunk-42L3D2F7.js} +1 -1
- package/{chunk-XZ35H3QB.js → chunk-43HR5ZDT.js} +1 -1
- package/chunk-4RKO4YFU.js +1 -0
- package/{chunk-BNQSW4G5.js → chunk-4YC2YMYH.js} +1 -1
- package/{chunk-MLTHWDBE.js → chunk-5G4V55RS.js} +1 -1
- package/{chunk-ZTXNJMNP.js → chunk-5LYRKTAV.js} +1 -1
- package/{chunk-GG3FXQPK.js → chunk-67L5H6HO.js} +1 -1
- package/{chunk-YFWXKCXL.js → chunk-67Q6QMQY.js} +1 -1
- package/chunk-A4RSARWN.js +1 -0
- package/{chunk-XFKT7HQ4.js → chunk-AV5KKRMA.js} +1 -1
- package/chunk-B2VS7Z6E.js +1 -0
- package/{chunk-VLHMURFN.js → chunk-BBRK364M.js} +1 -1
- package/chunk-CGQ2WKCU.js +1 -0
- package/{chunk-AEVJZNUY.js → chunk-DUIZM4ZO.js} +1 -1
- package/{chunk-XFTFZ5UD.js → chunk-EBSK6KZQ.js} +1 -1
- package/{chunk-TAFKX5F2.js → chunk-EXFIQK72.js} +1 -1
- package/{chunk-DH6M7Y7C.js → chunk-H5XAYRQ6.js} +1 -1
- package/{chunk-D3VVL4NK.js → chunk-HO5WBGKU.js} +1 -1
- package/{chunk-FVZOIWTT.js → chunk-HRCZ5SXI.js} +1 -1
- package/{chunk-APZXLYUU.js → chunk-I3GPRGH5.js} +1 -1
- package/{chunk-NJ2XZSM6.js → chunk-IQ3RNWGH.js} +1 -1
- package/{chunk-QGD6TGTI.js → chunk-JNMQJO3U.js} +1 -1
- package/{chunk-U7ABTEOS.js → chunk-JRJXFRW7.js} +1 -1
- package/{chunk-CR3C6XYB.js → chunk-JU5OZOO2.js} +1 -1
- package/{chunk-QQOFLIJG.js → chunk-LJ2P7K2Z.js} +1 -1
- package/{chunk-ODTXKOWN.js → chunk-LVX3DTQM.js} +1 -1
- package/{chunk-FPKRDCQ6.js → chunk-MM36XELZ.js} +1 -1
- package/{chunk-BXWAVFI6.js → chunk-MNHB4VKJ.js} +1 -1
- package/{chunk-Z6QCNSVI.js → chunk-NF4VR5PI.js} +1 -1
- package/{chunk-FNIOBDFO.js → chunk-OITOOW5H.js} +1 -1
- package/{chunk-WUK4ABE5.js → chunk-P3AUEHHI.js} +1 -1
- package/{chunk-AESH2EML.js → chunk-QEE2RRQ4.js} +1 -1
- package/{chunk-KTLT4LKY.js → chunk-QIUMBQM5.js} +1 -1
- package/{chunk-DNHCL3D4.js → chunk-QKYDZL4G.js} +1 -1
- package/{chunk-5Y3YA4IZ.js → chunk-QT7EG3ZF.js} +1 -1
- package/{chunk-GCL5YZGN.js → chunk-RD5JFFHQ.js} +1 -1
- package/{chunk-CU5GQUSX.js → chunk-SJTXV6AC.js} +1 -1
- package/{chunk-GXYICCA6.js → chunk-UAMORY54.js} +1 -1
- package/{chunk-LWJ6FCGJ.js → chunk-UFTPS2J6.js} +1 -1
- package/{chunk-G4PJG5YL.js → chunk-V42KLXW4.js} +1 -1
- package/{chunk-EYIHDNRT.js → chunk-VGYWG5A3.js} +1 -1
- package/{chunk-G4BVOKDI.js → chunk-WA53HHVH.js} +1 -1
- package/{chunk-QZRRXR3V.js → chunk-WVF3GRDZ.js} +1 -1
- package/{chunk-4GDXGM4L.js → chunk-XUPDFNDB.js} +1 -1
- package/{chunk-WHT6WK7V.js → chunk-YYSJESAX.js} +1 -1
- package/{chunk-CRIAZIHV.js → chunk-ZTDAMLNP.js} +1 -1
- package/index.html +1 -1
- package/main-BV7ROS25.js +1 -0
- package/package.json +1 -1
- package/chunk-5QZIKR6A.js +0 -1
- package/chunk-6K3PRIYO.js +0 -1
- package/chunk-FRN7G2XC.js +0 -1
- package/chunk-UGATCU55.js +0 -1
- package/main-DLNJU5L6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as he}from"./chunk-U7ABTEOS.js";import{a as Ne,b as pe,c as Ie,d as me,e as De}from"./chunk-EYIHDNRT.js";import"./chunk-4VEFX5WQ.js";import"./chunk-AS6Z56AD.js";import{b as Oe,c as Ce}from"./chunk-IW4RDAIN.js";import{j as Re}from"./chunk-CU5GQUSX.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-ODTXKOWN.js";import"./chunk-ME77WZZI.js";import{a as I}from"./chunk-5DJAX2HH.js";import"./chunk-KTLT4LKY.js";import"./chunk-DW332N2S.js";import"./chunk-6K3PRIYO.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as de,H as ue,K as Fe,c as oe,e as ae,f as se,g as re,i as _e,j as le,s as ce,u as Te,w as Ee,y as Se,z as ge}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{b as ne,d as ie}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as T,Ab as r,Bb as d,Fb as K,Gb as j,Ib as C,Mc as A,Pa as l,Pb as S,Qb as g,Rb as p,Sb as P,Sc as te,Tb as $,Ub as Q,Vb as u,W as R,Xb as _,aa as E,cb as H,cc as q,da as X,dc as Y,jc as L,la as N,oc as h,pc as f,qc as M,rc as y,sb as F,sc as x,tb as O,tc as w,wc as Z,xc as ee,yb as D,zb as s}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var fe=["formRef"],Me=()=>({maxWidth:"700px",width:"100%"});function Ae(o,n){if(o&1){let e=C();s(0,"button",31),u("click",function(){T(e);let t=_();return E(t.testDestination(0,!0))}),p(1,4),r()}if(o&2){let e=_();D("disabled",e.testSignal()=="testing")}}function Pe(o,n){if(o&1){let e=C();s(0,"button",32),u("click",function(){T(e);let t=_();return E(t.openTargetUrlDialog())}),S(1,5),d(2,"sh-icon"),g(),r()}}function $e(o,n){if(o&1){let e=C();s(0,"button",32),u("click",function(){T(e);let t=_(2);return E(t.copyTargetUrl())}),S(1,7),d(2,"sh-icon"),g(),r()}}function Le(o,n){if(o&1){let e=C();s(0,"sh-menu")(1,"button",20)(2,"sh-icon"),L(3,"dots-three-vertical"),r()(),K(4,33),s(5,"button",32),u("click",function(){T(e);let t=_();return E(t.openTargetUrlDialog())}),S(6,6),d(7,"sh-icon"),g(),r(),F(8,$e,3,0,"button",20),j(),r()}if(o&2){_();let e=w(0);l(8),O(e?8:-1)}}function ye(o,n){o&1&&(s(0,"sh-alert"),S(1,8),d(2,"sh-icon",34),g(),r())}function xe(o,n){o&1&&(s(0,"sh-alert",21),S(1,9),d(2,"sh-icon",34),g(),r())}function we(o,n){if(o&1&&(s(0,"sh-alert",22),S(1,10),d(2,"sh-icon",34),g(),r()),o&2){let e=_();l(2),P(e.testErrorMessage()),$(1)}}function Ge(o,n){if(o&1&&(s(0,"sh-alert",23),S(1,11),d(2,"sh-icon",34),g(),r()),o&2){let e=_();l(2),P(e.testErrorMessage()),$(1)}}function be(o,n){if(o&1){let e=C();s(0,"app-destination-list-item",24)(1,"button",27),u("click",function(){T(e);let t=_();return E(t.removeDestination())}),p(2,12),r()()}if(o&2){_();let e=w(15);D("destination",e)}}function Ue(o,n){if(o&1){let e=C();s(0,"app-destination-list",35),u("setDestination",function(t){T(e);let a=_();return E(a.setDestination(t))}),r()}}function ke(o,n){if(o&1){let e=C();s(0,"app-single-destination",36),M("targetUrlChange",function(t){T(e);let a=_();return f(a.targetUrlModel,t)||(a.targetUrlModel=t),E(t)}),r()}if(o&2){let e=_();h("targetUrl",e.targetUrlModel)}}function ve(o,n){o&1&&(S(0,3,1),d(1,"sh-icon",29),g())}function We(o,n){o&1&&(S(0,3,2),d(1,"sh-icon"),g())}function Ve(o,n){if(o&1){let e=C();s(0,"sh-dialog",37),M("isOpenChange",function(t){T(e);let a=_();return f(a.targetUrlDialogOpen,t)||(a.targetUrlDialogOpen=t),E(t)}),s(1,"header",38)(2,"div",39)(3,"h2"),p(4,13),r(),s(5,"sh-alert",22),p(6,14),r()()(),s(7,"div",40)(8,"sh-form-field")(9,"textarea",41),M("ngModelChange",function(t){T(e);let a=_();return f(a.targetUrlCtrl,t)||(a.targetUrlCtrl=t),E(t)}),r()()(),s(10,"footer",42)(11,"button",27),u("click",function(){T(e);let t=_();return E(t.closeTargetUrlDialog(!1))}),L(12,"Cancel"),r(),s(13,"button",43),u("click",function(){T(e);let t=_();return E(t.closeTargetUrlDialog(!0))}),S(14,15),d(15,"sh-icon"),g(),r()()()}if(o&2){let e=_();h("isOpen",e.targetUrlDialogOpen),D("options",ee(3,Me)),l(9),h("ngModel",e.targetUrlCtrl)}}var G=class o{#i=R(ie);#o=R(ne);#t=R(ge);#a=R(Ne);injector=R(X);#e=R(he);#s=R(Ie);formRef=te.required("formRef");targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;destinationTypeOptionsInFocus=N(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=A(()=>{let n=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return n.map(i=>e.find(t=>t.key===i))});selectedDestinationType=A(()=>{let n=this.#e.destinationTargetUrl();return n?Oe(n):null});selectedDestinationTypeOption=A(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),i=this.targetUrlInitial();!n||e===i||!e||this.#e.updateTargetUrl(e)}testDestination(n,e,i){let t=this.#e.destinationTargetUrl();t&&(this.#e.setTestState("testing"),this.#a.testDestination(t,this.#e.backupId(),n,!0,e).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),a.containsBackup===!1?(this.#e.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),e||this.#t.open(I,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#e.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),e||this.#t.open(I,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),i?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){i?.();return}let m=t.includes("?");a.action==="trust-cert"&&this.#e.updateTargetUrl(t+`${m?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.updateTargetUrl(t+`${m?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):i?.()}}))}setDestination(n){let e=Ce(n??"");if(e){if(e.mapper.default){let i=e.mapper.default("");this.#e.updateTargetUrl(i);return}this.#e.updateTargetUrl(`${n}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#t.open(I,{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:e=>{e?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(I,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#t.open(I,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=H({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,i){e&1&&q(i.formRef,fe,5),e&2&&Y()},features:[Z([Re])],decls:28,vars:11,consts:()=>{let n;n=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD*25: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/*25:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*26: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/*26:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,i=Q(i);let t;t=$localize` Test destination `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let m;m=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let b;b=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let v;v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let W;W=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`Change`;let B;B=$localize`Edit target URL`;let z;z=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;return J=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],n,e,i,t,a,m,b,U,k,v,W,V,B,z,J,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[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","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,i){if(e&1){let t=C();y(0),s(1,"form",16,0),u("submit",function(){return T(t),E(i.next())}),s(3,"header")(4,"h3",17)(5,"span"),p(6,1),r(),s(7,"div",18),F(8,Ae,2,1,"button",19),F(9,Pe,3,0,"button",20)(10,Le,9,1,"sh-menu"),r()(),F(11,ye,3,0,"sh-alert")(12,xe,3,0,"sh-alert",21)(13,we,3,1,"sh-alert",22)(14,Ge,3,1,"sh-alert",23),y(15),F(16,be,3,1,"app-destination-list-item",24),r(),F(17,Ue,1,0,"app-destination-list"),F(18,ke,1,1,"app-single-destination",25),s(19,"div",26)(20,"button",27),u("click",function(){return T(t),E(i.goBack())}),S(21,2),d(22,"sh-icon"),g(),r(),s(23,"button",28),S(24,3),F(25,ve,2,0,"sh-icon",29)(26,We,2,0,"sh-icon"),g(),r()()(),F(27,Ve,16,4,"sh-dialog",30)}if(e&2){let t=x(!!i.targetUrlModel());l(8),O(t?8:-1),l(),O(t?10:9),l(2),O(i.testSignal()=="testing"?11:i.testSignal()=="success"?12:i.testSignal()=="warning"?13:i.testSignal()=="error"?14:-1),l(4);let a=x(i.selectedDestinationTypeOption());l(),O(a?16:-1),l(),O(t?-1:17),l(),O(t?18:-1),l(5),D("disabled",i.testSignal()=="testing"||!t),l(2),O(i.testSignal()=="testing"?25:26),l(2),O(i.targetUrlDialogOpen()?27:-1)}},dependencies:[De,me,pe,ce,le,oe,ae,se,_e,re,de,ue,Fe,Te,Se,Ee],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}"],changeDetection:0})};export{G as default};
|
|
1
|
+
import{g as he}from"./chunk-JRJXFRW7.js";import{a as Ne,b as pe,c as Ie,d as me,e as De}from"./chunk-VGYWG5A3.js";import"./chunk-4VEFX5WQ.js";import"./chunk-AS6Z56AD.js";import{b as Oe,c as Ce}from"./chunk-IW4RDAIN.js";import{j as Re}from"./chunk-SJTXV6AC.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-LVX3DTQM.js";import"./chunk-ME77WZZI.js";import{a as I}from"./chunk-5DJAX2HH.js";import"./chunk-QIUMBQM5.js";import"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as de,H as ue,K as Fe,c as oe,e as ae,f as se,g as re,i as _e,j as le,s as ce,u as Te,w as Ee,y as Se,z as ge}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{b as ne,d as ie}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as T,Ab as r,Bb as d,Fb as K,Gb as j,Ib as C,Mc as A,Pa as l,Pb as S,Qb as g,Rb as p,Sb as P,Sc as te,Tb as $,Ub as Q,Vb as u,W as R,Xb as _,aa as E,cb as H,cc as q,da as X,dc as Y,jc as L,la as N,oc as h,pc as f,qc as M,rc as y,sb as F,sc as x,tb as O,tc as w,wc as Z,xc as ee,yb as D,zb as s}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var fe=["formRef"],Me=()=>({maxWidth:"700px",width:"100%"});function Ae(o,n){if(o&1){let e=C();s(0,"button",31),u("click",function(){T(e);let t=_();return E(t.testDestination(0,!0))}),p(1,4),r()}if(o&2){let e=_();D("disabled",e.testSignal()=="testing")}}function Pe(o,n){if(o&1){let e=C();s(0,"button",32),u("click",function(){T(e);let t=_();return E(t.openTargetUrlDialog())}),S(1,5),d(2,"sh-icon"),g(),r()}}function $e(o,n){if(o&1){let e=C();s(0,"button",32),u("click",function(){T(e);let t=_(2);return E(t.copyTargetUrl())}),S(1,7),d(2,"sh-icon"),g(),r()}}function Le(o,n){if(o&1){let e=C();s(0,"sh-menu")(1,"button",20)(2,"sh-icon"),L(3,"dots-three-vertical"),r()(),K(4,33),s(5,"button",32),u("click",function(){T(e);let t=_();return E(t.openTargetUrlDialog())}),S(6,6),d(7,"sh-icon"),g(),r(),F(8,$e,3,0,"button",20),j(),r()}if(o&2){_();let e=w(0);l(8),O(e?8:-1)}}function ye(o,n){o&1&&(s(0,"sh-alert"),S(1,8),d(2,"sh-icon",34),g(),r())}function xe(o,n){o&1&&(s(0,"sh-alert",21),S(1,9),d(2,"sh-icon",34),g(),r())}function we(o,n){if(o&1&&(s(0,"sh-alert",22),S(1,10),d(2,"sh-icon",34),g(),r()),o&2){let e=_();l(2),P(e.testErrorMessage()),$(1)}}function Ge(o,n){if(o&1&&(s(0,"sh-alert",23),S(1,11),d(2,"sh-icon",34),g(),r()),o&2){let e=_();l(2),P(e.testErrorMessage()),$(1)}}function be(o,n){if(o&1){let e=C();s(0,"app-destination-list-item",24)(1,"button",27),u("click",function(){T(e);let t=_();return E(t.removeDestination())}),p(2,12),r()()}if(o&2){_();let e=w(15);D("destination",e)}}function Ue(o,n){if(o&1){let e=C();s(0,"app-destination-list",35),u("setDestination",function(t){T(e);let a=_();return E(a.setDestination(t))}),r()}}function ke(o,n){if(o&1){let e=C();s(0,"app-single-destination",36),M("targetUrlChange",function(t){T(e);let a=_();return f(a.targetUrlModel,t)||(a.targetUrlModel=t),E(t)}),r()}if(o&2){let e=_();h("targetUrl",e.targetUrlModel)}}function ve(o,n){o&1&&(S(0,3,1),d(1,"sh-icon",29),g())}function We(o,n){o&1&&(S(0,3,2),d(1,"sh-icon"),g())}function Ve(o,n){if(o&1){let e=C();s(0,"sh-dialog",37),M("isOpenChange",function(t){T(e);let a=_();return f(a.targetUrlDialogOpen,t)||(a.targetUrlDialogOpen=t),E(t)}),s(1,"header",38)(2,"div",39)(3,"h2"),p(4,13),r(),s(5,"sh-alert",22),p(6,14),r()()(),s(7,"div",40)(8,"sh-form-field")(9,"textarea",41),M("ngModelChange",function(t){T(e);let a=_();return f(a.targetUrlCtrl,t)||(a.targetUrlCtrl=t),E(t)}),r()()(),s(10,"footer",42)(11,"button",27),u("click",function(){T(e);let t=_();return E(t.closeTargetUrlDialog(!1))}),L(12,"Cancel"),r(),s(13,"button",43),u("click",function(){T(e);let t=_();return E(t.closeTargetUrlDialog(!0))}),S(14,15),d(15,"sh-icon"),g(),r()()()}if(o&2){let e=_();h("isOpen",e.targetUrlDialogOpen),D("options",ee(3,Me)),l(9),h("ngModel",e.targetUrlCtrl)}}var G=class o{#i=R(ie);#o=R(ne);#t=R(ge);#a=R(Ne);injector=R(X);#e=R(he);#s=R(Ie);formRef=te.required("formRef");targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;destinationTypeOptionsInFocus=N(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=A(()=>{let n=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return n.map(i=>e.find(t=>t.key===i))});selectedDestinationType=A(()=>{let n=this.#e.destinationTargetUrl();return n?Oe(n):null});selectedDestinationTypeOption=A(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),i=this.targetUrlInitial();!n||e===i||!e||this.#e.updateTargetUrl(e)}testDestination(n,e,i){let t=this.#e.destinationTargetUrl();t&&(this.#e.setTestState("testing"),this.#a.testDestination(t,this.#e.backupId(),n,!0,e).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),a.containsBackup===!1?(this.#e.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),e||this.#t.open(I,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#e.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),e||this.#t.open(I,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),i?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){i?.();return}let m=t.includes("?");a.action==="trust-cert"&&this.#e.updateTargetUrl(t+`${m?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.updateTargetUrl(t+`${m?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):i?.()}}))}setDestination(n){let e=Ce(n??"");if(e){if(e.mapper.default){let i=e.mapper.default("");this.#e.updateTargetUrl(i);return}this.#e.updateTargetUrl(`${n}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#t.open(I,{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:e=>{e?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(I,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#t.open(I,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=H({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,i){e&1&&q(i.formRef,fe,5),e&2&&Y()},features:[Z([Re])],decls:28,vars:11,consts:()=>{let n;n=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD*25: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/*25:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*26: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/*26:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,i=Q(i);let t;t=$localize` Test destination `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let m;m=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let b;b=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let v;v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let W;W=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`Change`;let B;B=$localize`Edit target URL`;let z;z=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;return J=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],n,e,i,t,a,m,b,U,k,v,W,V,B,z,J,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[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","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,i){if(e&1){let t=C();y(0),s(1,"form",16,0),u("submit",function(){return T(t),E(i.next())}),s(3,"header")(4,"h3",17)(5,"span"),p(6,1),r(),s(7,"div",18),F(8,Ae,2,1,"button",19),F(9,Pe,3,0,"button",20)(10,Le,9,1,"sh-menu"),r()(),F(11,ye,3,0,"sh-alert")(12,xe,3,0,"sh-alert",21)(13,we,3,1,"sh-alert",22)(14,Ge,3,1,"sh-alert",23),y(15),F(16,be,3,1,"app-destination-list-item",24),r(),F(17,Ue,1,0,"app-destination-list"),F(18,ke,1,1,"app-single-destination",25),s(19,"div",26)(20,"button",27),u("click",function(){return T(t),E(i.goBack())}),S(21,2),d(22,"sh-icon"),g(),r(),s(23,"button",28),S(24,3),F(25,ve,2,0,"sh-icon",29)(26,We,2,0,"sh-icon"),g(),r()()(),F(27,Ve,16,4,"sh-dialog",30)}if(e&2){let t=x(!!i.targetUrlModel());l(8),O(t?8:-1),l(),O(t?10:9),l(2),O(i.testSignal()=="testing"?11:i.testSignal()=="success"?12:i.testSignal()=="warning"?13:i.testSignal()=="error"?14:-1),l(4);let a=x(i.selectedDestinationTypeOption());l(),O(a?16:-1),l(),O(t?-1:17),l(),O(t?18:-1),l(5),D("disabled",i.testSignal()=="testing"||!t),l(2),O(i.testSignal()=="testing"?25:26),l(2),O(i.targetUrlDialogOpen()?27:-1)}},dependencies:[De,me,pe,ce,le,oe,ae,se,_e,re,de,ue,Fe,Te,Se,Ee],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}"],changeDetection:0})};export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-VYJNNEM5.js";import"./chunk-JWO4FPWJ.js";import{g as q}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-VYJNNEM5.js";import"./chunk-JWO4FPWJ.js";import{g as q}from"./chunk-JRJXFRW7.js";import"./chunk-4VEFX5WQ.js";import"./chunk-AS6Z56AD.js";import{b as Z}from"./chunk-I3GPRGH5.js";import"./chunk-IW4RDAIN.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-EXFIQK72.js";import{a as V}from"./chunk-UFTPS2J6.js";import"./chunk-HRCZ5SXI.js";import"./chunk-6Q6SSTBK.js";import{a as j}from"./chunk-FK7JFD5B.js";import"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-DW332N2S.js";import{b as H}from"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{C as W,L as X,O as z,u as J}from"./chunk-HPNLQHW6.js";import{c as B}from"./chunk-BGTK25UG.js";import{b as w}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import{ka as k}from"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as s,Bb as R,Cc as T,Dc as d,Fb as P,Gb as m,Mc as b,Pa as a,Pb as y,Qb as D,Rb as r,Sb as v,Tb as x,W as c,Xb as g,ba as u,ca as f,cb as A,jc as M,la as I,mc as N,sb as O,tb as p,yb as C,zb as o}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";function Q(n,t){n&1&&(o(0,"div",17),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(o(0,"div",18),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(o(0,"sh-card",10),P(1,16),r(2,2),m(),O(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();a(3),p(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),T(1,"number"),T(2,"number")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileCount)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(P(0),r(1,8),m())}function ne(n,t){if(n&1&&(M(0),T(1,"bytes"),T(2,"bytes")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileSize)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileSize)," ")}}function ie(n,t){n&1&&(P(0),r(1,9),m())}function oe(n,t){if(n&1&&(o(0,"sh-card",10)(1,"h3"),y(2,5),R(3,"sh-spinner",23),D(),s(),o(4,"div",24),R(5,"sh-progress-bar",25),o(6,"p")(7,"span"),r(8,6),s(),O(9,ee,3,6)(10,te,2,0,"ng-container"),s(),o(11,"p")(12,"span"),r(13,7),s(),O(14,ne,3,6)(15,ie,2,0,"ng-container"),s()()()),n&2){let e,i,l,E,S=g();a(3),v((e=S.statusData())==null?null:e.statusText),x(2),a(2),C("value",(i=S.statusData())==null?null:i.OverallProgress),a(4),p((l=S.statusData())!=null&&l.ProcessedFileCount?9:10),a(5),p((E=S.statusData())!=null&&E.ProcessedFileSize?14:15)}}var G=class n{#o=c(B);#s=c(H);#t=c(V);#n=c(q);#r=c(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=I("");#e=null;lastRestoreStarted=b(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#o.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#i(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#_(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#i(e)})}#i(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let i;i=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let S;S=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let $;return $=$localize`N/A`,[t,e,i,l,E,S,h,F,L,$,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,i){if(e&1&&(o(0,"section"),O(1,Y,5,1,"sh-card",10)(2,oe,16,4,"sh-card",10),o(3,"sh-card",11)(4,"h3"),r(5,0),s(),o(6,"div",12),R(7,"app-notifications",13),s()(),o(8,"sh-card",14)(9,"h3"),r(10,1),s(),R(11,"app-logs-live",15),s()()),e&2){let l;a(),p(i.restoreResult()!=""?1:2),a(6),C("notificationFilterPredicate",i.notificationFilterPredicate()),a(4),C("asSimpleList",!0)("polling",i.restoreResult()=="")("whenFilter",(l=i.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",i.backupId())}},dependencies:[K,X,z,J,W,Z,j,k],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-5JYCHNFV.js";import{a as W}from"./chunk-
|
|
1
|
+
import{a as Y}from"./chunk-5JYCHNFV.js";import{a as W}from"./chunk-WVF3GRDZ.js";import{e as U}from"./chunk-4RKO4YFU.js";import{B as j,D as B,H as Q,b as $,c as A,d as v,e as k,f as x,j as J,p as X,q as V,r as q,t as z,u as H,w as K}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{d as R}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as F,Ab as i,Bb as r,E as S,Ib as M,Pa as l,Pb as g,Qb as d,Rb as O,Sc as y,Vb as C,W as p,aa as f,cb as L,cc as P,dc as w,gc as b,jc as G,kc as D,la as a,na as T,sb as I,tb as E,yb as h,zb as o}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Z=["passwordInput"];function ee(m,t){m&1&&(o(0,"sh-alert",6),O(1,4),i())}var _=new q,N=class m{#e=p(R);#n=p(U);rememberMe=W("rememberMe",!1,!0);failedLogin=a(!1);successLogin=a(!1);isLoading=a(!1);loginForm=_.group({user:_.control(""),pass:_.control("",v.required),rememberMe:_.control(this.rememberMe())});showPassword=a(!1);passwordInput=y("passwordInput");passwordEffect=T(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(t=>this.rememberMe.set(t??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let t=this.loginForm.value.pass,n=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!n&&t&&(this.isLoading.set(!0),this.#n.login(t,this.rememberMe()).pipe(S(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(n){return new(n||m)};static \u0275cmp=L({type:m,selectors:[["app-login"]],viewQuery:function(n,e){n&1&&P(e.passwordInput,Z,5),n&2&&w()},decls:24,vars:6,consts:()=>{let t;t=$localize`Enter your password`;let n;n=$localize` Password ${"\uFFFD#10\uFFFD"}:START_LINK:${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#10\uFFFD"}:CLOSE_LINK:`;let e;e=$localize` Login ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let s;s=$localize` Keep me logged in ${"\uFFFD#21\uFFFD\uFFFD/#21\uFFFD"}:TAG_INPUT:`;let c;return c=$localize` Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. `,[["passwordInput",""],n,e,s,c,[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["name","password","autocomplete","current-password","placeholder",t,"tabindex","1","formControlName","pass",3,"type"],["suffix","",3,"click"],["shButton","","type","submit",1,"raised","primary","login-button"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(n,e){if(n&1){let s=M();o(0,"form",5),C("submit",function(){return F(s),f(e.submit())}),I(1,ee,2,0,"sh-alert",6),o(2,"div",7),r(3,"app-logo"),i(),o(4,"div",8)(5,"div",9),r(6,"input",10),o(7,"sh-form-field")(8,"label",11),g(9,1),o(10,"a",12),r(11,"sh-icon"),i(),d(),i(),r(12,"input",13,0),o(14,"sh-icon",14),C("click",function(){return F(s),f(e.showPassword.set(!e.showPassword()))}),G(15),i()(),o(16,"button",15),g(17,2),r(18,"sh-icon"),d(),i()(),o(19,"sh-checkbox",16),g(20,3),r(21,"input",17),d(),i(),o(22,"div",18),r(23,"label",19),i()()()}n&2&&(h("formGroup",e.loginForm),l(),E(e.failedLogin()&&!e.successLogin()?1:-1),l(11),h("type",e.showPassword()?"text":"password"),l(3),D(e.showPassword()?"eye":"eye-slash"),l(),b("loader",e.isLoading()))},dependencies:[z,J,A,$,k,x,V,X,Y,Q,H,j,K,B],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}.login-button[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}"],changeDetection:0})};export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f,c as b}from"./chunk-BGTK25UG.js";import{d as O}from"./chunk-A4LPGPDU.js";import{a as v,d as T}from"./chunk-QPTSKQZ2.js";import{ua as P,va as s}from"./chunk-OTPG7USH.js";import{C as c,E as y,M as u,R as l,W as i,f as S,i as A,l as E,la as n,p as d,wa as N,z as R}from"./chunk-T2WO6CVD.js";var h=class r{platformId=i(N);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,o=!1){return s(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${o?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,o,t=!1){if(!s(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(o))}get length(){return P(this.platformId)?localStorage.length:0}getItem(e){return s(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,o){if(!s(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,o)}removeItem(e){s(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!s(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){s(this.platformId)||localStorage.clear()}clear(){if(!s(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return s(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(o){return new(o||r)};static \u0275prov=l({token:r,factory:r.\u0275fac})};function $(){try{let r=document.querySelector('meta[name="duplicati-proxy-config"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.startsWith("/"))return e}}catch(r){console.warn("Failed to read proxy configuration from meta tag:",r)}return null}function _(){try{let r=document.querySelector('meta[name="duplicati-enable-iframe-hosting"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.length>0)return e.toLowerCase()!=="true"}}catch(r){console.warn("Failed to read disable relay support configuration from meta tag:",r)}return!0}function B(){let r=$();if(r&&r.length>0){let e=r;e.startsWith("/")||(e=`/${e}`),e.endsWith("/")&&(e=e.slice(0,-1)),f.BASE=e}else f.BASE=""}var g=class r{#i=i(h);#r=n(null);#t=window.self!==window.top&&_();#o=n(this.#t);relayIsEnabled=this.#o.asReadonly();config=this.#r.asReadonly();configLoaded=this.#t?new A:null;isLoading=n(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#s(),this.#t&&(this.#o.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let o=e.data.replace("access:",""),t=JSON.parse(o);if(!t?.accessToken||!t?.clientId){this.#e("error:invalid-config"),this.#o.set(!1);return}if(typeof t.clientId!="string"){this.#e("error:invalid-config"),this.#o.set(!1);return}if(typeof t.accessToken!="string"){this.#e("error:invalid-config"),this.#o.set(!1);return}let a=this.#i.getItem("locale")??"en-US",I=t.locale??"en-US";a!==I&&(this.#i.setItem("locale",I),window.location.reload()),this.#r.set(t),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#s(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#r.set(e)}clearConfig(){this.#r.set(null)}static \u0275fac=function(o){return new(o||r)};static \u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})};var w="PROXY_AUTHED_FAKE_TOKEN",p="refreshNonce",m="v1:persist:duplicati:refreshNonce",L=class r{#i=i(O);#r=i(T);#t=i(b);#o=i(g);#e=n(null);#s=n(!1);#n=n(!1);token=this.#e.asReadonly();isLoggingOut=this.#s.asReadonly();setRefreshNonce(e,o){if(!e){sessionStorage.removeItem(p);return}o?localStorage.setItem(m,e||""):sessionStorage.setItem(p,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(p),o=localStorage.getItem(m),t=e||o;return{requestBody:t?{requestBody:{Nonce:t}}:void 0,local:t===o}}login(e,o){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:o}}).pipe(c(1),u(t=>{t.AccessToken?(this.#e.set(t.AccessToken),this.setRefreshNonce(t.RefreshNonce,o)):this.#e.set(null)}))}refreshToken(){if(this.#o.relayIsEnabled())return this.#e.set(w),new S(t=>{t.next({AccessToken:w}),t.complete()});if(this.#n())return this.#t.postApiV1AuthIssuetokenByOperation({operation:"websocket"}).pipe(c(1),u(t=>{t.Token&&this.#e.set(t.Token)}),d(t=>({AccessToken:t.Token})));let{requestBody:e,local:o}=this.getRefreshNonceBody();return this.#t.postApiV1AuthRefresh(e).pipe(c(1),u(t=>{t.AccessToken&&(this.#e.set(t.AccessToken),this.setRefreshNonce(t.RefreshNonce,o))}))}checkProxyAuthed(){let e=new v({"custom-proxy-check":"true"}),o=f.BASE||"";return this.#r.post(`${o}/api/v1/auth/status`,{headers:e}).pipe(d(t=>{let a=t;return a?.authorized&&a?.socketToken?(this.#e.set(a.socketToken),this.#n.set(!0),!0):!1}),R(()=>E(!1)))}logout(){this.#s.set(!0);let{requestBody:e,local:o}=this.getRefreshNonceBody();sessionStorage.removeItem(p),o&&localStorage.removeItem(m),this.#t.postApiV1AuthRefreshLogout(e).pipe(c(1),y(()=>{this.#s.set(!1),this.#e.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(o){return new(o||r)};static \u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})};export{h as a,B as b,g as c,w as d,L as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-LJ2P7K2Z.js";import{j as C}from"./chunk-SJTXV6AC.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-UFTPS2J6.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as G}from"./chunk-HRCZ5SXI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-LVX3DTQM.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-QIUMBQM5.js";import{b as h}from"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{L as M,M as $,R as I}from"./chunk-HPNLQHW6.js";import{c as L}from"./chunk-BGTK25UG.js";import{b as N,c as O,e as B,f as b}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as u,Bb as r,C as f,Pa as n,Pb as c,Qb as _,W as l,Xb as A,cb as D,jc as P,lc as E,na as R,sb as T,tb as g,wc as k,yb as d,zb as s,zc as p}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var y=(a,e)=>[a,e,"general"],U=(a,e)=>[a,e,"destination"],K=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],H=(a,e)=>[a,e,"options"];function J(a,e){if(a&1&&(s(0,"p"),P(1),u()),a&2){let t=A();n(),E("Editing: ",t.backupName())}}function X(a,e){a&1&&r(0,"sh-progress-bar",7)}function x(a,e){a&1&&(s(0,"section"),r(1,"router-outlet"),u())}var m=class a{#t=l(N);#e=l(C);#a=l(G);#i=l(L);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=h(this.#t.params);#n=h(this.#t.url);paramsChanged=R(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(f(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(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[k([C])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[e,t,i,o,F,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),s(1,"header"),T(2,J,2,1,"p"),s(3,"sh-stepper",5)(4,"div",6),c(5,0),r(6,"sh-radio"),_(),u(),s(7,"div",6),c(8,1),r(9,"sh-radio"),_(),u(),s(10,"div",6),c(11,2),r(12,"sh-radio"),_(),u(),s(13,"div",6),c(14,3),r(15,"sh-radio"),_(),u(),s(16,"div",6),c(17,4),r(18,"sh-radio"),_(),u()()(),T(19,X,1,0,"sh-progress-bar",7)(20,x,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),d("routerLink",p(7,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(10,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(13,K,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(19,H,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[O,B,b,v,$,I,M],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}"],changeDetection:0})};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-JRJXFRW7.js";import"./chunk-4VEFX5WQ.js";import"./chunk-AS6Z56AD.js";import"./chunk-IW4RDAIN.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-FK7JFD5B.js";import"./chunk-5DJAX2HH.js";import"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as C}from"./chunk-
|
|
1
|
+
import{g as C}from"./chunk-JRJXFRW7.js";import"./chunk-4VEFX5WQ.js";import"./chunk-AS6Z56AD.js";import"./chunk-IW4RDAIN.js";import{a as k}from"./chunk-LJ2P7K2Z.js";import{j as w}from"./chunk-SJTXV6AC.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-UFTPS2J6.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-HRCZ5SXI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-LVX3DTQM.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-QIUMBQM5.js";import{b as u}from"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{M as W,R as y}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as n,Bb as s,Pa as r,Pb as F,Qb as l,W as c,Xb as O,cb as D,gc as L,la as f,na as P,sb as E,tb as g,wc as N,xc as R,yb as _,yc as p,zb as o}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=P(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&L("full-width",a.isProgressPage())},features:[N([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
1
|
+
import{a as A}from"./chunk-LJ2P7K2Z.js";import"./chunk-UFTPS2J6.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-HRCZ5SXI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-LVX3DTQM.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-QIUMBQM5.js";import"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{U as S}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{c as u,e as N,f as c}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as t,Bb as T,Rb as n,cb as g,zb as e}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-HRCZ5SXI.js";import"./chunk-6Q6SSTBK.js";import{a as ae}from"./chunk-FK7JFD5B.js";import{a as _e}from"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import{c as re}from"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as ie,D as ne,b as H,e as Q,i as Y,s as Z,u as ee,z as te}from"./chunk-HPNLQHW6.js";import{c as oe}from"./chunk-BGTK25UG.js";import{d as j,e as q}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as p,Ab as o,Cc as z,E as K,Fc as V,Ib as g,Mc as M,Pa as r,Rb as c,Rc as W,Sb as A,Tb as L,Ub as F,Vb as $,W as u,Xb as C,aa as P,cb as y,gc as x,jc as E,l as k,la as T,oc as S,p as U,pc as D,qc as h,rc as G,sb as m,sc as w,tb as f,tc as v,xc as J,yb as N,yc as X,z as I,zb as n}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function Ee(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,4),o(),n(3,"p"),c(4,5),o(),n(5,"sh-checkbox",11),E(6," Delete local database "),n(7,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteLocalDb,e)||(a.deleteLocalDb=e),P(e)}),o()()()}if(l&2){let t=C();r(7),S("ngModel",t.deleteLocalDb)}}function ue(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,6),o(),n(3,"p"),c(4,7),z(5,"bytes"),o(),n(6,"sh-checkbox",11),E(7," Delete remote files "),n(8,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),P(e)}),o()()()}if(l&2){let t=C(),i=v(0),e=(i==null||i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.TargetFilesSize)??0;r(5),A(t.fileCount())(t.fileCount())(V(5,4,e,!0,!0)),L(4),r(3),S("ngModel",t.deleteRemoteFiles)}}var B=class l{#t=u(oe);#i=u(te);#e=u(le);#n=u(j);id=W.required();backup=M(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(U(()=>!0),I(()=>k(!1)))});fileCount=M(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=T(!1);deleteRemoteFiles=T(!1);isDeleting=T(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#i.open(_e,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:i}).pipe(K(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#n.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=y({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let b;b=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let O;return O=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,i,e,a,b,R,O,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,i){if(t&1){let e=g();G(0),n(1,"h3"),c(2,0),o(),m(3,Ee,8,1,"section"),n(4,"section")(5,"h4"),c(6,1),o(),n(7,"p"),c(8,2),o(),n(9,"button",8),E(10," Export configuration "),n(11,"sh-icon"),E(12,"caret-right"),o()()(),m(13,ue,9,8,"section"),n(14,"div",9)(15,"button",8),c(16,3),o(),n(17,"button",10),$("click",function(){return p(e),P(i.deleteBackup())}),E(18,"Delete backup"),o()()}if(t&2){let e=w(i.backup()),a=i.noLocalDbResource.value();r(2),A(e==null||e.Backup==null?null:e.Backup.Name),L(2),r(),f(a?3:-1),r(6),N("routerLink",X(8,ce,i.id())),r(4),f(a?13:-1),r(2),N("routerLink",J(10,se)),r(2),x("loader",i.isDeleting())}},dependencies:[ne,ie,ee,Z,H,Q,Y,q,ae],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{B as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-RD5JFFHQ.js")},{path:"destination",loadComponent:()=>import("./chunk-QT7EG3ZF.js")},{path:"source-data",loadComponent:()=>import("./chunk-EBSK6KZQ.js")},{path:"schedule",loadComponent:()=>import("./chunk-XUPDFNDB.js")},{path:"options",loadComponent:()=>import("./chunk-AV5KKRMA.js")}];export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _e}from"./chunk-4VEFX5WQ.js";import{a as le}from"./chunk-AS6Z56AD.js";import"./chunk-IW4RDAIN.js";import{j as ae}from"./chunk-
|
|
1
|
+
import{a as _e}from"./chunk-4VEFX5WQ.js";import{a as le}from"./chunk-AS6Z56AD.js";import"./chunk-IW4RDAIN.js";import{j as ae}from"./chunk-SJTXV6AC.js";import"./chunk-O4OTZE5N.js";import{a as ie,b as oe,c as se}from"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5DJAX2HH.js";import"./chunk-QIUMBQM5.js";import"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as ee,H as ne,P as te,c as H,e as q,i as Y,k as j,s as Q,u as Z}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{b as W,d as V}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as N,Ab as o,Bb as m,Ib as h,Mc as J,Pa as c,Pb as S,Qb as C,Rb as r,Sc as X,Vb as I,W as g,Xb as p,aa as P,cb as z,cc as v,dc as x,gc as K,la as B,oc as u,pc as d,qc as T,sb as E,tb as f,xc as U,yb as O,zb as t}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var re=["formRef"],ce=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(a,l){a&1&&(S(0,1,1),m(1,"sh-icon",20),C())}function ue(a,l){a&1&&(t(0,"p",21),r(1,6),o())}function de(a,l){a&1&&(t(0,"p"),r(1,7),o())}function Te(a,l){if(a&1){let n=h();t(0,"p"),r(1,8),o(),t(2,"app-timespan",18),T("ngModelChange",function(s){N(n);let i=p();return d(i.optionsFields.backupRetentionTime,s)||(i.optionsFields.backupRetentionTime=s),P(s)}),t(3,"label",30),r(4,9),o()()}if(a&2){let n=p();c(2),O("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function Se(a,l){if(a&1){let n=h();t(0,"p"),r(1,10),o(),t(2,"sh-form-field")(3,"label",31),r(4,11),o(),t(5,"input",32),T("ngModelChange",function(s){N(n);let i=p();return d(i.optionsFields.backupRetentionVersions,s)||(i.optionsFields.backupRetentionVersions=s),P(s)}),o()()}if(a&2){let n=p();c(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Ce(a,l){a&1&&(t(0,"p"),r(1,12),o())}function Oe(a,l){if(a&1){let n=h();t(0,"p"),r(1,13),o(),t(2,"sh-form-field")(3,"p"),r(4,14),o(),t(5,"label",33),r(6,15),o(),t(7,"input",34),T("ngModelChange",function(s){N(n);let i=p();return d(i.optionsFields.backupRetentionCustom,s)||(i.optionsFields.backupRetentionCustom=s),P(s)}),o()()}if(a&2){let n=p();c(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var me=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],ge=1024*1024*1024*2,Ne=1024*1024*5,F=class a{#e=g(ae);#n=g(V);#t=g(W);formRef=X.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=B(me);exceededVolumeSize=J(()=>{let{size:l,unit:n}=oe(this.optionsFields.remoteVolumeSize());if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,ie.findIndex(s=>s.value===n));return e>ge||e<Ne});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=z({type:a,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,re,5),n&2&&x()},decls:30,vars:16,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let s;s=$localize`Backup retention`;let i;i=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let M;M=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let R;R=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let b;b=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let k;k=$localize`Number of versions`;let L;L=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let w;w=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let G;G=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let D;return D=$localize`Retention expression`,[l,n,e,s,i,M,R,A,b,y,$,k,L,w,G,D,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],[1,"warn"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"sh-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),o(),t(3,"div",17)(4,"app-size",18),T("ngModelChange",function(i){return d(e.optionsFields.remoteVolumeSize,i)||(e.optionsFields.remoteVolumeSize=i),i}),t(5,"label",19),S(6,1),E(7,pe,2,0,"sh-icon",20),C(),o()(),E(8,ue,2,0,"p",21),t(9,"p"),S(10,2),t(11,"a",22),m(12,"sh-icon",23),o(),C(),o()(),t(13,"sh-select",24)(14,"label",19),r(15,3),o(),t(16,"input",25),T("ngModelChange",function(i){return d(e.optionsFields.backupRetention,i)||(e.optionsFields.backupRetention=i),i}),o()(),E(17,de,2,0,"p")(18,Te,5,2)(19,Se,6,1)(20,Ce,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",26),T("optionsChange",function(i){return d(e.settings,i)||(e.settings=i),i}),o(),t(23,"div",27)(24,"button",28),I("click",function(){return e.goBack()}),S(25,4),m(26,"sh-icon"),C(),o(),t(27,"button",29),I("click",function(){return e.submit()}),S(28,5),m(29,"sh-icon"),C(),o()()()),n&2&&(c(4),O("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),c(3),f(e.exceededVolumeSize()?7:-1),c(),f(e.exceededVolumeSize()?8:-1),c(5),O("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),c(3),u("ngModel",e.optionsFields.backupRetention),c(),f(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),c(5),u("options",e.settings),O("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",U(15,ce)),c(5),K("loader",e.isSubmitting()))},dependencies:[Q,H,j,q,Y,_e,se,le,ee,Z,te,ne],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v}from"./chunk-TELPJYLN.js";import{c as j,e as x}from"./chunk-4RKO4YFU.js";import{z as m}from"./chunk-HPNLQHW6.js";import{a as $,c as b}from"./chunk-BGTK25UG.js";import{ka as L}from"./chunk-OTPG7USH.js";import{Cb as N,Cc as G,Db as y,Eb as I,Ec as W,L as E,Mc as p,Pa as R,Pb as _,Qb as A,R as h,Rb as w,Sb as P,Tb as F,W as c,cb as M,f,g as k,la as n,na as O}from"./chunk-T2WO6CVD.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=O(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=M({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),w(2,0),y()(),N(3,"div",3)(4,"p"),_(5,1),I(6,"strong"),G(7,"number"),A(),y()()),t&2&&(R(7),P(W(7,1,s.countdown(),"2.0-0")),F(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var D=class r{dialog=c(m);#e=c(b);#i=n("disconnected");#s=n(null);#t=n(-1);#r=n(0);#l=n(!1);#u=new k;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=c(j).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new k,this.#c()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#c(){this.#i.set("connecting"),this.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(E(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,a=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(a),setTimeout(()=>{this.#c()},a)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,T=class r{#e=c(x);#i=c(v);dialog=c(m);#s=null;#t=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#o=n(null);#c=n(null);#a=void 0;#n=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#n.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#c.asReadonly();#h=null;taskCompleted=new f(e=>{this.#h=e});#d=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#e.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let a=window.location.hostname,g=$.BASE||"",J=this.#i.hasWebSocketAuth()?`${t}//${a}${s}${g}/notifications`:`${t}//${a}${s}${g}/notifications?token=${e}`;this.#t.set("connecting"),this.#s=new WebSocket(J),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e}))):this.#S()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let o=JSON.parse(d.data);o.Success?(u&&console.log("WebSocket authentication successful"),this.#S()):(console.error("WebSocket authentication failed:",o.Message),this.#t.set("disconnected"));return}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#t.set("disconnected");return}try{let o=JSON.parse(d.data),l=o?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",o),this.#r.set(o);else if(l==="reply"){let i=o;i.Success||console.error("WebSocket reply error:",i.Message)}else if(l==="progress"){let i=o;u&&console.log("Received progress update:",i.Data),this.#l.set(i.Data)}else if(l==="serversettings"){let i=o;u&&console.log("Received server settings update:",i.Data),this.#u.set(i.Data)}else if(l==="taskqueue"){let i=o;u&&console.log("Received task update:",i.Data),this.#o.set(i.Data)}else if(l==="taskcompleted"){let i=o;u&&console.log("Received task completed:",i.Data),this.#h?.next(i.Data)}else if(l==="backuplist"){let i=o;u&&console.log("Received backup list update:",i.Data),this.#c.set(i.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var o=d.code===4401;o&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:l=>{console.error("Error refreshing token",l)}}),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#S(){this.#t.set("connected");let e=this.#n();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#a&&this.#a.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),a=s[e];(!a||JSON.stringify(a)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var q=10,V=class r{#e=c(T);#i=c(D);#s=c(b);#t=c(v);#r=n("longpoll");#l=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>q&&this.#n.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#r()==="websocket"?this.#e.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=p(()=>this.#r()==="websocket"?this.#e.serverState():this.#i.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#r()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#e.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new f(t=>{let s=this.#n.find(a=>a.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#h()})}#h(){this.#a||this.#u()||(this.#a=!0,this.#d())}#d(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#p();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>q&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#d()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#d()},3e3)}})}#p(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{T as a,V as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,d as b}from"./chunk-
|
|
1
|
+
import{c as a,d as b}from"./chunk-JRJXFRW7.js";import"./chunk-4VEFX5WQ.js";import"./chunk-AS6Z56AD.js";import"./chunk-IW4RDAIN.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-FK7JFD5B.js";import"./chunk-5DJAX2HH.js";import"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-27ICL4CS.js")},{path:"encryption",loadComponent:()=>import("./chunk-BBRK364M.js")},{path:"select-files",loadComponent:()=>import("./chunk-MNHB4VKJ.js")},{path:"options",loadComponent:()=>import("./chunk-5G4V55RS.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-42L3D2F7.js")}],t=o;export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as fe,c as Re,d as b}from"./chunk-MHRECQ5Y.js";import{a as Ne}from"./chunk-FVZOIWTT.js";import"./chunk-6Q6SSTBK.js";import"./chunk-QZRRXR3V.js";import{b as he}from"./chunk-DW332N2S.js";import"./chunk-6K3PRIYO.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{A as Ce,B as Ee,H as Pe,L as Se,W as me,Y as ge,b as re,c as se,d as g,e as ae,f as le,j as _e,p as ce,q as pe,r as Fe,t as de,u as ue,w as Te}from"./chunk-HPNLQHW6.js";import{a as ie,c as Oe}from"./chunk-BGTK25UG.js";import{b as oe,d as te,e as ne}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import{d as ee}from"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as D,Ab as r,Bb as _,E as M,Ib as L,K as j,Mc as A,Pa as s,Pb as c,Qb as p,Rb as S,Sb as X,Tb as G,Ub as B,Vb as m,W as C,Xb as u,aa as x,cb as Q,gc as h,jc as $,kc as W,la as E,mc as Y,na as y,sb as F,tb as d,xc as Z,yb as P,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Ie=()=>["/"];function we(n,o){n&1&&(a(0,"sh-toggle",23),c(1,5),_(2,"input",26),p(),r())}function De(n,o){n&1&&(a(0,"span",29),S(1,9),r())}function xe(n,o){if(n&1&&(a(0,"span",29),S(1,10),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),G(1)}}function $e(n,o){if(n&1&&_(0,"sh-progress-bar",36),n&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ae(n,o){n&1&&(a(0,"span",29),S(1,11),r())}function Me(n,o){n&1&&(a(0,"span",29),S(1,12),r())}function ye(n,o){if(n&1&&(a(0,"span",29),S(1,13),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),G(1)}}function Le(n,o){n&1&&(c(0,7,1),_(1,"sh-icon"),p())}function Xe(n,o){n&1&&(c(0,7,2),_(1,"sh-icon"),p())}function Ge(n,o){n&1&&(c(0,14,1),_(1,"sh-icon",38),p())}function Be(n,o){n&1&&(c(0,14,2),_(1,"sh-icon"),p())}function be(n,o){if(n&1){let e=L();a(0,"button",37),m("click",function(){D(e);let i=u(2);return x(i.copyPassword())}),c(1,14),F(2,Ge,2,0)(3,Be,2,0),p(),r()}if(n&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function ve(n,o){n&1&&(a(0,"sh-alert",35),S(1,15),r())}function ke(n,o){if(n&1){let e=L();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),_(4,"sup"),p(),r(),_(5,"input",28),F(6,De,2,0,"span",29)(7,xe,2,1,"span",29),r(),F(8,$e,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),_(10,"input",31),F(11,Ae,2,0,"span",29)(12,Me,2,0,"span",29)(13,ye,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){D(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Le,2,0)(18,Xe,2,0),p(),r(),a(19,"button",33),m("click",function(){D(e);let i=u();return x(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,be,4,1,"button",34),r(),F(23,ve,2,0,"sh-alert",35),r()}if(n&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ue(n,o){if(n&1&&(a(0,"div",25)(1,"code"),$(2),r()()),n&2){let e=u();s(2),W(e.exportedCmd())}}var f=new Fe,v=class n{#o=C(fe);#t=C(Oe);#e=C(oe);#n=C(te);#i=C(ee);#r=C(Ne);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,Re()]),password:f.control("",[b("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[b("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=he(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=y(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=y(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(j(o=>{let e=R=>{let O=Object.entries(R);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},t=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=ie.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:t,token:o.Token})}`,{responseType:"blob"})}),M(()=>this.isExporting.set(!1))).subscribe({next:o=>{let t=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${t}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(M(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let t=window.URL.createObjectURL(o),i=document.createElement("a");i.href=t,i.download=e,i.click(),window.URL.revokeObjectURL(t)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Q({type:n,selectors:[["app-export"]],decls:26,vars:16,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 t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let R;R=$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 N;N=$localize`Password`;let T;T=$localize`Repeat password`;let k;k=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let I;I=$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:`,I=B(I);let U;U=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let K;K=$localize`Passwords are required`;let J;J=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let H;H=$localize`Passwords do not match`;let z;z=$localize`Passwords are required`;let V;V=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$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:`,w=B(w);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,t,i,R,O,k,I,U,K,J,H,z,V,w,q,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[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",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",T,"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,t){if(e&1&&(a(0,"header")(1,"h3"),$(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return t.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),a(10,"p"),$(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return t.exportType.set("cmd")}),c(15,2),_(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return t.exportType.set("file")}),c(18,3),_(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),_(22,"input",22),p(),r(),F(23,we,3,0,"sh-toggle",23),F(24,ke,24,8,"div",24),F(25,Ue,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",Z(15,Ie)),s(3),h("loading",t.isExporting()),P("shTooltip",t.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",t.exportForm.invalid||t.showCopyPassword()&&!t.copiedPassword()||t.encryptionFieldSignal()&&t.exportForm.value.repeatPassword!==t.exportForm.value.password),s(4),Y("#",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",t.exportForm),s(2),h("active",t.exportType()==="cmd"),s(3),h("active",t.exportType()==="file"),s(6),d(t.exportType()==="file"?23:-1),s(),d(t.encryptionFieldSignal()?24:-1),s(),d(t.exportedCmd()?25:-1)}},dependencies:[de,_e,se,re,ae,le,pe,ce,ne,Ce,me,ue,Pe,Ee,Te,Se,ge],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}"],changeDetection:0})};export{v as default};
|
|
1
|
+
import{a as fe,c as Re,d as b}from"./chunk-MHRECQ5Y.js";import{a as Ne}from"./chunk-HRCZ5SXI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-WVF3GRDZ.js";import{b as he}from"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{A as Ce,B as Ee,H as Pe,L as Se,W as me,Y as ge,b as re,c as se,d as g,e as ae,f as le,j as _e,p as ce,q as pe,r as Fe,t as de,u as ue,w as Te}from"./chunk-HPNLQHW6.js";import{a as ie,c as Oe}from"./chunk-BGTK25UG.js";import{b as oe,d as te,e as ne}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import{d as ee}from"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as D,Ab as r,Bb as _,E as M,Ib as L,K as j,Mc as A,Pa as s,Pb as c,Qb as p,Rb as S,Sb as X,Tb as G,Ub as B,Vb as m,W as C,Xb as u,aa as x,cb as Q,gc as h,jc as $,kc as W,la as E,mc as Y,na as y,sb as F,tb as d,xc as Z,yb as P,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Ie=()=>["/"];function we(n,o){n&1&&(a(0,"sh-toggle",23),c(1,5),_(2,"input",26),p(),r())}function De(n,o){n&1&&(a(0,"span",29),S(1,9),r())}function xe(n,o){if(n&1&&(a(0,"span",29),S(1,10),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),G(1)}}function $e(n,o){if(n&1&&_(0,"sh-progress-bar",36),n&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ae(n,o){n&1&&(a(0,"span",29),S(1,11),r())}function Me(n,o){n&1&&(a(0,"span",29),S(1,12),r())}function ye(n,o){if(n&1&&(a(0,"span",29),S(1,13),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),G(1)}}function Le(n,o){n&1&&(c(0,7,1),_(1,"sh-icon"),p())}function Xe(n,o){n&1&&(c(0,7,2),_(1,"sh-icon"),p())}function Ge(n,o){n&1&&(c(0,14,1),_(1,"sh-icon",38),p())}function Be(n,o){n&1&&(c(0,14,2),_(1,"sh-icon"),p())}function be(n,o){if(n&1){let e=L();a(0,"button",37),m("click",function(){D(e);let i=u(2);return x(i.copyPassword())}),c(1,14),F(2,Ge,2,0)(3,Be,2,0),p(),r()}if(n&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function ve(n,o){n&1&&(a(0,"sh-alert",35),S(1,15),r())}function ke(n,o){if(n&1){let e=L();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),_(4,"sup"),p(),r(),_(5,"input",28),F(6,De,2,0,"span",29)(7,xe,2,1,"span",29),r(),F(8,$e,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),_(10,"input",31),F(11,Ae,2,0,"span",29)(12,Me,2,0,"span",29)(13,ye,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){D(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Le,2,0)(18,Xe,2,0),p(),r(),a(19,"button",33),m("click",function(){D(e);let i=u();return x(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,be,4,1,"button",34),r(),F(23,ve,2,0,"sh-alert",35),r()}if(n&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ue(n,o){if(n&1&&(a(0,"div",25)(1,"code"),$(2),r()()),n&2){let e=u();s(2),W(e.exportedCmd())}}var f=new Fe,v=class n{#o=C(fe);#t=C(Oe);#e=C(oe);#n=C(te);#i=C(ee);#r=C(Ne);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,Re()]),password:f.control("",[b("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[b("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=he(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=y(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=y(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(j(o=>{let e=R=>{let O=Object.entries(R);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},t=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=ie.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:t,token:o.Token})}`,{responseType:"blob"})}),M(()=>this.isExporting.set(!1))).subscribe({next:o=>{let t=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${t}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(M(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let t=window.URL.createObjectURL(o),i=document.createElement("a");i.href=t,i.download=e,i.click(),window.URL.revokeObjectURL(t)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Q({type:n,selectors:[["app-export"]],decls:26,vars:16,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 t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let R;R=$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 N;N=$localize`Password`;let T;T=$localize`Repeat password`;let k;k=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let I;I=$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:`,I=B(I);let U;U=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let K;K=$localize`Passwords are required`;let J;J=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let H;H=$localize`Passwords do not match`;let z;z=$localize`Passwords are required`;let V;V=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$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:`,w=B(w);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,t,i,R,O,k,I,U,K,J,H,z,V,w,q,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[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",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",T,"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,t){if(e&1&&(a(0,"header")(1,"h3"),$(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return t.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),a(10,"p"),$(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return t.exportType.set("cmd")}),c(15,2),_(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return t.exportType.set("file")}),c(18,3),_(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),_(22,"input",22),p(),r(),F(23,we,3,0,"sh-toggle",23),F(24,ke,24,8,"div",24),F(25,Ue,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",Z(15,Ie)),s(3),h("loading",t.isExporting()),P("shTooltip",t.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",t.exportForm.invalid||t.showCopyPassword()&&!t.copiedPassword()||t.encryptionFieldSignal()&&t.exportForm.value.repeatPassword!==t.exportForm.value.password),s(4),Y("#",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",t.exportForm),s(2),h("active",t.exportType()==="cmd"),s(3),h("active",t.exportType()==="file"),s(6),d(t.exportType()==="file"?23:-1),s(),d(t.encryptionFieldSignal()?24:-1),s(),d(t.exportedCmd()?25:-1)}},dependencies:[de,_e,se,re,ae,le,pe,ce,ne,Ce,me,ue,Pe,Ee,Te,Se,ge],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}"],changeDetection:0})};export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as a,i as b}from"./chunk-
|
|
1
|
+
import{h as a,i as b}from"./chunk-SJTXV6AC.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5DJAX2HH.js";import"./chunk-QIUMBQM5.js";import"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-UFTPS2J6.js";import{c as m}from"./chunk-BGTK25UG.js";import{C as o,E as p,M as h,R as N,W as r,l as c,la as s,na as l,v as f,z as d}from"./chunk-T2WO6CVD.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-HRCZ5SXI.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as R,f as b,j as y,p as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-HPNLQHW6.js";import{c as J}from"./chunk-BGTK25UG.js";import{d as O,e as M}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as i,Bb as u,E as g,Pa as l,Pb as D,Qb as h,Rb as _,Ub as I,Vb as d,W as s,cb as f,gc as P,la as c,sb as C,tb as S,xc as N,yb as p,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,T=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,$,B,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-LJ2P7K2Z.js";import"./chunk-UFTPS2J6.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-HRCZ5SXI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-LVX3DTQM.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-QIUMBQM5.js";import"./chunk-DW332N2S.js";import"./chunk-B2VS7Z6E.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as D,C as N,u as E}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{e as m}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as n,Bb as o,Pa as c,Pb as r,Qb as l,Rb as i,cb as T,xc as d,yb as s,zb as e}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var f=()=>["/backup/new"],O=()=>["/backup/import"],u=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=T({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let S;return S=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,C,A,g,P,S,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,C){t&1&&(o(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),o(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),r(12,3),o(13,"sh-icon"),l(),n()(),e(14,"sh-card",8),o(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),r(21,6),o(22,"sh-icon"),l(),n()()()()),t&2&&(c(11),s("routerLink",d(2,f)),c(9),s("routerLink",d(3,O)))},dependencies:[M,D,N,E,m],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-WVF3GRDZ.js";import{b as B}from"./chunk-B2VS7Z6E.js";import{a as k}from"./chunk-TELPJYLN.js";import{c as b}from"./chunk-BGTK25UG.js";import{C as i,E as u,M as c,Mc as d,R as o,W as s,la as a,na as p}from"./chunk-T2WO6CVD.js";var y="backupListOrderBy",v="backupListShowActualTimes",D=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (descending)`},{value:"-name",label:$localize`Backup name (descending)`},{value:"-lastrun",label:$localize`Last run time (descending)`},{value:"-nextrun",label:$localize`Next run time (descending)`},{value:"-schedule",label:$localize`Is scheduled (descending)`},{value:"-backend",label:$localize`Destination type (descending)`},{value:"-sourcesize",label:$localize`Source size (descending)`},{value:"-destinationsize",label:$localize`Destination size (descending)`},{value:"-duration",label:$localize`Duration (descending)`}],g=class l{#s=s(b);#o=s(k);#e=s(B);#u=null;#t=a([]);#a=a([]);#l=a(!1);#n=a(null);#p=a(null);#c=r(v,"relative");#i=r(y,"id");orderByOptions=a(D);orderBy=this.#i.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#l.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#p.asReadonly();draftBackups=this.#t.asReadonly();#r=d(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=p(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=m();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.set(e),this.#e.isConnectionMethodSet()&&(this.#r()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#r()){this.#e.subscribe("backuplist",this.#i());return}let t=this.#u,n=Date.now(),h=t&&n-t<900*1e3;t&&n-t<100||!e&&h&&this.#a().length||(this.#u=n,this.#l.set(!0),this.#s.getApiV1Backups({orderBy:this.#i()}).pipe(i(1),c(f=>this.#a.set(f)),u(()=>this.#l.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#s.postApiV1BackupByIdStart({id:e}).pipe(i(1),c(()=>this.getBackups(!0)),u(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#s.deleteApiV1BackupById(e).pipe(i(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=o({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
|