@duplicati/ngclient 0.0.142 → 0.0.143
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-2NU5Y4V7.js +1 -0
- package/{chunk-LIJJPCCP.js → chunk-36RDZAZ4.js} +1 -1
- package/{chunk-JB75BUPF.js → chunk-3UN32GIC.js} +1 -1
- package/{chunk-Z2U5JI53.js → chunk-5AENPWCF.js} +1 -1
- package/{chunk-GFSWKDRL.js → chunk-5PSLWJTF.js} +1 -1
- package/{chunk-OWAZS6AA.js → chunk-66BSPEOQ.js} +1 -1
- package/chunk-6BCYG4Y6.js +1 -0
- package/{chunk-3L3SGYRX.js → chunk-6GC5VKTI.js} +1 -1
- package/{chunk-UBFQDZB5.js → chunk-6WWCFRZ5.js} +1 -1
- package/{chunk-65QCOV7I.js → chunk-6XBSQDXR.js} +1 -1
- package/{chunk-PEWNHZLZ.js → chunk-7X7K5IXS.js} +1 -1
- package/chunk-AB2L3URR.js +1 -0
- package/{chunk-O2RJYKE4.js → chunk-AO4O42CM.js} +1 -1
- package/{chunk-DUKSWBLV.js → chunk-ARXKB7WH.js} +1 -1
- package/{chunk-PWV3UKIW.js → chunk-BGUKMOKY.js} +1 -1
- package/{chunk-VMNRHHVY.js → chunk-BIETD4DI.js} +1 -1
- package/{chunk-JA5QSJM3.js → chunk-BSP6AKSZ.js} +1 -1
- package/{chunk-3BODZQHK.js → chunk-BXRW2LGW.js} +1 -1
- package/{chunk-QIQH4ASK.js → chunk-CFNP4FBG.js} +1 -1
- package/{chunk-ZTHT3VVI.js → chunk-CTEFMU6N.js} +1 -1
- package/chunk-ETCRT3EV.js +1 -0
- package/{chunk-WEAHBXR2.js → chunk-FFY3NRCC.js} +1 -1
- package/{chunk-ERIXY2FW.js → chunk-GDWLKG6V.js} +1 -1
- package/{chunk-HBKQWKW7.js → chunk-GHFYBZHQ.js} +1 -1
- package/{chunk-X5ISYEI2.js → chunk-GO22DJ44.js} +1 -1
- package/{chunk-SWLG7DS7.js → chunk-HBTRQAXQ.js} +1 -1
- package/{chunk-GXARFIQG.js → chunk-HDQRG3ZZ.js} +1 -1
- package/chunk-HKZX6OB5.js +1 -0
- package/{chunk-2G6UXMJB.js → chunk-IGOZJJE3.js} +1 -1
- package/{chunk-C32RWSXV.js → chunk-J2MHNGNQ.js} +1 -1
- package/{chunk-QM6X5ZEC.js → chunk-J3BBLPAD.js} +1 -1
- package/{chunk-BMYQZKPC.js → chunk-J5PSMGKZ.js} +1 -1
- package/{chunk-QC2NBFUR.js → chunk-JA7OQSO3.js} +1 -1
- package/{chunk-EDW3WHAP.js → chunk-JIHMT35A.js} +1 -1
- package/{chunk-UV3WAAEX.js → chunk-K3ZQ67VT.js} +1 -1
- package/{chunk-QD2VHHZY.js → chunk-KGJAK6OP.js} +1 -1
- package/{chunk-LAUG2PZW.js → chunk-KUPXKQHP.js} +1 -1
- package/chunk-LSVMEMXJ.js +1 -0
- package/{chunk-OAW2NFZX.js → chunk-M2RYJ73O.js} +1 -1
- package/{chunk-X6QMUQPK.js → chunk-MBBEXLIJ.js} +1 -1
- package/{chunk-PHIECUWX.js → chunk-NTA2CULM.js} +1 -1
- package/chunk-ODVCGM2O.js +1 -0
- package/{chunk-PMZGBC4U.js → chunk-OTMW34HV.js} +1 -1
- package/{chunk-P2DII6CV.js → chunk-OXOOR7I4.js} +1 -1
- package/{chunk-V7UTQSCX.js → chunk-PT7UQJD4.js} +1 -1
- package/chunk-QNOIURSX.js +1 -0
- package/{chunk-BVEALUGN.js → chunk-QY6E755W.js} +1 -1
- package/{chunk-CNUHBPET.js → chunk-SCOG2I64.js} +1 -1
- package/{chunk-OBJPWKDY.js → chunk-TJOWPBPB.js} +1 -1
- package/{chunk-UCZV35IF.js → chunk-UT6XGEMV.js} +1 -1
- package/chunk-UUODEERG.js +1 -0
- package/{chunk-OICFVPYU.js → chunk-UW4GBMEP.js} +1 -1
- package/{chunk-VC6TE2B6.js → chunk-WWFNG47J.js} +1 -1
- package/{chunk-PJBVFTZK.js → chunk-WZ23D2R7.js} +1 -1
- package/{chunk-ZGU7OKMF.js → chunk-X3IA226Q.js} +1 -1
- package/{chunk-TAPLSJ2K.js → chunk-XHUUCB2W.js} +1 -1
- package/{chunk-LT2T7TXS.js → chunk-XLE2TW65.js} +1 -1
- package/{chunk-5SPGCYAQ.js → chunk-XNVRJH42.js} +1 -1
- package/{chunk-YIV6PKM7.js → chunk-XQ4CAUD4.js} +1 -1
- package/{chunk-7765XHNC.js → chunk-YHNIGBHB.js} +1 -1
- package/{chunk-47WDRGVN.js → chunk-ZGAC2JKG.js} +1 -1
- package/index.html +1 -1
- package/locale/messages.cs.json +1 -0
- package/locale/messages.da.json +3 -20
- package/locale/messages.de.json +126 -104
- package/locale/messages.en_GB.json +1 -0
- package/locale/messages.es.json +1 -0
- package/locale/messages.fi.json +1 -0
- package/locale/messages.fr.json +1 -0
- package/locale/messages.hu.json +1 -0
- package/locale/messages.it.json +144 -112
- package/locale/messages.ja_JP.json +1 -0
- package/locale/messages.nl_NL.json +7 -106
- package/locale/messages.pl.json +29 -0
- package/locale/messages.pt.json +1 -0
- package/locale/messages.pt_BR.json +1 -0
- package/locale/messages.ru.json +1 -0
- package/locale/messages.sr_RS.json +1 -0
- package/locale/messages.sv_SE.json +1 -0
- package/locale/messages.zh-Hans.json +3 -97
- package/locale/messages.zh_CN.json +1 -88
- package/locale/messages.zh_TW.json +2 -0
- package/main-SFGPSKNZ.js +1 -0
- package/package.json +1 -1
- package/chunk-4URGDROZ.js +0 -1
- package/chunk-5DO6JZVF.js +0 -1
- package/chunk-5OIM6PRU.js +0 -1
- package/chunk-5SH42EY6.js +0 -1
- package/chunk-ATYS35R4.js +0 -1
- package/chunk-E6UP7FUD.js +0 -1
- package/chunk-JF4IGUR6.js +0 -1
- package/chunk-R3OYJX7V.js +0 -1
- package/chunk-YCTTQQ6B.js +0 -1
- package/main-TVE62AWE.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-WWFNG47J.js";import{a as re,b as E}from"./chunk-QGFC5ZUR.js";import"./chunk-XNVRJH42.js";import{a as ae}from"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import{a as P}from"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import{c as ie,e as ne,i as oe,s as se}from"./chunk-USU2EHJV.js";import"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{b as j,e as J}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{C as ee,a as Q,e as Y,g as Z,l as x}from"./chunk-WRNQOX5R.js";import{h as te}from"./chunk-J3BBLPAD.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as n,Bb as i,Cb as _,D as G,F as S,G as L,H as p,Oc as b,Pc as m,Qb as u,Ra as r,Rb as h,Sb as T,Tb as H,Ub as K,Wb as g,_ as F,bb as V,ic as D,kc as X,lc as C,oa as s,qc as z,r as y,rc as W,sc as q,ub as w,vb as U,zb as d}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";function ce(c,t){c&1&&(n(0,"sh-icon",19),C(1,"spinner"),i())}function _e(c,t){c&1&&(n(0,"sh-icon",20),C(1,"check"),i())}function de(c,t){c&1&&(n(0,"sh-icon",21),C(1,"warning"),i()),c&2&&d("shTooltip","File not found")}function ue(c,t){let a=re(c).pipe(G(t),L());return E(a,{initialValue:c()})}var f=class c{#o=F(j);#s=F(ae);#e=F(te);#a=F(Y);#t=s("");backupId=E(this.#o.params.pipe(y(t=>t.id)));activeBackup=b(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=b(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=b(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=b(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=m(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(S(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=m(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(S(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(P,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(S(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(S(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(P,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(S(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||c)};static \u0275cmp=V({type:c,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let A;A=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let M;M=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let B;B=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let N;N=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Restore (delete and repair) `;let I;I=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let $;$=$localize`Placement`;let R;R=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let O;return O=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,A,M,B,N,I,$,R,v,k,O,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(_(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),_(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),T(8,1),i(),n(9,"p"),T(10,2),i()(),n(11,"article")(12,"h2"),T(13,3),i(),n(14,"p"),T(15,4),i(),n(16,"div",16)(17,"button",17),g("click",function(){return e.repairDatabase()}),u(18,5),_(19,"sh-icon"),h(),i(),n(20,"button",17),g("click",function(){return e.deleteDatabase()}),u(21,6),_(22,"sh-icon"),h(),i(),n(23,"button",17),g("click",function(){return e.restoreDatabase()}),u(24,7),_(25,"sh-icon"),h(),i(),n(26,"button",17),g("click",function(){return e.createErrorReport()}),u(27,8),_(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),T(31,9),i(),n(32,"sh-form-field")(33,"input",18),q("ngModelChange",function(A){return W(e.backupFilePath,A)||(e.backupFilePath=A),A}),i(),w(34,ce,2,0,"sh-icon",19)(35,_e,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),g("click",function(){return e.resetDatabasePath()}),u(39,10),_(40,"sh-icon"),h(),i(),n(41,"button",17),g("click",function(){return e.saveDatabasePath()}),u(42,11),_(43,"sh-icon"),h(),i(),n(44,"button",17),g("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),_(46,"sh-icon"),h(),i(),n(47,"button",17),g("click",function(){return e.moveDatabasePath()}),u(48,13),_(49,"sh-icon"),h(),i()()()()),a&2){let o;r(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),K(8),r(9),D("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),r(3),D("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),r(3),D("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),r(3),D("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),r(6),X(e.isValidatedPath()?"success":"error"),r(),z("ngModel",e.backupFilePath),r(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),r(4),d("disabled",!e.pathHasChanged()),r(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),r(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),r(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[se,ie,ne,oe,le,Z,x,Q,ee,J],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as T}from"./chunk-L2EO4M4B.js";import{a as y,c as O,h as b}from"./chunk-J3BBLPAD.js";import{Aa as o,za as P}from"./chunk-WJPLJKPQ.js";import{B as A,F as l,H as N,R as g,V as a,_ as i,f as I,k as S,n as E,oa as n,r as R,ya as v}from"./chunk-QDFCX6XE.js";var c=class r{platformId=i(v);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return o(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,s=!1){if(!o(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${s?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return P(this.platformId)?localStorage.length:0}getItem(e){return o(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!o(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){o(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!o(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){o(this.platformId)||localStorage.clear()}clear(){if(!o(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return o(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac})};var f=class r{#i=i(c);#r=n(null);#t=window.self!==window.top;#s=n(this.#t);relayIsEnabled=this.#s.asReadonly();config=this.#r.asReadonly();configLoaded=this.#t?new S:null;isLoading=n(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#o(),this.#t&&(this.#s.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),s=JSON.parse(t);if(!s?.accessToken||!s?.clientId){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof s.clientId!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof s.accessToken!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}let m=this.#i.getItem("locale")??"en-US",p=s.locale??"en-US";m!==p&&(this.#i.setItem("locale",p),window.location.reload()),this.#r.set(s),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#o(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#r.set(e)}clearConfig(){this.#r.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};var d="PROXY_AUTHED_FAKE_TOKEN",h="refreshNonce",u="v1:persist:duplicati:refreshNonce",L=class r{#i=i(T);#r=i(O);#t=i(b);#s=i(f);#e=n(null);#o=n(!1);token=this.#e.asReadonly();isLoggingOut=this.#o.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(h);return}t?localStorage.setItem(u,e||""):sessionStorage.setItem(h,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(h),t=localStorage.getItem(u),s=e||t;return{body:s?{requestBody:{Nonce:s}}:void 0,local:s===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(l(1),g(s=>{s.AccessToken?(this.#e.set(s.AccessToken),this.setRefreshNonce(s.RefreshNonce,t)):this.#e.set(null)}))}refreshToken(){if(this.#s.relayIsEnabled())return this.#e.set(d),new I(s=>{s.next({AccessToken:d}),s.complete()});let{body:e,local:t}=this.getRefreshNonceBody();return this.#t.postApiV1AuthRefresh(e).pipe(l(1),g(s=>{s.AccessToken&&(this.#e.set(s.AccessToken),this.setRefreshNonce(s.RefreshNonce,t))}))}checkProxyAuthed(){let e=new y({"custom-proxy-check":"true"});return this.#r.get("/api/v1/systeminfo",{headers:e}).pipe(R(()=>(this.#e.set(d),!0)),A(()=>E(!1)))}logout(){this.#o.set(!0);let{body:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(h),t&&localStorage.removeItem(u),this.#t.postApiV1AuthRefreshLogout(e).pipe(l(1),N(()=>{this.#o.set(!1),this.#e.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a,f as b,d as c,L as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-BGUKMOKY.js";import{a as Z}from"./chunk-GUH5TMOS.js";import{b as H,d as K}from"./chunk-L2EO4M4B.js";import{b as j,c as W,e as q,g as Y,p as J}from"./chunk-WRNQOX5R.js";import{h as Q}from"./chunk-J3BBLPAD.js";import{Ab as a,Bb as l,Cb as O,Gb as D,Hb as R,Jb as f,Oa as E,Oc as h,Qb as V,Ra as r,Rb as z,Sb as s,Uc as S,Wb as u,Yb as _,_ as p,bb as A,ea as C,fa as I,kc as G,lc as F,mc as P,nc as X,oa as v,tc as B,ub as d,uc as U,vb as N,vc as m,xb as y,yb as L,zb as g}from"./chunk-QDFCX6XE.js";function ne(n,t){if(n&1&&F(0),n&2){_();let e=m(0);X(" ",e.Message," ")}}function oe(n,t){if(n&1&&(a(0,"div"),V(1,1),O(2,"a",15),z(),l()),n&2){let e=_();r(2),g("href",e.downloadLink(),E)}}function ae(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_(),c=m(0);return I(i.doRepair(c.BackupID))}),s(1,2),l()}}function re(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_(),c=m(0);return I(i.doDownloadBugreport(c))}),s(1,3),l()}}function le(n,t){if(n&1&&O(0,"sh-progress-bar",17),n&2){let e,o=_(2);g("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function ce(n,t){if(n&1){let e=f();a(0,"div",13),D(1),s(2,4),R(),a(3,"a",16),F(4),l(),d(5,le,1,1,"sh-progress-bar",17),a(6,"button",14),u("click",function(){C(e);let i=_();return I(i.doShowUpdate())}),s(7,5),l()()}if(n&2){let e,o,i=_(),c=m(0);r(3),g("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,E),r(),P(c.Message),r(),N(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function se(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_(),c=m(0);return I(i.doShowLog(c.BackupID))}),s(1,6),l()}}function _e(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),s(1,7),l()}}function de(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),s(1,8),l()}}var Ne={Error:"error",Warning:"warn",Information:"primary"},x=class n{#e=p(K);#a=p(H);#r=p(q);#t=p(W);#i=p(M);#n=p(Q);#o=v(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=h(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Ne[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(Z,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let i=`${location.origin}/api/v1/bugreport/${e}?token=${o.Token}`;t.DownloadLink=i,this.#o.set(i),this.triggerDownload(i)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let c;c=$localize`New update found:`;let w;w=$localize`Show Update`;let $;$=$localize`Show Log`;let b;b=$localize` Show Help `;let k;return k=$localize` Show Help `,[t,e,o,i,c,w,$,b,k,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"actions"],["shButton","",1,"small","outlined"],[1,"message"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1){let i=f();B(0),a(1,"sh-alert")(2,"div",9),F(3),l(),a(4,"div",10),d(5,ne,1,1),d(6,oe,3,1,"div"),a(7,"div",11),d(8,ae,2,0,"button",12),d(9,re,2,0,"button",12),d(10,ce,8,3,"div",13),d(11,se,2,0,"button",12),d(12,_e,2,0,"button",12),d(13,de,2,0,"button",12),a(14,"button",14),u("click",function(){return C(i),I(o.deleteNotificationByIndex())}),s(15,0),l()()()()}if(e&2){let i=U(o.notification());r(),G(o.getAlertType(i.Type)),r(2),P(i.Title),r(2),N(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),N(o.downloadLink()?6:-1),r(2),N(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),N(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),N(i.Action==="update:new"?10:-1),r(),N(i.Action==="backup:show-log"?11:-1),r(),N(i.Action==="config:issue:unencrypted-database"?12:-1),r(),N(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[J,Y,j],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var pe=(n,t)=>t.ID;function Te(n,t){if(n&1&&O(0,"app-notification",1),n&2){let e=t.$implicit,o=t.$index;g("index",o)("notification",e)}}function Ce(n,t){n&1&&(a(0,"div",2)(1,"p"),s(2,0),l()())}var ee=class n{#e=p(M);notificationFilterPredicate=S();notifications=h(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&y(0,Te,1,2,"app-notification",1,pe,!1,Ce,3,0,"div",2),e&2&&L(o.notifications())},dependencies:[x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{x as a,ee as b};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Ee}from"./chunk-
|
|
1
|
+
import{a as Ee}from"./chunk-K3ZQ67VT.js";import"./chunk-CZLLEVMJ.js";import{a as fe}from"./chunk-WWFNG47J.js";import{h as O}from"./chunk-36RDZAZ4.js";import"./chunk-QY6E755W.js";import{a as Se}from"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import{b as T}from"./chunk-QGFC5ZUR.js";import{a as se}from"./chunk-XNVRJH42.js";import"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import{c as le,e as me,f as de,j as _e,n as ce,o as ue,p as pe,q as Ce,r as ge,s as Ne,t as Me}from"./chunk-USU2EHJV.js";import"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{b as q,d as Z,e as J}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as ie,t as oe}from"./chunk-WRNQOX5R.js";import{g as ae,h as re}from"./chunk-J3BBLPAD.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as a,Bb as n,Cb as r,Gb as A,Hb as h,Jb as v,Pc as j,Qb as N,Ra as m,Rb as M,Sb as u,Tb as G,Ub as U,Wb as x,Yb as f,_ as c,bb as $,ea as S,fa as E,ic as w,oa as F,qc as K,rc as X,sc as z,ub as b,vb as B,wb as k,xb as R,xc as V,yb as y,yc as H,zb as C,zc as W}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var Fe=()=>["backup"];function Ae(s,t){s&1&&r(0,"sh-progress-bar",12)}function he(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",32),n()),s&2){let e=t.$implicit,l=t.$index;m(),C("id",V("filter-",l))("formControl",e)}}function Te(s,t){if(s&1){let e=v();a(0,"form",13)(1,"sh-select",14)(2,"label",15),u(3,1),n(),r(4,"input",16),n(),a(5,"sh-form-field")(6,"label",17),u(7,2),n(),r(8,"textarea",18),n(),a(9,"sh-form-field")(10,"label",19),u(11,3),n(),r(12,"textarea",20),n()(),a(13,"sh-divider"),u(14,4),n(),a(15,"form",13)(16,"sh-form-field")(17,"label",21),u(18,5),n(),r(19,"input",22),n(),a(20,"sh-form-field")(21,"label",23),u(22,6),n(),r(23,"input",24),n(),a(24,"app-toggle-card",25),A(25,26),u(26,7),h(),A(27,27),R(28,he,2,3,"sh-form-field",null,k),h(),n()(),a(30,"p"),N(31,8),r(32,"a",28),M(),n(),a(33,"app-options-list",29),z("optionsChange",function(o){S(e);let p=f();return X(p.settings,o)||(p.settings=o),E(o)}),n(),a(34,"div",30)(35,"button",31),x("click",function(){S(e);let o=f();return E(o.submit())}),N(36,9),r(37,"sh-icon"),M(),n()()}if(s&2){let e=f();C("formGroup",e.baseCmdForm),m(),C("options",e.commandOptions()??W(10,Fe))("inlineSearch",!0),m(14),C("formGroup",e.standardFields),m(9),C("disallowToggle",!0),m(4),y(e.standardFields.controls.filters.controls),m(5),K("options",e.settings),C("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),G(e.baseCmdForm.value.command),U(36)}}var d=new ge,Oe=["Bytes","KB","MB","GB","TB","PB"],P=class s{#e=c(O);#t=c(re);#n=c(Z);#i=c(q);#o=c(ae);#a=c(se);#l=c(Y);#r=T(this.#i.params);commandOptions=T(this.#o.getApiV1Commandline());sizeOptions=F(Oe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=j(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
|
|
2
2
|
`).filter(i=>i.length>0)??[],o=this.standardFields.value,p=o.filters??[],g=[t.command,e,...l,`--backup-name=${o["backup-name"]}`,`--dbpath=${o.dbpath}`,`--backup-id=${o["backup-id"]}`,...p.filter(i=>i).map(i=>i.startsWith("-")?`--exclude=${i?.slice(1)}`:`--include=${i}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(i=>`${i.Name.startsWith("--")?"":"--"}${i.Name}=${i.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:g}).subscribe(i=>{i.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",i.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
3
|
`)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=$({type:s,selectors:[["app-commandline"]],features:[H([O])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let l;l=$localize`TargetUrl`;let o;o=$localize`Commandline Arguments`;let p;p=$localize`Advanced options`;let g;g=$localize`Backup ID`;let i;i=$localize`Backup Name`;let I;I=$localize`Filters`;let D;D=$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#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,l,o,p,g,i,I,D,L,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"sh-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,l){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",10)(3,"button",11),N(4,0),r(5,"sh-icon"),M(),n()(),b(6,Ae,1,0,"sh-progress-bar",12)(7,Te,38,11),n()),e&2&&(m(6),B(l.finishedLoading()?7:6))},dependencies:[Ne,_e,le,me,de,fe,Ee,Se,Me,ce,ue,Ce,pe,J,ne,ee,te,oe,ie,Q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Re,b as $e}from"./chunk-WEAHBXR2.js";import{a as ve}from"./chunk-QC2NBFUR.js";import{a as k}from"./chunk-PWV3UKIW.js";import"./chunk-5SPGCYAQ.js";import{a as Ee}from"./chunk-JB75BUPF.js";import"./chunk-P2DII6CV.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-OWAZS6AA.js";import"./chunk-CWBEE627.js";import{a as Le}from"./chunk-7AMBMWZP.js";import{c as fe,d as Oe,e as Pe,i as De,r as Ne,s as Me,t as Ie}from"./chunk-USU2EHJV.js";import"./chunk-47WDRGVN.js";import{b as pe,d as Te}from"./chunk-4URGDROZ.js";import{c as ce,e as ue,f as de}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{C as Ce,a as I,b as G,c as Se,e as ge,g as w,k as he,l as Fe,n as me,u as Ae}from"./chunk-WRNQOX5R.js";import{h as x}from"./chunk-QM6X5ZEC.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as i,Cb as l,H as V,Jb as E,Oc as re,Pc as Q,Qb as u,Ra as r,Rb as d,Sb as O,Tc as le,Vb as $,Vc as _e,Wb as g,Xc as K,Yb as c,_ as F,bb as M,ea as m,ec as ne,fa as A,fc as oe,ic as H,kc as v,lc as h,mc as X,nc as z,oa as T,qc as W,rc as q,sc as j,tc as ie,ub as p,uc as se,vb as S,vc as b,wb as Z,xb as ee,yb as te,zb as P,zc as ae}from"./chunk-QDFCX6XE.js";import{a as B,b as Y}from"./chunk-EUDKD2JW.js";var Ge=["scroller"];function we(n,o){n&1&&(s(0,"sh-icon"),h(1,"bell-ringing"),i())}function xe(n,o){n&1&&(s(0,"sh-icon"),h(1,"bell"),i())}function ke(n,o){if(n&1&&l(0,"app-notification",8),n&2){c(2);let e=b(6);P("index",0)("notification",e.content)}}function Ue(n,o){if(n&1&&(s(0,"div",11),h(1),i()),n&2){c(3);let e=b(6);r(),z(" ",e.content.content," ")}}function Be(n,o){if(n&1&&(s(0,"sh-alert")(1,"div",10),h(2),i(),p(3,Ue,2,1,"div",11),i()),n&2){c(2);let e=b(6);v(e.content.type||"error"),r(2),X(e.content.title),r(),S(e.content.content?3:-1)}}function Ye(n,o){if(n&1&&(s(0,"div",6),p(1,ke,1,2,"app-notification",8)(2,Be,4,4,"sh-alert",9),i()),n&2){c();let e=b(6);r(),S(e.type==="notification"?1:2)}}function Ve(n,o){if(n&1){let e=E();s(0,"div",7)(1,"div",12)(2,"h6",13),u(3,2),s(4,"button",5),g("click",function(){m(e);let a=c();return A(a.toggleNotifications())}),l(5,"sh-icon"),i(),d(),i(),s(6,"div",14,0)(8,"div",15),l(9,"app-notifications"),i()()()()}}function Xe(n,o){if(n&1&&(s(0,"div",20),h(1),i()),n&2){let e=c().$implicit;r(),z(" ",e.content," ")}}function ze(n,o){if(n&1){let e=E();s(0,"sh-alert",18,1),g("click",function(){let a=m(e).$implicit,_=c(2);return A(_.deleteAlertByIndex(a.id))}),s(2,"div",19),h(3),i(),p(4,Xe,2,1,"div",20),i()}if(n&2){let e=o.$implicit;v(e.type),P("id",e.id),r(3),X(e.title),r(),S(e.content?4:-1)}}function We(n,o){n&1&&(s(0,"p",17),O(1,4),i())}function qe(n,o){if(n&1){let e=E();s(0,"div",7)(1,"div",12)(2,"h6",13),u(3,3),s(4,"button",5),g("click",function(){m(e);let a=c();return A(a.toggleAlerts())}),l(5,"sh-icon"),i(),d(),i(),s(6,"div",14,0)(8,"div",15),ee(9,ze,5,5,"sh-alert",16,Z,!1,We,2,0,"p",17),i()()()()}if(n&2){let e=c();r(9),te(e.alertHistory())}}var be=new Ne,y=class n{#e=F(Se);#t=F(k);isSubmitting=T(!1);messageSent=T(!1);form=be.group({message:be.control("",[Oe.required])});notifications=this.#t.notifications;shownMessage=T(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=re(()=>this.alertHistory().filter(o=>o.isOpen).length);scroller=_e("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=T(null);previousNotificationsCount=T(null);constructor(){Q(()=>{let o=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==o.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>Y(B({},a),{countDown:a.countDown-1}))},1e3)):o.length&&this.previousHistoryCount()!==o.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:o[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>Y(B({},a),{countDown:a.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(o){this.#e.removeAlert(o)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ne(t.scroller,Ge,5),e&2&&oe()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let o;o=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],o,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let a=E();s(0,"button",5),g("click",function(){return m(a),A(t.toggleAlerts())}),s(1,"sh-icon"),h(2,"info"),i()(),s(3,"button",5),g("click",function(){return m(a),A(t.toggleNotifications())}),p(4,we,2,0,"sh-icon")(5,xe,2,0,"sh-icon"),i(),ie(6),p(7,Ye,3,1,"div",6),p(8,Ve,10,0,"div",7),p(9,qe,12,1,"div",7)}if(e&2){v(t.alertHistory().length?"error":""),r(3),v(t.notifications().length?"error":""),r(),S(t.notifications().length?4:5),r(2);let a=se(t.shownMessage());r(),S(a?7:-1),r(),S(t.isNotificationsOpen()?8:-1),r(),S(t.isAlertsOpen()?9:-1)}},dependencies:[Ie,G,I,w,$e,Re],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function je(n,o){n&1&&(s(0,"sh-icon",14),h(1,"check"),i())}function Qe(n,o){n&1&&(s(0,"sh-icon",15),h(1,"prohibit"),i())}function Ke(n,o){if(n&1){let e=E();s(0,"button",20),g("click",function(){m(e);let a=c();return A(a.updatePassphrase())}),O(1,5),i()}if(n&2){let e=c();H("loader",e.isUpdating())}}function Je(n,o){if(n&1){let e=E();s(0,"button",21),g("click",function(){m(e);let a=c();return A(a.updatePassphrase())}),O(1,6),i()}if(n&2){let e=c();H("loader",e.isUpdating()),P("disabled",!0)}}var U=class n{#e=F(x);closed=le();isUpdating=T(!1);passphrase=T("");repeatPassphrase=T("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let o;o=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let a;a=$localize`Change passphrase`;let _;_=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,_=$(_);let D;D=$localize`Passphrase`;let N;N=$localize`Repeat passphrase`;let L;L=$localize`Not now thanks`;let R;R=$localize` Yes, update passphrase now `;let C;return C=$localize` Yes, update passphrase now `,[a,_,D,N,L,R,C,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",o,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),O(2,0),i()(),s(3,"div",8)(4,"sh-alert",9),u(5,1),l(6,"br")(7,"br"),d(),i(),s(8,"sh-form-field")(9,"label",10),O(10,2),i(),s(11,"input",11),j("ngModelChange",function(_){return q(t.passphrase,_)||(t.passphrase=_),_}),i()(),s(12,"sh-form-field")(13,"label",12),O(14,3),i(),s(15,"input",13),j("ngModelChange",function(_){return q(t.repeatPassphrase,_)||(t.repeatPassphrase=_),_}),i(),p(16,je,2,0,"sh-icon",14)(17,Qe,2,0,"sh-icon",15),i()(),s(18,"footer",16)(19,"button",17),g("click",function(){return t.cancel()}),O(20,4),i(),p(21,Ke,2,2,"button",18)(22,Je,2,3,"button",19),i()),e&2&&(r(11),W("ngModel",t.passphrase),r(4),P("disabled",t.passphrase().length===0),W("ngModel",t.repeatPassphrase),r(),S(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),H("loader",t.isUpdating()),r(2),S(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Me,fe,Pe,De,G,Fe,I,Ce],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var Ze=()=>({exact:!0});function et(n,o){n&1&&(s(0,"sh-icon"),h(1,"sun"),i())}function tt(n,o){n&1&&(s(0,"sh-icon"),h(1,"moon"),i())}function nt(n,o){if(n&1){let e=E();s(0,"button",22),g("click",function(){m(e);let a=c();return A(a.changeDefaultClientTo("ngax"))}),u(1,7),l(2,"sh-icon"),d(),i(),s(3,"button",22),g("click",function(){m(e);let a=c();return A(a.logout())}),u(4,8),l(5,"sh-icon"),d(),i()}}var J=class n{#e=F(ve);#t=F(x);#n=F(Ee);#o=F(pe);#i=F(ge);#s=F(k);#a=F(Te);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;ngOnInit(){return this.#s.init(),this.#n.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:o=>{let e=o["autogenerated-passphrase"]==="True",t=o["has-asked-for-password-change"]==="True";e&&!t&&this.#i.open(U,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(o){this.#r(o),window.location.replace(`/${o}`)}logout(){this.#a.logout()}#r(o){var e=new Date;e.setTime(e.getTime()+90*24*60*60*1e3),document.cookie="default-client="+o+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-layout"]],decls:37,vars:4,consts:()=>{let o;o=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let _;_=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let D;D=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SH_ICON:`,D=$(D);let N;N=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:`,N=$(N);let L;L=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Use old UI `;let R;return R=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[o,e,t,a,_,D,N,L,R,["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"sh-sidenav")(1,"div",9)(2,"header"),l(3,"app-logo"),s(4,"button",10),g("click",function(){return t.toggleBodyClass()}),p(5,et,2,0,"sh-icon")(6,tt,2,0,"sh-icon"),i()(),s(7,"sh-list",11)(8,"button",12),u(9,0),l(10,"sh-icon"),d(),i(),s(11,"button",13),u(12,1),l(13,"sh-icon"),d(),i(),s(14,"button",14),u(15,2),l(16,"sh-icon"),d(),i(),s(17,"button",15),u(18,3),l(19,"sh-icon"),d(),i()(),l(20,"div",16),s(21,"sh-list",17),p(22,nt,6,0),l(23,"sh-divider"),s(24,"button",18),u(25,4),l(26,"sh-icon"),d(),i(),s(27,"a",19),u(28,5),l(29,"sh-icon")(30,"sh-icon",20),d(),i(),s(31,"a",21),u(32,6),l(33,"sh-icon")(34,"sh-icon",20),d(),i()()(),l(35,"router-outlet")(36,"app-service-hub"),i()),e&2&&(r(5),S(t.isDarkMode()?5:6),r(3),P("routerLinkActiveOptions",ae(3,Ze)),r(14),S(t.relayIsEnabled()?-1:22))},dependencies:[ce,ue,de,Ae,I,me,w,he,y,Le],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}"],changeDetection:0})};export{J as default};
|
|
1
|
+
import{a as Re,b as $e}from"./chunk-FFY3NRCC.js";import{a as ve}from"./chunk-JA7OQSO3.js";import{a as k}from"./chunk-BGUKMOKY.js";import"./chunk-XNVRJH42.js";import{a as Ee}from"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import{a as Le}from"./chunk-7AMBMWZP.js";import{c as fe,d as Oe,e as Pe,i as De,r as Ne,s as Me,t as Ie}from"./chunk-USU2EHJV.js";import"./chunk-ZGAC2JKG.js";import{b as pe,d as Te}from"./chunk-ETCRT3EV.js";import{c as ce,e as ue,f as de}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{C as Ce,a as I,b as G,c as Se,e as ge,g as w,k as he,l as Fe,n as me,u as Ae}from"./chunk-WRNQOX5R.js";import{h as x}from"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as i,Cb as l,H as V,Jb as E,Oc as re,Pc as Q,Qb as u,Ra as r,Rb as d,Sb as O,Tc as le,Vb as $,Vc as _e,Wb as g,Xc as K,Yb as c,_ as F,bb as M,ea as m,ec as ne,fa as A,fc as oe,ic as H,kc as v,lc as h,mc as X,nc as z,oa as T,qc as W,rc as q,sc as j,tc as ie,ub as p,uc as se,vb as S,vc as b,wb as Z,xb as ee,yb as te,zb as P,zc as ae}from"./chunk-QDFCX6XE.js";import{a as B,b as Y}from"./chunk-EUDKD2JW.js";var Ge=["scroller"];function we(n,o){n&1&&(s(0,"sh-icon"),h(1,"bell-ringing"),i())}function xe(n,o){n&1&&(s(0,"sh-icon"),h(1,"bell"),i())}function ke(n,o){if(n&1&&l(0,"app-notification",8),n&2){c(2);let e=b(6);P("index",0)("notification",e.content)}}function Ue(n,o){if(n&1&&(s(0,"div",11),h(1),i()),n&2){c(3);let e=b(6);r(),z(" ",e.content.content," ")}}function Be(n,o){if(n&1&&(s(0,"sh-alert")(1,"div",10),h(2),i(),p(3,Ue,2,1,"div",11),i()),n&2){c(2);let e=b(6);v(e.content.type||"error"),r(2),X(e.content.title),r(),S(e.content.content?3:-1)}}function Ye(n,o){if(n&1&&(s(0,"div",6),p(1,ke,1,2,"app-notification",8)(2,Be,4,4,"sh-alert",9),i()),n&2){c();let e=b(6);r(),S(e.type==="notification"?1:2)}}function Ve(n,o){if(n&1){let e=E();s(0,"div",7)(1,"div",12)(2,"h6",13),u(3,2),s(4,"button",5),g("click",function(){m(e);let a=c();return A(a.toggleNotifications())}),l(5,"sh-icon"),i(),d(),i(),s(6,"div",14,0)(8,"div",15),l(9,"app-notifications"),i()()()()}}function Xe(n,o){if(n&1&&(s(0,"div",20),h(1),i()),n&2){let e=c().$implicit;r(),z(" ",e.content," ")}}function ze(n,o){if(n&1){let e=E();s(0,"sh-alert",18,1),g("click",function(){let a=m(e).$implicit,_=c(2);return A(_.deleteAlertByIndex(a.id))}),s(2,"div",19),h(3),i(),p(4,Xe,2,1,"div",20),i()}if(n&2){let e=o.$implicit;v(e.type),P("id",e.id),r(3),X(e.title),r(),S(e.content?4:-1)}}function We(n,o){n&1&&(s(0,"p",17),O(1,4),i())}function qe(n,o){if(n&1){let e=E();s(0,"div",7)(1,"div",12)(2,"h6",13),u(3,3),s(4,"button",5),g("click",function(){m(e);let a=c();return A(a.toggleAlerts())}),l(5,"sh-icon"),i(),d(),i(),s(6,"div",14,0)(8,"div",15),ee(9,ze,5,5,"sh-alert",16,Z,!1,We,2,0,"p",17),i()()()()}if(n&2){let e=c();r(9),te(e.alertHistory())}}var be=new Ne,y=class n{#e=F(Se);#t=F(k);isSubmitting=T(!1);messageSent=T(!1);form=be.group({message:be.control("",[Oe.required])});notifications=this.#t.notifications;shownMessage=T(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=re(()=>this.alertHistory().filter(o=>o.isOpen).length);scroller=_e("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=T(null);previousNotificationsCount=T(null);constructor(){Q(()=>{let o=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==o.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>Y(B({},a),{countDown:a.countDown-1}))},1e3)):o.length&&this.previousHistoryCount()!==o.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:o[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>Y(B({},a),{countDown:a.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(o){this.#e.removeAlert(o)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ne(t.scroller,Ge,5),e&2&&oe()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let o;o=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],o,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let a=E();s(0,"button",5),g("click",function(){return m(a),A(t.toggleAlerts())}),s(1,"sh-icon"),h(2,"info"),i()(),s(3,"button",5),g("click",function(){return m(a),A(t.toggleNotifications())}),p(4,we,2,0,"sh-icon")(5,xe,2,0,"sh-icon"),i(),ie(6),p(7,Ye,3,1,"div",6),p(8,Ve,10,0,"div",7),p(9,qe,12,1,"div",7)}if(e&2){v(t.alertHistory().length?"error":""),r(3),v(t.notifications().length?"error":""),r(),S(t.notifications().length?4:5),r(2);let a=se(t.shownMessage());r(),S(a?7:-1),r(),S(t.isNotificationsOpen()?8:-1),r(),S(t.isAlertsOpen()?9:-1)}},dependencies:[Ie,G,I,w,$e,Re],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function je(n,o){n&1&&(s(0,"sh-icon",14),h(1,"check"),i())}function Qe(n,o){n&1&&(s(0,"sh-icon",15),h(1,"prohibit"),i())}function Ke(n,o){if(n&1){let e=E();s(0,"button",20),g("click",function(){m(e);let a=c();return A(a.updatePassphrase())}),O(1,5),i()}if(n&2){let e=c();H("loader",e.isUpdating())}}function Je(n,o){if(n&1){let e=E();s(0,"button",21),g("click",function(){m(e);let a=c();return A(a.updatePassphrase())}),O(1,6),i()}if(n&2){let e=c();H("loader",e.isUpdating()),P("disabled",!0)}}var U=class n{#e=F(x);closed=le();isUpdating=T(!1);passphrase=T("");repeatPassphrase=T("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let o;o=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let a;a=$localize`Change passphrase`;let _;_=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,_=$(_);let D;D=$localize`Passphrase`;let N;N=$localize`Repeat passphrase`;let L;L=$localize`Not now thanks`;let R;R=$localize` Yes, update passphrase now `;let C;return C=$localize` Yes, update passphrase now `,[a,_,D,N,L,R,C,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",o,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),O(2,0),i()(),s(3,"div",8)(4,"sh-alert",9),u(5,1),l(6,"br")(7,"br"),d(),i(),s(8,"sh-form-field")(9,"label",10),O(10,2),i(),s(11,"input",11),j("ngModelChange",function(_){return q(t.passphrase,_)||(t.passphrase=_),_}),i()(),s(12,"sh-form-field")(13,"label",12),O(14,3),i(),s(15,"input",13),j("ngModelChange",function(_){return q(t.repeatPassphrase,_)||(t.repeatPassphrase=_),_}),i(),p(16,je,2,0,"sh-icon",14)(17,Qe,2,0,"sh-icon",15),i()(),s(18,"footer",16)(19,"button",17),g("click",function(){return t.cancel()}),O(20,4),i(),p(21,Ke,2,2,"button",18)(22,Je,2,3,"button",19),i()),e&2&&(r(11),W("ngModel",t.passphrase),r(4),P("disabled",t.passphrase().length===0),W("ngModel",t.repeatPassphrase),r(),S(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),H("loader",t.isUpdating()),r(2),S(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Me,fe,Pe,De,G,Fe,I,Ce],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var Ze=()=>({exact:!0});function et(n,o){n&1&&(s(0,"sh-icon"),h(1,"sun"),i())}function tt(n,o){n&1&&(s(0,"sh-icon"),h(1,"moon"),i())}function nt(n,o){if(n&1){let e=E();s(0,"button",22),g("click",function(){m(e);let a=c();return A(a.changeDefaultClientTo("ngax"))}),u(1,7),l(2,"sh-icon"),d(),i(),s(3,"button",22),g("click",function(){m(e);let a=c();return A(a.logout())}),u(4,8),l(5,"sh-icon"),d(),i()}}var J=class n{#e=F(ve);#t=F(x);#n=F(Ee);#o=F(pe);#i=F(ge);#s=F(k);#a=F(Te);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;ngOnInit(){return this.#s.init(),this.#n.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:o=>{let e=o["autogenerated-passphrase"]==="True",t=o["has-asked-for-password-change"]==="True";e&&!t&&this.#i.open(U,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(o){this.#r(o),window.location.replace(`/${o}`)}logout(){this.#a.logout()}#r(o){var e=new Date;e.setTime(e.getTime()+90*24*60*60*1e3),document.cookie="default-client="+o+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-layout"]],decls:37,vars:4,consts:()=>{let o;o=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let _;_=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let D;D=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SH_ICON:`,D=$(D);let N;N=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:`,N=$(N);let L;L=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Use old UI `;let R;return R=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[o,e,t,a,_,D,N,L,R,["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"sh-sidenav")(1,"div",9)(2,"header"),l(3,"app-logo"),s(4,"button",10),g("click",function(){return t.toggleBodyClass()}),p(5,et,2,0,"sh-icon")(6,tt,2,0,"sh-icon"),i()(),s(7,"sh-list",11)(8,"button",12),u(9,0),l(10,"sh-icon"),d(),i(),s(11,"button",13),u(12,1),l(13,"sh-icon"),d(),i(),s(14,"button",14),u(15,2),l(16,"sh-icon"),d(),i(),s(17,"button",15),u(18,3),l(19,"sh-icon"),d(),i()(),l(20,"div",16),s(21,"sh-list",17),p(22,nt,6,0),l(23,"sh-divider"),s(24,"button",18),u(25,4),l(26,"sh-icon"),d(),i(),s(27,"a",19),u(28,5),l(29,"sh-icon")(30,"sh-icon",20),d(),i(),s(31,"a",21),u(32,6),l(33,"sh-icon")(34,"sh-icon",20),d(),i()()(),l(35,"router-outlet")(36,"app-service-hub"),i()),e&2&&(r(5),S(t.isDarkMode()?5:6),r(3),P("routerLinkActiveOptions",ae(3,Ze)),r(14),S(t.relayIsEnabled()?-1:22))},dependencies:[ce,ue,de,Ae,I,me,w,he,y,Le],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}"],changeDetection:0})};export{J as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as d}from"./chunk-
|
|
1
|
+
import{h as d}from"./chunk-J3BBLPAD.js";import{H as r,Oc as s,Pc as g,V as n,_ as o,oa as l}from"./chunk-QDFCX6XE.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=o(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(r(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as mt}from"./chunk-OBJPWKDY.js";import{a as pt,b as Ot,c as Ct}from"./chunk-7765XHNC.js";import"./chunk-3L3SGYRX.js";import"./chunk-UV3WAAEX.js";import"./chunk-CZLLEVMJ.js";import{a as Dt}from"./chunk-LT2T7TXS.js";import{h as Et}from"./chunk-LIJJPCCP.js";import"./chunk-BVEALUGN.js";import"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import"./chunk-QGFC5ZUR.js";import"./chunk-P2DII6CV.js";import{a as m}from"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-OWAZS6AA.js";import"./chunk-CWBEE627.js";import{c as _t,e as ct,f as ut,g as Tt,i as gt,j as St,s as dt}from"./chunk-USU2EHJV.js";import"./chunk-4URGDROZ.js";import{b as nt,d as it}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as ot,b as at,d as st,e as Ft,l as rt,o as lt}from"./chunk-WRNQOX5R.js";import"./chunk-QM6X5ZEC.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as F,Cb as g,Gb as w,Hb as b,Jb as p,Oc as v,Qb as u,Ra as r,Rb as T,Sb as N,Tb as f,Ub as $,Vb as B,Vc as et,Wb as d,Yb as l,_ as O,bb as j,ea as _,ec as Q,fa as c,fc as q,ia as K,ic as Y,lc as I,mc as k,nc as J,oa as C,qc as A,rc as M,sc as y,ub as D,vb as E,wb as P,xb as x,yb as L,yc as Z,zb as h,zc as tt}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var Rt=["formRef"],ht=()=>({maxWidth:"700px",width:"100%"});function It(i,n){if(i&1){let t=p();u(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),T()}if(i&2){let t=l();r(),Y("loader",t.testSignal()=="testing"),h("disabled",t.testSignal()=="testing")}}function Nt(i,n){if(i&1){let t=p();u(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),F(),T()}}function ft(i,n){i&1&&(s(0,"sh-alert"),u(1,5),g(2,"sh-icon",31),T(),F())}function $t(i,n){i&1&&(s(0,"sh-alert",21),u(1,6),g(2,"sh-icon",31),T(),F())}function At(i,n){if(i&1&&(s(0,"sh-alert",22),u(1,7),g(2,"sh-icon",31),T(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function Mt(i,n){if(i&1&&(s(0,"sh-alert",23),u(1,8),g(2,"sh-icon",31),T(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function yt(i,n){if(i&1){let t=p();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),g(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,o=l();r(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Pt(i,n){if(i&1){let t=p();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),F(),s(3,"p"),I(4),F()()}if(i&2){let t=n.$implicit;r(2),k(t.displayName),r(2),k(t.description)}}function xt(i,n){if(i&1){let t=p();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),F()}if(i&2){let t=n.$implicit;r(2),J(" ",t.displayName," ")}}function Lt(i,n){if(i&1&&(s(0,"div",34),x(1,Pt,5,2,"div",35,P),F(),s(3,"sh-menu",36)(4,"button",37),N(5,10),F(),w(6,19),x(7,xt,3,1,"button",38,P),b(),F()),i&2){let t=l();r(),L(t.destinationTypeOptionsFocused()),r(2),h("searchable",!0),r(4),L(t.destinationTypeOptions())}}function wt(i,n){if(i&1){let t=p();s(0,"app-single-destination",41),y("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(u(0,4,1),g(1,"sh-icon",28),T())}function Bt(i,n){i&1&&(u(0,4,2),g(1,"sh-icon"),T())}function kt(i,n){if(i&1){let t=p();s(0,"sh-dialog",42),y("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),N(3,11),F(),s(4,"sh-alert",22),N(5,12),F()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),y("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),F(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),g(14,"sh-icon"),T(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),h("options",tt(3,ht)),r(8),A("ngModel",t.targetUrlCtrl)}}var U=class i{#i=O(it);#o=O(nt);#e=O(Ft);#a=O(pt);injector=O(K);#t=O(mt);#s=O(Ot);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=C(null);targetUrlInitial=C(null);targetUrlDialogOpen=C(!1);toggleNewDestination=C(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=C(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=v(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=v(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Dt(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let R=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=j({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,Rt,5),t&2&&q()},features:[Z([Et])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=B(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=B(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let X;return X=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,G,V,W,z,H,X,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=p();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,It,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),F(),w(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),F(),D(13,Nt,3,0,"button",18),b(),F()(),T(),F(),D(14,ft,3,0,"sh-alert")(15,$t,3,0,"sh-alert",21)(16,At,3,1,"sh-alert",22)(17,Mt,3,1,"sh-alert",23),D(18,yt,5,1,"p"),F(),D(19,Lt,9,1),D(20,wt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),u(23,3),g(24,"sh-icon"),T(),F(),s(25,"button",27),u(26,4),D(27,bt,2,0,"sh-icon",28)(28,Bt,2,0,"sh-icon"),T(),F()()(),D(29,kt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),E(e?6:-1),r(7),E(e?13:-1),r(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),E(e?18:-1),r(),E(e?-1:19),r(),E(e?20:-1),r(5),h("disabled",o.testSignal()=="testing"||!e),r(2),E(o.testSignal()=="testing"?27:28),r(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Ct,dt,St,_t,ct,ut,gt,Tt,rt,lt,ot,st,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.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-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{U as default};
|
|
1
|
+
import{g as mt}from"./chunk-TJOWPBPB.js";import{a as pt,b as Ot,c as Ct}from"./chunk-YHNIGBHB.js";import"./chunk-6GC5VKTI.js";import"./chunk-K3ZQ67VT.js";import"./chunk-CZLLEVMJ.js";import{a as Dt}from"./chunk-XLE2TW65.js";import{h as Et}from"./chunk-36RDZAZ4.js";import"./chunk-QY6E755W.js";import"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import"./chunk-QGFC5ZUR.js";import"./chunk-OXOOR7I4.js";import{a as m}from"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import{c as _t,e as ct,f as ut,g as Tt,i as gt,j as St,s as dt}from"./chunk-USU2EHJV.js";import"./chunk-ETCRT3EV.js";import{b as nt,d as it}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as ot,b as at,d as st,e as Ft,l as rt,o as lt}from"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as F,Cb as g,Gb as w,Hb as b,Jb as p,Oc as v,Qb as u,Ra as r,Rb as T,Sb as N,Tb as f,Ub as $,Vb as B,Vc as et,Wb as d,Yb as l,_ as O,bb as j,ea as _,ec as Q,fa as c,fc as q,ia as K,ic as Y,lc as I,mc as k,nc as J,oa as C,qc as A,rc as M,sc as y,ub as D,vb as E,wb as P,xb as x,yb as L,yc as Z,zb as h,zc as tt}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var Rt=["formRef"],ht=()=>({maxWidth:"700px",width:"100%"});function It(i,n){if(i&1){let t=p();u(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),T()}if(i&2){let t=l();r(),Y("loader",t.testSignal()=="testing"),h("disabled",t.testSignal()=="testing")}}function Nt(i,n){if(i&1){let t=p();u(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),F(),T()}}function ft(i,n){i&1&&(s(0,"sh-alert"),u(1,5),g(2,"sh-icon",31),T(),F())}function $t(i,n){i&1&&(s(0,"sh-alert",21),u(1,6),g(2,"sh-icon",31),T(),F())}function At(i,n){if(i&1&&(s(0,"sh-alert",22),u(1,7),g(2,"sh-icon",31),T(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function Mt(i,n){if(i&1&&(s(0,"sh-alert",23),u(1,8),g(2,"sh-icon",31),T(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function yt(i,n){if(i&1){let t=p();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),g(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,o=l();r(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Pt(i,n){if(i&1){let t=p();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),F(),s(3,"p"),I(4),F()()}if(i&2){let t=n.$implicit;r(2),k(t.displayName),r(2),k(t.description)}}function xt(i,n){if(i&1){let t=p();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),F()}if(i&2){let t=n.$implicit;r(2),J(" ",t.displayName," ")}}function Lt(i,n){if(i&1&&(s(0,"div",34),x(1,Pt,5,2,"div",35,P),F(),s(3,"sh-menu",36)(4,"button",37),N(5,10),F(),w(6,19),x(7,xt,3,1,"button",38,P),b(),F()),i&2){let t=l();r(),L(t.destinationTypeOptionsFocused()),r(2),h("searchable",!0),r(4),L(t.destinationTypeOptions())}}function wt(i,n){if(i&1){let t=p();s(0,"app-single-destination",41),y("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(u(0,4,1),g(1,"sh-icon",28),T())}function Bt(i,n){i&1&&(u(0,4,2),g(1,"sh-icon"),T())}function kt(i,n){if(i&1){let t=p();s(0,"sh-dialog",42),y("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),N(3,11),F(),s(4,"sh-alert",22),N(5,12),F()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),y("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),F(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),g(14,"sh-icon"),T(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),h("options",tt(3,ht)),r(8),A("ngModel",t.targetUrlCtrl)}}var U=class i{#i=O(it);#o=O(nt);#e=O(Ft);#a=O(pt);injector=O(K);#t=O(mt);#s=O(Ot);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=C(null);targetUrlInitial=C(null);targetUrlDialogOpen=C(!1);toggleNewDestination=C(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=C(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=v(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=v(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Dt(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let R=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=j({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,Rt,5),t&2&&q()},features:[Z([Et])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=B(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=B(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let X;return X=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,G,V,W,z,H,X,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=p();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,It,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),F(),w(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),F(),D(13,Nt,3,0,"button",18),b(),F()(),T(),F(),D(14,ft,3,0,"sh-alert")(15,$t,3,0,"sh-alert",21)(16,At,3,1,"sh-alert",22)(17,Mt,3,1,"sh-alert",23),D(18,yt,5,1,"p"),F(),D(19,Lt,9,1),D(20,wt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),u(23,3),g(24,"sh-icon"),T(),F(),s(25,"button",27),u(26,4),D(27,bt,2,0,"sh-icon",28)(28,Bt,2,0,"sh-icon"),T(),F()()(),D(29,kt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),E(e?6:-1),r(7),E(e?13:-1),r(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),E(e?18:-1),r(),E(e?-1:19),r(),E(e?20:-1),r(5),h("disabled",o.testSignal()=="testing"||!e),r(2),E(o.testSignal()=="testing"?27:28),r(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Ct,dt,St,_t,ct,ut,gt,Tt,rt,lt,ot,st,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.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-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a,g as b}from"./chunk-
|
|
1
|
+
import{f as a,g as b}from"./chunk-36RDZAZ4.js";import"./chunk-QY6E755W.js";import"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import"./chunk-QGFC5ZUR.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-USU2EHJV.js";import"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";export{a as createSourceDataForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as a,f as b}from"./chunk-TJOWPBPB.js";import"./chunk-K3ZQ67VT.js";import"./chunk-CZLLEVMJ.js";import"./chunk-QY6E755W.js";import"./chunk-UACX27D3.js";import"./chunk-QGFC5ZUR.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import"./chunk-USU2EHJV.js";import"./chunk-ETCRT3EV.js";import"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as y}from"./chunk-QGFC5ZUR.js";import{a as w}from"./chunk-
|
|
1
|
+
import{b as y}from"./chunk-QGFC5ZUR.js";import{a as w}from"./chunk-OXOOR7I4.js";import{a as b}from"./chunk-66BSPEOQ.js";import"./chunk-ETCRT3EV.js";import"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as I,g as U,p as $}from"./chunk-WRNQOX5R.js";import{h as x}from"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as a,Bb as r,Cb as d,H as g,Jb as f,Oa as M,Oc as k,Qb as O,Ra as l,Rb as P,Sb as F,Tb as E,Ub as h,Wb as T,Yb as p,_,bb as D,ea as m,fa as C,ic as L,lc as u,mc as R,oa as S,r as v,ub as s,vb as c,zb as G}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";function V(n,o){n&1&&d(0,"sh-progress-bar",3)}function B(n,o){if(n&1&&(a(0,"a",7),O(1,2),d(2,"sh-icon"),P(),r()),n&2){let e,t,i=p(2);G("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,M),l(2),E((t=i.serverState())==null?null:t.UpdatedVersion),h(1)}}function X(n,o){if(n&1){let e=f();a(0,"button",6),T("click",function(){m(e);let i=p();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(n&2){let e,t=p();L("loader",t.checkingForUpdates()),l(2),c((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function z(n,o){if(n&1){let e=f();a(0,"button",6),T("click",function(){m(e);let i=p();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function H(n,o){n&1&&d(0,"sh-progress-bar",3)}var N=class n{#e=_(x);#t=_(w);#n=_(b);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#t.serverState;duplicatiVersion=k(()=>this.#n.systemInfo()?.ServerVersionName??"Unknown");generalInfo=y(this.#e.getApiV1Acknowledgements().pipe(v(o=>o.Acknowledgements),g(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(g(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=D({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,t,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),F(3,0),r(),a(4,"p"),F(5,1),r(),a(6,"div",4),s(7,X,3,3)(8,z,2,0,"button",5),s(9,H,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;c(t.isLoading()?0:-1),l(5),E(t.duplicatiVersion()),h(5),l(2),c(((i=t.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=t.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),c(((A=t.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),R(t.generalInfo())}},dependencies:[$,U,I],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-66BSPEOQ.js";import{a as k,n as w}from"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import{ea as D}from"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as c,Ac as _,Bb as r,Bc as $,Hc as b,Ib as u,Jb as M,Oc as A,Ra as l,Sb as P,Wb as N,Yb as s,_ as y,bb as T,ea as O,fa as x,gb as m,gc as C,hc as E,ic as S,lc as a,mc as F,oa as p,ub as d,vb as f,xb as I,yb as v,zb as g}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var V=e=>({children:e,level:0}),Y=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),z=(e,t)=>t.id;function B(e,t){if(e&1&&(c(0,"sh-icon"),a(1,"caret-down"),r()),e&2){let n=s().$implicit;S("open",n.isOpen())}}function G(e,t){e&1&&(c(0,"sh-icon"),a(1,"dot"),r())}function U(e,t){e&1&&u(0)}function X(e,t){if(e&1&&m(0,U,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);g("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,Y,$(2,j,n.children,o.level+1)))}}function q(e,t){if(e&1){let n=M();c(0,"div",4,1),N("click",function(){let i=O(n).$implicit,L=s(2);return x(i.children.length>0&&L.toggleNode(i))}),d(2,B,2,2,"sh-icon",5)(3,G,2,0,"sh-icon"),c(4,"div",6),a(5),r()(),d(6,X,1,7,"ng-container")}if(e&2){let n=t.$implicit;S("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),f(n.children.length>0?2:3),l(3),F(n.text),l(),f(n.isOpen()?6:-1)}}function H(e,t){if(e&1&&(c(0,"sh-list"),I(1,q,7,7,null,null,z),r()),e&2){let n=t.$implicit;E("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function J(e,t){e&1&&u(0)}var h=class e{#e=y(R);treeStructure=A(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:p(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:p(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),m(2,H,3,2,"ng-template",null,0,b)(4,J,1,0,"ng-container",3)),n&2){let i=C(3);l(4),g("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,Y,_(2,V,o.treeStructure())))}},dependencies:[w,k,D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}sh-list[_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{h as default};
|