homebridge-config-ui-x 5.11.3-beta.4 → 5.12.0
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 +1 -1
- package/package.json +1 -1
- package/public/{chunk-MJICNVQH.js → chunk-3MO7ICHF.js} +1 -1
- package/public/{chunk-OXLWAR72.js → chunk-3SKLXSFI.js} +1 -1
- package/public/{chunk-WZJUFKXE.js → chunk-56HOZZW6.js} +1 -1
- package/public/{chunk-2DGKUFJ3.js → chunk-6SUIFFAZ.js} +1 -1
- package/public/{chunk-NZWOTGB5.js → chunk-7DOT7I4R.js} +1 -1
- package/public/{chunk-263NOR3O.js → chunk-7O4JAXGA.js} +6 -6
- package/public/{chunk-TAIGUU34.js → chunk-A5EOSR6S.js} +1 -1
- package/public/{chunk-MJBMB5I4.js → chunk-AIGU7Y6G.js} +1 -1
- package/public/{chunk-E3E557DB.js → chunk-AK4UTJX2.js} +1 -1
- package/public/{chunk-FXC2TXMQ.js → chunk-BAHYSQO5.js} +1 -1
- package/public/chunk-BJKMZCEQ.js +1 -0
- package/public/{chunk-RR2TABMH.js → chunk-BNHW6YHK.js} +1 -1
- package/public/{chunk-NTNJ6T3W.js → chunk-BNQ6BOCY.js} +1 -1
- package/public/{chunk-2JEPSQF2.js → chunk-BPQAV2XG.js} +1 -1
- package/public/{chunk-E42OXXZW.js → chunk-CCKAIEVL.js} +1 -1
- package/public/{chunk-6KMW4JN6.js → chunk-CJJAQM22.js} +2 -2
- package/public/{chunk-ORH5GUC6.js → chunk-D5Z6KR3J.js} +1 -1
- package/public/chunk-DRKO4DTB.js +1 -0
- package/public/{chunk-SJOJIS2X.js → chunk-EBANXPKG.js} +1 -1
- package/public/{chunk-J4NU6QG2.js → chunk-GOLMQCNJ.js} +1 -1
- package/public/{chunk-L46ABV4Q.js → chunk-GPTVUF5H.js} +1 -1
- package/public/{chunk-DJNNWVCP.js → chunk-HRAMBCZG.js} +1 -1
- package/public/{chunk-WV2GGBD5.js → chunk-IQUWZEQX.js} +1 -1
- package/public/{chunk-SS5R5CHL.js → chunk-JE6FI7IW.js} +1 -1
- package/public/{chunk-A5OTQCPQ.js → chunk-JI6C4NXH.js} +1 -1
- package/public/{chunk-XAMR4AJD.js → chunk-JJZ232C2.js} +1 -1
- package/public/{chunk-UOTOETS7.js → chunk-KCF7ILFR.js} +1 -1
- package/public/chunk-KEKO5EFZ.js +1 -0
- package/public/{chunk-Y3N7I3ZB.js → chunk-KK7LTOA5.js} +1 -1
- package/public/{chunk-GKPSCBCJ.js → chunk-L2Y7HWNA.js} +1 -1
- package/public/{chunk-GAEROYVP.js → chunk-LVPMGB27.js} +1 -1
- package/public/{chunk-FPTSCGOD.js → chunk-ML7UNHWF.js} +1 -1
- package/public/{chunk-22F7EMIW.js → chunk-MY5KM2NY.js} +1 -1
- package/public/{chunk-47A4BXKR.js → chunk-N2EK3VS7.js} +1 -1
- package/public/{chunk-LIRHHMQL.js → chunk-NBTW66C4.js} +1 -1
- package/public/{chunk-P4QLZKPE.js → chunk-NLWU3URB.js} +1 -1
- package/public/{chunk-OWHAIBS3.js → chunk-NVN7DYND.js} +1 -1
- package/public/{chunk-QAG3NKZT.js → chunk-OL7NNVJO.js} +1 -1
- package/public/{chunk-3ROZ6POS.js → chunk-PHO7WRKK.js} +1 -1
- package/public/{chunk-FQUPPZO7.js → chunk-PHWW4YF2.js} +1 -1
- package/public/{chunk-MWLJUZAA.js → chunk-QPGFU6MO.js} +1 -1
- package/public/{chunk-YFNESWHN.js → chunk-QTIB6YCV.js} +1 -1
- package/public/{chunk-HN5RADCN.js → chunk-RZVF77KW.js} +2 -2
- package/public/{chunk-SWSSREE5.js → chunk-SNO4VAGT.js} +1 -1
- package/public/{chunk-6LUQPFYO.js → chunk-UIZYHRTQ.js} +2 -2
- package/public/{chunk-MPVGIXNI.js → chunk-UO2L3YPH.js} +1 -1
- package/public/{chunk-3SO7DEUM.js → chunk-XCOJYJKE.js} +1 -1
- package/public/{chunk-UXCV66YL.js → chunk-XKFVEK25.js} +2 -2
- package/public/{chunk-7PCWFWIT.js → chunk-XPGD2BHY.js} +2 -2
- package/public/{chunk-IYFBQIND.js → chunk-YBNR45V5.js} +1 -1
- package/public/chunk-YK5NYQW5.js +1 -0
- package/public/{chunk-IZQBZT7U.js → chunk-ZDEL6332.js} +1 -1
- package/public/{chunk-ZWJ7CIIV.js → chunk-ZYETXD5U.js} +1 -1
- package/public/index.html +2 -2
- package/public/{main-KV63YMLE.js → main-YYHATWMC.js} +1 -1
- package/public/{styles-SYG5CZBA.css → styles-G2ZRD7VU.css} +1 -1
- package/public/chunk-6NRW3SRM.js +0 -1
- package/public/chunk-FUVZFNV2.js +0 -1
- package/public/chunk-XAZKD4YF.js +0 -1
- package/public/chunk-YUJKEHJT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-TUN7H57E.js";import{b as j}from"./chunk-MJBMB5I4.js";import{a as J}from"./chunk-J4NU6QG2.js";import{a as Q}from"./chunk-MA4NUDLX.js";import{a as te}from"./chunk-NXNTFMYU.js";import"./chunk-TGQIPKOK.js";import{a as X}from"./chunk-YFNESWHN.js";import{n as L}from"./chunk-54X33YUH.js";import"./chunk-3PGUQRQW.js";import{a as R}from"./chunk-OXLWAR72.js";import{b as B}from"./chunk-GKPSCBCJ.js";import{a as q,b as N,d as W,e as V,f as D,g as H}from"./chunk-5ZHDYUXA.js";import{b as A}from"./chunk-ORH5GUC6.js";import{k as $,l as U,p as T}from"./chunk-YUJKEHJT.js";import{$b as h,Ib as S,Lb as _,Nb as x,Pc as E,Qa as n,Za as F,_b as g,ad as K,db as O,g as ee,h as P,kc as v,lc as M,na as m,pb as u,qb as w,rb as y,rc as d,sa as b,sc as l,ta as C,wb as c,x as z,xb as i,yb as s,zb as p}from"./chunk-ZRDN4L2J.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};
|
|
1
|
+
import{a as G}from"./chunk-TUN7H57E.js";import{b as j}from"./chunk-AIGU7Y6G.js";import{a as J}from"./chunk-GOLMQCNJ.js";import{a as Q}from"./chunk-MA4NUDLX.js";import{a as te}from"./chunk-NXNTFMYU.js";import"./chunk-TGQIPKOK.js";import{a as X}from"./chunk-QTIB6YCV.js";import{n as L}from"./chunk-54X33YUH.js";import"./chunk-3PGUQRQW.js";import{a as R}from"./chunk-3SKLXSFI.js";import{b as B}from"./chunk-L2Y7HWNA.js";import{a as q,b as N,d as W,e as V,f as D,g as H}from"./chunk-5ZHDYUXA.js";import{b as A}from"./chunk-D5Z6KR3J.js";import{k as $,l as U,p as T}from"./chunk-YK5NYQW5.js";import{$b as h,Ib as S,Lb as _,Nb as x,Pc as E,Qa as n,Za as F,_b as g,ad as K,db as O,g as ee,h as P,kc as v,lc as M,na as m,pb as u,qb as w,rb as y,rc as d,sa as b,sc as l,ta as C,wb as c,x as z,xb as i,yb as s,zb as p}from"./chunk-ZRDN4L2J.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
1
|
+
import{b as c}from"./chunk-AIGU7Y6G.js";import{b as f}from"./chunk-L2Y7HWNA.js";import{e as u}from"./chunk-5ZHDYUXA.js";import{b as h}from"./chunk-D5Z6KR3J.js";import{k as o,n}from"./chunk-YK5NYQW5.js";import{h as i,ia as s,na as t,x as a}from"./chunk-ZRDN4L2J.js";var j=(()=>{class e{$auth=t(f);$authHelper=t(c);$router=t(u);$settings=t(h);$translate=t(o);$toastr=t(n);canActivate(m,r){return i(this,null,function*(){return this.$settings.settingsLoaded||(yield a(this.$settings.onSettingsLoaded)),this.$settings.formAuth===!1?(yield this.$auth.noauth(),!0):(yield this.$authHelper.isAuthenticated())?(yield this.$auth.checkAndRefreshIfNeeded(),this.$auth.user?.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),yield this.$router.navigate(["/"]),!1)):(window.sessionStorage.setItem("target_route",r.url),yield this.$router.navigate(["/login"]),!1)})}static \u0275fac=function(r){return new(r||e)};static \u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{j as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as f,h as s}from"./chunk-5ZHDYUXA.js";import{k as l,n as u,q as d}from"./chunk-
|
|
1
|
+
import{e as f,h as s}from"./chunk-5ZHDYUXA.js";import{k as l,n as u,q as d}from"./chunk-YK5NYQW5.js";import{eb as a,h as p,ia as m,ja as i,na as e,x as c}from"./chunk-ZRDN4L2J.js";var n=(()=>{class t{$api=e(d);$router=e(f);$toastr=e(u);$translate=e(l);resolve(){return p(this,null,function*(){try{return yield c(this.$api.get("/platform-tools/docker/startup-script"))}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(o){return new(o||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})();var S=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-RZVF77KW.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-56HOZZW6.js").then(t=>t.ContainerRestartComponent)}],v=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[s.forChild(S),s]})}return t})();var T=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[v]})}return t})();export{T as DockerModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as r}from"./chunk-5ZHDYUXA.js";import{eb as e,ja as t}from"./chunk-ZRDN4L2J.js";var m=[{path:"",loadComponent:()=>import("./chunk-
|
|
1
|
+
import{h as r}from"./chunk-5ZHDYUXA.js";import{eb as e,ja as t}from"./chunk-ZRDN4L2J.js";var m=[{path:"",loadComponent:()=>import("./chunk-BNQ6BOCY.js").then(o=>o.PowerOptionsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(m),r]})}return o})();var d=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{d as PowerOptionsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-HRAMBCZG.js";import{h as i}from"./chunk-5ZHDYUXA.js";import"./chunk-D5Z6KR3J.js";import"./chunk-YK5NYQW5.js";import{eb as r,ja as o}from"./chunk-ZRDN4L2J.js";var a=[{path:"",loadComponent:()=>import("./chunk-XKFVEK25.js").then(t=>t.SetupWizardComponent)}],u=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(a),i]})}return t})();var l=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({providers:[n],imports:[u]})}return t})();export{l as SetupWizardModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as u,h as n}from"./chunk-5ZHDYUXA.js";import{k as f,n as l,q as d}from"./chunk-
|
|
1
|
+
import{e as u,h as n}from"./chunk-5ZHDYUXA.js";import{k as f,n as l,q as d}from"./chunk-YK5NYQW5.js";import{eb as s,h as m,ia as p,ja as i,na as o,x as c}from"./chunk-ZRDN4L2J.js";var a=(()=>{class r{$api=o(d);$router=o(u);$toastr=o(l);$translate=o(f);resolve(){return m(this,null,function*(){try{return yield c(this.$api.get("/users"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(e){return new(e||r)};static \u0275prov=p({token:r,factory:r.\u0275fac})}return r})();var h=[{path:"",loadComponent:()=>import("./chunk-KK7LTOA5.js").then(r=>r.UsersComponent),resolve:{homebridgeUsers:a}}],g=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({imports:[n.forChild(h),n]})}return r})();var T=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({providers:[a],imports:[g]})}return r})();export{T as UsersModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as I}from"./chunk-54X33YUH.js";import{l as H}from"./chunk-
|
|
1
|
+
import{m as I}from"./chunk-54X33YUH.js";import{l as H}from"./chunk-YK5NYQW5.js";import{$b as k,Ab as o,Bb as a,Cb as s,Ib as B,Jb as p,La as r,Mb as f,Nb as m,Qa as i,Zb as v,_b as u,ac as E,db as L,ic as g,na as M,pb as x,qb as d,rb as c,rc as C,sa as T,sc as b,ta as y}from"./chunk-ZRDN4L2J.js";function w(t,_){if(t&1&&s(0,"i",14),t&2){let e=m();v(g("fas ",e.faIconClass," mb-3"))}}function z(t,_){if(t&1&&s(0,"p",7),t&2){let e=m();p("innerHTML",e.message2,r)}}function h(t,_){if(t&1&&s(0,"p",7),t&2){let e=m();p("innerHTML",e.message3,r)}}function P(t,_){if(t&1){let e=B();o(0,"button",15),f("click",function(){T(e);let n=m();return y(n.closeModal())}),u(1),a()}if(t&2){let e=m();v(g("btn ",e.confirmButtonClass||"btn-primary")),i(),E(" ",e.confirmButtonLabel," ")}}var N=(()=>{class t{$activeModal=M(I);title;message;message2;message3;confirmButtonLabel;confirmButtonClass;faIconClass;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close()}static \u0275fac=function(l){return new(l||t)};static \u0275cmp=L({type:t,selectors:[["ng-component"]],inputs:{title:"title",message:"message",message2:"message2",message3:"message3",confirmButtonLabel:"confirmButtonLabel",confirmButtonClass:"confirmButtonClass",faIconClass:"faIconClass"},decls:20,vars:15,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-0","text-center",3,"innerHTML"],[1,"mt-2","mb-0","text-center",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",3,"class"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",3,"click"]],template:function(l,n){l&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),u(3),a(),o(4,"button",3),C(5,"translate"),f("click",function(){return n.dismissModal()}),a()(),o(6,"div",4),d(7,w,1,3,"i",5),s(8,"p",6),d(9,z,1,1,"p",7),d(10,h,1,1,"p",7),a(),o(11,"div",8)(12,"div",9)(13,"button",10),C(14,"translate"),f("click",function(){return n.dismissModal()}),u(15),C(16,"translate"),a()(),s(17,"div",11),o(18,"div",12),d(19,P,2,4,"button",13),a()()()),l&2&&(i(3),k(n.title),i(),x("aria-label",b(5,9,"form.button_close")),i(3),c(n.faIconClass?7:-1),i(),p("innerHTML",n.message,r),i(),c(n.message2?9:-1),i(),c(n.message3?10:-1),i(3),x("aria-label",b(14,11,"form.button_cancel")),i(2),E(" ",b(16,13,"form.button_cancel")," "),i(4),c(n.confirmButtonLabel?19:-1))},dependencies:[H],encapsulation:2})}return t})();export{N as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as P}from"./chunk-JHD5MRCG.js";import{a as z}from"./chunk-STRTFJ4I.js";import{C as $,c as E,e as y,l as k}from"./chunk-3PGUQRQW.js";import{c as D}from"./chunk-5ZHDYUXA.js";import{b as O}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-JHD5MRCG.js";import{a as z}from"./chunk-STRTFJ4I.js";import{C as $,c as E,e as y,l as k}from"./chunk-3PGUQRQW.js";import{c as D}from"./chunk-5ZHDYUXA.js";import{b as O}from"./chunk-D5Z6KR3J.js";import{k as T,n as I,q as H}from"./chunk-YK5NYQW5.js";import{Ib as g,Lb as _,Nb as a,Qa as p,_b as v,db as x,fc as b,gc as M,h as S,hc as V,na as r,qb as m,rb as u,sa as l,ta as c,wb as f,x as C,xb as d,yb as s,zb as w}from"./chunk-ZRDN4L2J.js";function A(i,h){i&1&&w(0,"i",6)}function L(i,h){i&1&&w(0,"i",7)}function F(i,h){if(i&1){let t=g();d(0,"ngx-monaco-editor",10),_("onInit",function(e){l(t);let o=a();return c(o.onEditorInit(e))})("keydown.control.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())})("keydown.meta.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())}),s()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,h){if(i&1){let t=g();d(0,"textarea",11),V("ngModelChange",function(e){l(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),c(e)}),v(1," "),s()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(z);$route=r(D);$settings=r(O);$toastr=r(I);$translate=r(T);lastHeight;visualViewPortEventCallback;startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light"},this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(t=>{this.startupScript=t.startupScript.script}),this.monacoEditorModel={value:"",language:"shell"}}onEditorInit(t){this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.startupScript)}onSave(){return S(this,null,function*(){if(!this.saveInProgress){if(this.saveInProgress=!0,this.isMobile||(yield this.monacoEditor.getAction("editor.action.formatDocument").run(),this.startupScript=this.monacoEditor.getModel().getValue()),!["#!/bin/sh","#!/bin/bash"].includes(this.startupScript.split(`
|
|
2
2
|
`)[0].trim())){this.$toastr.error(this.$translate.instant("platform.docker.must_use_hashbang"),this.$translate.instant("toast.title_error")),this.startupScript=`#!/bin/sh
|
|
3
3
|
|
|
4
|
-
${this.startupScript}`,this.isMobile||this.monacoEditor.getModel().setValue(this.startupScript),this.saveInProgress=!1;return}try{yield C(this.$api.put("/platform-tools/docker/startup-script",{script:this.startupScript})),this.$toastr.success(this.$translate.instant("platform.docker.restart_required"),this.$translate.instant("platform.docker.script_saved"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}ngOnDestroy(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["ng-component"]],decls:11,vars:4,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0","font-monospace"],[1,"col-6","text-end"],[1,"btn","btn-primary","waves-effect","m-0",3,"click","disabled"],[1,"fas","fa-
|
|
4
|
+
${this.startupScript}`,this.isMobile||this.monacoEditor.getModel().setValue(this.startupScript),this.saveInProgress=!1;return}try{yield C(this.$api.put("/platform-tools/docker/startup-script",{script:this.startupScript})),this.$toastr.success(this.$translate.instant("platform.docker.restart_required"),this.$translate.instant("platform.docker.script_saved"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}ngOnDestroy(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["ng-component"]],decls:11,vars:4,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0","font-monospace"],[1,"col-6","text-end"],[1,"btn","btn-primary","waves-effect","m-0",3,"click","disabled"],[1,"fas","fa-circle-notch","fa-spin"],[1,"fas","fa-floppy-disk"],[1,"flex-grow-1","h-100","w-100","my-2",3,"options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModel"],[1,"flex-grow-1","h-100","w-100","my-2",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModelChange","ngModel"]],template:function(n,e){n&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),v(4,"startup.sh"),s()(),d(5,"div",4)(6,"button",5),_("click",function(){return e.onSave()}),m(7,A,1,0,"i",6)(8,L,1,0,"i",7),s()()(),m(9,F,1,2,"ngx-monaco-editor",8),m(10,W,2,1,"textarea",9),s()),n&2&&(p(6),f("disabled",e.saveInProgress),p(),u(e.saveInProgress?7:8),p(2),u(e.isMobile?-1:9),p(),u(e.isMobile?10:-1))},dependencies:[P,$,E,y,k],encapsulation:2})}return i})();export{tt as StartupScriptComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-XCOJYJKE.js";import"./chunk-7O4JAXGA.js";import"./chunk-IQUWZEQX.js";import"./chunk-JE6FI7IW.js";import"./chunk-JHD5MRCG.js";import"./chunk-STRTFJ4I.js";import"./chunk-JJZ232C2.js";import"./chunk-SIVN6M76.js";import"./chunk-V4JCOKHQ.js";import"./chunk-TMGK6CPZ.js";import"./chunk-NXNTFMYU.js";import"./chunk-TGQIPKOK.js";import"./chunk-QTIB6YCV.js";import"./chunk-54X33YUH.js";import"./chunk-3PGUQRQW.js";import"./chunk-3SKLXSFI.js";import"./chunk-L2Y7HWNA.js";import{h as n}from"./chunk-5ZHDYUXA.js";import"./chunk-D5Z6KR3J.js";import"./chunk-YK5NYQW5.js";import{eb as i,ia as a,ja as r}from"./chunk-ZRDN4L2J.js";var s=(()=>{class t{canDeactivate(o,e,p,m){return o.canDeactivate?o.canDeactivate(m?.url):!0}static \u0275fac=function(e){return new(e||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var f=[{path:"",loadComponent:()=>import("./chunk-BAHYSQO5.js").then(t=>t.PluginsComponent),canDeactivate:[s]}],l=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=r({imports:[n.forChild(f),n]})}return t})();var P=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=r({imports:[c,l]})}return t})();export{P as PluginsModule};
|