homebridge-config-ui-x 5.0.0-beta.64 → 5.0.0-beta.66
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/CHANGELOG.md +14 -2
- package/package.json +3 -3
- package/public/{chunk-LJMSR4SP.js → chunk-26MB4YAS.js} +1 -1
- package/public/{chunk-QIU2FB2V.js → chunk-34Y7O6R2.js} +1 -1
- package/public/{chunk-IH5H77MJ.js → chunk-42GTPTGJ.js} +1 -1
- package/public/chunk-44JCPLK6.js +1 -0
- package/public/chunk-4NDVDC6H.js +1 -0
- package/public/{chunk-KTZZ2RD5.js → chunk-4WQMB6B5.js} +1 -1
- package/public/{chunk-NKQEDA4E.js → chunk-53KEMH5C.js} +1 -1
- package/public/{chunk-54Z6ZAME.js → chunk-5DGIHY4Y.js} +1 -1
- package/public/chunk-5PTZAW2P.js +1 -0
- package/public/chunk-6YDOWLMV.js +1 -0
- package/public/{chunk-ZC4P5CX2.js → chunk-75JN24T4.js} +1 -1
- package/public/{chunk-B2SZOW5Y.js → chunk-7DXIWYTO.js} +1 -1
- package/public/{chunk-F6ZELBUI.js → chunk-ASLZVQ25.js} +1 -1
- package/public/{chunk-PA3HMGQS.js → chunk-BDHH5KR5.js} +1 -1
- package/public/chunk-BRL7S735.js +1 -0
- package/public/{chunk-W7CIKNVY.js → chunk-CHR2UZMG.js} +1 -1
- package/public/chunk-COOU6HZK.js +1 -0
- package/public/{chunk-JPVVUOFZ.js → chunk-CTUFSWR6.js} +1 -1
- package/public/chunk-CZ3VWALC.js +1 -0
- package/public/{chunk-WXPPYECW.js → chunk-D7SDIHXD.js} +1 -1
- package/public/{chunk-MQTOZASI.js → chunk-FIBL72PP.js} +1 -1
- package/public/{chunk-CYCZUOHF.js → chunk-G33KVSXU.js} +1 -1
- package/public/{chunk-NLRZQ3ZH.js → chunk-GBZFCTCI.js} +1 -1
- package/public/{chunk-Y36OPOB3.js → chunk-GPRB5JHY.js} +1 -1
- package/public/{chunk-DRH72PT7.js → chunk-GSY7224J.js} +1 -1
- package/public/chunk-GWL6YZ7A.js +1 -0
- package/public/{chunk-NUJN4GZB.js → chunk-I6MBHASN.js} +1 -1
- package/public/{chunk-P2XMCNAT.js → chunk-ICLWFJ2M.js} +1 -1
- package/public/{chunk-HO3Q6LHF.js → chunk-IJ2N7PG5.js} +1 -1
- package/public/{chunk-AZEXCKJT.js → chunk-ILZG6FIW.js} +1 -1
- package/public/{chunk-SGVMRFAH.js → chunk-IPUGJFQW.js} +1 -1
- package/public/chunk-IQ2LYYHA.js +1 -0
- package/public/{chunk-RURI3XCZ.js → chunk-IQBVR7GJ.js} +1 -1
- package/public/chunk-JHTZ6IUO.js +1 -0
- package/public/{chunk-DOJBRM3R.js → chunk-K75IQZB7.js} +1 -1
- package/public/chunk-KBTQA6WH.js +1 -0
- package/public/{chunk-BLDKFSRL.js → chunk-KMJ3DQZ2.js} +1 -1
- package/public/{chunk-KE3BZ45B.js → chunk-KSKRCPSQ.js} +1 -1
- package/public/{chunk-PAYXDYTL.js → chunk-LEJURWWR.js} +1 -1
- package/public/chunk-LM4G7OWP.js +1 -0
- package/public/{chunk-W5YOFQTI.js → chunk-LTVIEZZS.js} +1 -1
- package/public/{chunk-F4P5BATC.js → chunk-M7NQDZAF.js} +1 -1
- package/public/chunk-MDKM7UQZ.js +1 -0
- package/public/chunk-OQOUKWYY.js +1 -0
- package/public/{chunk-CLOVHSIL.js → chunk-OXPMTT7N.js} +1 -1
- package/public/{chunk-Q3XA4FK3.js → chunk-QLRX44WT.js} +1 -1
- package/public/chunk-RKMT73OG.js +1 -0
- package/public/{chunk-HGUYP7CP.js → chunk-RTYQOZBT.js} +1 -1
- package/public/{chunk-BTVMXDWO.js → chunk-SCHLH2W2.js} +1 -1
- package/public/{chunk-2FUHOKMX.js → chunk-SCX5JGYV.js} +1 -1
- package/public/{chunk-LZB6UR5K.js → chunk-T2Q2X464.js} +1 -1
- package/public/{chunk-IHOYVWVS.js → chunk-VAC5IU7L.js} +1 -1
- package/public/{chunk-43JSWHA3.js → chunk-VTRJFIUN.js} +1 -1
- package/public/{chunk-PBB2CYPC.js → chunk-W4MPZ3V6.js} +1 -1
- package/public/chunk-XAK43JG3.js +1 -0
- package/public/{chunk-T2NIXIPK.js → chunk-XSFHOYJ6.js} +1 -1
- package/public/{chunk-QBZUHXU4.js → chunk-YQHSUEEZ.js} +1 -1
- package/public/{chunk-WXF5OYDG.js → chunk-YUMRPV23.js} +1 -1
- package/public/{chunk-YQGAESLK.js → chunk-YYCLSWWN.js} +1 -1
- package/public/{chunk-A7F6EOX4.js → chunk-ZRICTXTP.js} +1 -1
- package/public/index.html +2 -2
- package/public/main-3WNAT3VR.js +1 -0
- package/public/{styles-B6MA4MCW.css → styles-SGJCHKTF.css} +1 -1
- package/public/chunk-3A3I3WJ6.js +0 -1
- package/public/chunk-5J2OSBX7.js +0 -1
- package/public/chunk-AHBD3NA2.js +0 -1
- package/public/chunk-BOZC3EXX.js +0 -1
- package/public/chunk-EGLDWUHX.js +0 -1
- package/public/chunk-EV2ELJP2.js +0 -1
- package/public/chunk-GT3FDKPM.js +0 -1
- package/public/chunk-HXHRGNJO.js +0 -1
- package/public/chunk-K2KTQ7XT.js +0 -1
- package/public/chunk-N6EA3B4N.js +0 -1
- package/public/chunk-OEYWBRCH.js +0 -1
- package/public/chunk-UFON2JQN.js +0 -1
- package/public/chunk-VLYLBJDU.js +0 -1
- package/public/chunk-WELMXMFX.js +0 -1
- package/public/chunk-XXEA3R6D.js +0 -1
- package/public/chunk-YPRESZVA.js +0 -1
- package/public/main-XRTYX73L.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-RTYQOZBT.js";import"./chunk-QCVDY2FW.js";import"./chunk-CTUFSWR6.js";import"./chunk-KPW2P5T4.js";import"./chunk-I6OD3CV4.js";import"./chunk-W2INV3O5.js";import"./chunk-4UVD743J.js";import"./chunk-DBUCH6BG.js";import"./chunk-VTRJFIUN.js";import"./chunk-JHTZ6IUO.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as ConfigEditorComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-4WQMB6B5.js";import"./chunk-GBZFCTCI.js";import"./chunk-3NAAMMFZ.js";import"./chunk-44K5XVZH.js";import"./chunk-53KEMH5C.js";import{g as i}from"./chunk-DBUCH6BG.js";import"./chunk-G33KVSXU.js";import"./chunk-VTRJFIUN.js";import"./chunk-JHTZ6IUO.js";import"./chunk-GDFC3M3E.js";import{c as m}from"./chunk-FETTFNJ2.js";import{ha as t,id as n,ub as r}from"./chunk-6ZN4TBLM.js";var u=[{path:"",loadComponent:()=>import("./chunk-CZ3VWALC.js").then(o=>o.TerminalComponent)}],a=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(u),i]})}return o})();var T=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,a,m.forChild()]})}return o})();export{T as TerminalModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k}from"./chunk-3NAAMMFZ.js";import{a as z,b as A}from"./chunk-44K5XVZH.js";import{a as l}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-3NAAMMFZ.js";import{a as z,b as A}from"./chunk-44K5XVZH.js";import{a as l}from"./chunk-53KEMH5C.js";import{M as n,g as r,ga as c,ma as d,n as h}from"./chunk-6ZN4TBLM.js";var f=r(z(),1),a=r(A(),1),p=r(k(),1);var $=(()=>{class t{$ws=d(l);term;io;fitAddon;webLinksAddon;resize;elementResize;pluginName;constructor(){}startTerminal(m,s={},u,w){this.pluginName=w,this.elementResize=u,this.io=this.$ws.connectToNamespace("log"),this.term=new f.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new a.FitAddon,this.webLinksAddon=new p.WebLinksAddon,this.resize=new h,this.term.open(m.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
|
|
2
2
|
\r
|
|
3
3
|
\rWebsocket failed to connect. Is the server running?
|
|
4
4
|
\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as V}from"./chunk-
|
|
1
|
+
import{a as V}from"./chunk-YQHSUEEZ.js";import{a as q}from"./chunk-ZIXTTJ4W.js";import{a as _}from"./chunk-TEFE7EK6.js";import{n as B,o as k}from"./chunk-W2INV3O5.js";import{h as D,k as F}from"./chunk-JHTZ6IUO.js";import{a as z,b as E}from"./chunk-FETTFNJ2.js";import{Cc as i,Dc as r,Jb as b,Kb as h,Ub as s,Vb as l,Wb as p,_b as T,bc as d,fb as y,g as j,gb as m,h as w,jc as C,kc as x,ma as o,mc as I,n as v,nc as S,pb as $,tb as L,ua as u,va as f}from"./chunk-6ZN4TBLM.js";var H=j(q(),1);var A=["logoutput"],X=(()=>{class c{$api=o(F);$log=o(V);$modal=o(B);$toastr=o(D);$translate=o(z);termTarget=$("logoutput");resizeEvent=new v;constructor(){}onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$log.startTerminal(this.termTarget(),{},this.resizeEvent)}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$log.destroyTerminal()}downloadLogFile(){let t=this.$modal.open(_,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_download_log_file"),t.componentInstance.message=this.$translate.instant("logs.download_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_download"),t.componentInstance.faIconClass="fas fa-fw fa-user-secret primary-text",t.result.then(()=>{this.$api.get("/platform-tools/hb-service/log/download",{observe:"response",responseType:"blob"}).subscribe({next:e=>{(0,H.saveAs)(e.body,"homebridge.log.txt")},error:e=>w(this,null,function*(){let n;try{n=JSON.parse(yield e.error.text()).message}catch(a){console.error(a)}this.$toastr.error(n||this.$translate.instant("logs.download.error"),this.$translate.instant("toast.title_error"))})})}).catch(()=>{})}truncateLogFile(){let t=this.$modal.open(_,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_truncate_log_file"),t.componentInstance.message=this.$translate.instant("logs.truncate_log_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_delete"),t.componentInstance.confirmButtonClass="btn-danger",t.componentInstance.faIconClass="fas fa-fw fa-circle-exclamation primary-text",t.result.then(()=>{this.$api.put("/platform-tools/hb-service/log/truncate",{}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("logs.log_file_truncated"),this.$translate.instant("toast.title_success")),this.$log.term.clear()},error:e=>{console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("logs.truncate.error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=L({type:c,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&C(n.termTarget,A,5),e&2&&x()},hostBindings:function(e,n){e&1&&d("resize",function(g){return n.onWindowResize(g)},!1,y)},decls:17,vars:15,consts:[["logoutput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-download"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-0",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-trash-alt"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","log-output",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,n){if(e&1){let a=T();s(0,"div",1)(1,"div",2)(2,"h3",3),I(3),i(4,"translate"),l()(),s(5,"div",4)(6,"button",5),i(7,"translate"),i(8,"translate"),d("click",function(){return u(a),f(n.downloadLogFile())}),p(9,"i",6),l(),s(10,"button",7),i(11,"translate"),i(12,"translate"),d("click",function(){return u(a),f(n.truncateLogFile())}),p(13,"i",8),l()()(),s(14,"div",9),p(15,"div",10,0),l()}e&2&&(m(3),S(r(4,5,"menu.linux.label_logs")),m(3),h("ngbTooltip",r(7,7,"form.button_download")),b("aria-label",r(8,9,"form.button_download")),m(4),h("ngbTooltip",r(11,11,"form.button_delete")),b("aria-label",r(12,13,"form.button_delete")))},dependencies:[k,E],encapsulation:2})}return c})();export{X as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-53KEMH5C.js";import{d as y}from"./chunk-DBUCH6BG.js";import{b as T}from"./chunk-VTRJFIUN.js";import{h as $,k as S}from"./chunk-JHTZ6IUO.js";import{a as _,b as g}from"./chunk-FETTFNJ2.js";import{Cc as m,Dc as p,Pb as l,Ub as r,Vb as n,Wb as f,cc as v,gb as i,ma as a,mc as s,nc as o,tb as x,zb as h}from"./chunk-6ZN4TBLM.js";function C(t,u){t&1&&(r(0,"p",7),s(1),m(2,"translate"),n()),t&2&&(i(),o(p(2,1,"restart.please_wait_while_server_restarts")))}function k(t,u){if(t&1&&(r(0,"div",8),s(1),n()),t&2){let e=v();i(),o(e.error)}}function b(t,u){t&1&&(r(0,"div",9)(1,"div",11),f(2,"i",12),n()())}function E(t,u){t&1&&(r(0,"div",10),s(1),m(2,"translate"),n()),t&2&&(i(),o(p(2,1,"platform.linux.long_time")))}var A=(()=>{class t{$api=a(S);$router=a(y);$settings=a(T);$toastr=a($);$translate=a(_);$ws=a(w);checkTimeout;checkDelay;resp={};timeout=!1;error=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}static \u0275fac=function(c){return new(c||t)};static \u0275cmp=x({type:t,selectors:[["ng-component"]],decls:15,vars:10,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"],[1,"justify-content-center","my-4"],[1,"alert","alert-warning","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"]],template:function(c,d){c&1&&(r(0,"div",0)(1,"h3",1),s(2),m(3,"translate"),n()(),r(4,"div",2)(5,"div",3),f(6,"i",4),n(),r(7,"div",5)(8,"h4",6),s(9),m(10,"translate"),n(),h(11,C,3,3,"p",7)(12,k,2,1,"div",8)(13,b,3,0,"div",9)(14,E,3,3,"div",10),n()()),c&2&&(i(2),o(p(3,6,"menu.restart.title")),i(7),o(p(10,8,"platform.linux.restarting_server")),i(2),l(d.error?-1:11),i(),l(d.error?12:-1),i(),l(d.error?-1:13),i(),l(d.timeout?14:-1))},dependencies:[g],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{A as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as X}from"./chunk-SGVMRFAH.js";import{n as j}from"./chunk-W2INV3O5.js";import{c as B,d as w,e as P,f as V,g as O,j as F,m as R,p as W,q as N,y as D,z as G}from"./chunk-4UVD743J.js";import{e as L}from"./chunk-DBUCH6BG.js";import{c as Q}from"./chunk-CYCZUOHF.js";import{b as J}from"./chunk-43JSWHA3.js";import{h as q,j as T,k as K}from"./chunk-HXHRGNJO.js";import{l as M}from"./chunk-GDFC3M3E.js";import{a as H,b as A}from"./chunk-FETTFNJ2.js";import{$c as I,Cc as s,Dc as l,Kb as _,Pb as f,Ub as n,Vb as o,Wb as d,_b as S,bc as b,cc as m,gb as i,h as v,ma as g,mc as p,nc as c,oc as C,tb as E,ua as h,va as x,w as y,yc as $,zb as z,zc as k}from"./chunk-6ZN4TBLM.js";var U=(t,u)=>({"is-valid":t,"is-invalid":u}),Z=t=>({"button-loading":t});function ee(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",3),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"button",5),b("click",function(){h(e);let a=m();return x(a.onClickGettingStarted())}),p(6),s(7,"translate"),o(),n(8,"small",6)(9,"a",7),b("click",function(){h(e);let a=m();return x(a.onClickRestoreBackup())}),p(10),s(11,"translate"),o()()()}t&2&&(i(3),c(l(4,3,"setup.welcome_to_homebridge")),i(3),C(" ",l(7,5,"setup.button_get_started")," "),i(4),c(l(11,7,"setup_wizard_message_restore")))}function te(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"div",9)(6,"p"),p(7),s(8,"translate"),o(),n(9,"form",10),b("ngSubmit",function(){h(e);let a=m();return x(a.createFirstUser())}),n(10,"div",11)(11,"span",12),d(12,"i",13),o(),d(13,"input",14),s(14,"translate"),o(),n(15,"div",11)(16,"span",12),d(17,"i",15),o(),d(18,"input",16),s(19,"translate"),o(),n(20,"div",17)(21,"span",12),d(22,"i",15),o(),d(23,"input",18),s(24,"translate"),o(),n(25,"div",19)(26,"button",20),p(27),s(28,"translate"),d(29,"i",21),o()()()()()}if(t&2){let e=m();i(3),c(l(4,15,"setup.create_account")),i(4),c(l(8,17,"setup.create_account_reason")),i(2),_("formGroup",e.createUserForm),i(4),_("placeholder",l(14,19,"users.label_username"))("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),i(5),_("placeholder",l(19,21,"users.label_password"))("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),i(5),_("placeholder",l(24,23,"users.label_confirm_password"))("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),i(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),i(),C(" ",l(28,25,"setup.create_account")," ")}}function ie(t,u){t&1&&(n(0,"span"),d(1,"i",26),p(2),s(3,"translate"),o()),t&2&&(i(2),C(" ",l(3,1,"backup.label_uploading")," "))}function ne(t,u){t&1&&(p(0),s(1,"translate")),t&2&&C(" ",l(1,1,"backup.button_restore_backup")," ")}function oe(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"p"),p(6),s(7,"translate"),o(),n(8,"input",22),b("change",function(a){h(e);let Y=m();return x(Y.handleRestoreFileInput(a.target.files))}),o(),n(9,"div",23)(10,"button",24),b("click",function(){h(e);let a=m();return x(a.onClickCancelRestore())}),p(11),s(12,"translate"),o(),n(13,"button",25),b("click",function(){h(e);let a=m();return x(a.onRestoreBackupClick())}),z(14,ie,4,3,"span")(15,ne,2,3),o()()()}if(t&2){let e=m();i(3),c(l(4,7,"form.button_restore")),i(3),c(l(7,9,"backup.restore_help_one")),i(4),_("disabled",e.restoreUploading),i(),C(" ",l(12,11,"form.button_cancel")," "),i(2),_("disabled",e.restoreUploading||!e.selectedFile),i(),f(e.restoreUploading?14:-1),i(),f(e.restoreUploading?-1:15)}}function re(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"h1"),d(6,"i",26),o()()),t&2&&(i(3),c(l(4,1,"restart.title_restart")))}function ae(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",27),p(3),s(4,"translate"),o(),n(5,"p",28),p(6),s(7,"translate"),o(),n(8,"a",29),p(9),s(10,"translate"),o()()),t&2&&(i(3),c(l(4,3,"setup_wizard_message_complete_title")),i(3),c(l(7,5,"setup_wizard_message_complete_message")),i(3),c(l(10,7,"setup.open_dashboard")))}var Se=(()=>{class t{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(M);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new F("",[w.required]),password:new F("",[w.compose([w.required,w.minLength(4)])]),passwordConfirm:new F("",[w.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,a=e.get("passwordConfirm").value;if(r!==a)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>v(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return v(this,null,function*(){try{let e=yield y(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(T.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield y(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return v(this,null,function*(){this.step="restarting",window.localStorage.removeItem(T.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>v(this,null,function*(){try{yield y(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=E({type:t,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form","input-group","mb-3"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"md-form","input-group","mb-4"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control",3,"change"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,a){r&1&&(n(0,"div",0)(1,"div",1),z(2,ee,12,9,"div",2)(3,te,30,38,"div",2)(4,oe,16,13,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(i(2),f(a.step==="welcome"?2:-1),i(),f(a.step==="create-account"?3:-1),i(),f(a.step==="restore-backup"?4:-1),i(),f(a.step==="restarting"?5:-1),i(),f(a.step==="setup-complete"?6:-1))},dependencies:[D,R,B,P,V,G,W,N,I,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return t})();export{Se as a};
|
|
1
|
+
import{b as X}from"./chunk-IPUGJFQW.js";import{n as j}from"./chunk-W2INV3O5.js";import{c as B,d as w,e as P,f as V,g as O,j as F,m as R,p as W,q as N,y as D,z as G}from"./chunk-4UVD743J.js";import{e as L}from"./chunk-DBUCH6BG.js";import{c as Q}from"./chunk-G33KVSXU.js";import{b as J}from"./chunk-VTRJFIUN.js";import{h as q,j as T,k as K}from"./chunk-JHTZ6IUO.js";import{l as M}from"./chunk-GDFC3M3E.js";import{a as H,b as A}from"./chunk-FETTFNJ2.js";import{$c as I,Cc as s,Dc as l,Kb as _,Pb as f,Ub as n,Vb as o,Wb as d,_b as S,bc as b,cc as m,gb as i,h as v,ma as g,mc as p,nc as c,oc as C,tb as E,ua as h,va as x,w as y,yc as $,zb as z,zc as k}from"./chunk-6ZN4TBLM.js";var U=(t,u)=>({"is-valid":t,"is-invalid":u}),Z=t=>({"button-loading":t});function ee(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",3),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"button",5),b("click",function(){h(e);let a=m();return x(a.onClickGettingStarted())}),p(6),s(7,"translate"),o(),n(8,"small",6)(9,"a",7),b("click",function(){h(e);let a=m();return x(a.onClickRestoreBackup())}),p(10),s(11,"translate"),o()()()}t&2&&(i(3),c(l(4,3,"setup.welcome_to_homebridge")),i(3),C(" ",l(7,5,"setup.button_get_started")," "),i(4),c(l(11,7,"setup_wizard_message_restore")))}function te(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"div",9)(6,"p"),p(7),s(8,"translate"),o(),n(9,"form",10),b("ngSubmit",function(){h(e);let a=m();return x(a.createFirstUser())}),n(10,"div",11)(11,"span",12),d(12,"i",13),o(),d(13,"input",14),s(14,"translate"),o(),n(15,"div",11)(16,"span",12),d(17,"i",15),o(),d(18,"input",16),s(19,"translate"),o(),n(20,"div",17)(21,"span",12),d(22,"i",15),o(),d(23,"input",18),s(24,"translate"),o(),n(25,"div",19)(26,"button",20),p(27),s(28,"translate"),d(29,"i",21),o()()()()()}if(t&2){let e=m();i(3),c(l(4,15,"setup.create_account")),i(4),c(l(8,17,"setup.create_account_reason")),i(2),_("formGroup",e.createUserForm),i(4),_("placeholder",l(14,19,"users.label_username"))("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),i(5),_("placeholder",l(19,21,"users.label_password"))("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),i(5),_("placeholder",l(24,23,"users.label_confirm_password"))("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),i(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),i(),C(" ",l(28,25,"setup.create_account")," ")}}function ie(t,u){t&1&&(n(0,"span"),d(1,"i",26),p(2),s(3,"translate"),o()),t&2&&(i(2),C(" ",l(3,1,"backup.label_uploading")," "))}function ne(t,u){t&1&&(p(0),s(1,"translate")),t&2&&C(" ",l(1,1,"backup.button_restore_backup")," ")}function oe(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"p"),p(6),s(7,"translate"),o(),n(8,"input",22),b("change",function(a){h(e);let Y=m();return x(Y.handleRestoreFileInput(a.target.files))}),o(),n(9,"div",23)(10,"button",24),b("click",function(){h(e);let a=m();return x(a.onClickCancelRestore())}),p(11),s(12,"translate"),o(),n(13,"button",25),b("click",function(){h(e);let a=m();return x(a.onRestoreBackupClick())}),z(14,ie,4,3,"span")(15,ne,2,3),o()()()}if(t&2){let e=m();i(3),c(l(4,7,"form.button_restore")),i(3),c(l(7,9,"backup.restore_help_one")),i(4),_("disabled",e.restoreUploading),i(),C(" ",l(12,11,"form.button_cancel")," "),i(2),_("disabled",e.restoreUploading||!e.selectedFile),i(),f(e.restoreUploading?14:-1),i(),f(e.restoreUploading?-1:15)}}function re(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"h1"),d(6,"i",26),o()()),t&2&&(i(3),c(l(4,1,"restart.title_restart")))}function ae(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",27),p(3),s(4,"translate"),o(),n(5,"p",28),p(6),s(7,"translate"),o(),n(8,"a",29),p(9),s(10,"translate"),o()()),t&2&&(i(3),c(l(4,3,"setup_wizard_message_complete_title")),i(3),c(l(7,5,"setup_wizard_message_complete_message")),i(3),c(l(10,7,"setup.open_dashboard")))}var Se=(()=>{class t{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(M);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new F("",[w.required]),password:new F("",[w.compose([w.required,w.minLength(4)])]),passwordConfirm:new F("",[w.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,a=e.get("passwordConfirm").value;if(r!==a)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>v(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return v(this,null,function*(){try{let e=yield y(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(T.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield y(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return v(this,null,function*(){this.step="restarting",window.localStorage.removeItem(T.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>v(this,null,function*(){try{yield y(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=E({type:t,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form","input-group","mb-3"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"md-form","input-group","mb-4"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control",3,"change"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,a){r&1&&(n(0,"div",0)(1,"div",1),z(2,ee,12,9,"div",2)(3,te,30,38,"div",2)(4,oe,16,13,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(i(2),f(a.step==="welcome"?2:-1),i(),f(a.step==="create-account"?3:-1),i(),f(a.step==="restore-backup"?4:-1),i(),f(a.step==="restarting"?5:-1),i(),f(a.step==="setup-complete"?6:-1))},dependencies:[D,R,B,P,V,G,W,N,I,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return t})();export{Se as a};
|
package/public/index.html
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
<link rel="manifest" href="/assets/manifest.webmanifest"/>
|
|
17
17
|
<meta name="theme-color" content="#140a33" media="(prefers-color-scheme: light)"/>
|
|
18
18
|
<meta name="theme-color" content="#0f0f0f" media="(prefers-color-scheme: dark)"/>
|
|
19
|
-
<link rel="stylesheet" href="styles-
|
|
19
|
+
<link rel="stylesheet" href="styles-SGJCHKTF.css" crossorigin="use-credentials"></head>
|
|
20
20
|
|
|
21
21
|
<body>
|
|
22
22
|
<app-root></app-root>
|
|
23
|
-
<link rel="modulepreload" href="chunk-
|
|
23
|
+
<link rel="modulepreload" href="chunk-ICLWFJ2M.js"><link rel="modulepreload" href="chunk-34Y7O6R2.js"><link rel="modulepreload" href="chunk-QCVDY2FW.js"><link rel="modulepreload" href="chunk-M7NQDZAF.js"><link rel="modulepreload" href="chunk-QLRX44WT.js"><link rel="modulepreload" href="chunk-LEJURWWR.js"><link rel="modulepreload" href="chunk-D7SDIHXD.js"><link rel="modulepreload" href="chunk-GBZFCTCI.js"><link rel="modulepreload" href="chunk-IQ2LYYHA.js"><link rel="modulepreload" href="chunk-KSKRCPSQ.js"><script src="polyfills-JFMQVUE2.js" type="module" crossorigin="use-credentials"></script><script src="main-3WNAT3VR.js" type="module" crossorigin="use-credentials"></script></body>
|
|
24
24
|
</html>
|