homebridge-config-ui-x 5.12.1-alpha.3 → 5.12.1-alpha.5
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 +3 -2
- package/dist/modules/plugins/plugins.interfaces.d.ts +6 -0
- package/dist/modules/plugins/plugins.service.js +13 -1
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/package.json +1 -1
- package/public/{chunk-Y7C4575H.js → chunk-27PDRAPZ.js} +1 -1
- package/public/{chunk-GGTSYCDS.js → chunk-2G3ZRIOX.js} +1 -1
- package/public/{chunk-NO4NUEGO.js → chunk-2RT43GHI.js} +1 -1
- package/public/{chunk-5ILS55YL.js → chunk-35TNTJ6Q.js} +1 -1
- package/public/{chunk-MXQ6SCXD.js → chunk-3O6LPAEW.js} +1 -1
- package/public/chunk-3PXFDCDF.js +1 -0
- package/public/{chunk-4WVVRGYH.js → chunk-425XTP54.js} +1 -1
- package/public/{chunk-L7PRYH5Q.js → chunk-4A36KA62.js} +1 -1
- package/public/{chunk-HT2MTBEV.js → chunk-4TGKZWXZ.js} +1 -1
- package/public/{chunk-N6D52WI6.js → chunk-4YBJ5QTV.js} +1 -1
- package/public/{chunk-4OLETODN.js → chunk-5D5IHYVR.js} +1 -1
- package/public/{chunk-GMX3VI46.js → chunk-5YPPSDLN.js} +2 -2
- package/public/{chunk-KME5LDFI.js → chunk-5ZUP3HNR.js} +1 -1
- package/public/{chunk-NT3C3F2Y.js → chunk-7XE7M5HW.js} +1 -1
- package/public/{chunk-5NPURMIV.js → chunk-AUQAKG3O.js} +1 -1
- package/public/{chunk-DDJU52K4.js → chunk-AVL3CCQY.js} +1 -1
- package/public/chunk-BAYCAWDC.js +5 -0
- package/public/{chunk-AMA6XMS7.js → chunk-BDAOH62P.js} +1 -1
- package/public/{chunk-IYNMO7IP.js → chunk-BDSIM6RK.js} +1 -1
- package/public/{chunk-627P2ZOZ.js → chunk-CVV3XAQV.js} +1 -1
- package/public/{chunk-4NKCRHTC.js → chunk-E2VTK3FW.js} +1 -1
- package/public/{chunk-LZU5VVW4.js → chunk-FQS33FLE.js} +1 -1
- package/public/chunk-G4VQKYKK.js +1 -0
- package/public/{chunk-OE4I76UJ.js → chunk-GJOBU3C4.js} +1 -1
- package/public/{chunk-A4EMK2AE.js → chunk-GRZI75RH.js} +1 -1
- package/public/{chunk-FJO5GYAD.js → chunk-GXJ2NOX4.js} +1 -1
- package/public/{chunk-VOEVFWQR.js → chunk-H7S7XGL7.js} +1 -1
- package/public/{chunk-E4OK73V5.js → chunk-HAMK3WGJ.js} +1 -1
- package/public/{chunk-UUXRTS4O.js → chunk-HYMBXFUO.js} +4 -4
- package/public/{chunk-C7ACOVTV.js → chunk-IH4AXNHX.js} +1 -1
- package/public/{chunk-N257IGQY.js → chunk-JCNQ3FDO.js} +1 -1
- package/public/chunk-K3TSLNDJ.js +1 -0
- package/public/{chunk-PXOVSZTX.js → chunk-KJ3W2ZWJ.js} +1 -1
- package/public/{chunk-HTPO5VWE.js → chunk-LAOBQH3S.js} +1 -1
- package/public/chunk-LDGHTZWD.js +1 -0
- package/public/chunk-LJ44UY4D.js +107 -0
- package/public/{chunk-VQK7TYXN.js → chunk-LUHGL4R6.js} +1 -1
- package/public/{chunk-OT6UQ4SL.js → chunk-M5KZHJR4.js} +1 -1
- package/public/{chunk-JT7SPTVG.js → chunk-M5WHL5B6.js} +1 -1
- package/public/{chunk-YHD44ZXJ.js → chunk-MAKU7ASQ.js} +1 -1
- package/public/{chunk-BH6X22T5.js → chunk-MI2IBZI5.js} +1 -1
- package/public/{chunk-PCFKF3RR.js → chunk-OS3DVZYM.js} +1 -1
- package/public/{chunk-HHZSXHMS.js → chunk-OVMB43FN.js} +1 -1
- package/public/{chunk-TGOXPZUQ.js → chunk-RKNX7776.js} +1 -1
- package/public/{chunk-4CIWXXEC.js → chunk-RPWSQUHZ.js} +1 -1
- package/public/chunk-SBHK6JCM.js +9 -0
- package/public/{chunk-4QCEHYUB.js → chunk-SPD7PARJ.js} +1 -1
- package/public/{chunk-VUQTJ7DS.js → chunk-SU7V56W4.js} +1 -1
- package/public/{chunk-KSI5RFA4.js → chunk-T2SKVOZO.js} +1 -1
- package/public/{chunk-UTUR2TZC.js → chunk-TL235YGR.js} +1 -1
- package/public/chunk-TTLR7I2U.js +1 -0
- package/public/{chunk-5VPFWJMT.js → chunk-U7LJ3OTZ.js} +1 -1
- package/public/chunk-UF5C5XRA.js +1 -0
- package/public/{chunk-T7I45MK4.js → chunk-UHSZIW4U.js} +1 -1
- package/public/{chunk-JR5ZQFDU.js → chunk-UNBKGN4V.js} +5 -5
- package/public/{chunk-GYOWF7DE.js → chunk-UZTBJJ5T.js} +1 -1
- package/public/{chunk-MGZVKFCX.js → chunk-VFWZ33F2.js} +1 -1
- package/public/{chunk-B2FEO32G.js → chunk-WKNWPF5K.js} +1 -1
- package/public/{chunk-RCHTZ25W.js → chunk-WPILACXW.js} +1 -1
- package/public/{chunk-PBGFVBCB.js → chunk-WVPFF3UP.js} +1 -1
- package/public/{chunk-NRHEAXPQ.js → chunk-X3MLIQHL.js} +1 -1
- package/public/{chunk-VYEQDD6F.js → chunk-XBGDL52V.js} +1 -1
- package/public/{chunk-W22PNIOT.js → chunk-XJG5QSTI.js} +1 -1
- package/public/{chunk-K6DZTGLW.js → chunk-ZARKYV4M.js} +1 -1
- package/public/{chunk-GHPOVWVP.js → chunk-ZHZVMYI7.js} +1 -1
- package/public/{chunk-O7FV4MLW.js → chunk-ZPGGQCXF.js} +1 -1
- package/public/{chunk-X7LAVJYW.js → chunk-ZQUEDCLO.js} +1 -1
- package/public/chunk-ZSEWZ6YI.js +1 -0
- package/public/index.html +2 -2
- package/public/{main-R4I2NDVF.js → main-BFHVUEXW.js} +1 -1
- package/public/styles-G2ZRD7VU.css +1 -0
- package/public/chunk-HOYNPDYG.js +0 -1
- package/public/chunk-HSZKOEQO.js +0 -5
- package/public/chunk-JB7NDPON.js +0 -1
- package/public/chunk-JTUZ5AFR.js +0 -1
- package/public/chunk-KCRG46YZ.js +0 -1
- package/public/chunk-QHCWTRM4.js +0 -107
- package/public/chunk-SSC2QCZI.js +0 -1
- package/public/chunk-U2RX6MKI.js +0 -1
- package/public/chunk-VCZ6KBM7.js +0 -36
- package/public/chunk-XX3G34TE.js +0 -1
- package/public/styles-WY6OJCQO.css +0 -1
package/public/chunk-SSC2QCZI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as E}from"./chunk-HT2MTBEV.js";import{a as S}from"./chunk-HSZKOEQO.js";import"./chunk-VCZ6KBM7.js";import"./chunk-K6DZTGLW.js";import"./chunk-YHD44ZXJ.js";import"./chunk-LZU5VVW4.js";import"./chunk-GHPOVWVP.js";import"./chunk-W22PNIOT.js";import{b as C}from"./chunk-T7I45MK4.js";import{k as $,l as _}from"./chunk-JTUZ5AFR.js";import{Cb as l,Db as m,Eb as g,Ec as b,Nb as h,Ra as a,Sa as c,Wb as f,Xb as v,ac as p,bc as y,fb as u,p as d,pa as s,tc as T,uc as w}from"./chunk-UUXRTS4O.js";var P=["terminaloutput"],x=(()=>{class r{$terminal=s(S);$settings=s(C);$navigationGuard=s(E);$translate=s($);resizeEvent=new d;terminalOptions={allowProposedApi:!0,allowTransparency:!1,fontSize:13,fontWeight:400,lineHeight:1.25};termTarget=b("terminaloutput");onWindowResize(){this.resizeEvent.next(void 0)}onBeforeUnload(t){return this.$navigationGuard.handleBeforeUnload(t)}onWindowFocus(){this.activateTerminal()}onClick(){this.activateTerminal()}activateTerminal(){this.$terminal.isTerminalReady()&&this.$terminal.term&&this.$terminal.term.focus()}ngOnInit(){let t=this.$translate.instant("menu.linux.label_terminal");if(this.$settings.setPageTitle(t),window.document.querySelector("body").classList.add("bg-black"),this.$settings.actualLightingMode==="light"){window.document.querySelector("body").classList.add("light-mode");let e=this.termTarget()?.nativeElement;e&&e.classList.add("light-mode")}this.$terminal.isTerminalReady()&&this.$terminal.destroyTerminal(),this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()?this.$terminal.reconnectTerminal(this.termTarget(),this.terminalOptions,this.resizeEvent):(!this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()&&this.$terminal.destroyPersistentSession(),this.$terminal.startTerminal(this.termTarget(),this.terminalOptions,this.resizeEvent)),setTimeout(()=>{this.activateTerminal()},100)}ngAfterViewInit(){document.addEventListener("visibilitychange",this.onVisibilityChange.bind(this))}onVisibilityChange(){!document.hidden&&this.$terminal.isTerminalReady()&&setTimeout(()=>{this.activateTerminal()},100)}canDeactivate(t){let e=this.$navigationGuard.canDeactivate();if(e===!1||e instanceof Promise&&e.then)return e;if(this.$settings.actualLightingMode!=="light")return window.document.querySelector("body").classList.remove("bg-black"),Promise.resolve(!0);window.document.querySelector("body").classList.remove("light-mode");let n=t&&(t.includes("/platform-tools/terminal")||t.includes("/logs"));return new Promise(o=>{let i=this.termTarget()?.nativeElement;i&&i.classList.add("fade-out"),n?setTimeout(()=>{o(!0)},250):(setTimeout(()=>{window.document.querySelector("body").classList.remove("bg-black")},250),setTimeout(()=>{o(!0)},500))})}ngOnDestroy(){document.removeEventListener("visibilitychange",this.onVisibilityChange.bind(this)),window.document.querySelector("body").classList.remove("light-mode"),this.$settings.env.terminal?.persistence?this.$terminal.detachTerminal():this.$terminal.destroyPersistentSession()}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=u({type:r,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&f(n.termTarget,P,5),e&2&&v()},hostBindings:function(e,n){e&1&&h("resize",function(i){return n.onWindowResize(i)},a)("beforeunload",function(i){return n.onBeforeUnload(i)},a)("focus",function(i){return n.onWindowFocus(i)},a)("click",function(i){return n.onClick(i)})},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,n){e&1&&(l(0,"div",1)(1,"div",2)(2,"h3",3),p(3),T(4,"translate"),m()()(),l(5,"div",4),g(6,"div",5,0),m()),e&2&&(c(3),y(w(4,1,"menu.linux.label_terminal")))},dependencies:[_],styles:["body.light-mode{transition:background-color .25s ease-in-out}#docker-terminal.light-mode[_ngcontent-%COMP%]{opacity:0;animation:_ngcontent-%COMP%_fadeIn .25s ease-in-out .25s forwards}#docker-terminal.light-mode.fade-out[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeOut .25s ease-in-out forwards!important;opacity:1}@keyframes _ngcontent-%COMP%_fadeIn{to{opacity:1}}@keyframes _ngcontent-%COMP%_fadeOut{to{opacity:0}}.adjust-for-mobile[_ngcontent-%COMP%]{height:calc(100% - 60px)}"]})}return r})();export{x as TerminalComponent};
|
package/public/chunk-U2RX6MKI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as G}from"./chunk-TUN7H57E.js";import{b as j}from"./chunk-FJO5GYAD.js";import{a as J}from"./chunk-5NPURMIV.js";import{a as Q}from"./chunk-Y7C4575H.js";import{a as te}from"./chunk-KSI5RFA4.js";import"./chunk-PCFKF3RR.js";import{a as X}from"./chunk-K6DZTGLW.js";import{n as L}from"./chunk-YHD44ZXJ.js";import"./chunk-LZU5VVW4.js";import{a as R}from"./chunk-GHPOVWVP.js";import{b as B}from"./chunk-W22PNIOT.js";import{a as q,b as N,d as W,e as V,f as D,g as H}from"./chunk-O7FV4MLW.js";import{b as A}from"./chunk-T7I45MK4.js";import{k as $,l as U,p as T}from"./chunk-JTUZ5AFR.js";import{$a as F,Ab as s,Bb as p,Kb as S,Nb as _,Pb as x,Rc as E,Sa as n,ac as g,bc as h,bd as K,fb as O,g as ee,h as P,mc as v,nc as M,pa as m,rb as u,sb as w,tb as y,tc as d,ua as b,uc as l,va as C,yb as c,z,zb as i}from"./chunk-UUXRTS4O.js";var Z=ee(te(),1);var I=()=>["/"],ne=r=>({"hamburger-icon-cross":r}),re=r=>({expanded:r}),oe=()=>({exact:!0}),ae=()=>["/plugins"],se=()=>["/accessories"],de=()=>["/logs"],le=()=>["/support"],pe=()=>["/platform-tools/terminal"],ce=()=>["/config"],me=()=>["/settings"],ue=()=>["/power-options"];function _e(r,k){if(r&1){let e=S();i(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),_("click",function(){b(e);let t=x();return C(t.openUnderVoltageModal())})("keydown",function(t){b(e);let o=x();return C(o.handleKeydown(t))}),i(4,"div",12),p(5,"i",21),s(),i(6,"div",14),g(7),d(8,"translate"),s()()()}r&2&&(n(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),n(6),h(l(8,6,"rpi.throttled.undervoltage_title")))}function ge(r,k){if(r&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let o=x();return C(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",22),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}r&2&&(n(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),n(5),h(l(7,6,"menu.linux.label_terminal")))}function fe(r,k){if(r&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let o=x();return C(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",23),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}r&2&&(n(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),n(5),h(l(7,6,"menu.config_json_editor")))}function he(r,k){if(r&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let o=x();return C(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",24),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}r&2&&(n(),c("routerLink",v(8,me))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),n(5),h(l(7,6,"menu.label_settings")))}function ve(r,k){if(r&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let o=x();return C(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",25),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}r&2&&(n(),c("routerLink",v(8,ue))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.restart.title")),n(5),h(l(7,6,"menu.restart.title")))}function be(r,k){if(r&1){let e=S();i(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.reloadPage())})("keydown",function(t){b(e);let o=x();return C(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",26),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}r&2&&(n(),u("aria-label",l(2,2,"menu.reload")),n(5),h(l(7,4,"menu.reload")))}function Ce(r,k){if(r&1){let e=S();i(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.logout())})("keydown",function(t){b(e);let o=x();return C(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",27),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}r&2&&(n(),u("aria-label",l(2,2,"menu.tooltip_logout")),n(5),h(l(7,4,"menu.tooltip_logout")))}var Y=(()=>{class r{$auth=m(B);$authHelper=m(j);$settings=m(A);$modal=m(L);$notification=m(Q);$renderer=m(F);$router=m(V);$translate=m($);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();sidebarMouseEnterListener=()=>this.openSidebar();sidebarMouseLeaveListener=()=>this.closeSidebar();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(a=>P(this,null,function*(){if(a instanceof q&&this.$settings.formAuth&&a.url!=="/login"&&!(yield this.$authHelper.isAuthenticated())){window.sessionStorage.setItem("target_route",a.url),yield this.$router.navigate(["/login"]);return}a instanceof N&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))}))}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(o=>{o["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),o["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(o=>{this.formAuth=o});let e=document.querySelector(".sidebar"),a=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",o=>{if(t.contains(o.target)&&this.isExpanded){o.preventDefault(),this.toggleSidebar();return}!e.contains(o.target)&&!a.contains(o.target)&&this.isExpanded&&(o.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),a.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),a.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}),document.addEventListener("click",o=>{e.contains(o.target)&&o.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(J,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let a=e.target;["menuitem","button"].includes(a.getAttribute("role"))&&a.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeEventListener("mouseenter",this.sidebarMouseEnterListener),e.removeEventListener("mouseleave",this.sidebarMouseLeaveListener),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),e.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}))}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=O({type:r,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-plug"],[1,"fa","fa-lightbulb"],[1,"fa","fa-wave-square"],[1,"fa","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-terminal"],[1,"fa","fa-code"],[1,"fa","fa-cog"],[1,"fa","fa-power-off"],[1,"fa","fa-refresh"],[1,"fa","fa-right-from-bracket"]],template:function(a,t){a&1&&(i(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),p(2,"span",1),i(3,"a",2),d(4,"translate"),p(5,"img",3),i(6,"div",4),g(7,"Homebridge"),s()(),i(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),s()(),i(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),i(15,"a",2),d(16,"translate"),p(17,"img",3),i(18,"div",8),g(19,"Homebridge"),s()()(),i(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(24,"div",12),p(25,"i",13),s(),i(26,"div",14),g(27),d(28,"translate"),s()()(),w(29,_e,9,8,"div",10),i(30,"div",10)(31,"div",15),d(32,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(33,"div",12),p(34,"i",16),s(),i(35,"div",14),g(36),d(37,"translate"),s()()(),i(38,"div",10)(39,"div",15),d(40,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(41,"div",12),p(42,"i",17),s(),i(43,"div",14),g(44),d(45,"translate"),s()()(),i(46,"div",10)(47,"div",15),d(48,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(49,"div",12),p(50,"i",18),s(),i(51,"div",14),g(52),d(53,"translate"),s()()(),w(54,ge,8,9,"div",10),w(55,fe,8,9,"div",10),w(56,he,8,9,"div",10),i(57,"div",10)(58,"div",15),d(59,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(60,"div",12),p(61,"i",19),s(),i(62,"div",14),g(63),d(64,"translate"),s()()(),w(65,ve,8,9,"div",10),w(66,be,8,6,"div",10),w(67,Ce,8,6,"div",10),s()()),a&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,37,"menu.sidebar.aria_menu")),n(3),c("routerLink",v(63,I)),u("aria-label",l(4,39,"menu.label_status")),n(5),c("ngClass",M(64,ne,t.isExpanded)),n(5),c("ngClass",M(66,re,t.isExpanded)),n(2),c("routerLink",v(68,I)),u("aria-label",l(16,41,"menu.label_status")),n(7),c("routerLink",v(69,I))("routerLinkActive","active")("routerLinkActiveOptions",v(70,oe)),u("aria-label",l(23,43,"menu.label_status")),n(5),h(l(28,45,"menu.label_status")),n(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),n(2),c("routerLink",v(71,ae))("routerLinkActive","active"),u("aria-label",l(32,47,"menu.label_plugins")),n(5),h(l(37,49,"menu.label_plugins")),n(3),c("routerLink",v(72,se))("routerLinkActive","active"),u("aria-label",l(40,51,"menu.label_accessories")),n(5),h(l(45,53,"menu.label_accessories")),n(3),c("routerLink",v(73,de))("routerLinkActive","active"),u("aria-label",l(48,55,"menu.linux.label_logs")),n(5),h(l(53,57,"menu.linux.label_logs")),n(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),n(),y(t.isAdmin?55:-1),n(),y(t.isAdmin?56:-1),n(2),c("routerLink",v(74,le))("routerLinkActive","active"),u("aria-label",l(59,59,"support.title")),n(5),h(l(64,61,"support.title")),n(2),y(t.isAdmin?65:-1),n(),y(t.isPwa?66:-1),n(),y(t.formAuth?67:-1))},dependencies:[D,K,E,H,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 80px)!important;scrollbar-width:thin}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{padding-bottom:60px}}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return r})();var xe=r=>({sidebarExpanded:r}),Je=(()=>{class r{$auth=m(B);$modal=m(L);$router=m(V);$settings=m(A);$translate=m($);$ws=m(R);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return P(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),!this.$router.url.endsWith("/restart")&&(0,Z.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=O({type:r,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(a,t){a&1&&(p(0,"app-sidebar",0),i(1,"div",1),p(2,"router-outlet"),s()),a&2&&(c("isExpanded",t.sidebarExpanded),n(),c("ngClass",M(2,xe,t.sidebarExpanded)))},dependencies:[Y,E,W],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return r})();export{Je as LayoutComponent};
|