homebridge-config-ui-x 5.0.0-beta.79 → 5.0.0-beta.80
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 -0
- package/package.json +5 -5
- package/public/chunk-2MYRJGR7.js +1 -0
- package/public/chunk-2NP34GCU.js +1 -0
- package/public/{chunk-OK2KXTVA.js → chunk-2XJKHKFE.js} +1 -1
- package/public/{chunk-SCKEPMWS.js → chunk-3HVSWJGA.js} +1 -1
- package/public/chunk-3K6CPW2T.js +1 -0
- package/public/{chunk-LOZSDQGZ.js → chunk-3OWDRYG5.js} +1 -1
- package/public/{chunk-4LEROROL.js → chunk-3QMP7C7O.js} +1 -1
- package/public/{chunk-FNC7FYG4.js → chunk-3X66PNLW.js} +1 -1
- package/public/{chunk-ZSPNMWLZ.js → chunk-445PQ2P2.js} +1 -1
- package/public/chunk-4HTVG6XH.js +1 -0
- package/public/{chunk-33HIN5AQ.js → chunk-4QBTHI5Q.js} +1 -1
- package/public/{chunk-642HY5SJ.js → chunk-54QYQEAD.js} +1 -1
- package/public/{chunk-RGMAOOWC.js → chunk-5SC4EBWO.js} +1 -1
- package/public/{chunk-YYSCOJVV.js → chunk-6IGIONL7.js} +1 -1
- package/public/{chunk-YW6PKOC6.js → chunk-7FQYPAKD.js} +1 -1
- package/public/chunk-ACC3X2QL.js +1 -0
- package/public/chunk-B33VSPLX.js +1 -0
- package/public/chunk-B3TGAR7U.js +1 -0
- package/public/{chunk-KC3EHWAU.js → chunk-BZFYWBTW.js} +1 -1
- package/public/{chunk-SN6YHQEH.js → chunk-CTGG2N5W.js} +1 -1
- package/public/{chunk-3CHNFG2M.js → chunk-EJSCHXQP.js} +1 -1
- package/public/{chunk-P7G645AG.js → chunk-EKQQOHAO.js} +1 -1
- package/public/chunk-EN4G5WDM.js +1 -0
- package/public/{chunk-OUJ72DB3.js → chunk-EP2OCKBU.js} +1 -1
- package/public/{chunk-ZYXYYQEC.js → chunk-F344PI26.js} +1 -1
- package/public/{chunk-F4D77JCY.js → chunk-FNQHOMAL.js} +1 -1
- package/public/chunk-FPWMFOIM.js +1 -0
- package/public/{chunk-ZKZCGWDX.js → chunk-G4AG4KBE.js} +1 -1
- package/public/chunk-GT2LNBEY.js +1 -0
- package/public/{chunk-KY43ST6M.js → chunk-HBJGGRMZ.js} +1 -1
- package/public/{chunk-RTP4FOHV.js → chunk-HSXNAMNE.js} +1 -1
- package/public/{chunk-GRLZFSPR.js → chunk-HUAZZUOC.js} +1 -1
- package/public/{chunk-5OL4WWEA.js → chunk-HYVILCZ3.js} +1 -1
- package/public/{chunk-ADL3JONM.js → chunk-IJMKQW7N.js} +1 -1
- package/public/{chunk-X2HBCRCJ.js → chunk-IMRTROQL.js} +1 -1
- package/public/{chunk-WOTBN7HR.js → chunk-IO42DXYQ.js} +1 -1
- package/public/{chunk-J57GRVNB.js → chunk-IR54FWV7.js} +1 -1
- package/public/{chunk-QJXH5XAB.js → chunk-JNCCO635.js} +1 -1
- package/public/{chunk-IFETLFVC.js → chunk-KVYFQZYX.js} +1 -1
- package/public/{chunk-IWDYGWKD.js → chunk-KXMDTAIL.js} +1 -1
- package/public/chunk-LERVFGN7.js +1 -0
- package/public/{chunk-VLOVRKGE.js → chunk-OL67GREO.js} +1 -1
- package/public/chunk-P77NBQ5S.js +1 -0
- package/public/{chunk-P42BILY7.js → chunk-R7USDODC.js} +1 -1
- package/public/{chunk-F4IOXQSE.js → chunk-RWGSYTLA.js} +1 -1
- package/public/{chunk-NAIOXTDW.js → chunk-SPEAMV6F.js} +1 -1
- package/public/chunk-SZ7POXBO.js +1 -0
- package/public/{chunk-BRVUO4NZ.js → chunk-TEOCKMP5.js} +1 -1
- package/public/{chunk-Z7B2YCUG.js → chunk-TL6WL7LY.js} +1 -1
- package/public/{chunk-H6OSOL3M.js → chunk-TRU4JZBU.js} +1 -1
- package/public/{chunk-RWGQI56V.js → chunk-UU4EF2TV.js} +1 -1
- package/public/chunk-VET5PSBE.js +1 -0
- package/public/chunk-VNVPPHQC.js +1 -0
- package/public/{chunk-AVR4VURJ.js → chunk-WE636KC4.js} +1 -1
- package/public/{chunk-4BHIPV25.js → chunk-WMYOYBHH.js} +1 -1
- package/public/{chunk-Y4NT4EWJ.js → chunk-XTMNJE4B.js} +1 -1
- package/public/chunk-XYNYGSDZ.js +1 -0
- package/public/{chunk-DLHSCNGJ.js → chunk-Z6KIOLK5.js} +3 -6
- package/public/{chunk-6LE6AVTK.js → chunk-ZE6VD7AX.js} +1 -1
- package/public/chunk-ZZ24726L.js +1 -0
- package/public/index.html +1 -1
- package/public/main-C6DWCUSO.js +1 -0
- package/public/chunk-4FWAGIXK.js +0 -1
- package/public/chunk-7C7RQUUE.js +0 -1
- package/public/chunk-ACS4WKYC.js +0 -1
- package/public/chunk-AZ2EJHLR.js +0 -1
- package/public/chunk-BUJCSWO6.js +0 -1
- package/public/chunk-CL32RDVQ.js +0 -1
- package/public/chunk-H7MDJKUL.js +0 -1
- package/public/chunk-HUGD4PI3.js +0 -1
- package/public/chunk-ITWAX34V.js +0 -1
- package/public/chunk-JA52VECC.js +0 -1
- package/public/chunk-LD3ZL5YN.js +0 -1
- package/public/chunk-MAEZUYZY.js +0 -1
- package/public/chunk-ODKKCZCV.js +0 -1
- package/public/chunk-PAUNJYGN.js +0 -1
- package/public/chunk-QP34WL7Y.js +0 -1
- package/public/chunk-UHZO6TNX.js +0 -1
- package/public/chunk-YS3E6QTC.js +0 -1
- package/public/main-ZDRPI2TC.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -50,6 +50,7 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file.
|
|
|
50
50
|
|
|
51
51
|
- upgrade to angular `v20`
|
|
52
52
|
- bump `plugin-ui-utils` for new theme method
|
|
53
|
+
- add support for dark mode switching with custom plugin uis (@NorthernMan54)
|
|
53
54
|
|
|
54
55
|
### Homebridge Dependencies
|
|
55
56
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-config-ui-x",
|
|
3
3
|
"displayName": "Homebridge UI",
|
|
4
|
-
"version": "5.0.0-beta.
|
|
4
|
+
"version": "5.0.0-beta.80",
|
|
5
5
|
"description": "A web based management, configuration and control platform for Homebridge.",
|
|
6
6
|
"author": "oznu <dev@oz.nu>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -125,17 +125,17 @@
|
|
|
125
125
|
"@prettier/plugin-xml": "^3.4.1",
|
|
126
126
|
"@types/fs-extra": "^11.0.4",
|
|
127
127
|
"@types/lodash": "^4.17.17",
|
|
128
|
-
"@types/node": "^22.15.
|
|
128
|
+
"@types/node": "^22.15.30",
|
|
129
129
|
"@types/node-schedule": "^2.1.7",
|
|
130
130
|
"@types/passport-jwt": "^4.0.1",
|
|
131
131
|
"@types/semver": "^7.7.0",
|
|
132
132
|
"@types/tail": "^2.2.3",
|
|
133
133
|
"@types/tcp-port-used": "^1.0.4",
|
|
134
134
|
"@types/unzipper": "^0.10.11",
|
|
135
|
-
"@vitest/coverage-v8": "^3.2.
|
|
135
|
+
"@vitest/coverage-v8": "^3.2.2",
|
|
136
136
|
"concurrently": "^9.1.2",
|
|
137
137
|
"eslint-plugin-format": "^1.0.1",
|
|
138
|
-
"form-data": "^4.0.
|
|
138
|
+
"form-data": "^4.0.3",
|
|
139
139
|
"nodemon": "^3.1.10",
|
|
140
140
|
"rimraf": "^6.0.1",
|
|
141
141
|
"ts-loader": "^9.5.2",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"tsconfig-paths": "^4.2.0",
|
|
144
144
|
"typescript": "^5.8.3",
|
|
145
145
|
"unplugin-swc": "^1.5.4",
|
|
146
|
-
"vitest": "^3.2.
|
|
146
|
+
"vitest": "^3.2.2"
|
|
147
147
|
},
|
|
148
148
|
"maintainers": [
|
|
149
149
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-ZE6VD7AX.js";import"./chunk-G4AG4KBE.js";import"./chunk-6US6MXBM.js";import"./chunk-RMMQMQZX.js";import"./chunk-TIXTDDTD.js";import"./chunk-LEMXCMWD.js";import"./chunk-SKVHW32E.js";import"./chunk-RQA2H3J6.js";import"./chunk-7FQYPAKD.js";import"./chunk-3HVSWJGA.js";import"./chunk-4HTVG6XH.js";import"./chunk-TEOCKMP5.js";import"./chunk-USOUWLNH.js";import"./chunk-4SITUFK3.js";import"./chunk-PAZ5V5TQ.js";export{a as LogsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-2XJKHKFE.js";import"./chunk-7FQYPAKD.js";import"./chunk-2SEP7Q76.js";import"./chunk-3HVSWJGA.js";import"./chunk-4HTVG6XH.js";import"./chunk-TEOCKMP5.js";import"./chunk-USOUWLNH.js";import"./chunk-4SITUFK3.js";import"./chunk-PAZ5V5TQ.js";export{a as RestartLinuxComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./chunk-
|
|
1
|
+
import{a as T}from"./chunk-7FQYPAKD.js";import{d as y}from"./chunk-2SEP7Q76.js";import{b as S}from"./chunk-4HTVG6XH.js";import{h as $,k as C}from"./chunk-TEOCKMP5.js";import{a as _,b as g}from"./chunk-4SITUFK3.js";import{$a as i,Ac as p,Bc as c,Hb as l,Ib as m,Ob as r,Pb as n,Qb as x,Yb as v,jc as o,kc as s,la as a,lb as h}from"./chunk-PAZ5V5TQ.js";function w(t,f){t&1&&(r(0,"p",7),o(1),p(2,"translate"),n()),t&2&&(i(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function k(t,f){if(t&1&&(r(0,"div",8),o(1),n()),t&2){let e=v();i(),s(e.error)}}function b(t,f){t&1&&(r(0,"div",9)(1,"div",11),x(2,"i",12),n()())}function E(t,f){t&1&&(r(0,"div",10),o(1),p(2,"translate"),n()),t&2&&(i(),s(c(2,1,"platform.linux.long_time")))}var A=(()=>{class t{$api=a(C);$router=a(y);$settings=a(S);$toastr=a($);$translate=a(_);$ws=a(T);checkTimeout;checkDelay;resp={};timeout=!1;error=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}static \u0275fac=function(d){return new(d||t)};static \u0275cmp=h({type:t,selectors:[["ng-component"]],decls:15,vars:10,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"],[1,"justify-content-center","my-4"],[1,"alert","alert-warning","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"]],template:function(d,u){d&1&&(r(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),n()(),r(4,"div",2)(5,"div",3),x(6,"i",4),n(),r(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),n(),l(11,w,3,3,"p",7),l(12,k,2,1,"div",8),l(13,b,3,0,"div",9),l(14,E,3,3,"div",10),n()()),d&2&&(i(2),s(c(3,6,"menu.restart.title")),i(7),s(c(10,8,"platform.linux.restarting_server")),i(2),m(u.error?-1:11),i(),m(u.error?12:-1),i(),m(u.error?-1:13),i(),m(u.timeout?14:-1))},dependencies:[g],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{A as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _,b as D}from"./chunk-
|
|
1
|
+
import{a as _,b as D}from"./chunk-4HTVG6XH.js";import{j as c,k as S}from"./chunk-TEOCKMP5.js";import{f as x}from"./chunk-USOUWLNH.js";import{C as v,g as O,ga as h,h as a,ha as E,ja as y,ka as l,la as f,mb as I,r as p,va as j,w as d,x as T,z as w}from"./chunk-PAZ5V5TQ.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(j))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=I({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-ZZ24726L.js";import"./chunk-TP425OA6.js";import"./chunk-GN7IXG4L.js";import"./chunk-Z6KIOLK5.js";import"./chunk-XTMNJE4B.js";import"./chunk-BVWBB74Y.js";import"./chunk-EGECSH4K.js";import"./chunk-ZA436JJP.js";import"./chunk-G4AG4KBE.js";import"./chunk-6US6MXBM.js";import"./chunk-ADC7QO6N.js";import"./chunk-RMMQMQZX.js";import"./chunk-TIXTDDTD.js";import"./chunk-FQEUOMOT.js";import"./chunk-LEMXCMWD.js";import"./chunk-SKVHW32E.js";import"./chunk-RQA2H3J6.js";import"./chunk-7FQYPAKD.js";import"./chunk-2SEP7Q76.js";import"./chunk-3HVSWJGA.js";import"./chunk-4HTVG6XH.js";import"./chunk-TEOCKMP5.js";import"./chunk-USOUWLNH.js";import"./chunk-4SITUFK3.js";import"./chunk-PAZ5V5TQ.js";export{a as PluginsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-KVYFQZYX.js";import"./chunk-SKVHW32E.js";import"./chunk-RQA2H3J6.js";import"./chunk-2SEP7Q76.js";import"./chunk-4HTVG6XH.js";import"./chunk-TEOCKMP5.js";import"./chunk-USOUWLNH.js";import"./chunk-4SITUFK3.js";import"./chunk-PAZ5V5TQ.js";export{a as PowerOptionsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as ie,a as U,b as X,c as Y,f as te}from"./chunk-ZSPNMWLZ.js";import{a as ne}from"./chunk-ZA436JJP.js";import{m as $,n as K,o as Q}from"./chunk-SKVHW32E.js";import{c as W,e as R,f as j,i as z,l as q,m as G,z as J}from"./chunk-RQA2H3J6.js";import{c as ee}from"./chunk-SCKEPMWS.js";import{b as Z}from"./chunk-YS3E6QTC.js";import{b as w}from"./chunk-4SITUFK3.js";import{$a as o,Ac as s,Bc as l,Cc as H,Gb as v,Hb as h,Ib as M,Kb as I,Lb as V,Mb as F,Nb as _,Ob as a,Pb as r,Qb as p,Ub as B,Xa as N,Xb as b,Yb as m,bd as O,jc as d,kc as u,la as f,lb as y,lc as S,qc as k,ra as C,rc as T,sa as x,sc as A,vc as L,wc as E}from"./chunk-PAZ5V5TQ.js";var oe=(()=>{class t{$activeModal=f($);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],decls:31,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li"),d(13),s(14,"translate"),r(),a(15,"li"),d(16),s(17,"translate"),r(),a(18,"li"),d(19),s(20,"translate"),r(),a(21,"li"),d(22),s(23,"translate"),r()()(),a(24,"div",8),p(25,"div",9),a(26,"div",10)(27,"button",11),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(28),s(29,"translate"),r()(),p(30,"div",12),r()()()),i&2&&(o(4),u(l(5,7,"support.title")),o(2),v("aria-label",l(7,9,"form.button_close")),o(7),u(l(14,11,"accessories.support.list_1")),o(3),u(l(17,13,"accessories.support.list_2")),o(3),u(l(20,15,"accessories.support.list_3")),o(3),u(l(23,17,"accessories.support.list_4")),o(6),S(" ",l(29,19,"form.button_close")," "))},dependencies:[w],encapsulation:2})}return t})();var se=()=>({standalone:!0}),ae=(()=>{class t{$activeModal=f($);roomName;constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-folder-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[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",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li",8)(13,"label",9),d(14),s(15,"translate"),r(),a(16,"div",10)(17,"input",11),A("ngModelChange",function(D){return T(n.roomName,D)||(n.roomName=D),D}),b("keyup.enter",function(){return n.$activeModal.close(n.roomName)}),r()()()()(),a(18,"div",12)(19,"div",13)(20,"button",14),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(21),s(22,"translate"),r()(),p(23,"div",15),a(24,"div",16)(25,"button",17),b("click",function(){return n.$activeModal.close(n.roomName)}),d(26),s(27,"translate"),r()()()()()),i&2&&(o(4),u(l(5,8,"accessories.button_add_room")),o(2),v("aria-label",l(7,10,"form.button_close")),o(8),u(l(15,12,"accessories.room_name")),o(3),k("ngModel",n.roomName),_("ngModelOptions",L(18,se)),o(4),S(" ",l(22,14,"form.button_close")," "),o(4),_("disabled",!n.roomName),o(),S(" ",l(27,16,"form.button_save")," "))},dependencies:[J,G,W,R,j,q,z,w],encapsulation:2})}return t})();var re=(()=>{class t{constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(i,n){i&1&&(a(0,"div",0),p(1,"i",1),a(2,"div",2),d(3),s(4,"translate"),r()()),i&2&&(o(3),u(l(4,1,"accessories.control.drag_here")))},dependencies:[w],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var le=t=>({"cursor-move":t}),ce=t=>({"justify-content-between":t}),de=t=>({link:t});function pe(t,g){if(t&1&&(a(0,"div",0)(1,"div",18)(2,"h5",19),d(3),s(4,"translate"),r()()()),t&2){let e=m().$implicit,i=m(2);o(2),_("ngClass",E(4,le,!i.isMobile)),o(),S(" ",e.name==="Default Room"?l(4,2,"accessories.control.default_room"):e.name," ")}}function me(t,g){if(t&1&&(a(0,"div",22),p(1,"app-accessory-tile",23),r()),t&2){let e=m().$implicit;o(),_("service",e)}}function ue(t,g){if(t&1&&h(0,me,2,1,"div",22),t&2){let e=g.$implicit,i=m(4);M(!i.hideHidden||!e.hidden?0:-1)}}function _e(t,g){if(t&1){let e=B();a(0,"div",20),A("dragulaModelChange",function(n){C(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),x(n)}),V(1,ue,1,1,null,null,I),p(3,"div",21)(4,"div",21)(5,"div",21)(6,"div",21)(7,"div",21)(8,"div",21)(9,"div",21)(10,"div",21)(11,"div",21)(12,"div",21),r()}if(t&2){let e=m().$implicit,i=m(2);_("ngClass",E(3,ce,i.isMobile))("dragula","services-bag"),k("dragulaModel",e.services),o(),F(e.services)}}function be(t,g){if(t&1){let e=B();a(0,"div",24),A("dragulaModelChange",function(n){C(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),x(n)}),p(1,"app-drag-here-placeholder",25),r()}if(t&2){let e=m().$implicit;_("dragula","services-bag"),k("dragulaModel",e.services)}}function fe(t,g){if(t&1&&(a(0,"div"),h(1,pe,5,6,"div",0),a(2,"div",15),h(3,_e,13,5,"div",16),h(4,be,2,2,"div",17),r()()),t&2){let e=g.$implicit,i=m(2);o(),M(!i.isMobile||e.services.length?1:-1),o(2),M(e.services.length?3:-1),o(),M(!e.services.length&&!i.isMobile?4:-1)}}function ge(t,g){if(t&1){let e=B();a(0,"div",1)(1,"div",2)(2,"h3",3),d(3),s(4,"translate"),r()(),a(5,"div",4)(6,"button",5),s(7,"translate"),s(8,"translate"),b("click",function(){C(e);let n=m();return x(n.addRoom())}),p(9,"i",6),r(),a(10,"button",5),s(11,"translate"),s(12,"translate"),s(13,"translate"),s(14,"translate"),b("click",function(){C(e);let n=m();return x(n.hideHidden=!n.hideHidden)}),p(15,"i",7),r(),a(16,"div",8)(17,"button",9),s(18,"translate"),s(19,"translate"),b("click",function(){C(e);let n=m();return x(n.toggleLayoutLock())}),p(20,"i",10),r(),a(21,"button",9),s(22,"translate"),s(23,"translate"),b("click",function(){C(e);let n=m();return x(n.toggleLayoutLock())}),p(24,"i",11),r()(),a(25,"button",12),s(26,"translate"),b("click",function(){C(e);let n=m();return x(n.openSupport())}),p(27,"i",13),r()()(),a(28,"div",14),A("dragulaModelChange",function(n){C(e);let c=m();return T(c.$accessories.rooms,n)||(c.$accessories.rooms=n),x(n)}),V(29,fe,5,3,"div",null,I),r()}if(t&2){let e=m();o(3),u(l(4,17,"accessories.title_accessories")),o(3),_("hidden",e.isMobile)("ngbTooltip",l(7,19,"accessories.button_add_room")),v("aria-label",l(8,21,"accessories.button_add_room")),o(4),_("hidden",e.isMobile)("ngbTooltip",e.hideHidden?l(11,23,"accessories.button_hidden_show"):l(12,25,"accessories.button_hidden_hide")),v("aria-label",e.hideHidden?l(13,27,"accessories.button_hidden_show"):l(14,29,"accessories.button_hidden_hide")),o(5),_("ngClass",e.hideHidden?"fa-eye-slash":"fa-eye"),o(2),_("disabled",!e.isMobile)("ngbTooltip",l(18,31,"form.button_unlock")),v("aria-label",l(19,33,"form.button_unlock")),o(4),_("disabled",e.isMobile)("ngbTooltip",l(22,35,"form.button_lock")),v("aria-label",l(23,37,"form.button_lock")),o(4),v("aria-label",l(26,39,"support.title")),o(3),_("dragula","rooms-bag"),k("dragulaModel",e.$accessories.rooms),o(),F(e.$accessories.rooms)}}function ve(t,g){t&1&&(a(0,"p",32),d(1),s(2,"translate"),r()),t&2&&(o(),u(l(2,1,"accessories.settings_link")))}function Ce(t,g){if(t&1&&(a(0,"div",0)(1,"div",26)(2,"h3",27),d(3),s(4,"translate"),r()(),a(5,"div",28)(6,"div",29)(7,"h5",30),d(8),s(9,"translate"),r(),p(10,"p",31),s(11,"translate"),h(12,ve,3,3,"p",32),r()()()),t&2){let e=m();o(3),u(l(4,4,"accessories.title_accessories")),o(5),u(l(9,6,"accessories.control_disabled")),o(2),_("innerHTML",H(11,8,"accessories.message_must_use_insecure_mode",E(11,de,e.linkInsecure)),N),o(2),M(e.$auth.user.admin?12:-1)}}var Ue=(()=>{class t{$auth=f(ee);dragulaService=f(U);$modal=f(K);$settings=f(Z);$md=f(ne);$accessories=f(te);isMobile=!1;hideHidden=!0;orderSubscription;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(i,n,c)=>!this.isMobile&&c.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:i=>!this.isMobile&&!i.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(ae,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(i=>i.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(i=>{for(let n=0;n<10;n++){let c=document.createElement("div");c.className="accessory-box invisible py-0 my-0",c.style.height="0",i.appendChild(c)}}):document.querySelectorAll(".invisible").forEach(i=>i.remove())}openSupport(){this.$modal.open(oe,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-accessories"]],decls:2,vars:2,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],[1,"fas","fa-fw","fa-lock"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"mb-3","mt-0"],[1,"mb-0",3,"innerHTML"],[1,"mt-3","mb-0"]],template:function(i,n){i&1&&(h(0,ge,31,41),h(1,Ce,13,13,"div",0)),i&2&&(M(n.$settings.env.enableAccessories?0:-1),o(),M(n.$settings.env.enableAccessories?-1:1))},dependencies:[Q,O,Y,X,ie,re,w],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{ae as a,Ue as b};
|
|
1
|
+
import{U as ie,a as U,b as X,c as Y,f as te}from"./chunk-445PQ2P2.js";import{a as ne}from"./chunk-ZA436JJP.js";import{m as $,n as K,o as Q}from"./chunk-SKVHW32E.js";import{c as W,e as R,f as j,i as z,l as q,m as G,z as J}from"./chunk-RQA2H3J6.js";import{c as ee}from"./chunk-3HVSWJGA.js";import{b as Z}from"./chunk-4HTVG6XH.js";import{b as w}from"./chunk-4SITUFK3.js";import{$a as o,Ac as s,Bc as l,Cc as H,Gb as v,Hb as h,Ib as M,Kb as I,Lb as V,Mb as F,Nb as _,Ob as a,Pb as r,Qb as p,Ub as B,Xa as N,Xb as b,Yb as m,bd as O,jc as d,kc as u,la as f,lb as y,lc as S,qc as k,ra as C,rc as T,sa as x,sc as A,vc as L,wc as E}from"./chunk-PAZ5V5TQ.js";var oe=(()=>{class t{$activeModal=f($);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],decls:31,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li"),d(13),s(14,"translate"),r(),a(15,"li"),d(16),s(17,"translate"),r(),a(18,"li"),d(19),s(20,"translate"),r(),a(21,"li"),d(22),s(23,"translate"),r()()(),a(24,"div",8),p(25,"div",9),a(26,"div",10)(27,"button",11),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(28),s(29,"translate"),r()(),p(30,"div",12),r()()()),i&2&&(o(4),u(l(5,7,"support.title")),o(2),v("aria-label",l(7,9,"form.button_close")),o(7),u(l(14,11,"accessories.support.list_1")),o(3),u(l(17,13,"accessories.support.list_2")),o(3),u(l(20,15,"accessories.support.list_3")),o(3),u(l(23,17,"accessories.support.list_4")),o(6),S(" ",l(29,19,"form.button_close")," "))},dependencies:[w],encapsulation:2})}return t})();var se=()=>({standalone:!0}),ae=(()=>{class t{$activeModal=f($);roomName;constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-folder-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[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",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li",8)(13,"label",9),d(14),s(15,"translate"),r(),a(16,"div",10)(17,"input",11),A("ngModelChange",function(D){return T(n.roomName,D)||(n.roomName=D),D}),b("keyup.enter",function(){return n.$activeModal.close(n.roomName)}),r()()()()(),a(18,"div",12)(19,"div",13)(20,"button",14),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(21),s(22,"translate"),r()(),p(23,"div",15),a(24,"div",16)(25,"button",17),b("click",function(){return n.$activeModal.close(n.roomName)}),d(26),s(27,"translate"),r()()()()()),i&2&&(o(4),u(l(5,8,"accessories.button_add_room")),o(2),v("aria-label",l(7,10,"form.button_close")),o(8),u(l(15,12,"accessories.room_name")),o(3),k("ngModel",n.roomName),_("ngModelOptions",L(18,se)),o(4),S(" ",l(22,14,"form.button_close")," "),o(4),_("disabled",!n.roomName),o(),S(" ",l(27,16,"form.button_save")," "))},dependencies:[J,G,W,R,j,q,z,w],encapsulation:2})}return t})();var re=(()=>{class t{constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(i,n){i&1&&(a(0,"div",0),p(1,"i",1),a(2,"div",2),d(3),s(4,"translate"),r()()),i&2&&(o(3),u(l(4,1,"accessories.control.drag_here")))},dependencies:[w],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var le=t=>({"cursor-move":t}),ce=t=>({"justify-content-between":t}),de=t=>({link:t});function pe(t,g){if(t&1&&(a(0,"div",0)(1,"div",18)(2,"h5",19),d(3),s(4,"translate"),r()()()),t&2){let e=m().$implicit,i=m(2);o(2),_("ngClass",E(4,le,!i.isMobile)),o(),S(" ",e.name==="Default Room"?l(4,2,"accessories.control.default_room"):e.name," ")}}function me(t,g){if(t&1&&(a(0,"div",22),p(1,"app-accessory-tile",23),r()),t&2){let e=m().$implicit;o(),_("service",e)}}function ue(t,g){if(t&1&&h(0,me,2,1,"div",22),t&2){let e=g.$implicit,i=m(4);M(!i.hideHidden||!e.hidden?0:-1)}}function _e(t,g){if(t&1){let e=B();a(0,"div",20),A("dragulaModelChange",function(n){C(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),x(n)}),V(1,ue,1,1,null,null,I),p(3,"div",21)(4,"div",21)(5,"div",21)(6,"div",21)(7,"div",21)(8,"div",21)(9,"div",21)(10,"div",21)(11,"div",21)(12,"div",21),r()}if(t&2){let e=m().$implicit,i=m(2);_("ngClass",E(3,ce,i.isMobile))("dragula","services-bag"),k("dragulaModel",e.services),o(),F(e.services)}}function be(t,g){if(t&1){let e=B();a(0,"div",24),A("dragulaModelChange",function(n){C(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),x(n)}),p(1,"app-drag-here-placeholder",25),r()}if(t&2){let e=m().$implicit;_("dragula","services-bag"),k("dragulaModel",e.services)}}function fe(t,g){if(t&1&&(a(0,"div"),h(1,pe,5,6,"div",0),a(2,"div",15),h(3,_e,13,5,"div",16),h(4,be,2,2,"div",17),r()()),t&2){let e=g.$implicit,i=m(2);o(),M(!i.isMobile||e.services.length?1:-1),o(2),M(e.services.length?3:-1),o(),M(!e.services.length&&!i.isMobile?4:-1)}}function ge(t,g){if(t&1){let e=B();a(0,"div",1)(1,"div",2)(2,"h3",3),d(3),s(4,"translate"),r()(),a(5,"div",4)(6,"button",5),s(7,"translate"),s(8,"translate"),b("click",function(){C(e);let n=m();return x(n.addRoom())}),p(9,"i",6),r(),a(10,"button",5),s(11,"translate"),s(12,"translate"),s(13,"translate"),s(14,"translate"),b("click",function(){C(e);let n=m();return x(n.hideHidden=!n.hideHidden)}),p(15,"i",7),r(),a(16,"div",8)(17,"button",9),s(18,"translate"),s(19,"translate"),b("click",function(){C(e);let n=m();return x(n.toggleLayoutLock())}),p(20,"i",10),r(),a(21,"button",9),s(22,"translate"),s(23,"translate"),b("click",function(){C(e);let n=m();return x(n.toggleLayoutLock())}),p(24,"i",11),r()(),a(25,"button",12),s(26,"translate"),b("click",function(){C(e);let n=m();return x(n.openSupport())}),p(27,"i",13),r()()(),a(28,"div",14),A("dragulaModelChange",function(n){C(e);let c=m();return T(c.$accessories.rooms,n)||(c.$accessories.rooms=n),x(n)}),V(29,fe,5,3,"div",null,I),r()}if(t&2){let e=m();o(3),u(l(4,17,"accessories.title_accessories")),o(3),_("hidden",e.isMobile)("ngbTooltip",l(7,19,"accessories.button_add_room")),v("aria-label",l(8,21,"accessories.button_add_room")),o(4),_("hidden",e.isMobile)("ngbTooltip",e.hideHidden?l(11,23,"accessories.button_hidden_show"):l(12,25,"accessories.button_hidden_hide")),v("aria-label",e.hideHidden?l(13,27,"accessories.button_hidden_show"):l(14,29,"accessories.button_hidden_hide")),o(5),_("ngClass",e.hideHidden?"fa-eye-slash":"fa-eye"),o(2),_("disabled",!e.isMobile)("ngbTooltip",l(18,31,"form.button_unlock")),v("aria-label",l(19,33,"form.button_unlock")),o(4),_("disabled",e.isMobile)("ngbTooltip",l(22,35,"form.button_lock")),v("aria-label",l(23,37,"form.button_lock")),o(4),v("aria-label",l(26,39,"support.title")),o(3),_("dragula","rooms-bag"),k("dragulaModel",e.$accessories.rooms),o(),F(e.$accessories.rooms)}}function ve(t,g){t&1&&(a(0,"p",32),d(1),s(2,"translate"),r()),t&2&&(o(),u(l(2,1,"accessories.settings_link")))}function Ce(t,g){if(t&1&&(a(0,"div",0)(1,"div",26)(2,"h3",27),d(3),s(4,"translate"),r()(),a(5,"div",28)(6,"div",29)(7,"h5",30),d(8),s(9,"translate"),r(),p(10,"p",31),s(11,"translate"),h(12,ve,3,3,"p",32),r()()()),t&2){let e=m();o(3),u(l(4,4,"accessories.title_accessories")),o(5),u(l(9,6,"accessories.control_disabled")),o(2),_("innerHTML",H(11,8,"accessories.message_must_use_insecure_mode",E(11,de,e.linkInsecure)),N),o(2),M(e.$auth.user.admin?12:-1)}}var Ue=(()=>{class t{$auth=f(ee);dragulaService=f(U);$modal=f(K);$settings=f(Z);$md=f(ne);$accessories=f(te);isMobile=!1;hideHidden=!0;orderSubscription;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(i,n,c)=>!this.isMobile&&c.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:i=>!this.isMobile&&!i.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(ae,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(i=>i.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(i=>{for(let n=0;n<10;n++){let c=document.createElement("div");c.className="accessory-box invisible py-0 my-0",c.style.height="0",i.appendChild(c)}}):document.querySelectorAll(".invisible").forEach(i=>i.remove())}openSupport(){this.$modal.open(oe,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-accessories"]],decls:2,vars:2,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],[1,"fas","fa-fw","fa-lock"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"mb-3","mt-0"],[1,"mb-0",3,"innerHTML"],[1,"mt-3","mb-0"]],template:function(i,n){i&1&&(h(0,ge,31,41),h(1,Ce,13,13,"div",0)),i&2&&(M(n.$settings.env.enableAccessories?0:-1),o(),M(n.$settings.env.enableAccessories?-1:1))},dependencies:[Q,O,Y,X,ie,re,w],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{ae as a,Ue as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-IJMKQW7N.js";import"./chunk-F344PI26.js";import{c as S}from"./chunk-BVWBB74Y.js";import"./chunk-ZA436JJP.js";import{q as d}from"./chunk-SKVHW32E.js";import{A as f,z as u}from"./chunk-RQA2H3J6.js";import"./chunk-7FQYPAKD.js";import{d as C,g as m}from"./chunk-2SEP7Q76.js";import"./chunk-3HVSWJGA.js";import"./chunk-4HTVG6XH.js";import{h as v,k as g}from"./chunk-TEOCKMP5.js";import"./chunk-USOUWLNH.js";import{a as M,c as h}from"./chunk-4SITUFK3.js";import{ga as c,h as p,ha as i,kd as l,la as e,mb as a,w as s}from"./chunk-PAZ5V5TQ.js";var n=(()=>{class t{$api=e(g);$router=e(C);$toastr=e(v);$translate=e(M);constructor(){}resolve(){return p(this,null,function*(){try{return yield s(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=c({token:t,factory:t.\u0275fac})}return t})();var j=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-EN4G5WDM.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-LERVFGN7.js").then(t=>t.ContainerRestartComponent)}],$=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[m.forChild(j),m]})}return t})();var Q=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[l,u,f,S,d,h.forChild(),$,R]})}return t})();export{Q as DockerModule};
|