homebridge-config-ui-x 5.4.2-beta.3 → 5.4.2-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -5
- package/package.json +1 -1
- package/public/3rdpartylicenses.txt +52 -78
- package/public/{chunk-YCP2AG74.js → chunk-2DS7BEBV.js} +1 -1
- package/public/{chunk-U36QM5TK.js → chunk-2W6X2FZY.js} +1 -1
- package/public/{chunk-LRGNBIU3.js → chunk-3NT6NMC5.js} +1 -1
- package/public/{chunk-3UIJNMSW.js → chunk-4OFGZX6Q.js} +1 -1
- package/public/{chunk-IPDYD72M.js → chunk-4RTKNG6L.js} +1 -1
- package/public/{chunk-ZZ26PFQM.js → chunk-4VMH5FRY.js} +1 -1
- package/public/{chunk-KZ2GXUPY.js → chunk-543O6APZ.js} +1 -1
- package/public/{chunk-HBAZZ6IF.js → chunk-5HZUPVWC.js} +1 -1
- package/public/{chunk-NUNQT5W4.js → chunk-677XEWJ2.js} +1 -1
- package/public/{chunk-PJK6T327.js → chunk-6MKTFG3Y.js} +1 -1
- package/public/{chunk-XMBAELKQ.js → chunk-A2DAMKWN.js} +1 -1
- package/public/{chunk-5FLIEMLS.js → chunk-AB7TCQOZ.js} +1 -1
- package/public/{chunk-BMCHWK5R.js → chunk-AHB5UJOX.js} +1 -1
- package/public/{chunk-BEYU5GMW.js → chunk-AP47FXQT.js} +1 -1
- package/public/{chunk-E5M5VUTV.js → chunk-B6764AYV.js} +1 -1
- package/public/{chunk-UMJPLO77.js → chunk-BJH2XS46.js} +1 -1
- package/public/{chunk-AM4V2PYB.js → chunk-CTIQENGH.js} +1 -1
- package/public/chunk-CXKZ57ZY.js +12 -0
- package/public/{chunk-YXBNP3EJ.js → chunk-DUQFKV4C.js} +1 -1
- package/public/{chunk-WCMFALUQ.js → chunk-G47DZL2Z.js} +1 -1
- package/public/{chunk-CF5KPFXL.js → chunk-G4NVCLVH.js} +1 -1
- package/public/{chunk-UGTMSVFO.js → chunk-GQRHVKQD.js} +1 -1
- package/public/{chunk-ZX5OT7EF.js → chunk-I3PIZ6R3.js} +1 -1
- package/public/{chunk-4CLVNAHT.js → chunk-I53R6BXR.js} +1 -1
- package/public/chunk-IMGYEBIF.js +30 -0
- package/public/{chunk-YZRL3CBQ.js → chunk-INQIYZSJ.js} +1 -1
- package/public/{chunk-HRJPJKGB.js → chunk-INZ4CFOM.js} +1 -1
- package/public/{chunk-D6EXTZUP.js → chunk-IULRECRY.js} +1 -1
- package/public/chunk-IXH3K25Z.js +1 -0
- package/public/{chunk-YN2LC5EB.js → chunk-JJPUSASZ.js} +1 -1
- package/public/{chunk-TKDK5GOM.js → chunk-JUV2DSAH.js} +1 -1
- package/public/{chunk-XP7ETORR.js → chunk-KFHYZ5SS.js} +1 -1
- package/public/{chunk-GRIYVNF3.js → chunk-KHLOAY63.js} +1 -1
- package/public/{chunk-EJDV7XKC.js → chunk-KLRLKCQM.js} +1 -1
- package/public/chunk-KUU5VKMV.js +4 -0
- package/public/{chunk-DD4UIDDU.js → chunk-LTYGO6XR.js} +1 -1
- package/public/{chunk-ECNGRFJK.js → chunk-LUMABV26.js} +1 -1
- package/public/{chunk-6PIVLJE3.js → chunk-MQX5ZTBS.js} +1 -1
- package/public/chunk-NH4EEDHF.js +1 -0
- package/public/{chunk-SOTPTYAE.js → chunk-ODSGVB3D.js} +1 -1
- package/public/{chunk-FVSVQWIM.js → chunk-PJ3EPI5G.js} +1 -1
- package/public/{chunk-AJ544VQP.js → chunk-QF27FM3R.js} +1 -1
- package/public/{chunk-BU7BW6HI.js → chunk-QQQEHCXA.js} +1 -1
- package/public/{chunk-2NAVB356.js → chunk-RLVPGUTL.js} +1 -1
- package/public/{chunk-DNZDV4RS.js → chunk-RVMDJBNR.js} +1 -1
- package/public/chunk-SLK25HWZ.js +1 -0
- package/public/{chunk-65PMNYAH.js → chunk-SN6LZKCD.js} +1 -1
- package/public/chunk-TCGYQJKS.js +23 -0
- package/public/{chunk-IQLQN2PI.js → chunk-WMKLZPZK.js} +1 -1
- package/public/chunk-WVUFHQCN.js +1 -0
- package/public/{chunk-UVNXQ7V7.js → chunk-XVT7UHRQ.js} +1 -1
- package/public/{chunk-YXZNLKQN.js → chunk-ZG36LVMH.js} +1 -1
- package/public/{chunk-4UTOOZ43.js → chunk-ZHR4YJI6.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-EG2RTPMA.js → main-ZMXK6L7D.js} +1 -1
- package/public/assets/hap-icons/light-bulb.svg +0 -25
- package/public/chunk-A7RVV6F7.js +0 -12
- package/public/chunk-C46JKCQN.js +0 -49
- package/public/chunk-L2TPDZKX.js +0 -1
- package/public/chunk-PTKDVHHF.js +0 -4
- package/public/chunk-S6BU4TS5.js +0 -1
- package/public/chunk-V2CLR7D3.js +0 -4
- package/public/chunk-WB2IGKUB.js +0 -1
- package/public/chunk-WMIMAPZH.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `homebridge-config-ui-x` will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
|
5
|
-
## v5.
|
|
5
|
+
## v5.5.0 (Unreleased)
|
|
6
6
|
|
|
7
7
|
### UI Changes
|
|
8
8
|
|
|
9
|
+
- updates to the `th.json` language file (#2528) (@tomzt)
|
|
9
10
|
- refreshed icons: security system
|
|
10
11
|
- refreshed icons: lock mechanism
|
|
11
12
|
- refreshed icons: irrigation system + valves
|
|
12
13
|
- refreshed icons: light, leak, motion, occ. sensor
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- fix saving custom attributes for ui layouts
|
|
14
|
+
- expand/collapse state saving for update information - docker information (#2529) (@NorthernMan54)
|
|
15
|
+
- refreshed icons: lightbulb
|
|
17
16
|
|
|
18
17
|
### Homebridge Dependencies
|
|
19
18
|
|
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.4.2-beta.
|
|
4
|
+
"version": "5.4.2-beta.5",
|
|
5
5
|
"description": "A web based management, configuration and control platform for Homebridge.",
|
|
6
6
|
"author": "oznu <dev@oz.nu>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -77,6 +77,58 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
77
77
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
78
78
|
THE SOFTWARE.
|
|
79
79
|
|
|
80
|
+
--------------------------------------------------------------------------------
|
|
81
|
+
Package: lodash
|
|
82
|
+
License: "MIT"
|
|
83
|
+
|
|
84
|
+
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
85
|
+
|
|
86
|
+
Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
87
|
+
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
88
|
+
|
|
89
|
+
This software consists of voluntary contributions made by many
|
|
90
|
+
individuals. For exact contribution history, see the revision history
|
|
91
|
+
available at https://github.com/lodash/lodash
|
|
92
|
+
|
|
93
|
+
The following license applies to all parts of this software except as
|
|
94
|
+
documented below:
|
|
95
|
+
|
|
96
|
+
====
|
|
97
|
+
|
|
98
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
99
|
+
a copy of this software and associated documentation files (the
|
|
100
|
+
"Software"), to deal in the Software without restriction, including
|
|
101
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
102
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
103
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
104
|
+
the following conditions:
|
|
105
|
+
|
|
106
|
+
The above copyright notice and this permission notice shall be
|
|
107
|
+
included in all copies or substantial portions of the Software.
|
|
108
|
+
|
|
109
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
110
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
111
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
112
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
113
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
114
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
115
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
116
|
+
|
|
117
|
+
====
|
|
118
|
+
|
|
119
|
+
Copyright and related rights for sample code are waived via CC0. Sample
|
|
120
|
+
code is defined as all source code displayed within the prose of the
|
|
121
|
+
documentation.
|
|
122
|
+
|
|
123
|
+
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
|
124
|
+
|
|
125
|
+
====
|
|
126
|
+
|
|
127
|
+
Files located in the node_modules and vendor directories are externally
|
|
128
|
+
maintained libraries used by this software which have their own
|
|
129
|
+
licenses; we recommend you read them, as their terms may differ from the
|
|
130
|
+
terms above.
|
|
131
|
+
|
|
80
132
|
--------------------------------------------------------------------------------
|
|
81
133
|
Package: @ng-formworks/cssframework
|
|
82
134
|
License: "MIT"
|
|
@@ -436,32 +488,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
436
488
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
437
489
|
SOFTWARE.
|
|
438
490
|
|
|
439
|
-
--------------------------------------------------------------------------------
|
|
440
|
-
Package: ajv-formats
|
|
441
|
-
License: "MIT"
|
|
442
|
-
|
|
443
|
-
MIT License
|
|
444
|
-
|
|
445
|
-
Copyright (c) 2020 Evgeny Poberezkin
|
|
446
|
-
|
|
447
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
448
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
449
|
-
in the Software without restriction, including without limitation the rights
|
|
450
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
451
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
452
|
-
furnished to do so, subject to the following conditions:
|
|
453
|
-
|
|
454
|
-
The above copyright notice and this permission notice shall be included in all
|
|
455
|
-
copies or substantial portions of the Software.
|
|
456
|
-
|
|
457
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
458
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
459
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
460
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
461
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
462
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
463
|
-
SOFTWARE.
|
|
464
|
-
|
|
465
491
|
--------------------------------------------------------------------------------
|
|
466
492
|
Package: ajv
|
|
467
493
|
License: "MIT"
|
|
@@ -575,58 +601,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
575
601
|
|
|
576
602
|
The complete list of contributors can be found at:
|
|
577
603
|
- https://github.com/garycourt/uri-js/graphs/contributors
|
|
578
|
-
--------------------------------------------------------------------------------
|
|
579
|
-
Package: lodash
|
|
580
|
-
License: "MIT"
|
|
581
|
-
|
|
582
|
-
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
583
|
-
|
|
584
|
-
Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
585
|
-
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
586
|
-
|
|
587
|
-
This software consists of voluntary contributions made by many
|
|
588
|
-
individuals. For exact contribution history, see the revision history
|
|
589
|
-
available at https://github.com/lodash/lodash
|
|
590
|
-
|
|
591
|
-
The following license applies to all parts of this software except as
|
|
592
|
-
documented below:
|
|
593
|
-
|
|
594
|
-
====
|
|
595
|
-
|
|
596
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
597
|
-
a copy of this software and associated documentation files (the
|
|
598
|
-
"Software"), to deal in the Software without restriction, including
|
|
599
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
600
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
601
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
602
|
-
the following conditions:
|
|
603
|
-
|
|
604
|
-
The above copyright notice and this permission notice shall be
|
|
605
|
-
included in all copies or substantial portions of the Software.
|
|
606
|
-
|
|
607
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
608
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
609
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
610
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
611
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
612
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
613
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
614
|
-
|
|
615
|
-
====
|
|
616
|
-
|
|
617
|
-
Copyright and related rights for sample code are waived via CC0. Sample
|
|
618
|
-
code is defined as all source code displayed within the prose of the
|
|
619
|
-
documentation.
|
|
620
|
-
|
|
621
|
-
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
|
622
|
-
|
|
623
|
-
====
|
|
624
|
-
|
|
625
|
-
Files located in the node_modules and vendor directories are externally
|
|
626
|
-
maintained libraries used by this software which have their own
|
|
627
|
-
licenses; we recommend you read them, as their terms may differ from the
|
|
628
|
-
terms above.
|
|
629
|
-
|
|
630
604
|
--------------------------------------------------------------------------------
|
|
631
605
|
Package: ajv-keywords
|
|
632
606
|
License: "MIT"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r}from"./chunk-5KFQUVTY.js";import"./chunk-PP5MH7GY.js";import{ha as t,ob as e}from"./chunk-XWYKEZQQ.js";var u=[{path:"",loadComponent:()=>import("./chunk-
|
|
1
|
+
import{g as r}from"./chunk-5KFQUVTY.js";import"./chunk-PP5MH7GY.js";import{ha as t,ob as e}from"./chunk-XWYKEZQQ.js";var u=[{path:"",loadComponent:()=>import("./chunk-WMKLZPZK.js").then(o=>o.LogsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(u),r]})}return o})();var p=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{p as LogsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-LUMABV26.js";import"./chunk-5HZUPVWC.js";import{d as E}from"./chunk-5KFQUVTY.js";import{b as R}from"./chunk-SN6LZKCD.js";import{k as O,n as B}from"./chunk-ZHR4YJI6.js";import{a as k,b as I}from"./chunk-6FXNHKMA.js";import"./chunk-PP5MH7GY.js";import{$b as $,Ec as b,Fc as g,Jb as f,Kb as _,Kc as o,Lc as l,Pb as x,Qb as r,Rb as n,Sb as v,bb as i,cc as S,ec as d,la as m,ld as T,nb as w,ra as C,rc as a,sa as y,sc as c,tc as h}from"./chunk-XWYKEZQQ.js";var U=(t,p)=>({"fas fa-fw fa-spinner fa-spin":t,"far fa-fw fa-check-circle":p}),F=t=>({"grey-text":t}),P=(t,p)=>({"far fa-fw fa-circle":t,"fas fa-fw fa-spinner fa-spin":p});function j(t,p){if(t&1&&(r(0,"div",7),a(1),n()),t&2){let e=d();i(),c(e.error)}}function M(t,p){if(t&1&&(r(0,"p",9),a(1),o(2,"translate"),n(),r(3,"div",10)(4,"div",11)(5,"span"),v(6,"i",12),a(7),o(8,"translate"),n()(),r(9,"div",11)(10,"span",12),v(11,"i",12),a(12),o(13,"translate"),n()()()),t&2){let e=d();i(),c(l(2,6,"restart.please_wait_while_server_restarts")),i(5),x("ngClass",g(12,U,!e.uiOnline,e.uiOnline)),i(),h(" ",l(8,8,"restart.ui_online")," "),i(3),x("ngClass",b(15,F,!e.uiOnline)),i(),x("ngClass",g(17,P,!e.uiOnline,e.uiOnline)),i(),h(" ",l(13,10,"restart.service_ready")," ")}}function V(t,p){if(t&1){let e=$();r(0,"p",15)(1,"button",16),S("click",function(){C(e);let u=d(2);return y(u.viewLogs())}),a(2),o(3,"translate"),n()()}t&2&&(i(2),c(l(3,1,"menu.tooltip_view_logs")))}function z(t,p){if(t&1&&(r(0,"div",8)(1,"p"),a(2),o(3,"translate"),n(),r(4,"p",13),a(5),o(6,"translate"),r(7,"span",14),a(8),n()(),f(9,V,4,3,"p",15),n()),t&2){let e=d();i(2),c(l(3,4,"restart.server_is_taking_long_time_to_restart")),i(3),h(" ",l(6,6,"restart.label_restart_command_executed"),": "),i(3),c(e.resp.command||"End Process"),i(),_(e.uiOnline?9:-1)}}var X=(()=>{class t{$api=m(B);$router=m(E);$settings=m(R);$toastr=m(O);$translate=m(k);$ws=m(D);checkTimeout;checkDelay;io;uiOnline=!1;error=!1;resp={};timeout=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting?(this.uiOnline=!0,this.checkIfServerUp()):this.$api.put("/server/restart",{}).subscribe({next:s=>{this.resp=s,this.checkIfServerUp(),s.restartingUI||(this.uiOnline=!0)},error:s=>{console.error(s),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{this.uiOnline=!0,(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},7e3),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},4e4)}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=w({type:t,selectors:[["ng-component"]],decls:14,vars:8,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,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(s,u){s&1&&(r(0,"div",0)(1,"h3",1),a(2),o(3,"translate"),n()(),r(4,"div",2)(5,"div",3),v(6,"i",4),n(),r(7,"div",5)(8,"h4",6),a(9),o(10,"translate"),n(),f(11,j,2,1,"div",7)(12,M,14,20),f(13,z,10,8,"div",8),n()()),s&2&&(i(2),c(l(3,4,"menu.restart.title")),i(7),c(l(10,6,"restart.title_restart")),i(2),_(u.error?11:12),i(2),_(u.timeout?13:-1))},dependencies:[T,I],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{X as RestartComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,g as s}from"./chunk-5KFQUVTY.js";import{k as l,n as d}from"./chunk-
|
|
1
|
+
import{d as u,g as s}from"./chunk-5KFQUVTY.js";import{k as l,n as d}from"./chunk-ZHR4YJI6.js";import{a as p}from"./chunk-6FXNHKMA.js";import"./chunk-PP5MH7GY.js";import{ga as c,h as f,ha as i,la as e,ob as n,w as m}from"./chunk-XWYKEZQQ.js";var a=(()=>{class t{$api=e(d);$router=e(u);$toastr=e(l);$translate=e(p);resolve(){return f(this,null,function*(){try{let o=yield m(this.$api.get("/config-editor"));return JSON.stringify(o,null,4)}catch(o){console.error(o),this.$toastr.error(o.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(r){return new(r||t)};static \u0275prov=c({token:t,factory:t.\u0275fac})}return t})();var y=[{path:"",loadComponent:()=>import("./chunk-BJH2XS46.js").then(t=>t.ConfigEditorComponent),resolve:{config:a}}],v=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=n({type:t});static \u0275inj=i({imports:[s.forChild(y),s]})}return t})();var T=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=n({type:t});static \u0275inj=i({providers:[a],imports:[v]})}return t})();export{T as ConfigEditorModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-RLVPGUTL.js";import{g as i}from"./chunk-5KFQUVTY.js";import"./chunk-SN6LZKCD.js";import"./chunk-ZHR4YJI6.js";import"./chunk-6FXNHKMA.js";import"./chunk-PP5MH7GY.js";import{ha as o,ob as r}from"./chunk-XWYKEZQQ.js";var a=[{path:"",loadComponent:()=>import("./chunk-IULRECRY.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{a as H}from"./chunk-WCMFALUQ.js";import{a as X}from"./chunk-G3CSSNW3.js";import{a as Z}from"./chunk-6N2SOTOL.js";import"./chunk-OPYWX2UT.js";import{a as R}from"./chunk-FVSVQWIM.js";import{n as E}from"./chunk-BEYU5GMW.js";import"./chunk-WMIMAPZH.js";import{a as j}from"./chunk-ECNGRFJK.js";import{b as A}from"./chunk-HBAZZ6IF.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-5KFQUVTY.js";import{b as T}from"./chunk-65PMNYAH.js";import{m as $}from"./chunk-4UTOOZ43.js";import{a as L,b as U}from"./chunk-6FXNHKMA.js";import"./chunk-PP5MH7GY.js";import{$b as S,Cd as K,Dc as h,Ec as M,Ib as m,Jb as x,Kb as y,Kc as s,Lc as d,Pb as c,Qb as n,Rb as a,Sb as p,bb as o,cc as _,ec as C,g as Y,gb as F,h as I,la as u,ld as O,nb as P,ra as b,rc as f,sa as w,sc as v,w as z}from"./chunk-XWYKEZQQ.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&(window?.matchMedia("(display-mode: standalone)").matches||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||window?.Windows||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var B=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],se=()=>["/support"],de=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),s(3,"translate"),_("click",function(){b(e);let t=C();return w(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),f(7),s(8,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"rpi.throttled.undervoltage_title")+" - "+d(3,4,"rpi.throttled.undervoltage_description")),o(6),v(d(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,de))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.linux.label_terminal")),o(5),v(d(7,6,"menu.linux.label_terminal")))}function _e(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.config_json_editor")),o(5),v(d(7,6,"menu.config_json_editor")))}function fe(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.label_settings")),o(5),v(d(7,6,"menu.label_settings")))}function ge(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.restart.title")),o(5),v(d(7,6,"menu.restart.title")))}function ve(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.reloadPage())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.reload")),o(5),v(d(7,4,"menu.reload")))}function he(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.logout())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.tooltip_logout")),o(5),v(d(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(X);$renderer=u(F);$router=u(V);$translate=u(L);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();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(l=>{l instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),l=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!l.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),l.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),l.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(H,{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-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let l=e.target;["menuitem","button"].includes(l.getAttribute("role"))&&l.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.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,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-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-power-off"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),s(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),p(2,"span",1),n(3,"a",2),s(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),n(15,"a",2),s(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),s(23,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),s(28,"translate"),a()()(),x(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),s(32,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),f(36),s(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),s(40,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),f(44),s(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),s(48,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),f(52),s(53,"translate"),a()()(),x(54,ue,8,9,"div",10),x(55,_e,8,9,"div",10),x(56,fe,8,9,"div",10),n(57,"div",10)(58,"div",15),s(59,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),f(63),s(64,"translate"),a()()(),x(65,ge,8,9,"div",10),x(66,ve,8,6,"div",10),x(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",d(1,37,"menu.sidebar.aria_menu")),o(3),c("routerLink",h(63,B)),m("aria-label",d(4,39,"menu.label_status")),o(5),c("ngClass",M(64,te,t.isExpanded)),o(5),c("ngClass",M(66,ne,t.isExpanded)),o(2),c("routerLink",h(68,B)),m("aria-label",d(16,41,"menu.label_status")),o(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",d(23,43,"menu.label_status")),o(5),v(d(28,45,"menu.label_status")),o(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",d(32,47,"menu.label_plugins")),o(5),v(d(37,49,"menu.label_plugins")),o(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",d(40,51,"menu.label_accessories")),o(5),v(d(45,53,"menu.label_accessories")),o(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",d(48,55,"menu.linux.label_logs")),o(5),v(d(53,57,"menu.linux.label_logs")),o(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),o(),y(t.isAdmin?55:-1),o(),y(t.isAdmin?56:-1),o(2),c("routerLink",h(74,se))("routerLinkActive","active"),m("aria-label",d(59,59,"support.title")),o(5),v(d(64,61,"support.title")),o(2),y(t.isAdmin?65:-1),o(),y(t.isPwa?66:-1),o(),y(t.formAuth?67:-1))},dependencies:[N,K,O,D,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-y:auto;max-height:calc(100vh - 80px)!important}.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;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;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;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;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){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var be=i=>({sidebarExpanded:i}),He=(()=>{class i{$auth=u(A);$modal=u(E);$router=u(V);$settings=u(T);$translate=u(L);$ws=u(j);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return I(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,$.serverTarget)){console.log(`Server restart required. UI Version: ${$.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{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:$.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(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(l,t){l&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),l&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,q],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 i})();export{He as LayoutComponent};
|
|
1
|
+
import{a as H}from"./chunk-G47DZL2Z.js";import{a as X}from"./chunk-G3CSSNW3.js";import{a as Z}from"./chunk-6N2SOTOL.js";import"./chunk-OPYWX2UT.js";import{a as R}from"./chunk-PJ3EPI5G.js";import{n as E}from"./chunk-AP47FXQT.js";import"./chunk-NH4EEDHF.js";import{a as j}from"./chunk-LUMABV26.js";import{b as A}from"./chunk-5HZUPVWC.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-5KFQUVTY.js";import{b as T}from"./chunk-SN6LZKCD.js";import{m as $}from"./chunk-ZHR4YJI6.js";import{a as L,b as U}from"./chunk-6FXNHKMA.js";import"./chunk-PP5MH7GY.js";import{$b as S,Cd as K,Dc as h,Ec as M,Ib as m,Jb as x,Kb as y,Kc as s,Lc as d,Pb as c,Qb as n,Rb as a,Sb as p,bb as o,cc as _,ec as C,g as Y,gb as F,h as I,la as u,ld as O,nb as P,ra as b,rc as f,sa as w,sc as v,w as z}from"./chunk-XWYKEZQQ.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&(window?.matchMedia("(display-mode: standalone)").matches||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||window?.Windows||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var B=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],se=()=>["/support"],de=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),s(3,"translate"),_("click",function(){b(e);let t=C();return w(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),f(7),s(8,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"rpi.throttled.undervoltage_title")+" - "+d(3,4,"rpi.throttled.undervoltage_description")),o(6),v(d(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,de))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.linux.label_terminal")),o(5),v(d(7,6,"menu.linux.label_terminal")))}function _e(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.config_json_editor")),o(5),v(d(7,6,"menu.config_json_editor")))}function fe(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.label_settings")),o(5),v(d(7,6,"menu.label_settings")))}function ge(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.restart.title")),o(5),v(d(7,6,"menu.restart.title")))}function ve(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.reloadPage())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.reload")),o(5),v(d(7,4,"menu.reload")))}function he(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.logout())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.tooltip_logout")),o(5),v(d(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(X);$renderer=u(F);$router=u(V);$translate=u(L);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();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(l=>{l instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),l=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!l.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),l.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),l.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(H,{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-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let l=e.target;["menuitem","button"].includes(l.getAttribute("role"))&&l.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.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,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-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-power-off"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),s(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),p(2,"span",1),n(3,"a",2),s(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),n(15,"a",2),s(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),s(23,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),s(28,"translate"),a()()(),x(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),s(32,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),f(36),s(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),s(40,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),f(44),s(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),s(48,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),f(52),s(53,"translate"),a()()(),x(54,ue,8,9,"div",10),x(55,_e,8,9,"div",10),x(56,fe,8,9,"div",10),n(57,"div",10)(58,"div",15),s(59,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),f(63),s(64,"translate"),a()()(),x(65,ge,8,9,"div",10),x(66,ve,8,6,"div",10),x(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",d(1,37,"menu.sidebar.aria_menu")),o(3),c("routerLink",h(63,B)),m("aria-label",d(4,39,"menu.label_status")),o(5),c("ngClass",M(64,te,t.isExpanded)),o(5),c("ngClass",M(66,ne,t.isExpanded)),o(2),c("routerLink",h(68,B)),m("aria-label",d(16,41,"menu.label_status")),o(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",d(23,43,"menu.label_status")),o(5),v(d(28,45,"menu.label_status")),o(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",d(32,47,"menu.label_plugins")),o(5),v(d(37,49,"menu.label_plugins")),o(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",d(40,51,"menu.label_accessories")),o(5),v(d(45,53,"menu.label_accessories")),o(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",d(48,55,"menu.linux.label_logs")),o(5),v(d(53,57,"menu.linux.label_logs")),o(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),o(),y(t.isAdmin?55:-1),o(),y(t.isAdmin?56:-1),o(2),c("routerLink",h(74,se))("routerLinkActive","active"),m("aria-label",d(59,59,"support.title")),o(5),v(d(64,61,"support.title")),o(2),y(t.isAdmin?65:-1),o(),y(t.isPwa?66:-1),o(),y(t.formAuth?67:-1))},dependencies:[N,K,O,D,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-y:auto;max-height:calc(100vh - 80px)!important}.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;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;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;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;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){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var be=i=>({sidebarExpanded:i}),He=(()=>{class i{$auth=u(A);$modal=u(E);$router=u(V);$settings=u(T);$translate=u(L);$ws=u(j);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return I(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,$.serverTarget)){console.log(`Server restart required. UI Version: ${$.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{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:$.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(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(l,t){l&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),l&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,q],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 i})();export{He as LayoutComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-QNF5ENQG.js";import{k as p,n as m}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-QNF5ENQG.js";import{k as p,n as m}from"./chunk-ZHR4YJI6.js";import{a as c}from"./chunk-6FXNHKMA.js";import{g as f,ga as n,h as r,la as a,w as s}from"./chunk-XWYKEZQQ.js";var l=f(u(),1);var $=(()=>{class e{$api=a(m);$toastr=a(p);$translate=a(c);downloadBackup(){return r(this,null,function*(){let t=yield s(this.$api.get("/backup/download",{observe:"response",responseType:"blob"})),i=t.headers.get("File-Name")||"homebridge-backup.tar.gz",o=t.body.size;if(o>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(o/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,l.saveAs)(t.body,i)})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{$ as a};
|