homebridge-config-ui-x 5.11.2-beta.8 → 5.11.2-beta.9
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/package.json +3 -3
- package/public/{chunk-OF2SRCQW.js → chunk-2OWZ4XP5.js} +1 -1
- package/public/{chunk-QMWN5KPC.js → chunk-3N7C33O4.js} +1 -1
- package/public/{chunk-G2KWTNHR.js → chunk-4XUH7NXA.js} +1 -1
- package/public/{chunk-CEMVTOZG.js → chunk-6CBJSM3U.js} +1 -1
- package/public/{chunk-NIS65GVY.js → chunk-7JIIKSDG.js} +1 -1
- package/public/{chunk-AXMO2G45.js → chunk-A2MXGFJ6.js} +1 -1
- package/public/{chunk-J7UDRE66.js → chunk-AWTSOXJ2.js} +1 -1
- package/public/{chunk-XORPUWNC.js → chunk-BBBDRQZR.js} +1 -1
- package/public/{chunk-KTQBVBY4.js → chunk-CKURAGOR.js} +1 -1
- package/public/{chunk-N5ONV6TU.js → chunk-DFG4HJK5.js} +1 -1
- package/public/{chunk-VY7HWBNV.js → chunk-DPITSP7F.js} +1 -1
- package/public/{chunk-JY5ZEEL2.js → chunk-DSSLC7R5.js} +1 -1
- package/public/{chunk-CMO4UANJ.js → chunk-F635TFLI.js} +1 -1
- package/public/{chunk-G2GGYHA2.js → chunk-GVFAT25G.js} +1 -1
- package/public/{chunk-XNZA4UBO.js → chunk-HBUIXUR3.js} +1 -1
- package/public/{chunk-5WSUQV2C.js → chunk-HN6QQBDC.js} +1 -1
- package/public/{chunk-OBV66CW4.js → chunk-HYHFIPBC.js} +1 -1
- package/public/{chunk-CP6FP6S2.js → chunk-IDVQIBZN.js} +1 -1
- package/public/{chunk-TPUA4UIN.js → chunk-K7PJFUH4.js} +1 -1
- package/public/{chunk-F5AJLGGI.js → chunk-KV4RQA3A.js} +1 -1
- package/public/{chunk-XOPZ7U6G.js → chunk-LAVT57X4.js} +1 -1
- package/public/{chunk-N7UWTPTT.js → chunk-LI37IF2Z.js} +1 -1
- package/public/chunk-LLNAB3NM.js +35 -0
- package/public/{chunk-Q7EXN4JA.js → chunk-LO72RI4S.js} +1 -1
- package/public/{chunk-ZNN6GWYK.js → chunk-LZTSIWKP.js} +1 -1
- package/public/{chunk-XTYMIZVV.js → chunk-N3SESV2P.js} +1 -1
- package/public/{chunk-PWCLNQBI.js → chunk-OS475ZQO.js} +1 -1
- package/public/{chunk-BB35SJH2.js → chunk-OVQGZ4C6.js} +1 -1
- package/public/{chunk-EWS4VSZB.js → chunk-PD3Q2PZE.js} +1 -1
- package/public/{chunk-GDWF2NMA.js → chunk-PYPOWROR.js} +1 -1
- package/public/{chunk-OOILCTQ3.js → chunk-R2CO54AK.js} +1 -1
- package/public/{chunk-6INJQUJQ.js → chunk-TCJMUYCJ.js} +1 -1
- package/public/{chunk-WVG4A2SW.js → chunk-TJXF3MRO.js} +1 -1
- package/public/{chunk-JWRZMMRO.js → chunk-UFVCK77E.js} +1 -1
- package/public/{chunk-4WEBTV3N.js → chunk-V2TVR4X3.js} +1 -1
- package/public/{chunk-4YNYBAGL.js → chunk-W4WAFNIS.js} +1 -1
- package/public/{chunk-2V4LIZUH.js → chunk-WU7URLRW.js} +1 -1
- package/public/{chunk-H3BKW5W3.js → chunk-X6RWNTC7.js} +1 -1
- package/public/{chunk-7DFQDPRM.js → chunk-YHBVXMFX.js} +1 -1
- package/public/{chunk-D3Q5QTFY.js → chunk-ZAWMHW3P.js} +1 -1
- package/public/{chunk-GGTS2YBW.js → chunk-ZSFO6PRU.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-O5PA2XOA.js → main-EZDP2TWN.js} +1 -1
- package/public/chunk-BFGRDXJK.js +0 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ie}from"./chunk-TUN7H57E.js";import{a as re}from"./chunk-N7UWTPTT.js";import{a as ne}from"./chunk-6QWPGE2L.js";import{a as de}from"./chunk-CP6FP6S2.js";import{a as te}from"./chunk-CMO4UANJ.js";import{a as Z,b as ee}from"./chunk-PRGOUVRO.js";import{a as Y}from"./chunk-PWCLNQBI.js";import{a as Q}from"./chunk-N5ONV6TU.js";import{n as D}from"./chunk-OF2SRCQW.js";import{a as R,b as W,d as H,e as T,f as X,g as G}from"./chunk-EWS4VSZB.js";import{a as $}from"./chunk-Z5PUNNUZ.js";import{b as z}from"./chunk-KTQBVBY4.js";import"./chunk-TPUA4UIN.js";import{b as B}from"./chunk-OBV66CW4.js";import{E as A,F as J,J as I,q}from"./chunk-J7UDRE66.js";import{Ab as S,Dc as d,Ec as l,Fb as g,Gb as i,Hb as a,Ib as p,Nc as K,Rb as k,Xb as u,Za as n,Zb as C,aa as c,ea as O,ga as b,ha as x,hb as j,ic as P,kc as _,lc as h,ma as U,mb as E,n as N,nb as V,sa as w,wc as f,yb as m,zb as y}from"./chunk-HUTYOGRH.js";import{g as se,h as L}from"./chunk-B4AJQJMI.js";var ae=se(de(),1);var F=()=>["/"],pe=()=>({exact:!0}),ce=()=>["/plugins"],me=()=>["/accessories"],ue=()=>["/logs"],_e=()=>["/support"],ge=()=>["/platform-tools/terminal"],ve=()=>["/config"],he=()=>["/settings"],fe=()=>["/power-options"];function be(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),u("click",function(){b(e);let t=C();return x(t.openUnderVoltageModal())})("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(4,"div",12),p(5,"i",21),a(),i(6,"div",14),_(7),d(8,"translate"),a()()()}s&2&&(n(),m("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 xe(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",22),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ge))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.linux.label_terminal")),n(5),h(l(7,6,"menu.linux.label_terminal")))}function Ce(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",23),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ve))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.config_json_editor")),n(5),h(l(7,6,"menu.config_json_editor")))}function we(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",24),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,he))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.label_settings")),n(5),h(l(7,6,"menu.label_settings")))}function ye(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",25),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,fe))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.restart.title")),n(5),h(l(7,6,"menu.restart.title")))}function Se(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.reloadPage())})("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",26),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.reload")),n(5),h(l(7,4,"menu.reload")))}function ke(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.logout())})("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",27),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.tooltip_logout")),n(5),h(l(7,4,"menu.tooltip_logout")))}var oe=(()=>{class s{destroyRef=c(U);injector=c(O);$auth=c(z);$authHelper=c(Q);$settings=c(B);$modal=c(D);$notification=c(ne);$renderer=c(j);$router=c(T);$translate=c(A);initialIsExpanded=K(!1,{});isExpanded=w(!1,{});formAuth=w(this.$settings.formAuth,{});isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=w(!1,{});rPiWasUnderVoltage=w(!1,{});isMobile=!1;freezeMenu=w(!1,{});isPwa=ie();sidebarMouseEnterListener=()=>this.openSidebar();sidebarMouseLeaveListener=()=>this.closeSidebar();touchstartListener;clickListener;constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.pipe($()).subscribe(r=>L(this,null,function*(){if(r instanceof R&&this.$settings.formAuth&&r.url!=="/login"&&!(yield this.$authHelper.isAuthenticated())){window.sessionStorage.setItem("target_route",r.url),yield this.$router.navigate(["/login"]);return}r instanceof W&&queueMicrotask(()=>{this.closeSidebar(),this.freezeMenu.set(!0),setTimeout(()=>{this.freezeMenu.set(!1)},750)})}))}ngOnInit(){this.isExpanded.set(this.initialIsExpanded()),this.$notification.raspberryPiThrottled.pipe($(this.destroyRef)).subscribe(o=>{o["Under Voltage"]&&this.rPiCurrentlyUnderVoltage.set(!0),o["Under-voltage has occurred"]&&this.rPiWasUnderVoltage.set(!0)}),this.$notification.formAuthEnabled.pipe($(this.destroyRef)).subscribe(o=>{this.formAuth.set(o)});let e=document.querySelector(".sidebar"),r=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?(this.touchstartListener=o=>{if(t.contains(o.target)&&this.isExpanded()){o.preventDefault(),this.toggleSidebar();return}!e.contains(o.target)&&!r.contains(o.target)&&this.isExpanded()&&(o.preventDefault(),this.closeSidebar())},document.addEventListener("touchstart",this.touchstartListener,{passive:!1})):(this.updateListeners(),r.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),r.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}),this.clickListener=o=>{e.contains(o.target)&&o.clientX>60&&this.closeSidebar()},document.addEventListener("click",this.clickListener,{passive:!1}))}toggleSidebar(){this.freezeMenu()||(this.isExpanded.set(!this.isExpanded()),this.updateContentStyles())}openUnderVoltageModal(){let e=E([{provide:ee,useValue:{title:this.$translate.instant("rpi.throttled.undervoltage_title"),message:this.$translate.instant(this.rPiCurrentlyUnderVoltage()?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),ctaButtonLabel:this.$translate.instant("form.button_more_info"),faIconClass:"fas fa-bolt yellow-text",ctaButtonLink:"https://pimylifeup.com/raspberry-pi-low-voltage-warning"}}],this.injector);this.$modal.open(re,{size:"lg",backdrop:"static",injector:e})}handleKeydown(e){if(e.key==="Enter"){let r=e.target;["menuitem","button"].includes(r.getAttribute("role"))&&r.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){this.touchstartListener&&document.removeEventListener("touchstart",this.touchstartListener),this.clickListener&&document.removeEventListener("click",this.clickListener);let e=document.querySelector(".sidebar"),r=document.querySelector(".m-header");e&&(e.removeEventListener("mouseenter",this.sidebarMouseEnterListener),e.removeEventListener("mouseleave",this.sidebarMouseLeaveListener)),r&&(r.removeEventListener("mouseenter",this.sidebarMouseEnterListener),r.removeEventListener("mouseleave",this.sidebarMouseLeaveListener))}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu()||(this.isExpanded.set(!0),this.updateContentStyles())}closeSidebar(){this.freezeMenu()||(this.isExpanded.set(!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(r){return new(r||s)};static \u0275cmp=V({type:s,selectors:[["app-sidebar"]],inputs:{initialIsExpanded:[1,"initialIsExpanded"]},decls:68,vars:73,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"],["role","navigation","id","sidebar",1,"sidebar"],["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(r,t){r&1&&(i(0,"div",0),d(1,"translate"),u("click",function(){return t.toggleSidebar()})("keydown",function(v){return t.handleKeydown(v)}),p(2,"span",1),i(3,"a",2),d(4,"translate"),p(5,"img",3),i(6,"div",4),_(7,"Homebridge"),a()(),i(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),i(13,"div",6)(14,"div",7),u("click",function(){return t.toggleSidebar()})("keydown",function(v){return t.handleKeydown(v)}),i(15,"a",2),d(16,"translate"),p(17,"img",3),i(18,"div",8),_(19,"Homebridge"),a()()(),i(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(24,"div",12),p(25,"i",13),a(),i(26,"div",14),_(27),d(28,"translate"),a()()(),y(29,be,9,8,"div",10),i(30,"div",10)(31,"div",15),d(32,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(33,"div",12),p(34,"i",16),a(),i(35,"div",14),_(36),d(37,"translate"),a()()(),i(38,"div",10)(39,"div",15),d(40,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(41,"div",12),p(42,"i",17),a(),i(43,"div",14),_(44),d(45,"translate"),a()()(),i(46,"div",10)(47,"div",15),d(48,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(49,"div",12),p(50,"i",18),a(),i(51,"div",14),_(52),d(53,"translate"),a()()(),y(54,xe,8,9,"div",10),y(55,Ce,8,9,"div",10),y(56,we,8,9,"div",10),i(57,"div",10)(58,"div",15),d(59,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(60,"div",12),p(61,"i",19),a(),i(62,"div",14),_(63),d(64,"translate"),a()()(),y(65,ye,8,9,"div",10),y(66,Se,8,6,"div",10),y(67,ke,8,6,"div",10),a()()),r&2&&(m("aria-expanded",t.isExpanded()?"true":"false")("aria-controls","sidebar")("aria-label",l(1,39,"menu.sidebar.aria_menu")),n(3),g("routerLink",f(65,F)),m("aria-label",l(4,41,"menu.label_status")),n(5),P("hamburger-icon-cross",t.isExpanded()),n(5),P("expanded",t.isExpanded()),n(2),g("routerLink",f(66,F)),m("aria-label",l(16,43,"menu.label_status")),n(7),g("routerLink",f(67,F))("routerLinkActive","active")("routerLinkActiveOptions",f(68,pe)),m("aria-label",l(23,45,"menu.label_status")),n(5),h(l(28,47,"menu.label_status")),n(2),S(t.rPiWasUnderVoltage()||t.rPiCurrentlyUnderVoltage()?29:-1),n(2),g("routerLink",f(69,ce))("routerLinkActive","active"),m("aria-label",l(32,49,"menu.label_plugins")),n(5),h(l(37,51,"menu.label_plugins")),n(3),g("routerLink",f(70,me))("routerLinkActive","active"),m("aria-label",l(40,53,"menu.label_accessories")),n(5),h(l(45,55,"menu.label_accessories")),n(3),g("routerLink",f(71,ue))("routerLinkActive","active"),m("aria-label",l(48,57,"menu.linux.label_logs")),n(5),h(l(53,59,"menu.linux.label_logs")),n(2),S(t.enableTerminalAccess&&t.isAdmin?54:-1),n(),S(t.isAdmin?55:-1),n(),S(t.isAdmin?56:-1),n(2),g("routerLink",f(72,_e))("routerLinkActive","active"),m("aria-label",l(59,61,"support.title")),n(5),h(l(64,63,"support.title")),n(2),S(t.isAdmin?65:-1),n(),S(t.isPwa?66:-1),n(),S(t.formAuth()?67:-1))},dependencies:[X,q,G,J],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 s})();var tt=(()=>{class s{injector=c(O);$auth=c(z);$modal=c(D);$router=c(T);$settings=c(B);$translate=c(A);$ws=c(Y);io;sidebarExpanded=w(!1,{});ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return L(this,null,function*(){if(this.$settings.settingsLoaded||(yield N(this.$settings.onSettingsLoaded)),!this.$router.url.endsWith("/restart")&&(0,ae.lt)(this.$settings.uiVersion,I.serverTarget)){console.log(`Server restart required. UI Version: ${I.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=E([{provide:Z,useValue:{title:this.$translate.instant("platform.version.service_restart_required"),message:this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:I.serverTarget}),confirmButtonLabel:this.$translate.instant("menu.tooltip_restart"),faIconClass:"fas fa-power-off orange-text"}}],this.injector),r=this.$modal.open(te,{size:"lg",backdrop:"static",injector:e});try{yield r.result,this.$router.navigate(["/restart"])}catch{}}})}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=V({type:s,selectors:[["app-layout"]],decls:3,vars:3,consts:[[3,"initialIsExpanded"],[1,"content","px-3","p-md-4"]],template:function(r,t){r&1&&(p(0,"app-sidebar",0),i(1,"div",1),p(2,"router-outlet"),a()),r&2&&(g("initialIsExpanded",t.sidebarExpanded()),n(),P("sidebarExpanded",t.sidebarExpanded()))},dependencies:[oe,H],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 s})();export{tt as LayoutComponent};
|
|
1
|
+
import{a as ie}from"./chunk-TUN7H57E.js";import{a as re}from"./chunk-LI37IF2Z.js";import{a as ne}from"./chunk-6QWPGE2L.js";import{a as de}from"./chunk-IDVQIBZN.js";import{a as te}from"./chunk-F635TFLI.js";import{a as Z,b as ee}from"./chunk-PRGOUVRO.js";import{a as Y}from"./chunk-OS475ZQO.js";import{a as Q}from"./chunk-DFG4HJK5.js";import{n as D}from"./chunk-2OWZ4XP5.js";import{a as R,b as W,d as H,e as T,f as X,g as G}from"./chunk-PD3Q2PZE.js";import{a as $}from"./chunk-Z5PUNNUZ.js";import{b as z}from"./chunk-CKURAGOR.js";import"./chunk-K7PJFUH4.js";import{b as B}from"./chunk-HYHFIPBC.js";import{E as A,F as J,J as I,q}from"./chunk-AWTSOXJ2.js";import{Ab as S,Dc as d,Ec as l,Fb as g,Gb as i,Hb as a,Ib as p,Nc as K,Rb as k,Xb as u,Za as n,Zb as C,aa as c,ea as O,ga as b,ha as x,hb as j,ic as P,kc as _,lc as h,ma as U,mb as E,n as N,nb as V,sa as w,wc as f,yb as m,zb as y}from"./chunk-HUTYOGRH.js";import{g as se,h as L}from"./chunk-B4AJQJMI.js";var ae=se(de(),1);var F=()=>["/"],pe=()=>({exact:!0}),ce=()=>["/plugins"],me=()=>["/accessories"],ue=()=>["/logs"],_e=()=>["/support"],ge=()=>["/platform-tools/terminal"],ve=()=>["/config"],he=()=>["/settings"],fe=()=>["/power-options"];function be(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),u("click",function(){b(e);let t=C();return x(t.openUnderVoltageModal())})("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(4,"div",12),p(5,"i",21),a(),i(6,"div",14),_(7),d(8,"translate"),a()()()}s&2&&(n(),m("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 xe(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",22),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ge))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.linux.label_terminal")),n(5),h(l(7,6,"menu.linux.label_terminal")))}function Ce(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",23),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ve))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.config_json_editor")),n(5),h(l(7,6,"menu.config_json_editor")))}function we(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",24),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,he))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.label_settings")),n(5),h(l(7,6,"menu.label_settings")))}function ye(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",25),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,fe))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.restart.title")),n(5),h(l(7,6,"menu.restart.title")))}function Se(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.reloadPage())})("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",26),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.reload")),n(5),h(l(7,4,"menu.reload")))}function ke(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.logout())})("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",27),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.tooltip_logout")),n(5),h(l(7,4,"menu.tooltip_logout")))}var oe=(()=>{class s{destroyRef=c(U);injector=c(O);$auth=c(z);$authHelper=c(Q);$settings=c(B);$modal=c(D);$notification=c(ne);$renderer=c(j);$router=c(T);$translate=c(A);initialIsExpanded=K(!1,{});isExpanded=w(!1,{});formAuth=w(this.$settings.formAuth,{});isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=w(!1,{});rPiWasUnderVoltage=w(!1,{});isMobile=!1;freezeMenu=w(!1,{});isPwa=ie();sidebarMouseEnterListener=()=>this.openSidebar();sidebarMouseLeaveListener=()=>this.closeSidebar();touchstartListener;clickListener;constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.pipe($()).subscribe(r=>L(this,null,function*(){if(r instanceof R&&this.$settings.formAuth&&r.url!=="/login"&&!(yield this.$authHelper.isAuthenticated())){window.sessionStorage.setItem("target_route",r.url),yield this.$router.navigate(["/login"]);return}r instanceof W&&queueMicrotask(()=>{this.closeSidebar(),this.freezeMenu.set(!0),setTimeout(()=>{this.freezeMenu.set(!1)},750)})}))}ngOnInit(){this.isExpanded.set(this.initialIsExpanded()),this.$notification.raspberryPiThrottled.pipe($(this.destroyRef)).subscribe(o=>{o["Under Voltage"]&&this.rPiCurrentlyUnderVoltage.set(!0),o["Under-voltage has occurred"]&&this.rPiWasUnderVoltage.set(!0)}),this.$notification.formAuthEnabled.pipe($(this.destroyRef)).subscribe(o=>{this.formAuth.set(o)});let e=document.querySelector(".sidebar"),r=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?(this.touchstartListener=o=>{if(t.contains(o.target)&&this.isExpanded()){o.preventDefault(),this.toggleSidebar();return}!e.contains(o.target)&&!r.contains(o.target)&&this.isExpanded()&&(o.preventDefault(),this.closeSidebar())},document.addEventListener("touchstart",this.touchstartListener,{passive:!1})):(this.updateListeners(),r.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),r.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}),this.clickListener=o=>{e.contains(o.target)&&o.clientX>60&&this.closeSidebar()},document.addEventListener("click",this.clickListener,{passive:!1}))}toggleSidebar(){this.freezeMenu()||(this.isExpanded.set(!this.isExpanded()),this.updateContentStyles())}openUnderVoltageModal(){let e=E([{provide:ee,useValue:{title:this.$translate.instant("rpi.throttled.undervoltage_title"),message:this.$translate.instant(this.rPiCurrentlyUnderVoltage()?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),ctaButtonLabel:this.$translate.instant("form.button_more_info"),faIconClass:"fas fa-bolt yellow-text",ctaButtonLink:"https://pimylifeup.com/raspberry-pi-low-voltage-warning"}}],this.injector);this.$modal.open(re,{size:"lg",backdrop:"static",injector:e})}handleKeydown(e){if(e.key==="Enter"){let r=e.target;["menuitem","button"].includes(r.getAttribute("role"))&&r.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){this.touchstartListener&&document.removeEventListener("touchstart",this.touchstartListener),this.clickListener&&document.removeEventListener("click",this.clickListener);let e=document.querySelector(".sidebar"),r=document.querySelector(".m-header");e&&(e.removeEventListener("mouseenter",this.sidebarMouseEnterListener),e.removeEventListener("mouseleave",this.sidebarMouseLeaveListener)),r&&(r.removeEventListener("mouseenter",this.sidebarMouseEnterListener),r.removeEventListener("mouseleave",this.sidebarMouseLeaveListener))}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu()||(this.isExpanded.set(!0),this.updateContentStyles())}closeSidebar(){this.freezeMenu()||(this.isExpanded.set(!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(r){return new(r||s)};static \u0275cmp=V({type:s,selectors:[["app-sidebar"]],inputs:{initialIsExpanded:[1,"initialIsExpanded"]},decls:68,vars:73,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"],["role","navigation","id","sidebar",1,"sidebar"],["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(r,t){r&1&&(i(0,"div",0),d(1,"translate"),u("click",function(){return t.toggleSidebar()})("keydown",function(v){return t.handleKeydown(v)}),p(2,"span",1),i(3,"a",2),d(4,"translate"),p(5,"img",3),i(6,"div",4),_(7,"Homebridge"),a()(),i(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),i(13,"div",6)(14,"div",7),u("click",function(){return t.toggleSidebar()})("keydown",function(v){return t.handleKeydown(v)}),i(15,"a",2),d(16,"translate"),p(17,"img",3),i(18,"div",8),_(19,"Homebridge"),a()()(),i(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(24,"div",12),p(25,"i",13),a(),i(26,"div",14),_(27),d(28,"translate"),a()()(),y(29,be,9,8,"div",10),i(30,"div",10)(31,"div",15),d(32,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(33,"div",12),p(34,"i",16),a(),i(35,"div",14),_(36),d(37,"translate"),a()()(),i(38,"div",10)(39,"div",15),d(40,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(41,"div",12),p(42,"i",17),a(),i(43,"div",14),_(44),d(45,"translate"),a()()(),i(46,"div",10)(47,"div",15),d(48,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(49,"div",12),p(50,"i",18),a(),i(51,"div",14),_(52),d(53,"translate"),a()()(),y(54,xe,8,9,"div",10),y(55,Ce,8,9,"div",10),y(56,we,8,9,"div",10),i(57,"div",10)(58,"div",15),d(59,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(60,"div",12),p(61,"i",19),a(),i(62,"div",14),_(63),d(64,"translate"),a()()(),y(65,ye,8,9,"div",10),y(66,Se,8,6,"div",10),y(67,ke,8,6,"div",10),a()()),r&2&&(m("aria-expanded",t.isExpanded()?"true":"false")("aria-controls","sidebar")("aria-label",l(1,39,"menu.sidebar.aria_menu")),n(3),g("routerLink",f(65,F)),m("aria-label",l(4,41,"menu.label_status")),n(5),P("hamburger-icon-cross",t.isExpanded()),n(5),P("expanded",t.isExpanded()),n(2),g("routerLink",f(66,F)),m("aria-label",l(16,43,"menu.label_status")),n(7),g("routerLink",f(67,F))("routerLinkActive","active")("routerLinkActiveOptions",f(68,pe)),m("aria-label",l(23,45,"menu.label_status")),n(5),h(l(28,47,"menu.label_status")),n(2),S(t.rPiWasUnderVoltage()||t.rPiCurrentlyUnderVoltage()?29:-1),n(2),g("routerLink",f(69,ce))("routerLinkActive","active"),m("aria-label",l(32,49,"menu.label_plugins")),n(5),h(l(37,51,"menu.label_plugins")),n(3),g("routerLink",f(70,me))("routerLinkActive","active"),m("aria-label",l(40,53,"menu.label_accessories")),n(5),h(l(45,55,"menu.label_accessories")),n(3),g("routerLink",f(71,ue))("routerLinkActive","active"),m("aria-label",l(48,57,"menu.linux.label_logs")),n(5),h(l(53,59,"menu.linux.label_logs")),n(2),S(t.enableTerminalAccess&&t.isAdmin?54:-1),n(),S(t.isAdmin?55:-1),n(),S(t.isAdmin?56:-1),n(2),g("routerLink",f(72,_e))("routerLinkActive","active"),m("aria-label",l(59,61,"support.title")),n(5),h(l(64,63,"support.title")),n(2),S(t.isAdmin?65:-1),n(),S(t.isPwa?66:-1),n(),S(t.formAuth()?67:-1))},dependencies:[X,q,G,J],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 s})();var tt=(()=>{class s{injector=c(O);$auth=c(z);$modal=c(D);$router=c(T);$settings=c(B);$translate=c(A);$ws=c(Y);io;sidebarExpanded=w(!1,{});ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return L(this,null,function*(){if(this.$settings.settingsLoaded||(yield N(this.$settings.onSettingsLoaded)),!this.$router.url.endsWith("/restart")&&(0,ae.lt)(this.$settings.uiVersion,I.serverTarget)){console.log(`Server restart required. UI Version: ${I.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=E([{provide:Z,useValue:{title:this.$translate.instant("platform.version.service_restart_required"),message:this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:I.serverTarget}),confirmButtonLabel:this.$translate.instant("menu.tooltip_restart"),faIconClass:"fas fa-power-off orange-text"}}],this.injector),r=this.$modal.open(te,{size:"lg",backdrop:"static",injector:e});try{yield r.result,this.$router.navigate(["/restart"])}catch{}}})}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=V({type:s,selectors:[["app-layout"]],decls:3,vars:3,consts:[[3,"initialIsExpanded"],[1,"content","px-3","p-md-4"]],template:function(r,t){r&1&&(p(0,"app-sidebar",0),i(1,"div",1),p(2,"router-outlet"),a()),r&2&&(g("initialIsExpanded",t.sidebarExpanded()),n(),P("sidebarExpanded",t.sidebarExpanded()))},dependencies:[oe,H],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 s})();export{tt as LayoutComponent};
|