This commit is contained in:
Dmitry Borisenko
2021-10-27 05:11:28 +07:00
parent c494f7b447
commit 17e2883cf1
3 changed files with 5 additions and 5 deletions

View File

@@ -112,7 +112,7 @@
{ {
widget: "anydata", widget: "anydata",
status: 30.5, status: 30.5,
after: "C", after: "°С",
page: "Any data", page: "Any data",
order: "3", order: "3",
descr: "Temperature", descr: "Temperature",
@@ -343,7 +343,7 @@
@apply content-center pr-4 py-1 bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500; @apply content-center pr-4 py-1 bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500;
} }
.widget-anydata-style { .widget-anydata-style {
@apply text-center text-lg text-gray-500 font-bold; @apply text-center text-gray-500 font-bold;
} }
} }

View File

@@ -15,6 +15,6 @@
<!-- svelte-ignore a11y-label-has-associated-control --> <!-- svelte-ignore a11y-label-has-associated-control -->
<label class="widget-anydata-style">{!widget.status ? "" : widget.status}</label> <label class="widget-anydata-style">{!widget.status ? "" : widget.status}</label>
<!-- svelte-ignore a11y-label-has-associated-control --> <!-- svelte-ignore a11y-label-has-associated-control -->
<label class="widget-anydata-style">{!widget.after ? "" : widget.after}</label> <label class="widget-anydata-style">&nbsp;{!widget.after ? "" : widget.after}</label>
</div> </div>
</div> </div>

View File

@@ -15,8 +15,8 @@
<label for={widget.topic} class="items-center cursor-pointer"> <label for={widget.topic} class="items-center cursor-pointer">
<div class="relative"> <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" /> <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="block bg-gray-600 w-10 h-6 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 class="dot {widget['send'] == true ? 'bg-red-400' : 'bg-white'} absolute left-1 top-1 w-4 h-4 rounded-full transition" />
</div> </div>
</label> </label>
</div> </div>