some changes

This commit is contained in:
Dmitry Borisenko
2021-10-25 16:50:31 +07:00
parent 90e826ca5f
commit aa67ba1b80
6 changed files with 26 additions and 3408 deletions

View File

@@ -11,7 +11,7 @@
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="widget-descr-style">{!widget.descr ? "" : widget.descr}</label>
</div>
<div class="widget-width">
<div class="widget-width-input">
{#if widget.type == "number"}
<input class={widget["send"] == true ? "widget-input border-red-500" : "widget-input focus:border-indigo-500"} on:change={() => ((widget["send"] = true), WSpush(widget.ws, widget.topic, widget.status))} bind:value={widget.status} step="0.1" type="number" />
{/if}

View File

@@ -11,15 +11,13 @@
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="widget-descr-style">{!widget.descr ? "" : widget.descr}</label>
</div>
<div class="widget-width-1-3">
<div class="flex items-center justify-center w-full">
<label for={widget.topic} class="items-center cursor-pointer">
<div class="relative">
<input on:change={() => ((widget["send"] = true), WSpush(widget.ws, widget.topic, widget.status))} bind:value={widget.status} id={widget.topic} type="checkbox" class="sr-only" />
<div class="block bg-gray-600 w-14 h-8 rounded-full" />
<div class="dot absolute left-1 top-1 bg-white w-6 h-6 rounded-full transition" />
</div>
</label>
</div>
<div class="widget-width-toggle">
<label for={widget.topic} class="items-center cursor-pointer">
<div class="relative">
<input on:change={() => ((widget["send"] = true), WSpush(widget.ws, widget.topic, widget.status))} bind:value={widget.status} id={widget.topic} type="checkbox" class="sr-only" />
<div class="block bg-gray-600 w-14 h-8 rounded-full" />
<div class="dot {widget['send'] == true ? 'bg-red-400' : 'bg-white'} absolute left-1 top-1 w-6 h-6 rounded-full transition" />
</div>
</label>
</div>
</div>