mirror of
https://github.com/home-assistant/frontend.git
synced 2025-09-06 03:36:32 +00:00
Compare commits
676 Commits
fix_new_sc
...
20250221.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4a1b7d46ca | ||
![]() |
75fadcca42 | ||
![]() |
41c93f5f7e | ||
![]() |
99559ff716 | ||
![]() |
753fe719e3 | ||
![]() |
5c14afd944 | ||
![]() |
23f1925c84 | ||
![]() |
c68002214f | ||
![]() |
8dbc203130 | ||
![]() |
64274d7355 | ||
![]() |
c07f4de39d | ||
![]() |
37ee2bf308 | ||
![]() |
d9559b7f07 | ||
![]() |
fce07daa20 | ||
![]() |
5d6fcaf6bb | ||
![]() |
0ab9098f23 | ||
![]() |
4498747fb1 | ||
![]() |
76977b64fa | ||
![]() |
2ca7395733 | ||
![]() |
0900869957 | ||
![]() |
91e8750f44 | ||
![]() |
936f66c41c | ||
![]() |
9ab5be4730 | ||
![]() |
a30e501031 | ||
![]() |
dcb04067b8 | ||
![]() |
bf962b29af | ||
![]() |
0ae6fa0763 | ||
![]() |
9d7d332790 | ||
![]() |
f1173dd84b | ||
![]() |
44dcca9923 | ||
![]() |
bd74d39dd8 | ||
![]() |
172d6c3079 | ||
![]() |
56539e8065 | ||
![]() |
8f6867f142 | ||
![]() |
d51f8995dd | ||
![]() |
f2e35dc70a | ||
![]() |
6487b9b7ea | ||
![]() |
e50b658db7 | ||
![]() |
6efe237639 | ||
![]() |
4a94cfc05b | ||
![]() |
7cbdb1dcfd | ||
![]() |
553bb61db7 | ||
![]() |
786ff787d1 | ||
![]() |
e5fea98460 | ||
![]() |
31180e3a9e | ||
![]() |
ce0f02a45b | ||
![]() |
53f090356e | ||
![]() |
776c4da688 | ||
![]() |
849922f7be | ||
![]() |
a26701808f | ||
![]() |
ef3bea71a0 | ||
![]() |
fcf655b0ec | ||
![]() |
b263b74916 | ||
![]() |
0f4b6b423a | ||
![]() |
72df585c5e | ||
![]() |
4698a63642 | ||
![]() |
6eb43a7d61 | ||
![]() |
af35b15400 | ||
![]() |
0d50d2664f | ||
![]() |
ff1159402e | ||
![]() |
f8742ae690 | ||
![]() |
c786d26542 | ||
![]() |
3f8ff94002 | ||
![]() |
1de740e7b5 | ||
![]() |
5abfb90b16 | ||
![]() |
6b691063a8 | ||
![]() |
d1d746e7e6 | ||
![]() |
2fcb64d4a1 | ||
![]() |
3769f8c7c0 | ||
![]() |
f0a56e75f5 | ||
![]() |
15f33e1f19 | ||
![]() |
181122177b | ||
![]() |
684cd0f627 | ||
![]() |
277202e363 | ||
![]() |
b388d1fd42 | ||
![]() |
251e6399f5 | ||
![]() |
f44c5d7a63 | ||
![]() |
cae1ca52f0 | ||
![]() |
9449f5ad0a | ||
![]() |
c337bc5f97 | ||
![]() |
6aab60cf45 | ||
![]() |
52e9bc3213 | ||
![]() |
e48b2383cf | ||
![]() |
002a249777 | ||
![]() |
10498ce18d | ||
![]() |
6a5936b2b2 | ||
![]() |
dc68aaa803 | ||
![]() |
e7931ce049 | ||
![]() |
59b2582fe3 | ||
![]() |
8577b0721c | ||
![]() |
91319be855 | ||
![]() |
0dff538298 | ||
![]() |
b95e87845f | ||
![]() |
bc49ebc489 | ||
![]() |
c97d0ce68a | ||
![]() |
a0e7d6f1c6 | ||
![]() |
25d2a5ddac | ||
![]() |
a2f2d64f5c | ||
![]() |
fcdcbbda05 | ||
![]() |
4b5c7fc2de | ||
![]() |
dd64d88afe | ||
![]() |
5feffd08ff | ||
![]() |
543c7df3e0 | ||
![]() |
167f859f2a | ||
![]() |
c7d9699a24 | ||
![]() |
a638cf443d | ||
![]() |
438d1c13ef | ||
![]() |
cc8869b9f9 | ||
![]() |
cbdb7406ad | ||
![]() |
f8d2560104 | ||
![]() |
cc48ae82d6 | ||
![]() |
e1bda9b57d | ||
![]() |
89e9316a40 | ||
![]() |
85e4975206 | ||
![]() |
142faba04d | ||
![]() |
c1c6d71ccf | ||
![]() |
5204a565cf | ||
![]() |
05b8a48ba8 | ||
![]() |
41770a89b4 | ||
![]() |
b7d14d7950 | ||
![]() |
4ccef6f28b | ||
![]() |
d1be441455 | ||
![]() |
b3391b34e4 | ||
![]() |
9359e9d475 | ||
![]() |
5453da75ea | ||
![]() |
bc21877008 | ||
![]() |
c9956c65e9 | ||
![]() |
74814cc305 | ||
![]() |
8f231d7b3e | ||
![]() |
5b6818d72d | ||
![]() |
8c75865a02 | ||
![]() |
99d832ac77 | ||
![]() |
240e48f5c1 | ||
![]() |
77fc11cda6 | ||
![]() |
f8f152f118 | ||
![]() |
20a67cf73c | ||
![]() |
dd11b3092e | ||
![]() |
7f3363621e | ||
![]() |
edce1901d7 | ||
![]() |
546087066a | ||
![]() |
a95c589a06 | ||
![]() |
5f6da9d959 | ||
![]() |
bc94ca0a0a | ||
![]() |
dc8d483e8b | ||
![]() |
a329553ce1 | ||
![]() |
1f8cfdd0de | ||
![]() |
fd1f966216 | ||
![]() |
243a2ce0e2 | ||
![]() |
77c1786171 | ||
![]() |
7a7c204d74 | ||
![]() |
dcb74ad2ee | ||
![]() |
fd4c62a852 | ||
![]() |
bf1b0ac949 | ||
![]() |
c6f0c62fd6 | ||
![]() |
ac98672cb7 | ||
![]() |
6b471ba6e7 | ||
![]() |
b28e7d2f06 | ||
![]() |
bf471eb8c3 | ||
![]() |
8c52bc3ffb | ||
![]() |
54b328648a | ||
![]() |
62a9da2de2 | ||
![]() |
25ff96b9bf | ||
![]() |
caeb616dc6 | ||
![]() |
fb79e2cfb2 | ||
![]() |
666316e44a | ||
![]() |
1532093426 | ||
![]() |
2effb0935c | ||
![]() |
06a08bb4f2 | ||
![]() |
09102d34d6 | ||
![]() |
27d683f6e8 | ||
![]() |
b89bd0be3b | ||
![]() |
51e6e6d230 | ||
![]() |
9005f8faa9 | ||
![]() |
7aa2abc9c2 | ||
![]() |
898fd51c7d | ||
![]() |
b3141a0653 | ||
![]() |
1025f73c36 | ||
![]() |
1cd44728df | ||
![]() |
eaab19fb8c | ||
![]() |
c4b2896fac | ||
![]() |
ca2a9f9171 | ||
![]() |
9e868e144d | ||
![]() |
fcb6da55d8 | ||
![]() |
87907b98bd | ||
![]() |
7535d66373 | ||
![]() |
e994e3565d | ||
![]() |
562589a6cb | ||
![]() |
e87f6d6d5e | ||
![]() |
3feedb792a | ||
![]() |
fc290028c6 | ||
![]() |
2f5fd6f0c7 | ||
![]() |
9a3ca59d77 | ||
![]() |
f76c22cb5b | ||
![]() |
aad94624e2 | ||
![]() |
076ab91199 | ||
![]() |
d121b33263 | ||
![]() |
dbfcf310c3 | ||
![]() |
25ea6c2c55 | ||
![]() |
b2b2c21477 | ||
![]() |
09777db549 | ||
![]() |
f108f65e39 | ||
![]() |
2ee9824bcc | ||
![]() |
812461ea00 | ||
![]() |
c430c28c2a | ||
![]() |
d67c463b98 | ||
![]() |
8efaf2b031 | ||
![]() |
5b038a4fef | ||
![]() |
2105793355 | ||
![]() |
21c2351137 | ||
![]() |
ebd1bdd686 | ||
![]() |
05bd70dd64 | ||
![]() |
e5d2f2d94b | ||
![]() |
57edb86c5c | ||
![]() |
173d60b913 | ||
![]() |
c17c1e4217 | ||
![]() |
d112872eb2 | ||
![]() |
e54f178b02 | ||
![]() |
7960da1872 | ||
![]() |
6288154c53 | ||
![]() |
52d8e98cdb | ||
![]() |
1043db29be | ||
![]() |
e6cc920781 | ||
![]() |
8bc78ba793 | ||
![]() |
e703750136 | ||
![]() |
69a93ddb6e | ||
![]() |
630b48218b | ||
![]() |
54c78ecc4d | ||
![]() |
57a17b8663 | ||
![]() |
d3e832c09b | ||
![]() |
abe8899f9b | ||
![]() |
922cd72be4 | ||
![]() |
3f4ee97ede | ||
![]() |
6f9a385619 | ||
![]() |
eda0ea077c | ||
![]() |
9934ea4b4f | ||
![]() |
cc42d958ce | ||
![]() |
2e1efecdf7 | ||
![]() |
5fead1b03a | ||
![]() |
730da177ef | ||
![]() |
bd53d1076f | ||
![]() |
e012a9e929 | ||
![]() |
95ac8eb5ab | ||
![]() |
6dbc04455f | ||
![]() |
2b8fc04fdc | ||
![]() |
3baeb22423 | ||
![]() |
aae4ba7341 | ||
![]() |
46d62d55a3 | ||
![]() |
de027b6d93 | ||
![]() |
f1cc02b40f | ||
![]() |
23c6155f9b | ||
![]() |
b0e6c5dbaf | ||
![]() |
8cb4452126 | ||
![]() |
0cd0f65d51 | ||
![]() |
3479879bd0 | ||
![]() |
60b9fbced7 | ||
![]() |
7496998a69 | ||
![]() |
c9db02ba2e | ||
![]() |
08737366fc | ||
![]() |
707192feac | ||
![]() |
4b03caa01a | ||
![]() |
3ffbd435e0 | ||
![]() |
2e2f39adbd | ||
![]() |
5e7f356707 | ||
![]() |
b02d0e58b1 | ||
![]() |
c01d3aee41 | ||
![]() |
6dde7d6945 | ||
![]() |
14c71f436e | ||
![]() |
9acdd9f903 | ||
![]() |
12b2edaa65 | ||
![]() |
d55d388046 | ||
![]() |
ec1dedcb6b | ||
![]() |
d0fbba5063 | ||
![]() |
344e083ac6 | ||
![]() |
0ee6548650 | ||
![]() |
166633cfa8 | ||
![]() |
853059ac73 | ||
![]() |
31ed0f7bea | ||
![]() |
57388ae429 | ||
![]() |
20203a3cef | ||
![]() |
9ec9c7e56b | ||
![]() |
788441499a | ||
![]() |
712817df65 | ||
![]() |
f8264e4500 | ||
![]() |
50fa8dd269 | ||
![]() |
fc20716ff2 | ||
![]() |
c6aec2db7d | ||
![]() |
f75f4b9733 | ||
![]() |
b1acf9a057 | ||
![]() |
221b3932ed | ||
![]() |
c50f701160 | ||
![]() |
85bebfc309 | ||
![]() |
6e90afc5bd | ||
![]() |
e137e695ec | ||
![]() |
7133dc5688 | ||
![]() |
617480472e | ||
![]() |
6ef799be60 | ||
![]() |
9ff1ce3c96 | ||
![]() |
f53ac94e76 | ||
![]() |
6d084813d5 | ||
![]() |
926f5e3cd8 | ||
![]() |
befc650f81 | ||
![]() |
2019b8992e | ||
![]() |
4d2e9f203f | ||
![]() |
760d898de7 | ||
![]() |
a755af96a6 | ||
![]() |
046b90ae25 | ||
![]() |
a3e8bcf848 | ||
![]() |
2cf1b7b6e6 | ||
![]() |
4b13dde92e | ||
![]() |
ebcee7680a | ||
![]() |
ffff7970f5 | ||
![]() |
2a2b6d33b8 | ||
![]() |
61ed889370 | ||
![]() |
4cc95938c8 | ||
![]() |
63c658e5b9 | ||
![]() |
3d1817a6b9 | ||
![]() |
8be2ca5392 | ||
![]() |
f043886273 | ||
![]() |
ff75c89ed4 | ||
![]() |
a8803de6e3 | ||
![]() |
e9f3f71be1 | ||
![]() |
334c87b194 | ||
![]() |
8db4a76bb9 | ||
![]() |
7aa2136c21 | ||
![]() |
47308e7b46 | ||
![]() |
87884ac747 | ||
![]() |
ec1fc09140 | ||
![]() |
e2ad94469a | ||
![]() |
70541ec966 | ||
![]() |
0bf64ee7f4 | ||
![]() |
4ea0c83fbe | ||
![]() |
d126e02747 | ||
![]() |
102a9eeb61 | ||
![]() |
fc3e99e794 | ||
![]() |
70953788cc | ||
![]() |
4ffec51a5e | ||
![]() |
71e10d5d8e | ||
![]() |
cfbcb74ac2 | ||
![]() |
3ff5b832bc | ||
![]() |
1faf024c5b | ||
![]() |
6d48e725c7 | ||
![]() |
052744e3d1 | ||
![]() |
2945a7b701 | ||
![]() |
6c9df587e7 | ||
![]() |
8f58681d83 | ||
![]() |
4a16d9bd44 | ||
![]() |
fcc9da6d85 | ||
![]() |
e03dc2c382 | ||
![]() |
be967940a2 | ||
![]() |
64ad37ed6a | ||
![]() |
01bc45c78b | ||
![]() |
2206644c47 | ||
![]() |
486038c426 | ||
![]() |
711f721007 | ||
![]() |
3b8bc242fe | ||
![]() |
7e80eed003 | ||
![]() |
a7ef498d75 | ||
![]() |
caf8fdf4c7 | ||
![]() |
f19ca78b89 | ||
![]() |
0fba0e2850 | ||
![]() |
15606a5a90 | ||
![]() |
c7df147908 | ||
![]() |
031658eef4 | ||
![]() |
fa672ffbba | ||
![]() |
34bcd5e71c | ||
![]() |
73854efa57 | ||
![]() |
a371b842da | ||
![]() |
b439c5d213 | ||
![]() |
04a9c67112 | ||
![]() |
012bd0714c | ||
![]() |
4e10d140d9 | ||
![]() |
8df67b8eb1 | ||
![]() |
fb09eba831 | ||
![]() |
a5de6ff3af | ||
![]() |
806cc2c608 | ||
![]() |
48a160f057 | ||
![]() |
c697843c34 | ||
![]() |
317a2f5b21 | ||
![]() |
220011f15f | ||
![]() |
35faeb651b | ||
![]() |
8daea5b565 | ||
![]() |
cd69c4c361 | ||
![]() |
eaab47a667 | ||
![]() |
d08a28ab9e | ||
![]() |
e8af454705 | ||
![]() |
713b5c7cf7 | ||
![]() |
8b17286fb6 | ||
![]() |
f3705a7e1d | ||
![]() |
d0123b2cce | ||
![]() |
884c22f92b | ||
![]() |
700690474c | ||
![]() |
4686808e53 | ||
![]() |
cf1df712e4 | ||
![]() |
c338e9cb30 | ||
![]() |
8e8fd89d56 | ||
![]() |
f1c360c550 | ||
![]() |
b429ecc376 | ||
![]() |
6d8422513a | ||
![]() |
cb0a48265a | ||
![]() |
c9082724a8 | ||
![]() |
455cd0485e | ||
![]() |
f5ec2dcbe2 | ||
![]() |
6b039a1073 | ||
![]() |
94c03be7ae | ||
![]() |
4bf0a23513 | ||
![]() |
f01388473a | ||
![]() |
1d0c3da294 | ||
![]() |
be849887a1 | ||
![]() |
e1a6f6f0e3 | ||
![]() |
d0327915db | ||
![]() |
351d318c89 | ||
![]() |
7d1ca2acf0 | ||
![]() |
fea83c0873 | ||
![]() |
d3b4014182 | ||
![]() |
5c7fe04562 | ||
![]() |
44e26c925b | ||
![]() |
205dd3f968 | ||
![]() |
86133a0696 | ||
![]() |
2105db9104 | ||
![]() |
49c377b1c4 | ||
![]() |
3fd3c8003a | ||
![]() |
ccbb2704d1 | ||
![]() |
34218f08ef | ||
![]() |
cf91e6a2a3 | ||
![]() |
ab9759c6dd | ||
![]() |
95adbfcc12 | ||
![]() |
1b9cbe434d | ||
![]() |
918aa562c5 | ||
![]() |
2ff0cb58bc | ||
![]() |
a94460a0c7 | ||
![]() |
60e57748f7 | ||
![]() |
0ecb8a6866 | ||
![]() |
d9dfea938e | ||
![]() |
6fe4f94d55 | ||
![]() |
01bec32fd6 | ||
![]() |
5453d6f7f5 | ||
![]() |
a0799a409b | ||
![]() |
704e7f279f | ||
![]() |
1daaf50773 | ||
![]() |
54eb7d169c | ||
![]() |
33b410dea0 | ||
![]() |
c05054e4ff | ||
![]() |
f416b1b5da | ||
![]() |
6a345d86a6 | ||
![]() |
a04e9b68bd | ||
![]() |
f7dbd38c2e | ||
![]() |
7150016375 | ||
![]() |
c3507abd9c | ||
![]() |
fc8a8b28c2 | ||
![]() |
637fe37ef4 | ||
![]() |
657bfc82ca | ||
![]() |
44423812f4 | ||
![]() |
a6a76155e5 | ||
![]() |
8c18d816b6 | ||
![]() |
361caafab9 | ||
![]() |
94f679e387 | ||
![]() |
85bd6432a9 | ||
![]() |
00c1dfa1d2 | ||
![]() |
fb72e1fb9c | ||
![]() |
152d2d0bdf | ||
![]() |
e06aa52a21 | ||
![]() |
49aa935490 | ||
![]() |
cead1e355d | ||
![]() |
edc99b5d6c | ||
![]() |
b38963b214 | ||
![]() |
0d99531855 | ||
![]() |
9cde7637ca | ||
![]() |
edc08994b3 | ||
![]() |
fc0907ef72 | ||
![]() |
bdb28246fc | ||
![]() |
0582798cde | ||
![]() |
e7d9032cc4 | ||
![]() |
331385794c | ||
![]() |
8e71bd7e82 | ||
![]() |
664cc9b33d | ||
![]() |
6757cda7f0 | ||
![]() |
97e6313890 | ||
![]() |
3cfba7b960 | ||
![]() |
5fb384ad31 | ||
![]() |
76cb9ce807 | ||
![]() |
0e61596f5c | ||
![]() |
061b6af812 | ||
![]() |
fd95ab5518 | ||
![]() |
a7cacbbbe6 | ||
![]() |
5a0225b86a | ||
![]() |
8b79fc5848 | ||
![]() |
5513da51a8 | ||
![]() |
56f9165323 | ||
![]() |
6afcd4d770 | ||
![]() |
52e1f9315e | ||
![]() |
a00f645921 | ||
![]() |
faf3bb2644 | ||
![]() |
31d98ec935 | ||
![]() |
7d0a269f1b | ||
![]() |
147098f0fd | ||
![]() |
d4cbfd9583 | ||
![]() |
a35ba38a2d | ||
![]() |
8fa36c8226 | ||
![]() |
5ccc3365fe | ||
![]() |
dcf97d4667 | ||
![]() |
4b7acbb766 | ||
![]() |
7900eb4054 | ||
![]() |
53caef8f92 | ||
![]() |
14bebc76b0 | ||
![]() |
8b6382448f | ||
![]() |
5cd6f22e99 | ||
![]() |
523c38a83e | ||
![]() |
0a28bbdd72 | ||
![]() |
e58bef7795 | ||
![]() |
d403532fc1 | ||
![]() |
4de8b562bd | ||
![]() |
31e85836f0 | ||
![]() |
e1359781a5 | ||
![]() |
379bc3a4e3 | ||
![]() |
b3b0006ba3 | ||
![]() |
cd44b33201 | ||
![]() |
33df805168 | ||
![]() |
fad435ea10 | ||
![]() |
b35f9944ea | ||
![]() |
dc799bf691 | ||
![]() |
1f7929bb3d | ||
![]() |
fb228dc918 | ||
![]() |
c66f5e2d8a | ||
![]() |
d71b29d089 | ||
![]() |
6b230b6142 | ||
![]() |
c532a9023a | ||
![]() |
ecc704e6ac | ||
![]() |
5470c8f250 | ||
![]() |
d21f249aac | ||
![]() |
907299b139 | ||
![]() |
37aa2bd869 | ||
![]() |
f1f53b9f24 | ||
![]() |
49d9c7f392 | ||
![]() |
65860a3142 | ||
![]() |
3b52d3d302 | ||
![]() |
2fe6203eae | ||
![]() |
92b02e39c9 | ||
![]() |
b693fd1edc | ||
![]() |
b84e00b312 | ||
![]() |
973fd51639 | ||
![]() |
e0494ccb57 | ||
![]() |
95559cbc2a | ||
![]() |
3da13b823a | ||
![]() |
c022871ead | ||
![]() |
c4fcbf0613 | ||
![]() |
79921745a8 | ||
![]() |
40a4255045 | ||
![]() |
2d902a0688 | ||
![]() |
8a46ef6168 | ||
![]() |
ba3d37b550 | ||
![]() |
88d0247217 | ||
![]() |
1c076d22a6 | ||
![]() |
0ecdae2551 | ||
![]() |
6f8ba6afac | ||
![]() |
ad1c32a880 | ||
![]() |
48819a59e7 | ||
![]() |
2718801c69 | ||
![]() |
2b43f5f8c8 | ||
![]() |
0ef23cd712 | ||
![]() |
7370d1e0dd | ||
![]() |
da7d3e118c | ||
![]() |
d4188d9aee | ||
![]() |
8722157623 | ||
![]() |
6e2f0d8c9b | ||
![]() |
08459394a6 | ||
![]() |
ee292f900f | ||
![]() |
3aaf08ac03 | ||
![]() |
d31f4a5f1d | ||
![]() |
875ab0cb97 | ||
![]() |
678af025ac | ||
![]() |
1fd38d085f | ||
![]() |
ec324ab09f | ||
![]() |
efcd57934a | ||
![]() |
1efe61445f | ||
![]() |
6db9bf800a | ||
![]() |
65458538a7 | ||
![]() |
9ddeb3734f | ||
![]() |
c89fc188a5 | ||
![]() |
d366471058 | ||
![]() |
9951c162a1 | ||
![]() |
0c7d689b5a | ||
![]() |
655ce05efe | ||
![]() |
2a6e562d37 | ||
![]() |
98d1954812 | ||
![]() |
72a2f54598 | ||
![]() |
9364ea060a | ||
![]() |
f8dfdcb090 | ||
![]() |
3d78a7821a | ||
![]() |
e923d610ce | ||
![]() |
8b25fe88a4 | ||
![]() |
3768be55ff | ||
![]() |
47cf17ab50 | ||
![]() |
d2ec24f32a | ||
![]() |
69ed736080 | ||
![]() |
7d3c77008d | ||
![]() |
27dbabc6bf | ||
![]() |
27ce395d68 | ||
![]() |
145a536156 | ||
![]() |
e9b2a83411 | ||
![]() |
784b7e4d04 | ||
![]() |
f4bf999ae2 | ||
![]() |
9c04f57e35 | ||
![]() |
f0ddc408e8 | ||
![]() |
df4d5a4567 | ||
![]() |
0a413cba03 | ||
![]() |
7e2217b542 | ||
![]() |
93947d76a2 | ||
![]() |
18cce45b88 | ||
![]() |
86f1af6682 | ||
![]() |
c8f58c7bc9 | ||
![]() |
e5e168803a | ||
![]() |
3436a023f6 | ||
![]() |
84322a21fe | ||
![]() |
ec20f7e2c4 | ||
![]() |
3579d82e8e | ||
![]() |
70532ac3bf | ||
![]() |
96b9d25bc5 | ||
![]() |
91777d45b0 | ||
![]() |
0582b8430d | ||
![]() |
63d97398c1 | ||
![]() |
3552417b39 | ||
![]() |
a6cbbfe1a4 | ||
![]() |
48f5d17060 | ||
![]() |
c713106948 | ||
![]() |
142e674020 | ||
![]() |
e4fc21c991 | ||
![]() |
f9844e8e58 | ||
![]() |
86f9909ac9 | ||
![]() |
629ae3fbf3 | ||
![]() |
ddd2c177b5 | ||
![]() |
829de4a073 | ||
![]() |
0df8b96133 | ||
![]() |
443921a97c | ||
![]() |
54bc0525f7 | ||
![]() |
72f8f020fc | ||
![]() |
7f31acf764 | ||
![]() |
8c5862e4ce | ||
![]() |
f3e0df93b5 | ||
![]() |
c6c5ea34d3 | ||
![]() |
287a068ada | ||
![]() |
8ca52820b1 | ||
![]() |
cd8900dd26 | ||
![]() |
6d2e7f9fbd | ||
![]() |
1016c87c60 | ||
![]() |
dbda1d75f9 | ||
![]() |
a9c25b49b9 | ||
![]() |
fbff95345c | ||
![]() |
8f4e65d392 | ||
![]() |
3a2cb51f8d | ||
![]() |
6c9cfed49f | ||
![]() |
257cab1061 | ||
![]() |
5f6577a24c | ||
![]() |
f8d6f0fae4 | ||
![]() |
5b7eeb6ac1 | ||
![]() |
191feed920 | ||
![]() |
13c1763277 | ||
![]() |
ac9085c7a4 | ||
![]() |
8beb93b695 | ||
![]() |
4f76e66cc0 | ||
![]() |
1ebd13027c | ||
![]() |
04beef5e36 | ||
![]() |
0a578c5847 | ||
![]() |
41924d8ec6 | ||
![]() |
6ff1a6fecc | ||
![]() |
05eb6e15a5 | ||
![]() |
6d01728d54 | ||
![]() |
2550bff4e9 | ||
![]() |
6e003907fb | ||
![]() |
f6c15dc990 | ||
![]() |
1061769144 | ||
![]() |
1edfec08e1 | ||
![]() |
239cad9b47 | ||
![]() |
8d7c175d70 | ||
![]() |
795bbefba6 | ||
![]() |
e1b34eaa33 | ||
![]() |
91d5d2f1eb |
@@ -1,5 +1,4 @@
|
|||||||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/python-3/.devcontainer/base.Dockerfile
|
FROM mcr.microsoft.com/devcontainers/python:1-3.13
|
||||||
FROM mcr.microsoft.com/devcontainers/python:3.12
|
|
||||||
|
|
||||||
ENV \
|
ENV \
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -7,7 +7,7 @@ body:
|
|||||||
value: |
|
value: |
|
||||||
Make sure you are running the [latest version of Home Assistant][releases] before reporting an issue.
|
Make sure you are running the [latest version of Home Assistant][releases] before reporting an issue.
|
||||||
|
|
||||||
If you have a feature or enhancement request for the frontend, please [start an discussion][fr] instead of creating an issue.
|
If you have a feature or enhancement request for the frontend, please [start a discussion][fr] instead of creating an issue.
|
||||||
|
|
||||||
**Please do not report issues for custom cards.**
|
**Please do not report issues for custom cards.**
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ body:
|
|||||||
If known, otherwise leave blank.
|
If known, otherwise leave blank.
|
||||||
- type: input
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: In which browser are you experiencing the issue with?
|
label: In which browser are you experiencing the issue?
|
||||||
placeholder: Google Chrome 88.0.4324.150
|
placeholder: Google Chrome 88.0.4324.150
|
||||||
description: >
|
description: >
|
||||||
Provide the full name and don't forget to add the version!
|
Provide the full name and don't forget to add the version!
|
||||||
|
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -2,7 +2,7 @@ blank_issues_enabled: false
|
|||||||
contact_links:
|
contact_links:
|
||||||
- name: Request a feature for the UI / Dashboards
|
- name: Request a feature for the UI / Dashboards
|
||||||
url: https://github.com/home-assistant/frontend/discussions/category_choices
|
url: https://github.com/home-assistant/frontend/discussions/category_choices
|
||||||
about: Request an new feature for the Home Assistant frontend.
|
about: Request a new feature for the Home Assistant frontend.
|
||||||
- name: Report a bug that is NOT related to the UI / Dashboards
|
- name: Report a bug that is NOT related to the UI / Dashboards
|
||||||
url: https://github.com/home-assistant/core/issues
|
url: https://github.com/home-assistant/core/issues
|
||||||
about: This is the issue tracker for our frontend. Please report other issues in the backend ("core") repository.
|
about: This is the issue tracker for our frontend. Please report other issues in the backend ("core") repository.
|
||||||
|
4
.github/workflows/cast_deployment.yaml
vendored
4
.github/workflows/cast_deployment.yaml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
ref: dev
|
ref: dev
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -62,7 +62,7 @@ jobs:
|
|||||||
ref: master
|
ref: master
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
46
.github/workflows/ci.yaml
vendored
46
.github/workflows/ci.yaml
vendored
@@ -26,20 +26,14 @@ jobs:
|
|||||||
- name: Check out files from GitHub
|
- name: Check out files from GitHub
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
id: setup-node
|
uses: actions/setup-node@v4.2.0
|
||||||
uses: actions/setup-node@v4.1.0
|
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
- uses: actions/cache@v4.2.0
|
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
|
||||||
path: "node_modules"
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('yarn.lock') }}
|
|
||||||
restore-keys: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
|
- name: Check for duplicate dependencies
|
||||||
|
run: yarn dedupe --check
|
||||||
- name: Build resources
|
- name: Build resources
|
||||||
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
|
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
|
||||||
- name: Setup lint cache
|
- name: Setup lint cache
|
||||||
@@ -66,19 +60,11 @@ jobs:
|
|||||||
- name: Check out files from GitHub
|
- name: Check out files from GitHub
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
id: setup-node
|
uses: actions/setup-node@v4.2.0
|
||||||
uses: actions/setup-node@v4.1.0
|
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
- uses: actions/cache@v4.2.0
|
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
|
||||||
path: "node_modules"
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('yarn.lock') }}
|
|
||||||
restore-keys: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
- name: Build resources
|
- name: Build resources
|
||||||
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
|
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
|
||||||
@@ -92,26 +78,18 @@ jobs:
|
|||||||
- name: Check out files from GitHub
|
- name: Check out files from GitHub
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
id: setup-node
|
uses: actions/setup-node@v4.2.0
|
||||||
uses: actions/setup-node@v4.1.0
|
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
- uses: actions/cache@v4.2.0
|
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
|
||||||
path: "node_modules"
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('yarn.lock') }}
|
|
||||||
restore-keys: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
- name: Build Application
|
- name: Build Application
|
||||||
run: ./node_modules/.bin/gulp build-app
|
run: ./node_modules/.bin/gulp build-app
|
||||||
env:
|
env:
|
||||||
IS_TEST: "true"
|
IS_TEST: "true"
|
||||||
- name: Upload bundle stats
|
- name: Upload bundle stats
|
||||||
uses: actions/upload-artifact@v4.4.3
|
uses: actions/upload-artifact@v4.6.0
|
||||||
with:
|
with:
|
||||||
name: frontend-bundle-stats
|
name: frontend-bundle-stats
|
||||||
path: build/stats/*.json
|
path: build/stats/*.json
|
||||||
@@ -124,26 +102,18 @@ jobs:
|
|||||||
- name: Check out files from GitHub
|
- name: Check out files from GitHub
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
id: setup-node
|
uses: actions/setup-node@v4.2.0
|
||||||
uses: actions/setup-node@v4.1.0
|
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
- uses: actions/cache@v4.2.0
|
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
|
||||||
path: "node_modules"
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('yarn.lock') }}
|
|
||||||
restore-keys: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
- name: Build Application
|
- name: Build Application
|
||||||
run: ./node_modules/.bin/gulp build-hassio
|
run: ./node_modules/.bin/gulp build-hassio
|
||||||
env:
|
env:
|
||||||
IS_TEST: "true"
|
IS_TEST: "true"
|
||||||
- name: Upload bundle stats
|
- name: Upload bundle stats
|
||||||
uses: actions/upload-artifact@v4.4.3
|
uses: actions/upload-artifact@v4.6.0
|
||||||
with:
|
with:
|
||||||
name: supervisor-bundle-stats
|
name: supervisor-bundle-stats
|
||||||
path: build/stats/*.json
|
path: build/stats/*.json
|
||||||
|
4
.github/workflows/demo_deployment.yaml
vendored
4
.github/workflows/demo_deployment.yaml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
ref: dev
|
ref: dev
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -63,7 +63,7 @@ jobs:
|
|||||||
ref: master
|
ref: master
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
2
.github/workflows/design_deployment.yaml
vendored
2
.github/workflows/design_deployment.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
2
.github/workflows/design_preview.yaml
vendored
2
.github/workflows/design_preview.yaml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
8
.github/workflows/nightly.yaml
vendored
8
.github/workflows/nightly.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
- cron: "0 1 * * *"
|
- cron: "0 1 * * *"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PYTHON_VERSION: "3.12"
|
PYTHON_VERSION: "3.13"
|
||||||
NODE_OPTIONS: --max_old_space_size=6144
|
NODE_OPTIONS: --max_old_space_size=6144
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -57,14 +57,14 @@ jobs:
|
|||||||
run: tar -czvf translations.tar.gz translations
|
run: tar -czvf translations.tar.gz translations
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v4.4.3
|
uses: actions/upload-artifact@v4.6.0
|
||||||
with:
|
with:
|
||||||
name: wheels
|
name: wheels
|
||||||
path: dist/home_assistant_frontend*.whl
|
path: dist/home_assistant_frontend*.whl
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload translations
|
- name: Upload translations
|
||||||
uses: actions/upload-artifact@v4.4.3
|
uses: actions/upload-artifact@v4.6.0
|
||||||
with:
|
with:
|
||||||
name: translations
|
name: translations
|
||||||
path: translations.tar.gz
|
path: translations.tar.gz
|
||||||
|
2
.github/workflows/release-drafter.yaml
vendored
2
.github/workflows/release-drafter.yaml
vendored
@@ -18,6 +18,6 @@ jobs:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: release-drafter/release-drafter@v6.0.0
|
- uses: release-drafter/release-drafter@v6.1.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
22
.github/workflows/release.yaml
vendored
22
.github/workflows/release.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
- published
|
- published
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PYTHON_VERSION: "3.12"
|
PYTHON_VERSION: "3.13"
|
||||||
NODE_OPTIONS: --max_old_space_size=6144
|
NODE_OPTIONS: --max_old_space_size=6144
|
||||||
|
|
||||||
# Set default workflow permissions
|
# Set default workflow permissions
|
||||||
@@ -25,16 +25,16 @@ jobs:
|
|||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: Verify version
|
|
||||||
uses: home-assistant/actions/helpers/verify-version@master
|
|
||||||
|
|
||||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
|
- name: Verify version
|
||||||
|
uses: home-assistant/actions/helpers/verify-version@master
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
script/release
|
script/release
|
||||||
|
|
||||||
- name: Upload release assets
|
- name: Upload release assets
|
||||||
uses: softprops/action-gh-release@v2.1.0
|
uses: softprops/action-gh-release@v2.2.1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
dist/*.whl
|
dist/*.whl
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: home-assistant/wheels@2024.11.0
|
uses: home-assistant/wheels@2024.11.0
|
||||||
with:
|
with:
|
||||||
abi: cp312
|
abi: cp313
|
||||||
tag: musllinux_1_2
|
tag: musllinux_1_2
|
||||||
arch: amd64
|
arch: amd64
|
||||||
wheels-key: ${{ secrets.WHEELS_KEY }}
|
wheels-key: ${{ secrets.WHEELS_KEY }}
|
||||||
@@ -92,7 +92,7 @@ jobs:
|
|||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -107,7 +107,7 @@ jobs:
|
|||||||
- name: Tar folder
|
- name: Tar folder
|
||||||
run: tar -czf landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz -C landing-page/dist .
|
run: tar -czf landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz -C landing-page/dist .
|
||||||
- name: Upload release asset
|
- name: Upload release asset
|
||||||
uses: softprops/action-gh-release@v2.1.0
|
uses: softprops/action-gh-release@v2.2.1
|
||||||
with:
|
with:
|
||||||
files: landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz
|
files: landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ jobs:
|
|||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -136,6 +136,6 @@ jobs:
|
|||||||
- name: Tar folder
|
- name: Tar folder
|
||||||
run: tar -czf hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz -C hassio/build .
|
run: tar -czf hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz -C hassio/build .
|
||||||
- name: Upload release asset
|
- name: Upload release asset
|
||||||
uses: softprops/action-gh-release@v2.1.0
|
uses: softprops/action-gh-release@v2.2.1
|
||||||
with:
|
with:
|
||||||
files: hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz
|
files: hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz
|
||||||
|
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 90 days stale policy
|
- name: 90 days stale policy
|
||||||
uses: actions/stale@v9.0.0
|
uses: actions/stale@v9.1.0
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
days-before-stale: 90
|
days-before-stale: 90
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -6,4 +6,4 @@ enableGlobalCache: false
|
|||||||
|
|
||||||
nodeLinker: node-modules
|
nodeLinker: node-modules
|
||||||
|
|
||||||
yarnPath: .yarn/releases/yarn-4.5.3.cjs
|
yarnPath: .yarn/releases/yarn-4.6.0.cjs
|
||||||
|
@@ -5,7 +5,7 @@ import paths from "../paths.cjs";
|
|||||||
const POLYFILL_DIR = join(paths.polymer_dir, "src/resources/polyfills");
|
const POLYFILL_DIR = join(paths.polymer_dir, "src/resources/polyfills");
|
||||||
|
|
||||||
// List of polyfill keys with supported browser targets for the functionality
|
// List of polyfill keys with supported browser targets for the functionality
|
||||||
const PolyfillSupport = {
|
const polyfillSupport = {
|
||||||
// Note states and shadowRoot properties should be supported.
|
// Note states and shadowRoot properties should be supported.
|
||||||
"element-internals": {
|
"element-internals": {
|
||||||
android: 90,
|
android: 90,
|
||||||
@@ -18,17 +18,6 @@ const PolyfillSupport = {
|
|||||||
safari: 17.4,
|
safari: 17.4,
|
||||||
samsung: 15.0,
|
samsung: 15.0,
|
||||||
},
|
},
|
||||||
"element-append": {
|
|
||||||
android: 54,
|
|
||||||
chrome: 54,
|
|
||||||
edge: 17,
|
|
||||||
firefox: 49,
|
|
||||||
ios: 10.0,
|
|
||||||
opera: 41,
|
|
||||||
opera_mobile: 41,
|
|
||||||
safari: 10.0,
|
|
||||||
samsung: 6.0,
|
|
||||||
},
|
|
||||||
"element-getattributenames": {
|
"element-getattributenames": {
|
||||||
android: 61,
|
android: 61,
|
||||||
chrome: 61,
|
chrome: 61,
|
||||||
@@ -51,27 +40,18 @@ const PolyfillSupport = {
|
|||||||
safari: 12.0,
|
safari: 12.0,
|
||||||
samsung: 10.0,
|
samsung: 10.0,
|
||||||
},
|
},
|
||||||
fetch: {
|
// FormatJS polyfill detects fix for https://bugs.chromium.org/p/v8/issues/detail?id=10682,
|
||||||
android: 42,
|
// so adjusted to several months after that was marked fixed
|
||||||
chrome: 42,
|
|
||||||
edge: 14,
|
|
||||||
firefox: 39,
|
|
||||||
ios: 10.3,
|
|
||||||
opera: 29,
|
|
||||||
opera_mobile: 29,
|
|
||||||
safari: 10.1,
|
|
||||||
samsung: 4.0,
|
|
||||||
},
|
|
||||||
"intl-getcanonicallocales": {
|
"intl-getcanonicallocales": {
|
||||||
android: 54,
|
android: 90,
|
||||||
chrome: 54,
|
chrome: 90,
|
||||||
edge: 16,
|
edge: 90,
|
||||||
firefox: 48,
|
firefox: 48,
|
||||||
ios: 10.3,
|
ios: 10.3,
|
||||||
opera: 41,
|
opera: 76,
|
||||||
opera_mobile: 41,
|
opera_mobile: 64,
|
||||||
safari: 10.1,
|
safari: 10.1,
|
||||||
samsung: 6.0,
|
samsung: 15.0,
|
||||||
},
|
},
|
||||||
"intl-locale": {
|
"intl-locale": {
|
||||||
android: 74,
|
android: 74,
|
||||||
@@ -87,17 +67,6 @@ const PolyfillSupport = {
|
|||||||
"intl-other": {
|
"intl-other": {
|
||||||
// Not specified (i.e. always try polyfill) since compatibility depends on supported locales
|
// Not specified (i.e. always try polyfill) since compatibility depends on supported locales
|
||||||
},
|
},
|
||||||
proxy: {
|
|
||||||
android: 49,
|
|
||||||
chrome: 49,
|
|
||||||
edge: 12,
|
|
||||||
firefox: 18,
|
|
||||||
ios: 10.0,
|
|
||||||
opera: 36,
|
|
||||||
opera_mobile: 36,
|
|
||||||
safari: 10.0,
|
|
||||||
samsung: 5.0,
|
|
||||||
},
|
|
||||||
"resize-observer": {
|
"resize-observer": {
|
||||||
android: 64,
|
android: 64,
|
||||||
chrome: 64,
|
chrome: 64,
|
||||||
@@ -115,8 +84,6 @@ const PolyfillSupport = {
|
|||||||
// corresponding polyfill key and actual module to import
|
// corresponding polyfill key and actual module to import
|
||||||
const polyfillMap = {
|
const polyfillMap = {
|
||||||
global: {
|
global: {
|
||||||
fetch: { key: "fetch", module: "unfetch/polyfill" },
|
|
||||||
Proxy: { key: "proxy", module: "proxy-polyfill" },
|
|
||||||
ResizeObserver: {
|
ResizeObserver: {
|
||||||
key: "resize-observer",
|
key: "resize-observer",
|
||||||
module: join(POLYFILL_DIR, "resize-observer.ts"),
|
module: join(POLYFILL_DIR, "resize-observer.ts"),
|
||||||
@@ -128,7 +95,7 @@ const polyfillMap = {
|
|||||||
module: "element-internals-polyfill",
|
module: "element-internals-polyfill",
|
||||||
},
|
},
|
||||||
...Object.fromEntries(
|
...Object.fromEntries(
|
||||||
["append", "getAttributeNames", "toggleAttribute"].map((prop) => {
|
["getAttributeNames", "toggleAttribute"].map((prop) => {
|
||||||
const key = `element-${prop.toLowerCase()}`;
|
const key = `element-${prop.toLowerCase()}`;
|
||||||
return [prop, { key, module: join(POLYFILL_DIR, `${key}.ts`) }];
|
return [prop, { key, module: join(POLYFILL_DIR, `${key}.ts`) }];
|
||||||
})
|
})
|
||||||
@@ -168,7 +135,7 @@ export default defineProvider(
|
|||||||
const resolvePolyfill = createMetaResolver(polyfillMap);
|
const resolvePolyfill = createMetaResolver(polyfillMap);
|
||||||
return {
|
return {
|
||||||
name: "custom-polyfill",
|
name: "custom-polyfill",
|
||||||
polyfills: PolyfillSupport,
|
polyfills: polyfillSupport,
|
||||||
usageGlobal(meta, utils) {
|
usageGlobal(meta, utils) {
|
||||||
const polyfill = resolvePolyfill(meta);
|
const polyfill = resolvePolyfill(meta);
|
||||||
if (polyfill && shouldInjectPolyfill(polyfill.desc.key)) {
|
if (polyfill && shouldInjectPolyfill(polyfill.desc.key)) {
|
||||||
|
@@ -9,7 +9,7 @@ export default [
|
|||||||
"import/extensions": "off",
|
"import/extensions": "off",
|
||||||
"import/no-dynamic-require": "off",
|
"import/no-dynamic-require": "off",
|
||||||
"global-require": "off",
|
"global-require": "off",
|
||||||
"@typescript-eslint/no-var-requires": "off",
|
"@typescript-eslint/no-require-imports": "off",
|
||||||
"prefer-arrow-callback": "off",
|
"prefer-arrow-callback": "off",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
import { constants } from "node:zlib";
|
import { constants } from "node:zlib";
|
||||||
import gulp from "gulp";
|
import gulp from "gulp";
|
||||||
import brotli from "gulp-brotli";
|
import brotli from "gulp-brotli";
|
||||||
|
import zopfli from "gulp-zopfli-green";
|
||||||
import paths from "../paths.cjs";
|
import paths from "../paths.cjs";
|
||||||
|
|
||||||
const filesGlob = "*.{js,json,css,svg,xml}";
|
const filesGlob = "*.{js,json,css,svg,xml}";
|
||||||
@@ -12,29 +13,74 @@ const brotliOptions = {
|
|||||||
[constants.BROTLI_PARAM_QUALITY]: constants.BROTLI_MAX_QUALITY,
|
[constants.BROTLI_PARAM_QUALITY]: constants.BROTLI_MAX_QUALITY,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
const zopfliOptions = { threshold: 150 };
|
||||||
|
|
||||||
const compressDistBrotli = (rootDir, modernDir, compressServiceWorker = true) =>
|
const compressModern = (rootDir, modernDir, compress) =>
|
||||||
|
gulp
|
||||||
|
.src([`${modernDir}/**/${filesGlob}`, `${rootDir}/sw-modern.js`], {
|
||||||
|
base: rootDir,
|
||||||
|
allowEmpty: true,
|
||||||
|
})
|
||||||
|
.pipe(compress === "zopfli" ? zopfli(zopfliOptions) : brotli(brotliOptions))
|
||||||
|
.pipe(gulp.dest(rootDir));
|
||||||
|
|
||||||
|
const compressOther = (rootDir, modernDir, compress) =>
|
||||||
gulp
|
gulp
|
||||||
.src(
|
.src(
|
||||||
[
|
[
|
||||||
`${modernDir}/**/${filesGlob}`,
|
`${rootDir}/**/${filesGlob}`,
|
||||||
compressServiceWorker ? `${rootDir}/sw-modern.js` : undefined,
|
`!${modernDir}/**/${filesGlob}`,
|
||||||
].filter(Boolean),
|
`!${rootDir}/{sw-modern,service_worker}.js`,
|
||||||
{
|
`${rootDir}/{authorize,onboarding}.html`,
|
||||||
base: rootDir,
|
],
|
||||||
}
|
{ base: rootDir, allowEmpty: true }
|
||||||
)
|
)
|
||||||
.pipe(brotli(brotliOptions))
|
.pipe(compress === "zopfli" ? zopfli(zopfliOptions) : brotli(brotliOptions))
|
||||||
.pipe(gulp.dest(rootDir));
|
.pipe(gulp.dest(rootDir));
|
||||||
|
|
||||||
const compressAppBrotli = () =>
|
const compressAppModernBrotli = () =>
|
||||||
compressDistBrotli(paths.app_output_root, paths.app_output_latest);
|
compressModern(paths.app_output_root, paths.app_output_latest, "brotli");
|
||||||
const compressHassioBrotli = () =>
|
const compressAppModernZopfli = () =>
|
||||||
compressDistBrotli(
|
compressModern(paths.app_output_root, paths.app_output_latest, "zopfli");
|
||||||
|
|
||||||
|
const compressHassioModernBrotli = () =>
|
||||||
|
compressModern(
|
||||||
paths.hassio_output_root,
|
paths.hassio_output_root,
|
||||||
paths.hassio_output_latest,
|
paths.hassio_output_latest,
|
||||||
false
|
"brotli"
|
||||||
|
);
|
||||||
|
const compressHassioModernZopfli = () =>
|
||||||
|
compressModern(
|
||||||
|
paths.hassio_output_root,
|
||||||
|
paths.hassio_output_latest,
|
||||||
|
"zopfli"
|
||||||
);
|
);
|
||||||
|
|
||||||
gulp.task("compress-app", compressAppBrotli);
|
const compressAppOtherBrotli = () =>
|
||||||
gulp.task("compress-hassio", compressHassioBrotli);
|
compressOther(paths.app_output_root, paths.app_output_latest, "brotli");
|
||||||
|
const compressAppOtherZopfli = () =>
|
||||||
|
compressOther(paths.app_output_root, paths.app_output_latest, "zopfli");
|
||||||
|
|
||||||
|
const compressHassioOtherBrotli = () =>
|
||||||
|
compressOther(paths.hassio_output_root, paths.hassio_output_latest, "brotli");
|
||||||
|
const compressHassioOtherZopfli = () =>
|
||||||
|
compressOther(paths.hassio_output_root, paths.hassio_output_latest, "zopfli");
|
||||||
|
|
||||||
|
gulp.task(
|
||||||
|
"compress-app",
|
||||||
|
gulp.parallel(
|
||||||
|
compressAppModernBrotli,
|
||||||
|
compressAppOtherBrotli,
|
||||||
|
compressAppModernZopfli,
|
||||||
|
compressAppOtherZopfli
|
||||||
|
)
|
||||||
|
);
|
||||||
|
gulp.task(
|
||||||
|
"compress-hassio",
|
||||||
|
gulp.parallel(
|
||||||
|
compressHassioModernBrotli,
|
||||||
|
compressHassioOtherBrotli,
|
||||||
|
compressHassioModernZopfli,
|
||||||
|
compressHassioOtherZopfli
|
||||||
|
)
|
||||||
|
);
|
||||||
|
@@ -67,12 +67,6 @@ function copyPolyfills(staticDir) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyLoaderJS(staticDir) {
|
|
||||||
const staticPath = genStaticPath(staticDir);
|
|
||||||
copyFileDir(npmPath("systemjs/dist/s.min.js"), staticPath("js"));
|
|
||||||
copyFileDir(npmPath("systemjs/dist/s.min.js.map"), staticPath("js"));
|
|
||||||
}
|
|
||||||
|
|
||||||
function copyFonts(staticDir) {
|
function copyFonts(staticDir) {
|
||||||
const staticPath = genStaticPath(staticDir);
|
const staticPath = genStaticPath(staticDir);
|
||||||
// Local fonts
|
// Local fonts
|
||||||
@@ -140,8 +134,6 @@ gulp.task("copy-static-app", async () => {
|
|||||||
const staticDir = paths.app_output_static;
|
const staticDir = paths.app_output_static;
|
||||||
// Basic static files
|
// Basic static files
|
||||||
fs.copySync(polyPath("public"), paths.app_output_root);
|
fs.copySync(polyPath("public"), paths.app_output_root);
|
||||||
|
|
||||||
copyLoaderJS(staticDir);
|
|
||||||
copyPolyfills(staticDir);
|
copyPolyfills(staticDir);
|
||||||
copyFonts(staticDir);
|
copyFonts(staticDir);
|
||||||
copyTranslations(staticDir);
|
copyTranslations(staticDir);
|
||||||
@@ -164,8 +156,6 @@ gulp.task("copy-static-demo", async () => {
|
|||||||
);
|
);
|
||||||
// Copy demo static files
|
// Copy demo static files
|
||||||
fs.copySync(path.resolve(paths.demo_dir, "public"), paths.demo_output_root);
|
fs.copySync(path.resolve(paths.demo_dir, "public"), paths.demo_output_root);
|
||||||
|
|
||||||
copyLoaderJS(paths.demo_output_static);
|
|
||||||
copyPolyfills(paths.demo_output_static);
|
copyPolyfills(paths.demo_output_static);
|
||||||
copyMapPanel(paths.demo_output_static);
|
copyMapPanel(paths.demo_output_static);
|
||||||
copyFonts(paths.demo_output_static);
|
copyFonts(paths.demo_output_static);
|
||||||
@@ -179,8 +169,6 @@ gulp.task("copy-static-cast", async () => {
|
|||||||
fs.copySync(polyPath("public/static"), paths.cast_output_static);
|
fs.copySync(polyPath("public/static"), paths.cast_output_static);
|
||||||
// Copy cast static files
|
// Copy cast static files
|
||||||
fs.copySync(path.resolve(paths.cast_dir, "public"), paths.cast_output_root);
|
fs.copySync(path.resolve(paths.cast_dir, "public"), paths.cast_output_root);
|
||||||
|
|
||||||
copyLoaderJS(paths.cast_output_static);
|
|
||||||
copyPolyfills(paths.cast_output_static);
|
copyPolyfills(paths.cast_output_static);
|
||||||
copyMapPanel(paths.cast_output_static);
|
copyMapPanel(paths.cast_output_static);
|
||||||
copyFonts(paths.cast_output_static);
|
copyFonts(paths.cast_output_static);
|
||||||
|
17
build-scripts/gulp/index.mjs
Normal file
17
build-scripts/gulp/index.mjs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import "./app.js";
|
||||||
|
import "./cast.js";
|
||||||
|
import "./clean.js";
|
||||||
|
import "./compress.js";
|
||||||
|
import "./demo.js";
|
||||||
|
import "./download-translations.js";
|
||||||
|
import "./entry-html.js";
|
||||||
|
import "./fetch-nightly-translations.js";
|
||||||
|
import "./gallery.js";
|
||||||
|
import "./gather-static.js";
|
||||||
|
import "./gen-icons-json.js";
|
||||||
|
import "./hassio.js";
|
||||||
|
import "./landing-page.js";
|
||||||
|
import "./locale-data.js";
|
||||||
|
import "./rspack.js";
|
||||||
|
import "./service-worker.js";
|
||||||
|
import "./translations.js";
|
@@ -25,7 +25,7 @@ Home Assistant Cast is made up of two separate applications:
|
|||||||
|
|
||||||
### Setting dev variables
|
### Setting dev variables
|
||||||
|
|
||||||
Open `src/cast/dev_const.ts` and change `CAST_DEV_APP_ID` to the ID of the app you just created. And set the `CAST_DEV_HASS_URL` to the url of you development machine.
|
Open `src/cast/dev_const.ts` and change `CAST_DEV_APP_ID` to the ID of the app you just created. And set the `CAST_DEV_HASS_URL` to the url of your development machine.
|
||||||
|
|
||||||
### Changing configuration
|
### Changing configuration
|
||||||
|
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
|
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background-color: white;
|
|
||||||
font-size: initial;
|
font-size: initial;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -3,7 +3,7 @@ import "@material/mwc-list/mwc-list";
|
|||||||
import type { ActionDetail } from "@material/mwc-list/mwc-list";
|
import type { ActionDetail } from "@material/mwc-list/mwc-list";
|
||||||
import { mdiCast, mdiCastConnected, mdiViewDashboard } from "@mdi/js";
|
import { mdiCast, mdiCastConnected, mdiViewDashboard } from "@mdi/js";
|
||||||
import type { Auth, Connection } from "home-assistant-js-websocket";
|
import type { Auth, Connection } from "home-assistant-js-websocket";
|
||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { LitElement, css, html } from "lit";
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import type { CastManager } from "../../../../src/cast/cast_manager";
|
import type { CastManager } from "../../../../src/cast/cast_manager";
|
||||||
@@ -203,74 +203,72 @@ class HcCast extends LitElement {
|
|||||||
}
|
}
|
||||||
this.connection.close();
|
this.connection.close();
|
||||||
location.reload();
|
location.reload();
|
||||||
} catch (err: any) {
|
} catch (_err: any) {
|
||||||
alert("Unable to log out!");
|
alert("Unable to log out!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
.center-item {
|
||||||
.center-item {
|
display: flex;
|
||||||
display: flex;
|
justify-content: space-around;
|
||||||
justify-content: space-around;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.action-item {
|
.action-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.question {
|
.question {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.question:before {
|
.question:before {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
content: "";
|
content: "";
|
||||||
background-color: var(--primary-color);
|
background-color: var(--primary-color);
|
||||||
opacity: 0.12;
|
opacity: 0.12;
|
||||||
will-change: opacity;
|
will-change: opacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connection,
|
.connection,
|
||||||
.connection a {
|
.connection a {
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
mwc-button ha-svg-icon {
|
mwc-button ha-svg-icon {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
margin-inline-end: 8px;
|
margin-inline-end: 8px;
|
||||||
margin-inline-start: initial;
|
margin-inline-start: initial;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ha-list-item ha-icon,
|
ha-list-item ha-icon,
|
||||||
ha-list-item ha-svg-icon {
|
ha-list-item ha-svg-icon {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
:host([hide-icons]) ha-icon {
|
:host([hide-icons]) ha-icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spacer {
|
.spacer {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-content a {
|
.card-content a {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -13,7 +13,7 @@ import {
|
|||||||
ERR_INVALID_HTTPS_TO_HTTP,
|
ERR_INVALID_HTTPS_TO_HTTP,
|
||||||
getAuth,
|
getAuth,
|
||||||
} from "home-assistant-js-websocket";
|
} from "home-assistant-js-websocket";
|
||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { css, html, LitElement } from "lit";
|
import { css, html, LitElement } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
import type { CastManager } from "../../../../src/cast/cast_manager";
|
import type { CastManager } from "../../../../src/cast/cast_manager";
|
||||||
@@ -215,7 +215,7 @@ export class HcConnect extends LitElement {
|
|||||||
let url: URL;
|
let url: URL;
|
||||||
try {
|
try {
|
||||||
url = new URL(value);
|
url = new URL(value);
|
||||||
} catch (err: any) {
|
} catch (_err: any) {
|
||||||
this.error = "Invalid URL";
|
this.error = "Invalid URL";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -252,7 +252,7 @@ export class HcConnect extends LitElement {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
// Clear url if we have a auth callback in url.
|
// Clear url if we have an auth callback in url.
|
||||||
if (location.search.includes("auth_callback=1")) {
|
if (location.search.includes("auth_callback=1")) {
|
||||||
history.replaceState(null, "", location.pathname);
|
history.replaceState(null, "", location.pathname);
|
||||||
}
|
}
|
||||||
@@ -288,41 +288,39 @@ export class HcConnect extends LitElement {
|
|||||||
try {
|
try {
|
||||||
saveTokens(null);
|
saveTokens(null);
|
||||||
location.reload();
|
location.reload();
|
||||||
} catch (err: any) {
|
} catch (_err: any) {
|
||||||
alert("Unable to log out!");
|
alert("Unable to log out!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
.card-content a {
|
||||||
.card-content a {
|
color: var(--primary-color);
|
||||||
color: var(--primary-color);
|
}
|
||||||
}
|
.card-actions a {
|
||||||
.card-actions a {
|
text-decoration: none;
|
||||||
text-decoration: none;
|
}
|
||||||
}
|
.error {
|
||||||
.error {
|
color: red;
|
||||||
color: red;
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.error a {
|
.error a {
|
||||||
color: darkred;
|
color: darkred;
|
||||||
}
|
}
|
||||||
|
|
||||||
mwc-button ha-svg-icon {
|
mwc-button ha-svg-icon {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spacer {
|
.spacer {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ha-textfield {
|
ha-textfield {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import type { Auth, Connection, HassUser } from "home-assistant-js-websocket";
|
import type { Auth, Connection, HassUser } from "home-assistant-js-websocket";
|
||||||
import { getUser } from "home-assistant-js-websocket";
|
import { getUser } from "home-assistant-js-websocket";
|
||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { css, html, LitElement } from "lit";
|
import { css, html, LitElement } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
@@ -63,96 +63,94 @@ class HcLayout extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
:host {
|
||||||
|
display: flex;
|
||||||
|
min-height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
ha-card {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
color: var(--ha-card-header-color, var(--primary-text-color));
|
||||||
|
font-family: var(--ha-card-header-font-family, inherit);
|
||||||
|
font-size: var(--ha-card-header-font-size, 24px);
|
||||||
|
letter-spacing: -0.012em;
|
||||||
|
line-height: 32px;
|
||||||
|
padding: 24px 16px 16px;
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero {
|
||||||
|
border-radius: 4px 4px 0 0;
|
||||||
|
}
|
||||||
|
.subtitle {
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
line-height: initial;
|
||||||
|
}
|
||||||
|
.subtitle a {
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
:host ::slotted(.card-content:not(:first-child)),
|
||||||
|
slot:not(:first-child)::slotted(.card-content) {
|
||||||
|
padding-top: 0px;
|
||||||
|
margin-top: -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:host ::slotted(.section-header) {
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 4px 16px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
:host ::slotted(.card-content) {
|
||||||
|
padding: 16px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
:host ::slotted(.card-actions) {
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 5px 16px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 8px 0 24px;
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
}
|
||||||
|
.footer a {
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 500px) {
|
||||||
:host {
|
:host {
|
||||||
display: flex;
|
justify-content: flex-start;
|
||||||
min-height: 100%;
|
min-height: 90%;
|
||||||
align-items: center;
|
margin-bottom: 30px;
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ha-card {
|
`;
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
max-width: 500px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layout {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-header {
|
|
||||||
color: var(--ha-card-header-color, var(--primary-text-color));
|
|
||||||
font-family: var(--ha-card-header-font-family, inherit);
|
|
||||||
font-size: var(--ha-card-header-font-size, 24px);
|
|
||||||
letter-spacing: -0.012em;
|
|
||||||
line-height: 32px;
|
|
||||||
padding: 24px 16px 16px;
|
|
||||||
display: block;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero {
|
|
||||||
border-radius: 4px 4px 0 0;
|
|
||||||
}
|
|
||||||
.subtitle {
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
line-height: initial;
|
|
||||||
}
|
|
||||||
.subtitle a {
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
:host ::slotted(.card-content:not(:first-child)),
|
|
||||||
slot:not(:first-child)::slotted(.card-content) {
|
|
||||||
padding-top: 0px;
|
|
||||||
margin-top: -8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host ::slotted(.section-header) {
|
|
||||||
font-weight: 500;
|
|
||||||
padding: 4px 16px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host ::slotted(.card-content) {
|
|
||||||
padding: 16px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host ::slotted(.card-actions) {
|
|
||||||
border-top: 1px solid #e8e8e8;
|
|
||||||
padding: 5px 16px;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 12px;
|
|
||||||
padding: 8px 0 24px;
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
}
|
|
||||||
.footer a {
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-width: 500px) {
|
|
||||||
:host {
|
|
||||||
justify-content: flex-start;
|
|
||||||
min-height: 90%;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { css, html, LitElement } from "lit";
|
import { css, html, LitElement } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import type { HomeAssistant } from "../../../../src/types";
|
import type { HomeAssistant } from "../../../../src/types";
|
||||||
@@ -24,31 +24,29 @@ class HcLaunchScreen extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
:host {
|
||||||
:host {
|
display: block;
|
||||||
display: block;
|
height: 100vh;
|
||||||
height: 100vh;
|
background-color: #f2f4f9;
|
||||||
background-color: #f2f4f9;
|
font-size: 24px;
|
||||||
font-size: 24px;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
flex-direction: column;
|
text-align: center;
|
||||||
text-align: center;
|
align-items: center;
|
||||||
align-items: center;
|
height: 100%;
|
||||||
height: 100%;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
img {
|
||||||
img {
|
max-width: 80%;
|
||||||
max-width: 80%;
|
object-fit: cover;
|
||||||
object-fit: cover;
|
}
|
||||||
}
|
.status {
|
||||||
.status {
|
color: #1d2126;
|
||||||
color: #1d2126;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -1,10 +1,4 @@
|
|||||||
import {
|
import { css, html, LitElement, type TemplateResult } from "lit";
|
||||||
css,
|
|
||||||
type CSSResultGroup,
|
|
||||||
html,
|
|
||||||
LitElement,
|
|
||||||
type TemplateResult,
|
|
||||||
} from "lit";
|
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import { fireEvent } from "../../../../src/common/dom/fire_event";
|
import { fireEvent } from "../../../../src/common/dom/fire_event";
|
||||||
import type { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
|
import type { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
|
||||||
@@ -14,6 +8,7 @@ import "../../../../src/panels/lovelace/views/hui-view";
|
|||||||
import "../../../../src/panels/lovelace/views/hui-view-container";
|
import "../../../../src/panels/lovelace/views/hui-view-container";
|
||||||
import type { HomeAssistant } from "../../../../src/types";
|
import type { HomeAssistant } from "../../../../src/types";
|
||||||
import "./hc-launch-screen";
|
import "./hc-launch-screen";
|
||||||
|
import "../../../../src/panels/lovelace/views/hui-view-background";
|
||||||
|
|
||||||
(window as any).loadCardHelpers = () =>
|
(window as any).loadCardHelpers = () =>
|
||||||
import("../../../../src/panels/lovelace/custom-card-helpers");
|
import("../../../../src/panels/lovelace/custom-card-helpers");
|
||||||
@@ -57,11 +52,9 @@ class HcLovelace extends LitElement {
|
|||||||
const background = viewConfig.background || this.lovelaceConfig.background;
|
const background = viewConfig.background || this.lovelaceConfig.background;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<hui-view-container
|
<hui-view-container .hass=${this.hass} .theme=${viewConfig.theme}>
|
||||||
.hass=${this.hass}
|
<hui-view-background .hass=${this.hass} .background=${background}>
|
||||||
.background=${background}
|
</hui-view-background>
|
||||||
.theme=${viewConfig.theme}
|
|
||||||
>
|
|
||||||
<hui-view
|
<hui-view
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.lovelace=${lovelace}
|
.lovelace=${lovelace}
|
||||||
@@ -118,20 +111,18 @@ class HcLovelace extends LitElement {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
hui-view-container {
|
||||||
hui-view-container {
|
display: flex;
|
||||||
display: flex;
|
position: relative;
|
||||||
position: relative;
|
min-height: 100vh;
|
||||||
min-height: 100vh;
|
box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
}
|
||||||
}
|
hui-view-container > * {
|
||||||
hui-view {
|
flex: 1 1 100%;
|
||||||
flex: 1 1 100%;
|
max-width: 100%;
|
||||||
max-width: 100%;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CastViewChanged {
|
export interface CastViewChanged {
|
||||||
|
@@ -3,7 +3,7 @@ import type { Lovelace } from "../../../src/panels/lovelace/types";
|
|||||||
import { energyEntities } from "../stubs/entities";
|
import { energyEntities } from "../stubs/entities";
|
||||||
import type { DemoConfig } from "./types";
|
import type { DemoConfig } from "./types";
|
||||||
|
|
||||||
export const demoConfigs: Array<() => Promise<DemoConfig>> = [
|
export const demoConfigs: (() => Promise<DemoConfig>)[] = [
|
||||||
() => import("./sections").then((mod) => mod.demoSections),
|
() => import("./sections").then((mod) => mod.demoSections),
|
||||||
() => import("./arsaboo").then((mod) => mod.demoArsaboo),
|
() => import("./arsaboo").then((mod) => mod.demoArsaboo),
|
||||||
() => import("./teachingbirds").then((mod) => mod.demoTeachingbirds),
|
() => import("./teachingbirds").then((mod) => mod.demoTeachingbirds),
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import { mdiTelevision } from "@mdi/js";
|
import { mdiTelevision } from "@mdi/js";
|
||||||
import type { CSSResultGroup } from "lit";
|
|
||||||
import { css, html, LitElement, nothing } from "lit";
|
import { css, html, LitElement, nothing } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
import type { CastManager } from "../../../src/cast/cast_manager";
|
import type { CastManager } from "../../../src/cast/cast_manager";
|
||||||
@@ -67,37 +66,35 @@ class CastDemoRow extends LitElement implements LovelaceRow {
|
|||||||
this.style.display = this._castManager ? "" : "none";
|
this.style.display = this._castManager ? "" : "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
:host {
|
||||||
:host {
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
}
|
||||||
}
|
ha-svg-icon {
|
||||||
ha-svg-icon {
|
padding: 8px;
|
||||||
padding: 8px;
|
color: var(--paper-item-icon-color);
|
||||||
color: var(--paper-item-icon-color);
|
}
|
||||||
}
|
.flex {
|
||||||
.flex {
|
flex: 1;
|
||||||
flex: 1;
|
overflow: hidden;
|
||||||
overflow: hidden;
|
margin-left: 16px;
|
||||||
margin-left: 16px;
|
display: flex;
|
||||||
display: flex;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
align-items: center;
|
||||||
align-items: center;
|
}
|
||||||
}
|
.name {
|
||||||
.name {
|
white-space: nowrap;
|
||||||
white-space: nowrap;
|
overflow: hidden;
|
||||||
overflow: hidden;
|
text-overflow: ellipsis;
|
||||||
text-overflow: ellipsis;
|
}
|
||||||
}
|
google-cast-launcher {
|
||||||
google-cast-launcher {
|
cursor: pointer;
|
||||||
cursor: pointer;
|
display: inline-block;
|
||||||
display: inline-block;
|
height: 24px;
|
||||||
height: 24px;
|
width: 24px;
|
||||||
width: 24px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -32,6 +32,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
|||||||
return this._hidden ? 0 : 2;
|
return this._hidden ? 0 : 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
public setConfig(_config: LovelaceCardConfig) {}
|
public setConfig(_config: LovelaceCardConfig) {}
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
|
@@ -131,6 +131,7 @@ export const mockHistory = (mockHass: MockHomeAssistant) => {
|
|||||||
});
|
});
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
return () => {};
|
return () => {};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@@ -43,7 +43,7 @@ customElements.whenDefined("hui-root").then(() => {
|
|||||||
const index = (ev as CustomEvent).detail.index;
|
const index = (ev as CustomEvent).detail.index;
|
||||||
try {
|
try {
|
||||||
await setDemoConfig(this.hass, this.lovelace!, index);
|
await setDemoConfig(this.hass, this.lovelace!, index);
|
||||||
} catch (err: any) {
|
} catch (_err: any) {
|
||||||
setDemoConfig(this.hass, this.lovelace!, selectedDemoConfigIndex);
|
setDemoConfig(this.hass, this.lovelace!, selectedDemoConfigIndex);
|
||||||
alert("Failed to switch config :-(");
|
alert("Failed to switch config :-(");
|
||||||
}
|
}
|
||||||
|
@@ -15,6 +15,7 @@ export const mockPersistentNotification = (hass: MockHomeAssistant) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as PersistentNotificationMessage);
|
} as PersistentNotificationMessage);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
return () => {};
|
return () => {};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@@ -15,7 +15,7 @@ import type { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
|
|||||||
const generateMeanStatistics = (
|
const generateMeanStatistics = (
|
||||||
start: Date,
|
start: Date,
|
||||||
end: Date,
|
end: Date,
|
||||||
// eslint-disable-next-line @typescript-eslint/default-param-last
|
// eslint-disable-next-line default-param-last
|
||||||
period: "5minute" | "hour" | "day" | "month" = "hour",
|
period: "5minute" | "hour" | "day" | "month" = "hour",
|
||||||
initValue: number,
|
initValue: number,
|
||||||
maxDiff: number
|
maxDiff: number
|
||||||
@@ -52,7 +52,7 @@ const generateMeanStatistics = (
|
|||||||
const generateSumStatistics = (
|
const generateSumStatistics = (
|
||||||
start: Date,
|
start: Date,
|
||||||
end: Date,
|
end: Date,
|
||||||
// eslint-disable-next-line @typescript-eslint/default-param-last
|
// eslint-disable-next-line default-param-last
|
||||||
period: "5minute" | "hour" | "day" | "month" = "hour",
|
period: "5minute" | "hour" | "day" | "month" = "hour",
|
||||||
initValue: number,
|
initValue: number,
|
||||||
maxDiff: number
|
maxDiff: number
|
||||||
@@ -89,7 +89,7 @@ const generateSumStatistics = (
|
|||||||
const generateCurvedStatistics = (
|
const generateCurvedStatistics = (
|
||||||
start: Date,
|
start: Date,
|
||||||
end: Date,
|
end: Date,
|
||||||
// eslint-disable-next-line @typescript-eslint/default-param-last
|
// eslint-disable-next-line default-param-last
|
||||||
_period: "5minute" | "hour" | "day" | "month" = "hour",
|
_period: "5minute" | "hour" | "day" | "month" = "hour",
|
||||||
initValue: number,
|
initValue: number,
|
||||||
maxDiff: number,
|
maxDiff: number,
|
||||||
|
@@ -11,6 +11,7 @@ export const mockTemplate = (hass: MockHomeAssistant) => {
|
|||||||
result: msg.template,
|
result: msg.template,
|
||||||
listeners: { all: false, domains: [], entities: [], time: false },
|
listeners: { all: false, domains: [], entities: [], time: false },
|
||||||
});
|
});
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
return () => {};
|
return () => {};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@@ -22,5 +22,6 @@ export const mockTodo = (hass: MockHomeAssistant) => {
|
|||||||
},
|
},
|
||||||
] as TodoItem[],
|
] as TodoItem[],
|
||||||
}));
|
}));
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
hass.mockWS("todo/item/subscribe", (_msg, _hass) => () => {});
|
hass.mockWS("todo/item/subscribe", (_msg, _hass) => () => {});
|
||||||
};
|
};
|
||||||
|
@@ -18,8 +18,9 @@ const compat = new FlatCompat({
|
|||||||
export default [
|
export default [
|
||||||
...compat.extends(
|
...compat.extends(
|
||||||
"airbnb-base",
|
"airbnb-base",
|
||||||
"airbnb-typescript/base",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:@typescript-eslint/strict",
|
||||||
|
"plugin:@typescript-eslint/stylistic",
|
||||||
"plugin:wc/recommended",
|
"plugin:wc/recommended",
|
||||||
"plugin:lit/all",
|
"plugin:lit/all",
|
||||||
"plugin:lit-a11y/recommended",
|
"plugin:lit-a11y/recommended",
|
||||||
@@ -50,8 +51,6 @@ export default [
|
|||||||
ecmaFeatures: {
|
ecmaFeatures: {
|
||||||
modules: true,
|
modules: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
project: "./tsconfig.json",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -148,15 +147,15 @@ export default [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
"@typescript-eslint/no-unused-vars": "off",
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
|
||||||
"unused-imports/no-unused-vars": [
|
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
vars: "all",
|
args: "all",
|
||||||
varsIgnorePattern: "^_",
|
|
||||||
args: "after-used",
|
|
||||||
argsIgnorePattern: "^_",
|
argsIgnorePattern: "^_",
|
||||||
|
caughtErrors: "all",
|
||||||
|
caughtErrorsIgnorePattern: "^_",
|
||||||
|
destructuredArrayIgnorePattern: "^_",
|
||||||
|
varsIgnorePattern: "^_",
|
||||||
ignoreRestSiblings: true,
|
ignoreRestSiblings: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -174,6 +173,16 @@ export default [
|
|||||||
"lit-a11y/role-has-required-aria-attrs": "error",
|
"lit-a11y/role-has-required-aria-attrs": "error",
|
||||||
"@typescript-eslint/consistent-type-imports": "error",
|
"@typescript-eslint/consistent-type-imports": "error",
|
||||||
"@typescript-eslint/no-import-type-side-effects": "error",
|
"@typescript-eslint/no-import-type-side-effects": "error",
|
||||||
|
camelcase: "off",
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "off",
|
||||||
|
"@typescript-eslint/no-empty-object-type": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
allowInterfaces: "always",
|
||||||
|
allowObjectTypes: "always",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"no-use-before-define": "off",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@@ -42,7 +42,7 @@ In most cases, Create can be paired with Delete, and Add can be paired with Remo
|
|||||||
|
|
||||||
## Add
|
## Add
|
||||||
|
|
||||||
An already-exisiting item.
|
An already-existing item.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
@@ -177,26 +177,24 @@ export class DemoAutomationDescribeAction extends LitElement {
|
|||||||
this._action = ev.detail.isValid ? ev.detail.value : undefined;
|
this._action = ev.detail.isValid ? ev.detail.value : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
.action {
|
||||||
.action {
|
padding: 16px;
|
||||||
padding: 16px;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
span {
|
||||||
span {
|
margin-right: 16px;
|
||||||
margin-right: 16px;
|
}
|
||||||
}
|
ha-yaml-editor {
|
||||||
ha-yaml-editor {
|
width: 50%;
|
||||||
width: 50%;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -98,26 +98,24 @@ export class DemoAutomationDescribeCondition extends LitElement {
|
|||||||
this._condition = ev.detail.isValid ? ev.detail.value : undefined;
|
this._condition = ev.detail.isValid ? ev.detail.value : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
.condition {
|
||||||
.condition {
|
padding: 16px;
|
||||||
padding: 16px;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
span {
|
||||||
span {
|
margin-right: 16px;
|
||||||
margin-right: 16px;
|
}
|
||||||
}
|
ha-yaml-editor {
|
||||||
ha-yaml-editor {
|
width: 50%;
|
||||||
width: 50%;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -121,26 +121,24 @@ export class DemoAutomationDescribeTrigger extends LitElement {
|
|||||||
this._trigger = ev.detail.isValid ? ev.detail.value : undefined;
|
this._trigger = ev.detail.isValid ? ev.detail.value : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
.trigger {
|
||||||
.trigger {
|
padding: 16px;
|
||||||
padding: 16px;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
span {
|
||||||
span {
|
margin-right: 16px;
|
||||||
margin-right: 16px;
|
}
|
||||||
}
|
ha-yaml-editor {
|
||||||
ha-yaml-editor {
|
width: 50%;
|
||||||
width: 50%;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -58,22 +58,20 @@ export class DemoAutomationTraceTimeline extends LitElement {
|
|||||||
hass.updateTranslations("config", "en");
|
hass.updateTranslations("config", "en");
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px;
|
||||||
margin: 24px;
|
}
|
||||||
}
|
.card-content {
|
||||||
.card-content {
|
display: flex;
|
||||||
display: flex;
|
}
|
||||||
}
|
button {
|
||||||
button {
|
position: absolute;
|
||||||
position: absolute;
|
top: 0;
|
||||||
top: 0;
|
right: 0;
|
||||||
right: 0;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -68,28 +68,26 @@ export class DemoAutomationTrace extends LitElement {
|
|||||||
this._selected = { ...this._selected, [sampleIdx]: ev.detail.path };
|
this._selected = { ...this._selected, [sampleIdx]: ev.detail.path };
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px;
|
||||||
margin: 24px;
|
}
|
||||||
}
|
.card-content {
|
||||||
.card-content {
|
display: flex;
|
||||||
display: flex;
|
}
|
||||||
}
|
.card-content > * {
|
||||||
.card-content > * {
|
margin-right: 16px;
|
||||||
margin-right: 16px;
|
}
|
||||||
}
|
.card-content > *:last-child {
|
||||||
.card-content > *:last-child {
|
margin-right: 0;
|
||||||
margin-right: 0;
|
}
|
||||||
}
|
button {
|
||||||
button {
|
position: absolute;
|
||||||
position: absolute;
|
top: 0;
|
||||||
top: 0;
|
right: 0;
|
||||||
right: 0;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -19,7 +19,7 @@ The alert offers four severity levels that set a distinctive icon and color.
|
|||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
<ha-alert alert-type="warning">
|
<ha-alert alert-type="warning">
|
||||||
This is an warning alert — check it out!
|
This is a warning alert — check it out!
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
<ha-alert alert-type="info">
|
<ha-alert alert-type="info">
|
||||||
@@ -27,7 +27,7 @@ The alert offers four severity levels that set a distinctive icon and color.
|
|||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
<ha-alert alert-type="success">
|
<ha-alert alert-type="success">
|
||||||
This is an success alert — check it out!
|
This is a success alert — check it out!
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
**Note:** This component is by <a href="https://mui.com/components/alert/" rel="noopener noreferrer" target="_blank">MUI</a> and is not documented in the <a href="https://material.io" rel="noopener noreferrer" target="_blank">Material Design guidelines</a>.
|
**Note:** This component is by <a href="https://mui.com/components/alert/" rel="noopener noreferrer" target="_blank">MUI</a> and is not documented in the <a href="https://material.io" rel="noopener noreferrer" target="_blank">Material Design guidelines</a>.
|
||||||
@@ -95,7 +95,7 @@ Actions must have a tab index of 0 so that they can be reached by keyboard-only
|
|||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
<ha-alert alert-type="warning">
|
<ha-alert alert-type="warning">
|
||||||
This is an warning alert — check it out!
|
This is a warning alert — check it out!
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
<ha-alert alert-type="info">
|
<ha-alert alert-type="info">
|
||||||
@@ -103,7 +103,7 @@ Actions must have a tab index of 0 so that they can be reached by keyboard-only
|
|||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
<ha-alert alert-type="success">
|
<ha-alert alert-type="success">
|
||||||
This is an success alert — check it out!
|
This is a success alert — check it out!
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
```html
|
```html
|
||||||
@@ -122,37 +122,37 @@ Actions must have a tab index of 0 so that they can be reached by keyboard-only
|
|||||||
The `title ` option should not be used without a description.
|
The `title ` option should not be used without a description.
|
||||||
|
|
||||||
<ha-alert alert-type="success" title="Success">
|
<ha-alert alert-type="success" title="Success">
|
||||||
This is an success alert — check it out!
|
This is a success alert — check it out!
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<ha-alert alert-type="success" title="Success">
|
<ha-alert alert-type="success" title="Success">
|
||||||
This is an success alert — check it out!
|
This is a success alert — check it out!
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
```
|
```
|
||||||
|
|
||||||
**Dismissable**
|
**Dismissable**
|
||||||
|
|
||||||
<ha-alert alert-type="success" dismissable>
|
<ha-alert alert-type="success" dismissable>
|
||||||
This is an success alert — check it out!
|
This is a success alert — check it out!
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<ha-alert alert-type="success" dismissable>
|
<ha-alert alert-type="success" dismissable>
|
||||||
This is an success alert — check it out!
|
This is a success alert — check it out!
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
```
|
```
|
||||||
|
|
||||||
**Slotted action**
|
**Slotted action**
|
||||||
|
|
||||||
<ha-alert alert-type="success">
|
<ha-alert alert-type="success">
|
||||||
This is an success alert — check it out!
|
This is a success alert — check it out!
|
||||||
<mwc-button slot="action" label="Undo"></mwc-button>
|
<mwc-button slot="action" label="Undo"></mwc-button>
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<ha-alert alert-type="success">
|
<ha-alert alert-type="success">
|
||||||
This is an success alert — check it out!
|
This is a success alert — check it out!
|
||||||
<mwc-button slot="action" label="Undo"></mwc-button>
|
<mwc-button slot="action" label="Undo"></mwc-button>
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
```
|
```
|
||||||
|
@@ -177,46 +177,44 @@ export class DemoHaAlert extends LitElement {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
:host {
|
||||||
:host {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
flex-direction: row;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
.dark,
|
||||||
.dark,
|
.light {
|
||||||
.light {
|
display: block;
|
||||||
display: block;
|
background-color: var(--primary-background-color);
|
||||||
background-color: var(--primary-background-color);
|
padding: 0 50px;
|
||||||
padding: 0 50px;
|
}
|
||||||
}
|
ha-card {
|
||||||
ha-card {
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
ha-alert {
|
||||||
ha-alert {
|
display: block;
|
||||||
display: block;
|
margin: 24px 0;
|
||||||
margin: 24px 0;
|
}
|
||||||
}
|
.condition {
|
||||||
.condition {
|
padding: 16px;
|
||||||
padding: 16px;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
.image {
|
||||||
.image {
|
display: inline-flex;
|
||||||
display: inline-flex;
|
height: 100%;
|
||||||
height: 100%;
|
align-items: center;
|
||||||
align-items: center;
|
}
|
||||||
}
|
img {
|
||||||
img {
|
max-height: 24px;
|
||||||
max-height: 24px;
|
width: 24px;
|
||||||
width: 24px;
|
}
|
||||||
}
|
mwc-button {
|
||||||
mwc-button {
|
--mdc-theme-primary: var(--primary-text-color);
|
||||||
--mdc-theme-primary: var(--primary-text-color);
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -63,20 +63,18 @@ export class DemoHaBar extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
.warning {
|
||||||
.warning {
|
--ha-bar-primary-color: var(--warning-color);
|
||||||
--ha-bar-primary-color: var(--warning-color);
|
}
|
||||||
}
|
.error {
|
||||||
.error {
|
--ha-bar-primary-color: var(--error-color);
|
||||||
--ha-bar-primary-color: var(--error-color);
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -103,19 +103,17 @@ export class DemoHaChips extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
.card-content {
|
||||||
.card-content {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
flex-direction: column;
|
align-items: flex-start;
|
||||||
align-items: flex-start;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -48,14 +48,12 @@ export class DemoHaCircularProgress extends LitElement {
|
|||||||
></ha-card>`;
|
></ha-card>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -14,12 +14,12 @@ import "../../../../src/components/ha-card";
|
|||||||
import "../../../../src/components/ha-svg-icon";
|
import "../../../../src/components/ha-svg-icon";
|
||||||
import "../../../../src/components/ha-control-button-group";
|
import "../../../../src/components/ha-control-button-group";
|
||||||
|
|
||||||
type Button = {
|
interface Button {
|
||||||
label: string;
|
label: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
class?: string;
|
class?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
};
|
}
|
||||||
|
|
||||||
const buttons: Button[] = [
|
const buttons: Button[] = [
|
||||||
{
|
{
|
||||||
@@ -35,10 +35,10 @@ const buttons: Button[] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
type ButtonGroup = {
|
interface ButtonGroup {
|
||||||
vertical?: boolean;
|
vertical?: boolean;
|
||||||
class?: string;
|
class?: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
const buttonGroups: ButtonGroup[] = [
|
const buttonGroups: ButtonGroup[] = [
|
||||||
{},
|
{},
|
||||||
@@ -137,53 +137,51 @@ export class DemoHaBarButton extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
pre {
|
||||||
pre {
|
margin-top: 0;
|
||||||
margin-top: 0;
|
margin-bottom: 8px;
|
||||||
margin-bottom: 8px;
|
}
|
||||||
}
|
p {
|
||||||
p {
|
margin: 0;
|
||||||
margin: 0;
|
}
|
||||||
}
|
label {
|
||||||
label {
|
font-weight: 600;
|
||||||
font-weight: 600;
|
}
|
||||||
}
|
.custom {
|
||||||
.custom {
|
--control-button-icon-color: var(--primary-color);
|
||||||
--control-button-icon-color: var(--primary-color);
|
--control-button-background-color: var(--primary-color);
|
||||||
--control-button-background-color: var(--primary-color);
|
--control-button-background-opacity: 0.2;
|
||||||
--control-button-background-opacity: 0.2;
|
--control-button-border-radius: 18px;
|
||||||
--control-button-border-radius: 18px;
|
height: 100px;
|
||||||
height: 100px;
|
width: 100px;
|
||||||
width: 100px;
|
}
|
||||||
}
|
.custom-group {
|
||||||
.custom-group {
|
--control-button-group-thickness: 100px;
|
||||||
--control-button-group-thickness: 100px;
|
--control-button-group-border-radius: 36px;
|
||||||
--control-button-group-border-radius: 36px;
|
--control-button-group-spacing: 20px;
|
||||||
--control-button-group-spacing: 20px;
|
}
|
||||||
}
|
.custom-group ha-control-button {
|
||||||
.custom-group ha-control-button {
|
--control-button-border-radius: 18px;
|
||||||
--control-button-border-radius: 18px;
|
--mdc-icon-size: 32px;
|
||||||
--mdc-icon-size: 32px;
|
}
|
||||||
}
|
.vertical-buttons {
|
||||||
.vertical-buttons {
|
height: 300px;
|
||||||
height: 300px;
|
display: flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
flex-direction: row;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
p.title {
|
||||||
p.title {
|
margin-bottom: 12px;
|
||||||
margin-bottom: 12px;
|
}
|
||||||
}
|
.vertical-switches > *:not(:last-child) {
|
||||||
.vertical-switches > *:not(:last-child) {
|
margin-right: 4px;
|
||||||
margin-right: 4px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -133,39 +133,37 @@ export class DemoHaCircularSlider extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
pre {
|
||||||
pre {
|
margin-top: 0;
|
||||||
margin-top: 0;
|
margin-bottom: 8px;
|
||||||
margin-bottom: 8px;
|
}
|
||||||
}
|
p {
|
||||||
p {
|
margin: 0;
|
||||||
margin: 0;
|
}
|
||||||
}
|
p.title {
|
||||||
p.title {
|
margin-bottom: 12px;
|
||||||
margin-bottom: 12px;
|
}
|
||||||
}
|
ha-control-circular-slider {
|
||||||
ha-control-circular-slider {
|
--control-circular-slider-color: #ff9800;
|
||||||
--control-circular-slider-color: #ff9800;
|
}
|
||||||
}
|
ha-control-circular-slider[inverted] {
|
||||||
ha-control-circular-slider[inverted] {
|
--control-circular-slider-color: #2196f3;
|
||||||
--control-circular-slider-color: #2196f3;
|
}
|
||||||
}
|
ha-control-circular-slider[dual] {
|
||||||
ha-control-circular-slider[dual] {
|
--control-circular-slider-high-color: #2196f3;
|
||||||
--control-circular-slider-high-color: #2196f3;
|
--control-circular-slider-low-color: #ff9800;
|
||||||
--control-circular-slider-low-color: #ff9800;
|
}
|
||||||
}
|
.field {
|
||||||
.field {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
flex-direction: row;
|
align-items: center;
|
||||||
align-items: center;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -73,32 +73,30 @@ export class DemoHarControlNumberButtons extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
pre {
|
||||||
pre {
|
margin-top: 0;
|
||||||
margin-top: 0;
|
margin-bottom: 8px;
|
||||||
margin-bottom: 8px;
|
}
|
||||||
}
|
p {
|
||||||
p {
|
margin: 0;
|
||||||
margin: 0;
|
}
|
||||||
}
|
label {
|
||||||
label {
|
font-weight: 600;
|
||||||
font-weight: 600;
|
}
|
||||||
}
|
.custom {
|
||||||
.custom {
|
color: #2196f3;
|
||||||
color: #2196f3;
|
--control-number-buttons-color: #2196f3;
|
||||||
--control-number-buttons-color: #2196f3;
|
--control-number-buttons-background-color: #2196f3;
|
||||||
--control-number-buttons-background-color: #2196f3;
|
--control-number-buttons-background-opacity: 0.1;
|
||||||
--control-number-buttons-background-opacity: 0.1;
|
--control-number-buttons-thickness: 100px;
|
||||||
--control-number-buttons-thickness: 100px;
|
--control-number-buttons-border-radius: 36px;
|
||||||
--control-number-buttons-border-radius: 36px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -8,19 +8,19 @@ import "../../../../src/components/ha-control-select-menu";
|
|||||||
import "../../../../src/components/ha-list-item";
|
import "../../../../src/components/ha-list-item";
|
||||||
import "../../../../src/components/ha-svg-icon";
|
import "../../../../src/components/ha-svg-icon";
|
||||||
|
|
||||||
type SelectMenuOptions = {
|
interface SelectMenuOptions {
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
type SelectMenu = {
|
interface SelectMenu {
|
||||||
label: string;
|
label: string;
|
||||||
icon: string;
|
icon: string;
|
||||||
class?: string;
|
class?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
options: SelectMenuOptions[];
|
options: SelectMenuOptions[];
|
||||||
};
|
}
|
||||||
|
|
||||||
const selects: SelectMenu[] = [
|
const selects: SelectMenu[] = [
|
||||||
{
|
{
|
||||||
@@ -112,32 +112,30 @@ export class DemoHaControlSelectMenu extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
pre {
|
||||||
pre {
|
margin-top: 0;
|
||||||
margin-top: 0;
|
margin-bottom: 8px;
|
||||||
margin-bottom: 8px;
|
}
|
||||||
}
|
p {
|
||||||
p {
|
margin: 0;
|
||||||
margin: 0;
|
}
|
||||||
}
|
label {
|
||||||
label {
|
font-weight: 600;
|
||||||
font-weight: 600;
|
}
|
||||||
}
|
.custom {
|
||||||
.custom {
|
--control-button-icon-color: var(--primary-color);
|
||||||
--control-button-icon-color: var(--primary-color);
|
--control-button-background-color: var(--primary-color);
|
||||||
--control-button-background-color: var(--primary-color);
|
--control-button-background-opacity: 0.2;
|
||||||
--control-button-background-opacity: 0.2;
|
--control-button-border-radius: 18px;
|
||||||
--control-button-border-radius: 18px;
|
height: 100px;
|
||||||
height: 100px;
|
width: 100px;
|
||||||
width: 100px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -168,42 +168,40 @@ export class DemoHaControlSelect extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
pre {
|
||||||
pre {
|
margin-top: 0;
|
||||||
margin-top: 0;
|
margin-bottom: 8px;
|
||||||
margin-bottom: 8px;
|
}
|
||||||
}
|
p {
|
||||||
p {
|
margin: 0;
|
||||||
margin: 0;
|
}
|
||||||
}
|
label {
|
||||||
label {
|
font-weight: 600;
|
||||||
font-weight: 600;
|
}
|
||||||
}
|
.custom {
|
||||||
.custom {
|
--mdc-icon-size: 24px;
|
||||||
--mdc-icon-size: 24px;
|
--control-select-color: var(--state-fan-active-color);
|
||||||
--control-select-color: var(--state-fan-active-color);
|
--control-select-thickness: 130px;
|
||||||
--control-select-thickness: 130px;
|
--control-select-border-radius: 36px;
|
||||||
--control-select-border-radius: 36px;
|
}
|
||||||
}
|
.vertical-selects {
|
||||||
.vertical-selects {
|
height: 300px;
|
||||||
height: 300px;
|
display: flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
flex-direction: row;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
p.title {
|
||||||
p.title {
|
margin-bottom: 12px;
|
||||||
margin-bottom: 12px;
|
}
|
||||||
}
|
.vertical-selects > *:not(:last-child) {
|
||||||
.vertical-selects > *:not(:last-child) {
|
margin-right: 4px;
|
||||||
margin-right: 4px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -131,43 +131,41 @@ export class DemoHaBarSlider extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
pre {
|
||||||
pre {
|
margin-top: 0;
|
||||||
margin-top: 0;
|
margin-bottom: 8px;
|
||||||
margin-bottom: 8px;
|
}
|
||||||
}
|
p {
|
||||||
p {
|
margin: 0;
|
||||||
margin: 0;
|
}
|
||||||
}
|
label {
|
||||||
label {
|
font-weight: 600;
|
||||||
font-weight: 600;
|
}
|
||||||
}
|
.custom {
|
||||||
.custom {
|
--control-slider-color: #ffcf4c;
|
||||||
--control-slider-color: #ffcf4c;
|
--control-slider-background: #ffcf4c;
|
||||||
--control-slider-background: #ffcf4c;
|
--control-slider-background-opacity: 0.2;
|
||||||
--control-slider-background-opacity: 0.2;
|
--control-slider-thickness: 130px;
|
||||||
--control-slider-thickness: 130px;
|
--control-slider-border-radius: 36px;
|
||||||
--control-slider-border-radius: 36px;
|
}
|
||||||
}
|
.vertical-sliders {
|
||||||
.vertical-sliders {
|
height: 300px;
|
||||||
height: 300px;
|
display: flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
flex-direction: row;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
p.title {
|
||||||
p.title {
|
margin-bottom: 12px;
|
||||||
margin-bottom: 12px;
|
}
|
||||||
}
|
.vertical-sliders > *:not(:last-child) {
|
||||||
.vertical-sliders > *:not(:last-child) {
|
margin-right: 4px;
|
||||||
margin-right: 4px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -99,44 +99,42 @@ export class DemoHaControlSwitch extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
pre {
|
||||||
pre {
|
margin-top: 0;
|
||||||
margin-top: 0;
|
margin-bottom: 8px;
|
||||||
margin-bottom: 8px;
|
}
|
||||||
}
|
p {
|
||||||
p {
|
margin: 0;
|
||||||
margin: 0;
|
}
|
||||||
}
|
label {
|
||||||
label {
|
font-weight: 600;
|
||||||
font-weight: 600;
|
}
|
||||||
}
|
.custom {
|
||||||
.custom {
|
--control-switch-on-color: var(--green-color);
|
||||||
--control-switch-on-color: var(--green-color);
|
--control-switch-off-color: var(--red-color);
|
||||||
--control-switch-off-color: var(--red-color);
|
--control-switch-thickness: 130px;
|
||||||
--control-switch-thickness: 130px;
|
--control-switch-border-radius: 36px;
|
||||||
--control-switch-border-radius: 36px;
|
--control-switch-padding: 6px;
|
||||||
--control-switch-padding: 6px;
|
--mdc-icon-size: 24px;
|
||||||
--mdc-icon-size: 24px;
|
}
|
||||||
}
|
.vertical-switches {
|
||||||
.vertical-switches {
|
height: 300px;
|
||||||
height: 300px;
|
display: flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
flex-direction: row;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
p.title {
|
||||||
p.title {
|
margin-bottom: 12px;
|
||||||
margin-bottom: 12px;
|
}
|
||||||
}
|
.vertical-switches > *:not(:last-child) {
|
||||||
.vertical-switches > *:not(:last-child) {
|
margin-right: 4px;
|
||||||
margin-right: 4px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -143,13 +143,11 @@ export class DemoHaExpansionPanel extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-expansion-panel {
|
||||||
ha-expansion-panel {
|
margin: -16px;
|
||||||
margin: -16px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -20,7 +20,7 @@ export class DemoHaFaded extends LitElement {
|
|||||||
<ha-faded><span>${LONG_TEXT}</span></ha-faded>
|
<ha-faded><span>${LONG_TEXT}</span></ha-faded>
|
||||||
<h3>No text</h3>
|
<h3>No text</h3>
|
||||||
<ha-faded><span></span></ha-faded>
|
<ha-faded><span></span></ha-faded>
|
||||||
<h3>Smal text</h3>
|
<h3>Small text</h3>
|
||||||
<ha-faded><span>${SMALL_TEXT}</span></ha-faded>
|
<ha-faded><span>${SMALL_TEXT}</span></ha-faded>
|
||||||
<h3>Long text in markdown</h3>
|
<h3>Long text in markdown</h3>
|
||||||
<ha-faded>
|
<ha-faded>
|
||||||
@@ -61,14 +61,12 @@ export class DemoHaFaded extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -124,6 +124,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
temperature_entity_id: null,
|
||||||
|
humidity_entity_id: null,
|
||||||
created_at: 0,
|
created_at: 0,
|
||||||
modified_at: 0,
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
@@ -135,6 +137,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
temperature_entity_id: null,
|
||||||
|
humidity_entity_id: null,
|
||||||
created_at: 0,
|
created_at: 0,
|
||||||
modified_at: 0,
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
@@ -146,6 +150,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
temperature_entity_id: null,
|
||||||
|
humidity_entity_id: null,
|
||||||
created_at: 0,
|
created_at: 0,
|
||||||
modified_at: 0,
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
|
@@ -76,7 +76,7 @@ export class DemoHaHsColorPicker extends LitElement {
|
|||||||
@change=${this._saturationChanged}
|
@change=${this._saturationChanged}
|
||||||
>
|
>
|
||||||
</ha-slider>
|
</ha-slider>
|
||||||
<p>Color Brighness : ${this.brightness}</p>
|
<p>Color Brightness : ${this.brightness}</p>
|
||||||
<ha-slider
|
<ha-slider
|
||||||
labeled
|
labeled
|
||||||
step="1"
|
step="1"
|
||||||
@@ -91,27 +91,25 @@ export class DemoHaHsColorPicker extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
.card-content {
|
||||||
.card-content {
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
flex-direction: column;
|
}
|
||||||
}
|
ha-hs-color-picker {
|
||||||
ha-hs-color-picker {
|
width: 400px;
|
||||||
width: 400px;
|
}
|
||||||
}
|
.value {
|
||||||
.value {
|
font-size: 22px;
|
||||||
font-size: 22px;
|
font-weight: bold;
|
||||||
font-weight: bold;
|
margin: 0 0 12px 0;
|
||||||
margin: 0 0 12px 0;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -95,25 +95,23 @@ export class DemoHaLabelBadge extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
pre {
|
||||||
pre {
|
margin-left: 16px;
|
||||||
margin-left: 16px;
|
background-color: var(--markdown-code-background-color);
|
||||||
background-color: var(--markdown-code-background-color);
|
padding: 8px;
|
||||||
padding: 8px;
|
}
|
||||||
}
|
.badge {
|
||||||
.badge {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
flex-direction: row;
|
margin-bottom: 16px;
|
||||||
margin-bottom: 16px;
|
align-items: center;
|
||||||
align-items: center;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -123,6 +123,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
temperature_entity_id: null,
|
||||||
|
humidity_entity_id: null,
|
||||||
created_at: 0,
|
created_at: 0,
|
||||||
modified_at: 0,
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
@@ -134,6 +136,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
temperature_entity_id: null,
|
||||||
|
humidity_entity_id: null,
|
||||||
created_at: 0,
|
created_at: 0,
|
||||||
modified_at: 0,
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
@@ -145,6 +149,8 @@ const AREAS: AreaRegistryEntry[] = [
|
|||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
|
temperature_entity_id: null,
|
||||||
|
humidity_entity_id: null,
|
||||||
created_at: 0,
|
created_at: 0,
|
||||||
modified_at: 0,
|
modified_at: 0,
|
||||||
},
|
},
|
||||||
|
@@ -48,27 +48,25 @@ export class DemoHaTip extends LitElement {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
:host {
|
||||||
:host {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: row;
|
||||||
flex-direction: row;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
.dark,
|
||||||
.dark,
|
.light {
|
||||||
.light {
|
display: block;
|
||||||
display: block;
|
background-color: var(--primary-background-color);
|
||||||
background-color: var(--primary-background-color);
|
padding: 0 50px;
|
||||||
padding: 0 50px;
|
}
|
||||||
}
|
ha-tip {
|
||||||
ha-tip {
|
margin-bottom: 14px;
|
||||||
margin-bottom: 14px;
|
}
|
||||||
}
|
ha-card {
|
||||||
ha-card {
|
margin: 24px auto;
|
||||||
margin: 24px auto;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -100,32 +100,30 @@ export class DemoDateTimeDateTimeNumeric extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-control-select {
|
||||||
ha-control-select {
|
max-width: 800px;
|
||||||
max-width: 800px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
}
|
||||||
}
|
.header {
|
||||||
.header {
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
.center {
|
||||||
.center {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
max-width: 900px;
|
||||||
max-width: 900px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > div {
|
.container > div {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -100,32 +100,30 @@ export class DemoDateTimeDateTimeSeconds extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-control-select {
|
||||||
ha-control-select {
|
max-width: 800px;
|
||||||
max-width: 800px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
}
|
||||||
}
|
.header {
|
||||||
.header {
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
.center {
|
||||||
.center {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
max-width: 900px;
|
||||||
max-width: 900px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > div {
|
.container > div {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -100,32 +100,30 @@ export class DemoDateTimeDateTimeShortYear extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-control-select {
|
||||||
ha-control-select {
|
max-width: 800px;
|
||||||
max-width: 800px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
}
|
||||||
}
|
.header {
|
||||||
.header {
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
.center {
|
||||||
.center {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
max-width: 900px;
|
||||||
max-width: 900px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > div {
|
.container > div {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -100,32 +100,30 @@ export class DemoDateTimeDateTimeShort extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-control-select {
|
||||||
ha-control-select {
|
max-width: 800px;
|
||||||
max-width: 800px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
}
|
||||||
}
|
.header {
|
||||||
.header {
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
.center {
|
||||||
.center {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
max-width: 900px;
|
||||||
max-width: 900px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > div {
|
.container > div {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -100,32 +100,30 @@ export class DemoDateTimeDateTime extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-control-select {
|
||||||
ha-control-select {
|
max-width: 800px;
|
||||||
max-width: 800px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
}
|
||||||
}
|
.header {
|
||||||
.header {
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
.center {
|
||||||
.center {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
max-width: 900px;
|
||||||
max-width: 900px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > div {
|
.container > div {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -90,28 +90,26 @@ export class DemoDateTimeDate extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
.header {
|
||||||
.header {
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
.center {
|
||||||
.center {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > div {
|
.container > div {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -100,32 +100,30 @@ export class DemoDateTimeTimeSeconds extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-control-select {
|
||||||
ha-control-select {
|
max-width: 800px;
|
||||||
max-width: 800px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
}
|
||||||
}
|
.header {
|
||||||
.header {
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
.center {
|
||||||
.center {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > div {
|
.container > div {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -100,32 +100,30 @@ export class DemoDateTimeTimeWeekday extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-control-select {
|
||||||
ha-control-select {
|
max-width: 800px;
|
||||||
max-width: 800px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
}
|
||||||
}
|
.header {
|
||||||
.header {
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
.center {
|
||||||
.center {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
max-width: 800px;
|
||||||
max-width: 800px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > div {
|
.container > div {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -100,32 +100,30 @@ export class DemoDateTimeTime extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-control-select {
|
||||||
ha-control-select {
|
max-width: 800px;
|
||||||
max-width: 800px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
}
|
||||||
}
|
.header {
|
||||||
.header {
|
font-weight: bold;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
.center {
|
||||||
.center {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
.container {
|
||||||
.container {
|
max-width: 600px;
|
||||||
max-width: 600px;
|
margin: 12px auto;
|
||||||
margin: 12px auto;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-evenly;
|
||||||
justify-content: space-evenly;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > div {
|
.container > div {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -321,13 +321,13 @@ function createEntity(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
type EntityRowData = {
|
interface EntityRowData {
|
||||||
stateObj: HassEntity;
|
stateObj: HassEntity;
|
||||||
entity_id: string;
|
entity_id: string;
|
||||||
state: string;
|
state: string;
|
||||||
device_class?: string;
|
device_class?: string;
|
||||||
domain: string;
|
domain: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
function createRowData(stateObj: HassEntity): EntityRowData {
|
function createRowData(stateObj: HassEntity): EntityRowData {
|
||||||
return {
|
return {
|
||||||
@@ -429,17 +429,15 @@ export class DemoEntityState extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
.color {
|
||||||
.color {
|
display: block;
|
||||||
display: block;
|
height: 20px;
|
||||||
height: 20px;
|
width: 20px;
|
||||||
width: 20px;
|
border-radius: 10px;
|
||||||
border-radius: 10px;
|
background-color: rgb(--color);
|
||||||
background-color: rgb(--color);
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -76,14 +76,12 @@ export class DemoMiscMarkdown extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
ha-card {
|
||||||
ha-card {
|
margin: 12px;
|
||||||
margin: 12px;
|
padding: 12px;
|
||||||
padding: 12px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -135,12 +135,12 @@ const configFlows: DataEntryFlowProgressExtended[] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const configEntries: Array<{
|
const configEntries: {
|
||||||
items: ConfigEntryExtended[];
|
items: ConfigEntryExtended[];
|
||||||
is_custom?: boolean;
|
is_custom?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
highlight?: string;
|
highlight?: string;
|
||||||
}> = [
|
}[] = [
|
||||||
{ items: [loadedEntry] },
|
{ items: [loadedEntry] },
|
||||||
{ items: [configPanelEntry] },
|
{ items: [configPanelEntry] },
|
||||||
{ items: [optionsFlowEntry] },
|
{ items: [optionsFlowEntry] },
|
||||||
@@ -349,26 +349,24 @@ export class DemoIntegrationCard extends LitElement {
|
|||||||
this.isCloud = !this.isCloud;
|
this.isCloud = !this.isCloud;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static styles = css`
|
||||||
return css`
|
.container {
|
||||||
.container {
|
display: grid;
|
||||||
display: grid;
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
grid-gap: 8px 8px;
|
||||||
grid-gap: 8px 8px;
|
padding: 8px 16px 16px;
|
||||||
padding: 8px 16px 16px;
|
margin-bottom: 16px;
|
||||||
margin-bottom: 16px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container > * {
|
.container > * {
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ha-formfield {
|
ha-formfield {
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
14
gulpfile.js
14
gulpfile.js
@@ -1,16 +1,4 @@
|
|||||||
import { globIterate } from "glob";
|
|
||||||
import { availableParallelism } from "node:os";
|
import { availableParallelism } from "node:os";
|
||||||
|
import "./build-scripts/gulp/index.mjs";
|
||||||
|
|
||||||
process.env.UV_THREADPOOL_SIZE = availableParallelism();
|
process.env.UV_THREADPOOL_SIZE = availableParallelism();
|
||||||
|
|
||||||
const gulpImports = [];
|
|
||||||
|
|
||||||
for await (const gulpModule of globIterate("build-scripts/gulp/*.?(c|m)js", {
|
|
||||||
dotRelative: true,
|
|
||||||
})) {
|
|
||||||
gulpImports.push(import(gulpModule));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Since all tasks are currently registered with gulp.task(), this is enough
|
|
||||||
// If any are converted to named exports, need to loop and aggregate exports here
|
|
||||||
await Promise.all(gulpImports);
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import type { ActionDetail } from "@material/mwc-list/mwc-list-foundation";
|
import type { ActionDetail } from "@material/mwc-list/mwc-list-foundation";
|
||||||
import "@material/mwc-list/mwc-list-item";
|
import "@material/mwc-list/mwc-list-item";
|
||||||
import { mdiDotsVertical } from "@mdi/js";
|
import { mdiDotsVertical } from "@mdi/js";
|
||||||
import type { CSSResultGroup, PropertyValues, TemplateResult } from "lit";
|
import type { PropertyValues, TemplateResult } from "lit";
|
||||||
import { css, html, LitElement, nothing } from "lit";
|
import { css, html, LitElement, nothing } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
@@ -211,35 +211,33 @@ export class HassioAddonStore extends LitElement {
|
|||||||
this._filter = e.detail.value;
|
this._filter = e.detail.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
hassio-addon-repository {
|
||||||
hassio-addon-repository {
|
margin-top: 24px;
|
||||||
margin-top: 24px;
|
}
|
||||||
}
|
.search {
|
||||||
.search {
|
position: sticky;
|
||||||
position: sticky;
|
top: 0;
|
||||||
top: 0;
|
z-index: 2;
|
||||||
z-index: 2;
|
}
|
||||||
}
|
search-input {
|
||||||
search-input {
|
display: block;
|
||||||
display: block;
|
--mdc-text-field-fill-color: var(--sidebar-background-color);
|
||||||
--mdc-text-field-fill-color: var(--sidebar-background-color);
|
--mdc-text-field-idle-line-color: var(--divider-color);
|
||||||
--mdc-text-field-idle-line-color: var(--divider-color);
|
}
|
||||||
}
|
.advanced {
|
||||||
.advanced {
|
padding: 12px;
|
||||||
padding: 12px;
|
display: flex;
|
||||||
display: flex;
|
flex-wrap: wrap;
|
||||||
flex-wrap: wrap;
|
color: var(--primary-text-color);
|
||||||
color: var(--primary-text-color);
|
}
|
||||||
}
|
.advanced a {
|
||||||
.advanced a {
|
margin-left: 0.5em;
|
||||||
margin-left: 0.5em;
|
margin-inline-start: 0.5em;
|
||||||
margin-inline-start: 0.5em;
|
margin-inline-end: initial;
|
||||||
margin-inline-end: initial;
|
color: var(--primary-color);
|
||||||
color: var(--primary-color);
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -299,7 +299,7 @@ class HassioAddonConfig extends LitElement {
|
|||||||
if (this.addon.schema && this._canShowSchema && !this._yamlMode) {
|
if (this.addon.schema && this._canShowSchema && !this._yamlMode) {
|
||||||
this._valid = true;
|
this._valid = true;
|
||||||
this._configHasChanged = true;
|
this._configHasChanged = true;
|
||||||
this._options! = ev.detail.value;
|
this._options = ev.detail.value;
|
||||||
} else {
|
} else {
|
||||||
this._configHasChanged = true;
|
this._configHasChanged = true;
|
||||||
this._valid = ev.detail.isValid;
|
this._valid = ev.detail.isValid;
|
||||||
|
@@ -151,7 +151,7 @@ class HassioAddonNetwork extends LitElement {
|
|||||||
|
|
||||||
private async _configChanged(ev: CustomEvent): Promise<void> {
|
private async _configChanged(ev: CustomEvent): Promise<void> {
|
||||||
this._configHasChanged = true;
|
this._configHasChanged = true;
|
||||||
this._config! = ev.detail.value;
|
this._config = ev.detail.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _resetTapped(ev: CustomEvent): Promise<void> {
|
private async _resetTapped(ev: CustomEvent): Promise<void> {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { mdiHelpCircle } from "@mdi/js";
|
import { mdiHelpCircle } from "@mdi/js";
|
||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { css, html, LitElement } from "lit";
|
import { css, html, LitElement } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import "../../../src/components/ha-svg-icon";
|
import "../../../src/components/ha-svg-icon";
|
||||||
@@ -64,86 +64,84 @@ class HassioCardContent extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
:host {
|
||||||
:host {
|
direction: ltr;
|
||||||
direction: ltr;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ha-svg-icon {
|
ha-svg-icon {
|
||||||
margin-right: 24px;
|
margin-right: 24px;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
float: left;
|
float: left;
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
}
|
}
|
||||||
ha-svg-icon.update {
|
ha-svg-icon.update {
|
||||||
color: var(--warning-color);
|
color: var(--warning-color);
|
||||||
}
|
}
|
||||||
ha-svg-icon.running,
|
ha-svg-icon.running,
|
||||||
ha-svg-icon.installed {
|
ha-svg-icon.installed {
|
||||||
color: var(--success-color);
|
color: var(--success-color);
|
||||||
}
|
}
|
||||||
ha-svg-icon.hassupdate,
|
ha-svg-icon.hassupdate,
|
||||||
ha-svg-icon.backup {
|
ha-svg-icon.backup {
|
||||||
color: var(--paper-item-icon-color);
|
color: var(--paper-item-icon-color);
|
||||||
}
|
}
|
||||||
ha-svg-icon.not_available {
|
ha-svg-icon.not_available {
|
||||||
color: var(--error-color);
|
color: var(--error-color);
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
color: var(--primary-text-color);
|
color: var(--primary-text-color);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.addition {
|
.addition {
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 2.4em;
|
height: 2.4em;
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
}
|
}
|
||||||
.icon_image img {
|
.icon_image img {
|
||||||
max-height: 40px;
|
max-height: 40px;
|
||||||
max-width: 40px;
|
max-width: 40px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.icon_image.stopped,
|
.icon_image.stopped,
|
||||||
.icon_image.not_available {
|
.icon_image.not_available {
|
||||||
filter: grayscale(1);
|
filter: grayscale(1);
|
||||||
}
|
}
|
||||||
.dot {
|
.dot {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: var(--warning-color);
|
background-color: var(--warning-color);
|
||||||
width: 12px;
|
width: 12px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
top: 8px;
|
top: 8px;
|
||||||
right: 8px;
|
right: 8px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
.topbar {
|
.topbar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
border-top-left-radius: 2px;
|
border-top-left-radius: 2px;
|
||||||
border-top-right-radius: 2px;
|
border-top-right-radius: 2px;
|
||||||
}
|
}
|
||||||
.topbar.installed {
|
.topbar.installed {
|
||||||
background-color: var(--primary-color);
|
background-color: var(--primary-color);
|
||||||
}
|
}
|
||||||
.topbar.update {
|
.topbar.update {
|
||||||
background-color: var(--accent-color);
|
background-color: var(--accent-color);
|
||||||
}
|
}
|
||||||
.topbar.unavailable {
|
.topbar.unavailable {
|
||||||
background-color: var(--error-color);
|
background-color: var(--error-color);
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { mdiFolderUpload } from "@mdi/js";
|
import { mdiFolderUpload } from "@mdi/js";
|
||||||
import type { TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { html, LitElement } from "lit";
|
import { html, LitElement } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { fireEvent } from "../../../src/common/dom/fire_event";
|
import { fireEvent } from "../../../src/common/dom/fire_event";
|
||||||
import "../../../src/components/ha-circular-progress";
|
import "../../../src/components/ha-circular-progress";
|
||||||
import "../../../src/components/ha-file-upload";
|
import "../../../src/components/ha-file-upload";
|
||||||
@@ -10,10 +10,12 @@ import { uploadBackup } from "../../../src/data/hassio/backup";
|
|||||||
import { extractApiErrorMessage } from "../../../src/data/hassio/common";
|
import { extractApiErrorMessage } from "../../../src/data/hassio/common";
|
||||||
import { showAlertDialog } from "../../../src/dialogs/generic/show-dialog-box";
|
import { showAlertDialog } from "../../../src/dialogs/generic/show-dialog-box";
|
||||||
import type { HomeAssistant } from "../../../src/types";
|
import type { HomeAssistant } from "../../../src/types";
|
||||||
|
import type { LocalizeFunc } from "../../../src/common/translations/localize";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HASSDomEvents {
|
interface HASSDomEvents {
|
||||||
"backup-uploaded": { backup: HassioBackup };
|
"backup-uploaded": { backup: HassioBackup };
|
||||||
|
"backup-cleared": undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +23,8 @@ declare global {
|
|||||||
export class HassioUploadBackup extends LitElement {
|
export class HassioUploadBackup extends LitElement {
|
||||||
public hass?: HomeAssistant;
|
public hass?: HomeAssistant;
|
||||||
|
|
||||||
|
@property({ attribute: false }) public localize?: LocalizeFunc;
|
||||||
|
|
||||||
@state() public value: string | null = null;
|
@state() public value: string | null = null;
|
||||||
|
|
||||||
@state() private _uploading = false;
|
@state() private _uploading = false;
|
||||||
@@ -32,13 +36,26 @@ export class HassioUploadBackup extends LitElement {
|
|||||||
.uploading=${this._uploading}
|
.uploading=${this._uploading}
|
||||||
.icon=${mdiFolderUpload}
|
.icon=${mdiFolderUpload}
|
||||||
accept="application/x-tar"
|
accept="application/x-tar"
|
||||||
label="Upload backup"
|
.label=${this.localize?.(
|
||||||
supports="Supports .TAR files"
|
"ui.panel.page-onboarding.restore.upload_backup"
|
||||||
|
) || "Upload backup"}
|
||||||
|
.supports=${this.localize?.(
|
||||||
|
"ui.panel.page-onboarding.restore.upload_supports"
|
||||||
|
) || "Supports .TAR files"}
|
||||||
|
.secondary=${this.localize?.(
|
||||||
|
"ui.panel.page-onboarding.restore.upload_drop"
|
||||||
|
) || "Or drop your file here"}
|
||||||
@file-picked=${this._uploadFile}
|
@file-picked=${this._uploadFile}
|
||||||
|
@files-cleared=${this._clear}
|
||||||
></ha-file-upload>
|
></ha-file-upload>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _clear() {
|
||||||
|
this.value = null;
|
||||||
|
fireEvent(this, "backup-cleared");
|
||||||
|
}
|
||||||
|
|
||||||
private async _uploadFile(ev) {
|
private async _uploadFile(ev) {
|
||||||
const file = ev.detail.files[0];
|
const file = ev.detail.files[0];
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { mdiFolder, mdiPuzzle } from "@mdi/js";
|
import { mdiFolder, mdiPuzzle } from "@mdi/js";
|
||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { LitElement, css, html, nothing } from "lit";
|
import { LitElement, css, html, nothing } from "lit";
|
||||||
import { customElement, property, query } from "lit/decorators";
|
import { customElement, property, query } from "lit/decorators";
|
||||||
import { atLeastVersion } from "../../../src/common/config/version";
|
import { atLeastVersion } from "../../../src/common/config/version";
|
||||||
@@ -65,7 +65,7 @@ const _computeAddons = (addons): AddonCheckboxItem[] =>
|
|||||||
|
|
||||||
@customElement("supervisor-backup-content")
|
@customElement("supervisor-backup-content")
|
||||||
export class SupervisorBackupContent extends LitElement {
|
export class SupervisorBackupContent extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass?: HomeAssistant;
|
||||||
|
|
||||||
@property({ attribute: false }) public localize?: LocalizeFunc;
|
@property({ attribute: false }) public localize?: LocalizeFunc;
|
||||||
|
|
||||||
@@ -186,12 +186,13 @@ export class SupervisorBackupContent extends LitElement {
|
|||||||
.iconPath=${mdiHomeAssistant}
|
.iconPath=${mdiHomeAssistant}
|
||||||
.version=${this.backup
|
.version=${this.backup
|
||||||
? this.backup.homeassistant
|
? this.backup.homeassistant
|
||||||
: this.hass.config.version}
|
: this.hass?.config.version}
|
||||||
>
|
>
|
||||||
</supervisor-formfield-label>`}
|
</supervisor-formfield-label>`}
|
||||||
>
|
>
|
||||||
<ha-checkbox
|
<ha-checkbox
|
||||||
.checked=${this.homeAssistant}
|
.checked=${this.onboarding || this.homeAssistant}
|
||||||
|
.disabled=${this.onboarding}
|
||||||
@change=${this._toggleHomeAssistant}
|
@change=${this._toggleHomeAssistant}
|
||||||
>
|
>
|
||||||
</ha-checkbox>
|
</ha-checkbox>
|
||||||
@@ -282,59 +283,57 @@ export class SupervisorBackupContent extends LitElement {
|
|||||||
this.homeAssistant = !this.homeAssistant;
|
this.homeAssistant = !this.homeAssistant;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
.partial-picker ha-formfield {
|
||||||
.partial-picker ha-formfield {
|
display: block;
|
||||||
display: block;
|
}
|
||||||
}
|
.partial-picker ha-checkbox {
|
||||||
.partial-picker ha-checkbox {
|
--mdc-checkbox-touch-target-size: 32px;
|
||||||
--mdc-checkbox-touch-target-size: 32px;
|
}
|
||||||
}
|
.partial-picker {
|
||||||
.partial-picker {
|
display: block;
|
||||||
display: block;
|
margin: 0px -6px;
|
||||||
margin: 0px -6px;
|
}
|
||||||
}
|
supervisor-formfield-label {
|
||||||
supervisor-formfield-label {
|
display: inline-flex;
|
||||||
display: inline-flex;
|
align-items: center;
|
||||||
align-items: center;
|
}
|
||||||
}
|
hr {
|
||||||
hr {
|
border-color: var(--divider-color);
|
||||||
border-color: var(--divider-color);
|
border-bottom: none;
|
||||||
border-bottom: none;
|
margin: 16px 0;
|
||||||
margin: 16px 0;
|
}
|
||||||
}
|
.details {
|
||||||
.details {
|
color: var(--secondary-text-color);
|
||||||
color: var(--secondary-text-color);
|
}
|
||||||
}
|
.section-content {
|
||||||
.section-content {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
flex-direction: column;
|
margin-left: 30px;
|
||||||
margin-left: 30px;
|
margin-inline-start: 30px;
|
||||||
margin-inline-start: 30px;
|
margin-inline-end: initial;
|
||||||
margin-inline-end: initial;
|
}
|
||||||
}
|
ha-formfield.password {
|
||||||
ha-formfield.password {
|
display: block;
|
||||||
display: block;
|
margin: 0 -14px -16px;
|
||||||
margin: 0 -14px -16px;
|
}
|
||||||
}
|
.backup-types {
|
||||||
.backup-types {
|
display: flex;
|
||||||
display: flex;
|
margin-left: -13px;
|
||||||
margin-left: -13px;
|
margin-inline-start: -13px;
|
||||||
margin-inline-start: -13px;
|
margin-inline-end: initial;
|
||||||
margin-inline-end: initial;
|
}
|
||||||
}
|
.sub-header {
|
||||||
.sub-header {
|
margin-top: 8px;
|
||||||
margin-top: 8px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
public backupDetails():
|
public backupDetails():
|
||||||
| HassioPartialBackupCreateParams
|
| HassioPartialBackupCreateParams
|
||||||
| HassioFullBackupCreateParams {
|
| HassioFullBackupCreateParams {
|
||||||
const data: any = {};
|
const data: any = {};
|
||||||
|
|
||||||
if (!this.backup) {
|
if (!this.backup && this.hass) {
|
||||||
data.name =
|
data.name =
|
||||||
this.backupName ||
|
this.backupName ||
|
||||||
formatDate(new Date(), this.hass.locale, this.hass.config);
|
formatDate(new Date(), this.hass.locale, this.hass.config);
|
||||||
@@ -364,7 +363,9 @@ export class SupervisorBackupContent extends LitElement {
|
|||||||
if (folders?.length) {
|
if (folders?.length) {
|
||||||
data.folders = folders;
|
data.folders = folders;
|
||||||
}
|
}
|
||||||
data.homeassistant = this.homeAssistant;
|
|
||||||
|
// onboarding needs at least homeassistant to restore
|
||||||
|
data.homeassistant = this.onboarding || this.homeAssistant;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@@ -386,6 +387,7 @@ export class SupervisorBackupContent extends LitElement {
|
|||||||
.iconPath=${section === "addons" ? mdiPuzzle : mdiFolder}
|
.iconPath=${section === "addons" ? mdiPuzzle : mdiFolder}
|
||||||
.imageUrl=${section === "addons" &&
|
.imageUrl=${section === "addons" &&
|
||||||
!this.onboarding &&
|
!this.onboarding &&
|
||||||
|
this.hass &&
|
||||||
atLeastVersion(this.hass.config.version, 0, 105) &&
|
atLeastVersion(this.hass.config.version, 0, 105) &&
|
||||||
addons?.get(item.slug)?.icon
|
addons?.get(item.slug)?.icon
|
||||||
? `/api/hassio/addons/${item.slug}/icon`
|
? `/api/hassio/addons/${item.slug}/icon`
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { css, html, LitElement } from "lit";
|
import { css, html, LitElement } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import "../../../src/components/ha-svg-icon";
|
import "../../../src/components/ha-svg-icon";
|
||||||
@@ -30,29 +30,27 @@ class SupervisorFormfieldLabel extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
:host {
|
||||||
:host {
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
}
|
||||||
}
|
.label {
|
||||||
.label {
|
margin-right: 4px;
|
||||||
margin-right: 4px;
|
margin-inline-end: 4px;
|
||||||
margin-inline-end: 4px;
|
margin-inline-start: initial;
|
||||||
margin-inline-start: initial;
|
}
|
||||||
}
|
.version {
|
||||||
.version {
|
color: var(--secondary-text-color);
|
||||||
color: var(--secondary-text-color);
|
}
|
||||||
}
|
.icon {
|
||||||
.icon {
|
max-height: 22px;
|
||||||
max-height: 22px;
|
max-width: 22px;
|
||||||
max-width: 22px;
|
margin-right: 8px;
|
||||||
margin-right: 8px;
|
margin-inline-end: 8px;
|
||||||
margin-inline-end: 8px;
|
margin-inline-start: initial;
|
||||||
margin-inline-start: initial;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { css, html, LitElement } from "lit";
|
import { css, html, LitElement } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import { classMap } from "lit/directives/class-map";
|
import { classMap } from "lit/directives/class-map";
|
||||||
@@ -31,46 +31,41 @@ class SupervisorMetric extends LitElement {
|
|||||||
</ha-settings-row>`;
|
</ha-settings-row>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
ha-settings-row {
|
||||||
ha-settings-row {
|
padding: 0;
|
||||||
padding: 0;
|
height: 54px;
|
||||||
height: 54px;
|
width: 100%;
|
||||||
width: 100%;
|
}
|
||||||
}
|
ha-settings-row > div[slot="description"] {
|
||||||
ha-settings-row > div[slot="description"] {
|
white-space: normal;
|
||||||
white-space: normal;
|
color: var(--secondary-text-color);
|
||||||
color: var(--secondary-text-color);
|
display: flex;
|
||||||
display: flex;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
ha-bar {
|
||||||
ha-bar {
|
--ha-bar-primary-color: var(--hassio-bar-ok-color, var(--success-color));
|
||||||
--ha-bar-primary-color: var(
|
}
|
||||||
--hassio-bar-ok-color,
|
.target-warning {
|
||||||
var(--success-color)
|
--ha-bar-primary-color: var(
|
||||||
);
|
--hassio-bar-warning-color,
|
||||||
}
|
var(--warning-color)
|
||||||
.target-warning {
|
);
|
||||||
--ha-bar-primary-color: var(
|
}
|
||||||
--hassio-bar-warning-color,
|
.target-critical {
|
||||||
var(--warning-color)
|
--ha-bar-primary-color: var(
|
||||||
);
|
--hassio-bar-critical-color,
|
||||||
}
|
var(--error-color)
|
||||||
.target-critical {
|
);
|
||||||
--ha-bar-primary-color: var(
|
}
|
||||||
--hassio-bar-critical-color,
|
.value {
|
||||||
var(--error-color)
|
width: 48px;
|
||||||
);
|
padding-right: 4px;
|
||||||
}
|
padding-inline-start: initial;
|
||||||
.value {
|
padding-inline-end: 4px;
|
||||||
width: 48px;
|
flex-shrink: 0;
|
||||||
padding-right: 4px;
|
}
|
||||||
padding-inline-start: initial;
|
`;
|
||||||
padding-inline-end: 4px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -28,7 +28,7 @@ export class DialogHassioBackupUpload
|
|||||||
await this.updateComplete;
|
await this.updateComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeDialog(): void {
|
public closeDialog() {
|
||||||
if (this._dialogParams && !this._dialogParams.onboarding) {
|
if (this._dialogParams && !this._dialogParams.onboarding) {
|
||||||
if (this._dialogParams.reloadBackup) {
|
if (this._dialogParams.reloadBackup) {
|
||||||
this._dialogParams.reloadBackup();
|
this._dialogParams.reloadBackup();
|
||||||
@@ -36,6 +36,7 @@ export class DialogHassioBackupUpload
|
|||||||
}
|
}
|
||||||
this._dialogParams = undefined;
|
this._dialogParams = undefined;
|
||||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
|
@@ -8,9 +8,11 @@ import { atLeastVersion } from "../../../../src/common/config/version";
|
|||||||
import { fireEvent } from "../../../../src/common/dom/fire_event";
|
import { fireEvent } from "../../../../src/common/dom/fire_event";
|
||||||
import { stopPropagation } from "../../../../src/common/dom/stop_propagation";
|
import { stopPropagation } from "../../../../src/common/dom/stop_propagation";
|
||||||
import { slugify } from "../../../../src/common/string/slugify";
|
import { slugify } from "../../../../src/common/string/slugify";
|
||||||
import "../../../../src/components/ha-dialog";
|
import "../../../../src/components/ha-md-dialog";
|
||||||
|
import "../../../../src/components/ha-dialog-header";
|
||||||
import "../../../../src/components/buttons/ha-progress-button";
|
import "../../../../src/components/buttons/ha-progress-button";
|
||||||
import "../../../../src/components/ha-alert";
|
import "../../../../src/components/ha-alert";
|
||||||
|
import "../../../../src/components/ha-button";
|
||||||
import "../../../../src/components/ha-button-menu";
|
import "../../../../src/components/ha-button-menu";
|
||||||
import "../../../../src/components/ha-header-bar";
|
import "../../../../src/components/ha-header-bar";
|
||||||
import "../../../../src/components/ha-icon-button";
|
import "../../../../src/components/ha-icon-button";
|
||||||
@@ -19,6 +21,7 @@ import type { HassioBackupDetail } from "../../../../src/data/hassio/backup";
|
|||||||
import {
|
import {
|
||||||
fetchHassioBackupInfo,
|
fetchHassioBackupInfo,
|
||||||
removeBackup,
|
removeBackup,
|
||||||
|
restoreBackup,
|
||||||
} from "../../../../src/data/hassio/backup";
|
} from "../../../../src/data/hassio/backup";
|
||||||
import { extractApiErrorMessage } from "../../../../src/data/hassio/common";
|
import { extractApiErrorMessage } from "../../../../src/data/hassio/common";
|
||||||
import {
|
import {
|
||||||
@@ -33,6 +36,7 @@ import "../../components/supervisor-backup-content";
|
|||||||
import type { SupervisorBackupContent } from "../../components/supervisor-backup-content";
|
import type { SupervisorBackupContent } from "../../components/supervisor-backup-content";
|
||||||
import type { HassioBackupDialogParams } from "./show-dialog-hassio-backup";
|
import type { HassioBackupDialogParams } from "./show-dialog-hassio-backup";
|
||||||
import type { BackupOrRestoreKey } from "../../util/translations";
|
import type { BackupOrRestoreKey } from "../../util/translations";
|
||||||
|
import type { HaMdDialog } from "../../../../src/components/ha-md-dialog";
|
||||||
|
|
||||||
@customElement("dialog-hassio-backup")
|
@customElement("dialog-hassio-backup")
|
||||||
class HassioBackupDialog
|
class HassioBackupDialog
|
||||||
@@ -52,13 +56,20 @@ class HassioBackupDialog
|
|||||||
@query("supervisor-backup-content")
|
@query("supervisor-backup-content")
|
||||||
private _backupContent!: SupervisorBackupContent;
|
private _backupContent!: SupervisorBackupContent;
|
||||||
|
|
||||||
|
@query("ha-md-dialog") private _dialog?: HaMdDialog;
|
||||||
|
|
||||||
public async showDialog(dialogParams: HassioBackupDialogParams) {
|
public async showDialog(dialogParams: HassioBackupDialogParams) {
|
||||||
this._backup = await fetchHassioBackupInfo(this.hass, dialogParams.slug);
|
|
||||||
this._dialogParams = dialogParams;
|
this._dialogParams = dialogParams;
|
||||||
|
this._backup = await fetchHassioBackupInfo(this.hass, dialogParams.slug);
|
||||||
|
if (!this._backup) {
|
||||||
|
this._error = this._localize("no_backup_found");
|
||||||
|
} else if (this._dialogParams.onboarding && !this._backup.homeassistant) {
|
||||||
|
this._error = this._localize("restore_no_home_assistant");
|
||||||
|
}
|
||||||
this._restoringBackup = false;
|
this._restoringBackup = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeDialog() {
|
private _dialogClosed(): void {
|
||||||
this._backup = undefined;
|
this._backup = undefined;
|
||||||
this._dialogParams = undefined;
|
this._dialogParams = undefined;
|
||||||
this._restoringBackup = false;
|
this._restoringBackup = false;
|
||||||
@@ -66,6 +77,11 @@ class HassioBackupDialog
|
|||||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public closeDialog() {
|
||||||
|
this._dialog?.close();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private _localize(key: BackupOrRestoreKey) {
|
private _localize(key: BackupOrRestoreKey) {
|
||||||
return (
|
return (
|
||||||
this._dialogParams!.supervisor?.localize(`backup.${key}`) ||
|
this._dialogParams!.supervisor?.localize(`backup.${key}`) ||
|
||||||
@@ -78,100 +94,80 @@ class HassioBackupDialog
|
|||||||
return nothing;
|
return nothing;
|
||||||
}
|
}
|
||||||
return html`
|
return html`
|
||||||
<ha-dialog
|
<ha-md-dialog
|
||||||
open
|
open
|
||||||
scrimClickAction
|
.disableCancelAction=${!this._error}
|
||||||
@closed=${this.closeDialog}
|
@closed=${this._dialogClosed}
|
||||||
.heading=${this._backup.name}
|
|
||||||
>
|
>
|
||||||
<div slot="heading">
|
<ha-dialog-header slot="headline">
|
||||||
<ha-header-bar>
|
<ha-icon-button
|
||||||
<span slot="title">${this._backup.name}</span>
|
slot="navigationIcon"
|
||||||
<ha-icon-button
|
.label=${this._localize("close")}
|
||||||
.label=${this._localize("close")}
|
.path=${mdiClose}
|
||||||
.path=${mdiClose}
|
@click=${this.closeDialog}
|
||||||
slot="actionItems"
|
.disabled=${this._restoringBackup}
|
||||||
dialogAction="cancel"
|
></ha-icon-button>
|
||||||
></ha-icon-button>
|
<span slot="title" .title=${this._backup.name}
|
||||||
</ha-header-bar>
|
>${this._backup.name}</span
|
||||||
|
>
|
||||||
|
${!this._dialogParams.onboarding && this._dialogParams.supervisor
|
||||||
|
? html`<ha-button-menu
|
||||||
|
slot="actionItems"
|
||||||
|
fixed
|
||||||
|
@action=${this._handleMenuAction}
|
||||||
|
@closed=${stopPropagation}
|
||||||
|
>
|
||||||
|
<ha-icon-button
|
||||||
|
.label=${this._dialogParams.supervisor.localize(
|
||||||
|
"backup.more_actions"
|
||||||
|
)}
|
||||||
|
.path=${mdiDotsVertical}
|
||||||
|
slot="trigger"
|
||||||
|
></ha-icon-button>
|
||||||
|
<mwc-list-item
|
||||||
|
>${this._dialogParams.supervisor.localize(
|
||||||
|
"backup.download_backup"
|
||||||
|
)}</mwc-list-item
|
||||||
|
>
|
||||||
|
<mwc-list-item class="error"
|
||||||
|
>${this._dialogParams.supervisor.localize(
|
||||||
|
"backup.delete_backup_title"
|
||||||
|
)}</mwc-list-item
|
||||||
|
>
|
||||||
|
</ha-button-menu>`
|
||||||
|
: nothing}
|
||||||
|
</ha-dialog-header>
|
||||||
|
<div slot="content">
|
||||||
|
${this._error
|
||||||
|
? html`<ha-alert alert-type="error">${this._error}</ha-alert>`
|
||||||
|
: this._restoringBackup
|
||||||
|
? html`<div class="loading">
|
||||||
|
<ha-circular-progress indeterminate></ha-circular-progress>
|
||||||
|
</div>`
|
||||||
|
: html`
|
||||||
|
<supervisor-backup-content
|
||||||
|
.hass=${this.hass}
|
||||||
|
.supervisor=${this._dialogParams.supervisor}
|
||||||
|
.backup=${this._backup}
|
||||||
|
.onboarding=${this._dialogParams.onboarding || false}
|
||||||
|
.localize=${this._dialogParams.localize}
|
||||||
|
dialogInitialFocus
|
||||||
|
>
|
||||||
|
</supervisor-backup-content>
|
||||||
|
`}
|
||||||
</div>
|
</div>
|
||||||
${this._restoringBackup
|
<div slot="actions">
|
||||||
? html`<ha-circular-progress indeterminate></ha-circular-progress>`
|
<ha-button
|
||||||
: html`
|
.disabled=${this._restoringBackup || !!this._error}
|
||||||
<supervisor-backup-content
|
@click=${this._restoreClicked}
|
||||||
.hass=${this.hass}
|
>
|
||||||
.supervisor=${this._dialogParams.supervisor}
|
${this._localize("restore")}
|
||||||
.backup=${this._backup}
|
</ha-button>
|
||||||
.onboarding=${this._dialogParams.onboarding || false}
|
</div>
|
||||||
.localize=${this._dialogParams.localize}
|
</ha-md-dialog>
|
||||||
dialogInitialFocus
|
|
||||||
>
|
|
||||||
</supervisor-backup-content>
|
|
||||||
`}
|
|
||||||
${this._error
|
|
||||||
? html`<ha-alert alert-type="error">${this._error}</ha-alert>`
|
|
||||||
: nothing}
|
|
||||||
|
|
||||||
<mwc-button
|
|
||||||
.disabled=${this._restoringBackup}
|
|
||||||
slot="secondaryAction"
|
|
||||||
@click=${this._restoreClicked}
|
|
||||||
>
|
|
||||||
${this._localize("restore")}
|
|
||||||
</mwc-button>
|
|
||||||
|
|
||||||
${!this._dialogParams.onboarding && this._dialogParams.supervisor
|
|
||||||
? html`<ha-button-menu
|
|
||||||
fixed
|
|
||||||
slot="primaryAction"
|
|
||||||
@action=${this._handleMenuAction}
|
|
||||||
@closed=${stopPropagation}
|
|
||||||
>
|
|
||||||
<ha-icon-button
|
|
||||||
.label=${this._dialogParams.supervisor.localize(
|
|
||||||
"backup.more_actions"
|
|
||||||
)}
|
|
||||||
.path=${mdiDotsVertical}
|
|
||||||
slot="trigger"
|
|
||||||
></ha-icon-button>
|
|
||||||
<mwc-list-item
|
|
||||||
>${this._dialogParams.supervisor.localize(
|
|
||||||
"backup.download_backup"
|
|
||||||
)}</mwc-list-item
|
|
||||||
>
|
|
||||||
<mwc-list-item class="error"
|
|
||||||
>${this._dialogParams.supervisor.localize(
|
|
||||||
"backup.delete_backup_title"
|
|
||||||
)}</mwc-list-item
|
|
||||||
>
|
|
||||||
</ha-button-menu>`
|
|
||||||
: nothing}
|
|
||||||
</ha-dialog>
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
|
||||||
return [
|
|
||||||
haStyle,
|
|
||||||
haStyleDialog,
|
|
||||||
css`
|
|
||||||
ha-circular-progress {
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
ha-header-bar {
|
|
||||||
--mdc-theme-on-primary: var(--primary-text-color);
|
|
||||||
--mdc-theme-primary: var(--mdc-theme-surface);
|
|
||||||
flex-shrink: 0;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
ha-icon-button {
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
private _handleMenuAction(ev: CustomEvent<ActionDetail>) {
|
private _handleMenuAction(ev: CustomEvent<ActionDetail>) {
|
||||||
switch (ev.detail.index) {
|
switch (ev.detail.index) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -186,16 +182,7 @@ class HassioBackupDialog
|
|||||||
private async _restoreClicked() {
|
private async _restoreClicked() {
|
||||||
const backupDetails = this._backupContent.backupDetails();
|
const backupDetails = this._backupContent.backupDetails();
|
||||||
this._restoringBackup = true;
|
this._restoringBackup = true;
|
||||||
this._dialogParams?.onRestoring?.();
|
|
||||||
if (this._backupContent.backupType === "full") {
|
|
||||||
await this._fullRestoreClicked(backupDetails);
|
|
||||||
} else {
|
|
||||||
await this._partialRestoreClicked(backupDetails);
|
|
||||||
}
|
|
||||||
this._restoringBackup = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async _partialRestoreClicked(backupDetails) {
|
|
||||||
const supervisor = this._dialogParams?.supervisor;
|
const supervisor = this._dialogParams?.supervisor;
|
||||||
if (supervisor !== undefined && supervisor.info.state !== "running") {
|
if (supervisor !== undefined && supervisor.info.state !== "running") {
|
||||||
await showAlertDialog(this, {
|
await showAlertDialog(this, {
|
||||||
@@ -204,91 +191,45 @@ class HassioBackupDialog
|
|||||||
state: supervisor.info.state,
|
state: supervisor.info.state,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
this._restoringBackup = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
!(await showConfirmationDialog(this, {
|
!(await showConfirmationDialog(this, {
|
||||||
title: this._localize("confirm_restore_partial_backup_title"),
|
title: this._localize(
|
||||||
text: this._localize("confirm_restore_partial_backup_text"),
|
this._backup!.type === "full"
|
||||||
|
? "confirm_restore_full_backup_title"
|
||||||
|
: "confirm_restore_partial_backup_title"
|
||||||
|
),
|
||||||
|
text: this._localize(
|
||||||
|
this._backup!.type === "full"
|
||||||
|
? "confirm_restore_full_backup_text"
|
||||||
|
: "confirm_restore_partial_backup_text"
|
||||||
|
),
|
||||||
confirmText: this._localize("restore"),
|
confirmText: this._localize("restore"),
|
||||||
dismissText: this._localize("cancel"),
|
dismissText: this._localize("cancel"),
|
||||||
}))
|
}))
|
||||||
) {
|
) {
|
||||||
|
this._restoringBackup = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._dialogParams?.onboarding) {
|
try {
|
||||||
try {
|
await restoreBackup(
|
||||||
await this.hass!.callApi(
|
this.hass,
|
||||||
"POST",
|
this._backup!.type,
|
||||||
|
this._backup!.slug,
|
||||||
`hassio/${
|
{ ...backupDetails, background: this._dialogParams?.onboarding },
|
||||||
atLeastVersion(this.hass!.config.version, 2021, 9)
|
!!this.hass && atLeastVersion(this.hass.config.version, 2021, 9)
|
||||||
? "backups"
|
|
||||||
: "snapshots"
|
|
||||||
}/${this._backup!.slug}/restore/partial`,
|
|
||||||
backupDetails
|
|
||||||
);
|
|
||||||
this.closeDialog();
|
|
||||||
} catch (error: any) {
|
|
||||||
this._error = error.body.message;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this._dialogParams?.onRestoring?.();
|
|
||||||
await fetch(`/api/hassio/backups/${this._backup!.slug}/restore/partial`, {
|
|
||||||
method: "POST",
|
|
||||||
body: JSON.stringify(backupDetails),
|
|
||||||
});
|
|
||||||
this.closeDialog();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async _fullRestoreClicked(backupDetails) {
|
|
||||||
const supervisor = this._dialogParams?.supervisor;
|
|
||||||
if (supervisor !== undefined && supervisor.info.state !== "running") {
|
|
||||||
await showAlertDialog(this, {
|
|
||||||
title: supervisor.localize("backup.could_not_restore"),
|
|
||||||
text: supervisor.localize("backup.restore_blocked_not_running", {
|
|
||||||
state: supervisor.info.state,
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
!(await showConfirmationDialog(this, {
|
|
||||||
title: this._localize("confirm_restore_full_backup_title"),
|
|
||||||
text: this._localize("confirm_restore_full_backup_text"),
|
|
||||||
confirmText: this._localize("restore"),
|
|
||||||
dismissText: this._localize("cancel"),
|
|
||||||
}))
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this._dialogParams?.onboarding) {
|
|
||||||
this.hass!.callApi(
|
|
||||||
"POST",
|
|
||||||
`hassio/${
|
|
||||||
atLeastVersion(this.hass!.config.version, 2021, 9)
|
|
||||||
? "backups"
|
|
||||||
: "snapshots"
|
|
||||||
}/${this._backup!.slug}/restore/full`,
|
|
||||||
backupDetails
|
|
||||||
).then(
|
|
||||||
() => {
|
|
||||||
this.closeDialog();
|
|
||||||
},
|
|
||||||
(error) => {
|
|
||||||
this._error = error.body.message;
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
this._dialogParams?.onRestoring?.();
|
this._dialogParams?.onRestoring?.();
|
||||||
fetch(`/api/hassio/backups/${this._backup!.slug}/restore/full`, {
|
|
||||||
method: "POST",
|
|
||||||
body: JSON.stringify(backupDetails),
|
|
||||||
});
|
|
||||||
this.closeDialog();
|
this.closeDialog();
|
||||||
|
} catch (error: any) {
|
||||||
|
this._error =
|
||||||
|
error?.body?.message || this._localize("restore_start_failed");
|
||||||
|
} finally {
|
||||||
|
this._restoringBackup = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,7 +302,36 @@ class HassioBackupDialog
|
|||||||
private get _computeName() {
|
private get _computeName() {
|
||||||
return this._backup
|
return this._backup
|
||||||
? this._backup.name || this._backup.slug
|
? this._backup.name || this._backup.slug
|
||||||
: "Unnamed backup";
|
: this._localize("unnamed_backup");
|
||||||
|
}
|
||||||
|
|
||||||
|
static get styles(): CSSResultGroup {
|
||||||
|
return [
|
||||||
|
haStyle,
|
||||||
|
haStyleDialog,
|
||||||
|
css`
|
||||||
|
ha-circular-progress {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
ha-header-bar {
|
||||||
|
--mdc-theme-on-primary: var(--primary-text-color);
|
||||||
|
--mdc-theme-primary: var(--mdc-theme-surface);
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
ha-icon-button {
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
}
|
||||||
|
.loading {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -82,10 +82,11 @@ export class DialogHassioNetwork
|
|||||||
await this.updateComplete;
|
await this.updateComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeDialog(): void {
|
public closeDialog() {
|
||||||
this._params = undefined;
|
this._params = undefined;
|
||||||
this._processing = false;
|
this._processing = false;
|
||||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
|
@@ -92,7 +92,7 @@ class HassioMyRedirect extends LitElement {
|
|||||||
let url: string;
|
let url: string;
|
||||||
try {
|
try {
|
||||||
url = this._createRedirectUrl(redirect);
|
url = this._createRedirectUrl(redirect);
|
||||||
} catch (err: any) {
|
} catch (_err: any) {
|
||||||
this._error = this.supervisor.localize("my.error");
|
this._error = this.supervisor.localize("my.error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { css, html, LitElement } from "lit";
|
import { css, html, LitElement } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import type { Supervisor } from "../../src/data/supervisor/supervisor";
|
import type { Supervisor } from "../../src/data/supervisor/supervisor";
|
||||||
@@ -39,15 +39,13 @@ class HassioPanel extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
:host {
|
||||||
:host {
|
--app-header-background-color: var(--sidebar-background-color);
|
||||||
--app-header-background-color: var(--sidebar-background-color);
|
--app-header-text-color: var(--sidebar-text-color);
|
||||||
--app-header-text-color: var(--sidebar-text-color);
|
--app-header-border-bottom: 1px solid var(--divider-color);
|
||||||
--app-header-border-bottom: 1px solid var(--divider-color);
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { mdiMenu } from "@mdi/js";
|
import { mdiMenu } from "@mdi/js";
|
||||||
import type { CSSResultGroup, PropertyValues, TemplateResult } from "lit";
|
import type { PropertyValues, TemplateResult } from "lit";
|
||||||
import { css, html, LitElement } from "lit";
|
import { css, html, LitElement } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { fireEvent } from "../../../src/common/dom/fire_event";
|
import { fireEvent } from "../../../src/common/dom/fire_event";
|
||||||
@@ -158,7 +158,7 @@ class HassioIngressView extends LitElement {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
addon = await fetchHassioAddonInfo(this.hass, addonSlug);
|
addon = await fetchHassioAddonInfo(this.hass, addonSlug);
|
||||||
} catch (err: any) {
|
} catch (_err: any) {
|
||||||
await this.updateComplete;
|
await this.updateComplete;
|
||||||
await showAlertDialog(this, {
|
await showAlertDialog(this, {
|
||||||
text:
|
text:
|
||||||
@@ -219,7 +219,7 @@ class HassioIngressView extends LitElement {
|
|||||||
});
|
});
|
||||||
this._fetchData(addonSlug);
|
this._fetchData(addonSlug);
|
||||||
return;
|
return;
|
||||||
} catch (e) {
|
} catch (_err) {
|
||||||
await showAlertDialog(this, {
|
await showAlertDialog(this, {
|
||||||
text:
|
text:
|
||||||
this.supervisor.localize("ingress.error_starting_addon") ||
|
this.supervisor.localize("ingress.error_starting_addon") ||
|
||||||
@@ -264,7 +264,7 @@ class HassioIngressView extends LitElement {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
session = await createSessionPromise;
|
session = await createSessionPromise;
|
||||||
} catch (err: any) {
|
} catch (_err: any) {
|
||||||
if (this._sessionKeepAlive) {
|
if (this._sessionKeepAlive) {
|
||||||
clearInterval(this._sessionKeepAlive);
|
clearInterval(this._sessionKeepAlive);
|
||||||
}
|
}
|
||||||
@@ -285,7 +285,7 @@ class HassioIngressView extends LitElement {
|
|||||||
this._sessionKeepAlive = window.setInterval(async () => {
|
this._sessionKeepAlive = window.setInterval(async () => {
|
||||||
try {
|
try {
|
||||||
await validateHassioSession(this.hass, session);
|
await validateHassioSession(this.hass, session);
|
||||||
} catch (err: any) {
|
} catch (_err: any) {
|
||||||
session = await createHassioSession(this.hass);
|
session = await createHassioSession(this.hass);
|
||||||
}
|
}
|
||||||
}, 60000);
|
}, 60000);
|
||||||
@@ -325,51 +325,49 @@ class HassioIngressView extends LitElement {
|
|||||||
fireEvent(this, "hass-toggle-menu");
|
fireEvent(this, "hass-toggle-menu");
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
iframe {
|
||||||
iframe {
|
display: block;
|
||||||
display: block;
|
width: 100%;
|
||||||
width: 100%;
|
height: 100%;
|
||||||
height: 100%;
|
border: 0;
|
||||||
border: 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.header + iframe {
|
.header + iframe {
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
background-color: var(--app-header-background-color);
|
background-color: var(--app-header-background-color);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: var(--app-header-text-color, white);
|
color: var(--app-header-text-color, white);
|
||||||
border-bottom: var(--app-header-border-bottom, none);
|
border-bottom: var(--app-header-border-bottom, none);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
--mdc-icon-size: 20px;
|
--mdc-icon-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-title {
|
.main-title {
|
||||||
margin: var(--margin-title);
|
margin: var(--margin-title);
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ha-icon-button {
|
ha-icon-button {
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
hass-subpage {
|
hass-subpage {
|
||||||
--app-header-background-color: var(--sidebar-background-color);
|
--app-header-background-color: var(--sidebar-background-color);
|
||||||
--app-header-text-color: var(--sidebar-text-color);
|
--app-header-text-color: var(--sidebar-text-color);
|
||||||
--app-header-border-bottom: 1px solid var(--divider-color);
|
--app-header-border-bottom: 1px solid var(--divider-color);
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -33,7 +33,7 @@ class HassioCoreInfo extends LitElement {
|
|||||||
|
|
||||||
@state() private _metrics?: HassioStats;
|
@state() private _metrics?: HassioStats;
|
||||||
|
|
||||||
protected render(): TemplateResult | void {
|
protected render(): TemplateResult | undefined {
|
||||||
const metrics = [
|
const metrics = [
|
||||||
{
|
{
|
||||||
description: this.supervisor.localize("system.core.cpu_usage"),
|
description: this.supervisor.localize("system.core.cpu_usage"),
|
||||||
|
@@ -49,7 +49,7 @@ class HassioHostInfo extends LitElement {
|
|||||||
|
|
||||||
@property({ attribute: false }) public supervisor!: Supervisor;
|
@property({ attribute: false }) public supervisor!: Supervisor;
|
||||||
|
|
||||||
protected render(): TemplateResult | void {
|
protected render(): TemplateResult | undefined {
|
||||||
const primaryIpAddress = this.supervisor.host.features.includes("network")
|
const primaryIpAddress = this.supervisor.host.features.includes("network")
|
||||||
? this._primaryIpAddress(this.supervisor.network!)
|
? this._primaryIpAddress(this.supervisor.network!)
|
||||||
: "";
|
: "";
|
||||||
|
@@ -44,7 +44,7 @@ class HassioSupervisorInfo extends LitElement {
|
|||||||
|
|
||||||
@state() private _metrics?: HassioStats;
|
@state() private _metrics?: HassioStats;
|
||||||
|
|
||||||
protected render(): TemplateResult | void {
|
protected render(): TemplateResult | undefined {
|
||||||
const metrics = [
|
const metrics = [
|
||||||
{
|
{
|
||||||
description: this.supervisor.localize("system.supervisor.cpu_usage"),
|
description: this.supervisor.localize("system.supervisor.cpu_usage"),
|
||||||
|
@@ -65,7 +65,7 @@ class HassioSupervisorLog extends LitElement {
|
|||||||
await this._loadData();
|
await this._loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected render(): TemplateResult | void {
|
protected render(): TemplateResult | undefined {
|
||||||
return html`
|
return html`
|
||||||
<ha-card outlined>
|
<ha-card outlined>
|
||||||
${this._error
|
${this._error
|
||||||
|
@@ -23,7 +23,7 @@ class HassioSystem extends LitElement {
|
|||||||
|
|
||||||
@property({ attribute: false }) public route!: Route;
|
@property({ attribute: false }) public route!: Route;
|
||||||
|
|
||||||
protected render(): TemplateResult | void {
|
protected render(): TemplateResult | undefined {
|
||||||
return html`
|
return html`
|
||||||
<hass-tabs-subpage
|
<hass-tabs-subpage
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
|
@@ -9,6 +9,7 @@ import {
|
|||||||
} from "lit";
|
} from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
|
import { atLeastVersion } from "../../../src/common/config/version";
|
||||||
import { fireEvent } from "../../../src/common/dom/fire_event";
|
import { fireEvent } from "../../../src/common/dom/fire_event";
|
||||||
import "../../../src/components/buttons/ha-progress-button";
|
import "../../../src/components/buttons/ha-progress-button";
|
||||||
import "../../../src/components/ha-alert";
|
import "../../../src/components/ha-alert";
|
||||||
@@ -18,7 +19,8 @@ import "../../../src/components/ha-checkbox";
|
|||||||
import "../../../src/components/ha-faded";
|
import "../../../src/components/ha-faded";
|
||||||
import "../../../src/components/ha-icon-button";
|
import "../../../src/components/ha-icon-button";
|
||||||
import "../../../src/components/ha-markdown";
|
import "../../../src/components/ha-markdown";
|
||||||
import "../../../src/components/ha-settings-row";
|
import "../../../src/components/ha-md-list";
|
||||||
|
import "../../../src/components/ha-md-list-item";
|
||||||
import "../../../src/components/ha-svg-icon";
|
import "../../../src/components/ha-svg-icon";
|
||||||
import "../../../src/components/ha-switch";
|
import "../../../src/components/ha-switch";
|
||||||
import type { HaSwitch } from "../../../src/components/ha-switch";
|
import type { HaSwitch } from "../../../src/components/ha-switch";
|
||||||
@@ -124,6 +126,8 @@ class UpdateAvailableCard extends LitElement {
|
|||||||
|
|
||||||
const changelog = changelogUrl(this._updateType, this._version_latest);
|
const changelog = changelogUrl(this._updateType, this._version_latest);
|
||||||
|
|
||||||
|
const createBackupTexts = this._computeCreateBackupTexts();
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-card
|
<ha-card
|
||||||
outlined
|
outlined
|
||||||
@@ -163,17 +167,28 @@ class UpdateAvailableCard extends LitElement {
|
|||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
${["core", "addon"].includes(this._updateType)
|
${createBackupTexts
|
||||||
? html`
|
? html`
|
||||||
<hr />
|
<hr />
|
||||||
<ha-settings-row>
|
<ha-md-list>
|
||||||
<span slot="heading">
|
<ha-md-list-item>
|
||||||
${this.supervisor.localize(
|
<span slot="headline">
|
||||||
"update_available.create_backup"
|
${createBackupTexts.title}
|
||||||
)}
|
</span>
|
||||||
</span>
|
|
||||||
<ha-switch id="create_backup" checked></ha-switch>
|
${createBackupTexts.description
|
||||||
</ha-settings-row>
|
? html`
|
||||||
|
<span slot="supporting-text">
|
||||||
|
${createBackupTexts.description}
|
||||||
|
</span>
|
||||||
|
`
|
||||||
|
: nothing}
|
||||||
|
<ha-switch
|
||||||
|
slot="end"
|
||||||
|
id="create-backup"
|
||||||
|
></ha-switch>
|
||||||
|
</ha-md-list-item>
|
||||||
|
</ha-md-list>
|
||||||
`
|
`
|
||||||
: nothing}
|
: nothing}
|
||||||
`
|
`
|
||||||
@@ -243,6 +258,35 @@ class UpdateAvailableCard extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _computeCreateBackupTexts():
|
||||||
|
| { title: string; description?: string }
|
||||||
|
| undefined {
|
||||||
|
// Addon backup
|
||||||
|
if (
|
||||||
|
this._updateType === "addon" &&
|
||||||
|
atLeastVersion(this.hass.config.version, 2025, 2, 0)
|
||||||
|
) {
|
||||||
|
const version = this._version;
|
||||||
|
return {
|
||||||
|
title: this.supervisor.localize("update_available.create_backup.addon"),
|
||||||
|
description: this.supervisor.localize(
|
||||||
|
"update_available.create_backup.addon_description",
|
||||||
|
{ version: version }
|
||||||
|
),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Old behavior
|
||||||
|
if (this._updateType && ["core", "addon"].includes(this._updateType)) {
|
||||||
|
return {
|
||||||
|
title: this.supervisor.localize(
|
||||||
|
"update_available.create_backup.generic"
|
||||||
|
),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
get _shouldCreateBackup(): boolean {
|
get _shouldCreateBackup(): boolean {
|
||||||
if (this._updateType && !["core", "addon"].includes(this._updateType)) {
|
if (this._updateType && !["core", "addon"].includes(this._updateType)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -374,7 +418,6 @@ class UpdateAvailableCard extends LitElement {
|
|||||||
this._error = this.supervisor.localize("backup.backup_already_running");
|
this._error = this.supervisor.localize("backup.backup_already_running");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._error = undefined;
|
this._error = undefined;
|
||||||
this._updating = true;
|
this._updating = true;
|
||||||
|
|
||||||
@@ -436,16 +479,22 @@ class UpdateAvailableCard extends LitElement {
|
|||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ha-settings-row {
|
|
||||||
padding: 0;
|
|
||||||
margin-bottom: -16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
border-color: var(--divider-color);
|
border-color: var(--divider-color);
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
margin: 16px 0 0 0;
|
margin: 16px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ha-md-list {
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: -16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ha-md-list-item {
|
||||||
|
--md-list-item-leading-space: 0;
|
||||||
|
--md-list-item-trailing-space: 0;
|
||||||
|
--md-item-overflow: visible;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
import type { TemplateResult } from "lit";
|
||||||
import { css, html, LitElement } from "lit";
|
import { css, html, LitElement } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import type { Supervisor } from "../../../src/data/supervisor/supervisor";
|
import type { Supervisor } from "../../../src/data/supervisor/supervisor";
|
||||||
@@ -38,20 +38,18 @@ class UpdateAvailableDashboard extends LitElement {
|
|||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static styles = css`
|
||||||
return css`
|
hass-subpage {
|
||||||
hass-subpage {
|
--app-header-background-color: var(--primary-background-color);
|
||||||
--app-header-background-color: var(--primary-background-color);
|
--app-header-text-color: var(--sidebar-text-color);
|
||||||
--app-header-text-color: var(--sidebar-text-color);
|
}
|
||||||
}
|
update-available-card {
|
||||||
update-available-card {
|
margin: auto;
|
||||||
margin: auto;
|
margin-top: 16px;
|
||||||
margin-top: 16px;
|
margin-bottom: 24px;
|
||||||
margin-bottom: 24px;
|
max-width: 600px;
|
||||||
max-width: 600px;
|
}
|
||||||
}
|
`;
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@@ -230,7 +230,7 @@ class LandingPageLogs extends LitElement {
|
|||||||
this._startLogStream();
|
this._startLogStream();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (_err) {
|
||||||
// ignore and continue with observer logs
|
// ignore and continue with observer logs
|
||||||
}
|
}
|
||||||
this._loadObserverLogs();
|
this._loadObserverLogs();
|
||||||
|
@@ -126,7 +126,7 @@ class HaLandingPage extends LandingPageBaseElement {
|
|||||||
"selectedLanguage",
|
"selectedLanguage",
|
||||||
JSON.stringify(language)
|
JSON.stringify(language)
|
||||||
);
|
);
|
||||||
} catch (err: any) {
|
} catch (_err: any) {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
120
package.json
120
package.json
@@ -26,25 +26,25 @@
|
|||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "7.26.0",
|
"@babel/runtime": "7.26.7",
|
||||||
"@braintree/sanitize-url": "7.1.0",
|
"@braintree/sanitize-url": "7.1.1",
|
||||||
"@codemirror/autocomplete": "6.18.3",
|
"@codemirror/autocomplete": "6.18.4",
|
||||||
"@codemirror/commands": "6.7.1",
|
"@codemirror/commands": "6.8.0",
|
||||||
"@codemirror/language": "6.10.6",
|
"@codemirror/language": "6.10.8",
|
||||||
"@codemirror/legacy-modes": "6.4.2",
|
"@codemirror/legacy-modes": "6.4.2",
|
||||||
"@codemirror/search": "6.5.8",
|
"@codemirror/search": "6.5.8",
|
||||||
"@codemirror/state": "6.4.1",
|
"@codemirror/state": "6.5.1",
|
||||||
"@codemirror/view": "6.35.2",
|
"@codemirror/view": "6.36.2",
|
||||||
"@egjs/hammerjs": "2.0.17",
|
"@egjs/hammerjs": "2.0.17",
|
||||||
"@formatjs/intl-datetimeformat": "6.16.6",
|
"@formatjs/intl-datetimeformat": "6.17.2",
|
||||||
"@formatjs/intl-displaynames": "6.8.6",
|
"@formatjs/intl-displaynames": "6.8.9",
|
||||||
"@formatjs/intl-durationformat": "0.6.5",
|
"@formatjs/intl-durationformat": "0.7.2",
|
||||||
"@formatjs/intl-getcanonicallocales": "2.5.3",
|
"@formatjs/intl-getcanonicallocales": "2.5.4",
|
||||||
"@formatjs/intl-listformat": "7.7.6",
|
"@formatjs/intl-listformat": "7.7.9",
|
||||||
"@formatjs/intl-locale": "4.2.6",
|
"@formatjs/intl-locale": "4.2.9",
|
||||||
"@formatjs/intl-numberformat": "8.14.6",
|
"@formatjs/intl-numberformat": "8.15.2",
|
||||||
"@formatjs/intl-pluralrules": "5.3.6",
|
"@formatjs/intl-pluralrules": "5.4.2",
|
||||||
"@formatjs/intl-relativetimeformat": "11.4.6",
|
"@formatjs/intl-relativetimeformat": "11.4.9",
|
||||||
"@fullcalendar/core": "6.1.15",
|
"@fullcalendar/core": "6.1.15",
|
||||||
"@fullcalendar/daygrid": "6.1.15",
|
"@fullcalendar/daygrid": "6.1.15",
|
||||||
"@fullcalendar/interaction": "6.1.15",
|
"@fullcalendar/interaction": "6.1.15",
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
"@lit-labs/context": "0.4.1",
|
"@lit-labs/context": "0.4.1",
|
||||||
"@lit-labs/motion": "1.0.7",
|
"@lit-labs/motion": "1.0.7",
|
||||||
"@lit-labs/observers": "2.0.4",
|
"@lit-labs/observers": "2.0.4",
|
||||||
"@lit-labs/virtualizer": "2.0.14",
|
"@lit-labs/virtualizer": "2.0.15",
|
||||||
"@lrnwebcomponents/simple-tooltip": "8.0.2",
|
"@lrnwebcomponents/simple-tooltip": "8.0.2",
|
||||||
"@material/chips": "=14.0.0-canary.53b3cad2f.0",
|
"@material/chips": "=14.0.0-canary.53b3cad2f.0",
|
||||||
"@material/data-table": "=14.0.0-canary.53b3cad2f.0",
|
"@material/data-table": "=14.0.0-canary.53b3cad2f.0",
|
||||||
@@ -91,43 +91,41 @@
|
|||||||
"@polymer/polymer": "3.5.2",
|
"@polymer/polymer": "3.5.2",
|
||||||
"@replit/codemirror-indentation-markers": "6.5.3",
|
"@replit/codemirror-indentation-markers": "6.5.3",
|
||||||
"@thomasloven/round-slider": "0.6.0",
|
"@thomasloven/round-slider": "0.6.0",
|
||||||
"@vaadin/combo-box": "24.5.5",
|
"@vaadin/combo-box": "24.6.2",
|
||||||
"@vaadin/vaadin-themable-mixin": "24.5.5",
|
"@vaadin/vaadin-themable-mixin": "24.6.2",
|
||||||
"@vibrant/color": "3.2.1-alpha.1",
|
"@vibrant/color": "4.0.0",
|
||||||
"@vibrant/core": "3.2.1-alpha.1",
|
|
||||||
"@vibrant/quantizer-mmcq": "3.2.1-alpha.1",
|
|
||||||
"@vue/web-component-wrapper": "1.3.0",
|
"@vue/web-component-wrapper": "1.3.0",
|
||||||
"@webcomponents/scoped-custom-element-registry": "0.0.9",
|
"@webcomponents/scoped-custom-element-registry": "0.0.9",
|
||||||
"@webcomponents/webcomponentsjs": "2.8.0",
|
"@webcomponents/webcomponentsjs": "2.8.0",
|
||||||
"app-datepicker": "5.1.1",
|
"app-datepicker": "5.1.1",
|
||||||
"barcode-detector": "2.3.1",
|
"barcode-detector": "2.3.1",
|
||||||
"chart.js": "4.4.7",
|
|
||||||
"color-name": "2.0.0",
|
"color-name": "2.0.0",
|
||||||
"comlink": "4.4.2",
|
"comlink": "4.4.2",
|
||||||
"core-js": "3.39.0",
|
"core-js": "3.40.0",
|
||||||
"cropperjs": "1.6.2",
|
"cropperjs": "1.6.2",
|
||||||
"date-fns": "4.1.0",
|
"date-fns": "4.1.0",
|
||||||
"date-fns-tz": "3.2.0",
|
"date-fns-tz": "3.2.0",
|
||||||
"deep-clone-simple": "1.1.1",
|
"deep-clone-simple": "1.1.1",
|
||||||
"deep-freeze": "0.0.1",
|
"deep-freeze": "0.0.1",
|
||||||
"dialog-polyfill": "0.5.6",
|
"dialog-polyfill": "0.5.6",
|
||||||
"element-internals-polyfill": "1.3.12",
|
"echarts": "5.6.0",
|
||||||
|
"element-internals-polyfill": "1.3.13",
|
||||||
"fuse.js": "7.0.0",
|
"fuse.js": "7.0.0",
|
||||||
"google-timezones-json": "1.2.0",
|
"google-timezones-json": "1.2.0",
|
||||||
|
"gulp-zopfli-green": "6.0.2",
|
||||||
"hls.js": "patch:hls.js@npm%3A1.5.7#~/.yarn/patches/hls.js-npm-1.5.7-f5bbd3d060.patch",
|
"hls.js": "patch:hls.js@npm%3A1.5.7#~/.yarn/patches/hls.js-npm-1.5.7-f5bbd3d060.patch",
|
||||||
"home-assistant-js-websocket": "9.4.0",
|
"home-assistant-js-websocket": "9.4.0",
|
||||||
"idb-keyval": "6.2.1",
|
"idb-keyval": "6.2.1",
|
||||||
"intl-messageformat": "10.7.8",
|
"intl-messageformat": "10.7.14",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"leaflet": "1.9.4",
|
"leaflet": "1.9.4",
|
||||||
"leaflet-draw": "patch:leaflet-draw@npm%3A1.0.4#./.yarn/patches/leaflet-draw-npm-1.0.4-0ca0ebcf65.patch",
|
"leaflet-draw": "patch:leaflet-draw@npm%3A1.0.4#./.yarn/patches/leaflet-draw-npm-1.0.4-0ca0ebcf65.patch",
|
||||||
"lit": "2.8.0",
|
"lit": "2.8.0",
|
||||||
"lit-html": "2.8.0",
|
"lit-html": "2.8.0",
|
||||||
"luxon": "3.5.0",
|
"luxon": "3.5.0",
|
||||||
"marked": "15.0.3",
|
"marked": "15.0.6",
|
||||||
"memoize-one": "6.0.0",
|
"memoize-one": "6.0.0",
|
||||||
"node-vibrant": "3.2.1-alpha.1",
|
"node-vibrant": "4.0.3",
|
||||||
"proxy-polyfill": "0.3.2",
|
|
||||||
"punycode": "2.3.1",
|
"punycode": "2.3.1",
|
||||||
"qr-scanner": "1.4.2",
|
"qr-scanner": "1.4.2",
|
||||||
"qrcode": "1.5.4",
|
"qrcode": "1.5.4",
|
||||||
@@ -139,8 +137,7 @@
|
|||||||
"tinykeys": "3.0.0",
|
"tinykeys": "3.0.0",
|
||||||
"tsparticles-engine": "2.12.0",
|
"tsparticles-engine": "2.12.0",
|
||||||
"tsparticles-preset-links": "2.12.0",
|
"tsparticles-preset-links": "2.12.0",
|
||||||
"ua-parser-js": "1.0.39",
|
"ua-parser-js": "2.0.0",
|
||||||
"unfetch": "5.0.0",
|
|
||||||
"vis-data": "7.1.9",
|
"vis-data": "7.1.9",
|
||||||
"vis-network": "9.1.9",
|
"vis-network": "9.1.9",
|
||||||
"vue": "2.7.16",
|
"vue": "2.7.16",
|
||||||
@@ -155,20 +152,20 @@
|
|||||||
"xss": "1.0.15"
|
"xss": "1.0.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.26.0",
|
"@babel/core": "7.26.7",
|
||||||
"@babel/helper-define-polyfill-provider": "0.6.3",
|
"@babel/helper-define-polyfill-provider": "0.6.3",
|
||||||
"@babel/plugin-proposal-decorators": "7.25.9",
|
"@babel/plugin-proposal-decorators": "7.25.9",
|
||||||
"@babel/plugin-transform-runtime": "7.25.9",
|
"@babel/plugin-transform-runtime": "7.25.9",
|
||||||
"@babel/preset-env": "7.26.0",
|
"@babel/preset-env": "7.26.7",
|
||||||
"@babel/preset-typescript": "7.26.0",
|
"@babel/preset-typescript": "7.26.0",
|
||||||
"@bundle-stats/plugin-webpack-filter": "4.17.0",
|
"@bundle-stats/plugin-webpack-filter": "4.18.2",
|
||||||
"@lokalise/node-api": "12.8.0",
|
"@lokalise/node-api": "13.0.0",
|
||||||
"@octokit/auth-oauth-device": "7.1.1",
|
"@octokit/auth-oauth-device": "7.1.2",
|
||||||
"@octokit/plugin-retry": "7.1.2",
|
"@octokit/plugin-retry": "7.1.3",
|
||||||
"@octokit/rest": "21.0.2",
|
"@octokit/rest": "21.1.0",
|
||||||
"@rsdoctor/rspack-plugin": "0.4.11",
|
"@rsdoctor/rspack-plugin": "0.4.13",
|
||||||
"@rspack/cli": "1.1.5",
|
"@rspack/cli": "1.2.2",
|
||||||
"@rspack/core": "1.1.5",
|
"@rspack/core": "1.2.2",
|
||||||
"@types/babel__plugin-transform-runtime": "7.9.5",
|
"@types/babel__plugin-transform-runtime": "7.9.5",
|
||||||
"@types/chromecast-caf-receiver": "6.0.20",
|
"@types/chromecast-caf-receiver": "6.0.20",
|
||||||
"@types/chromecast-caf-sender": "1.0.11",
|
"@types/chromecast-caf-sender": "1.0.11",
|
||||||
@@ -176,64 +173,58 @@
|
|||||||
"@types/glob": "8.1.0",
|
"@types/glob": "8.1.0",
|
||||||
"@types/html-minifier-terser": "7.0.2",
|
"@types/html-minifier-terser": "7.0.2",
|
||||||
"@types/js-yaml": "4.0.9",
|
"@types/js-yaml": "4.0.9",
|
||||||
"@types/leaflet": "1.9.15",
|
"@types/leaflet": "1.9.16",
|
||||||
"@types/leaflet-draw": "1.0.11",
|
"@types/leaflet-draw": "1.0.11",
|
||||||
"@types/lodash.merge": "4.6.9",
|
"@types/lodash.merge": "4.6.9",
|
||||||
"@types/luxon": "3.4.2",
|
"@types/luxon": "3.4.2",
|
||||||
"@types/mocha": "10.0.10",
|
"@types/mocha": "10.0.10",
|
||||||
"@types/qrcode": "1.5.5",
|
"@types/qrcode": "1.5.5",
|
||||||
"@types/serve-handler": "6.1.4",
|
|
||||||
"@types/sortablejs": "1.15.8",
|
"@types/sortablejs": "1.15.8",
|
||||||
"@types/tar": "6.1.13",
|
"@types/tar": "6.1.13",
|
||||||
"@types/ua-parser-js": "0.7.39",
|
"@types/ua-parser-js": "0.7.39",
|
||||||
"@types/webspeechapi": "0.0.29",
|
"@types/webspeechapi": "0.0.29",
|
||||||
"@typescript-eslint/eslint-plugin": "7.18.0",
|
"@typescript-eslint/eslint-plugin": "8.21.0",
|
||||||
"@typescript-eslint/parser": "7.18.0",
|
"@typescript-eslint/parser": "8.21.0",
|
||||||
"@vitest/coverage-v8": "2.1.8",
|
"@vitest/coverage-v8": "3.0.4",
|
||||||
"babel-loader": "9.2.1",
|
"babel-loader": "9.2.1",
|
||||||
"babel-plugin-template-html-minifier": "4.1.0",
|
"babel-plugin-template-html-minifier": "4.1.0",
|
||||||
"browserslist-useragent-regexp": "4.1.3",
|
"browserslist-useragent-regexp": "4.1.3",
|
||||||
"del": "8.0.0",
|
"del": "8.0.0",
|
||||||
"eslint": "9.16.0",
|
"eslint": "9.19.0",
|
||||||
"eslint-config-airbnb-base": "15.0.0",
|
"eslint-config-airbnb-base": "15.0.0",
|
||||||
"eslint-config-airbnb-typescript": "18.0.0",
|
"eslint-config-prettier": "10.0.1",
|
||||||
"eslint-config-prettier": "9.1.0",
|
"eslint-import-resolver-webpack": "0.13.10",
|
||||||
"eslint-import-resolver-webpack": "0.13.9",
|
|
||||||
"eslint-plugin-import": "2.31.0",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"eslint-plugin-lit": "1.15.0",
|
"eslint-plugin-lit": "1.15.0",
|
||||||
"eslint-plugin-lit-a11y": "4.1.4",
|
"eslint-plugin-lit-a11y": "4.1.4",
|
||||||
"eslint-plugin-unused-imports": "4.1.4",
|
"eslint-plugin-unused-imports": "4.1.4",
|
||||||
"eslint-plugin-wc": "2.2.0",
|
"eslint-plugin-wc": "2.2.0",
|
||||||
"fancy-log": "2.0.0",
|
"fancy-log": "2.0.0",
|
||||||
"fs-extra": "11.2.0",
|
"fs-extra": "11.3.0",
|
||||||
"glob": "11.0.0",
|
"glob": "11.0.1",
|
||||||
"gulp": "5.0.0",
|
"gulp": "5.0.0",
|
||||||
"gulp-brotli": "3.0.0",
|
"gulp-brotli": "3.0.0",
|
||||||
"gulp-json-transform": "0.5.0",
|
"gulp-json-transform": "0.5.0",
|
||||||
"gulp-rename": "2.0.0",
|
"gulp-rename": "2.0.0",
|
||||||
"html-minifier-terser": "7.2.0",
|
"html-minifier-terser": "7.2.0",
|
||||||
"husky": "9.1.7",
|
"husky": "9.1.7",
|
||||||
"jsdom": "25.0.1",
|
"jsdom": "26.0.0",
|
||||||
"jszip": "3.10.1",
|
"jszip": "3.10.1",
|
||||||
"lint-staged": "15.2.10",
|
"lint-staged": "15.4.3",
|
||||||
"lit-analyzer": "2.0.3",
|
"lit-analyzer": "2.0.3",
|
||||||
"lodash.merge": "4.6.2",
|
"lodash.merge": "4.6.2",
|
||||||
"lodash.template": "4.5.0",
|
"lodash.template": "4.5.0",
|
||||||
"magic-string": "0.30.14",
|
|
||||||
"map-stream": "0.0.7",
|
"map-stream": "0.0.7",
|
||||||
"object-hash": "3.0.0",
|
"object-hash": "3.0.0",
|
||||||
"open": "10.1.0",
|
|
||||||
"pinst": "3.0.0",
|
"pinst": "3.0.0",
|
||||||
"prettier": "3.4.2",
|
"prettier": "3.4.2",
|
||||||
"rspack-manifest-plugin": "5.0.2",
|
"rspack-manifest-plugin": "5.0.3",
|
||||||
"serve-handler": "6.1.6",
|
|
||||||
"sinon": "19.0.2",
|
"sinon": "19.0.2",
|
||||||
"systemjs": "6.15.1",
|
|
||||||
"tar": "7.4.3",
|
"tar": "7.4.3",
|
||||||
"terser-webpack-plugin": "5.3.10",
|
"terser-webpack-plugin": "5.3.11",
|
||||||
"ts-lit-plugin": "2.0.2",
|
"ts-lit-plugin": "2.0.2",
|
||||||
"typescript": "5.7.2",
|
"typescript": "5.7.3",
|
||||||
"vitest": "2.1.8",
|
"vitest": "3.0.4",
|
||||||
"webpack-stats-plugin": "1.1.3",
|
"webpack-stats-plugin": "1.1.3",
|
||||||
"webpackbar": "7.0.0",
|
"webpackbar": "7.0.0",
|
||||||
"workbox-build": "patch:workbox-build@npm%3A7.1.1#~/.yarn/patches/workbox-build-npm-7.1.1-a854f3faae.patch"
|
"workbox-build": "patch:workbox-build@npm%3A7.1.1#~/.yarn/patches/workbox-build-npm-7.1.1-a854f3faae.patch"
|
||||||
@@ -247,7 +238,8 @@
|
|||||||
"clean-css": "5.3.3",
|
"clean-css": "5.3.3",
|
||||||
"@lit/reactive-element": "1.6.3",
|
"@lit/reactive-element": "1.6.3",
|
||||||
"@fullcalendar/daygrid": "6.1.15",
|
"@fullcalendar/daygrid": "6.1.15",
|
||||||
"globals": "15.13.0"
|
"globals": "15.14.0",
|
||||||
|
"tslib": "2.8.1"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@4.5.3"
|
"packageManager": "yarn@4.6.0"
|
||||||
}
|
}
|
||||||
|
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "home-assistant-frontend"
|
name = "home-assistant-frontend"
|
||||||
version = "20241127.0"
|
version = "20250221.0"
|
||||||
license = {text = "Apache-2.0"}
|
license = {text = "Apache-2.0"}
|
||||||
description = "The Home Assistant frontend"
|
description = "The Home Assistant frontend"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [
|
authors = [
|
||||||
{name = "The Home Assistant Authors", email = "hello@home-assistant.io"}
|
{name = "The Home Assistant Authors", email = "hello@home-assistant.io"}
|
||||||
]
|
]
|
||||||
requires-python = ">=3.11.0"
|
requires-python = ">=3.13.0"
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
"Homepage" = "https://github.com/home-assistant/frontend"
|
"Homepage" = "https://github.com/home-assistant/frontend"
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||||
// Needs to remain CommonJS until eslint-import-resolver-webpack supports ES modules
|
// Needs to remain CommonJS until eslint-import-resolver-webpack supports ES modules
|
||||||
const rspack = require("./build-scripts/rspack.cjs");
|
const rspack = require("./build-scripts/rspack.cjs");
|
||||||
const env = require("./build-scripts/env.cjs");
|
const env = require("./build-scripts/env.cjs");
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user