* Hide nanoleaf:IP devices in UI * Color clicking behavior is more clear * small icons for mega-groups * common tags/roles for groups * fix default names in UI state * hexagon corner * secondary lamp icon * fix selection bugs in device form * select all/none hotkey * quick assign modal
This commit is contained in:
@@ -19,7 +19,10 @@
|
||||
$: submit(color);
|
||||
|
||||
function toggle(event: MouseEvent & { currentTarget: EventTarget & HTMLDivElement; }) {
|
||||
if (event.shiftKey) {
|
||||
if (color === null) {
|
||||
color = { k: 2750 }
|
||||
$selectedColorPicker = colorPickerId;
|
||||
} else {
|
||||
if (color !== null) {
|
||||
if ($selectedColorPicker !== colorPickerId) {
|
||||
$selectedColorPicker = colorPickerId;
|
||||
@@ -30,17 +33,10 @@
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (color === null || (color.hs == null && color.k == null)) {
|
||||
color = { k: 2750 }
|
||||
$selectedColorPicker = colorPickerId;
|
||||
} else {
|
||||
color = null;
|
||||
|
||||
if ($selectedColorPicker === colorPickerId) {
|
||||
$selectedColorPicker = null;
|
||||
}
|
||||
}
|
||||
function clearColor() {
|
||||
color = null;
|
||||
}
|
||||
|
||||
function submit(color: Color | null) {
|
||||
@@ -80,7 +76,7 @@
|
||||
<BFormOption on:click={toggle} icon="palette" state={(color !== null) || null} color={colorStr}>
|
||||
{#if color != null}
|
||||
<div class="picker-wrapper">
|
||||
<ColorPicker bind:color={color} id={colorPickerId} />
|
||||
<ColorPicker on:delete={clearColor} deletable bind:color={color} id={colorPickerId} />
|
||||
</div>
|
||||
{/if}
|
||||
{#if color?.xy != null}
|
||||
|
||||
Reference in New Issue
Block a user