Use svelte preprocess, generate random colors, check GZipped filesize
This commit is contained in:
parent
b38dabec52
commit
70bbc99ca1
3 changed files with 12 additions and 2 deletions
|
@ -68,6 +68,15 @@
|
|||
firstLedDataSubscription = status.subscribe(async (val) => {
|
||||
if (val && val.leds) {
|
||||
ledStatus = val.leds.map((obj) => ({ ['hex']: obj['hex'] }));
|
||||
|
||||
for (let led of ledStatus) {
|
||||
if (led['hex'] == '#000000') {
|
||||
led['hex'] = `#${Math.floor(Math.random() * 16777215)
|
||||
.toString(16)
|
||||
.padStart(6, '0')}`;
|
||||
}
|
||||
}
|
||||
|
||||
firstLedDataSubscription();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue