mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-26 23:12:34 +03:00
progress change color
This commit is contained in:
@@ -199,6 +199,9 @@
|
|||||||
.widget-input-indigo {
|
.widget-input-indigo {
|
||||||
@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-input-red {
|
||||||
|
@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 border-red-500;
|
||||||
|
}
|
||||||
.widget-after {
|
.widget-after {
|
||||||
@apply pr-4 block text-gray-500 font-bold md:text-right;
|
@apply pr-4 block text-gray-500 font-bold md:text-right;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export let value;
|
|
||||||
export let widget;
|
export let widget;
|
||||||
//style="min-width:50%; max-width:100%; width:{value.length * 10}px" on:change={(WSpush(ws, topic, value), console.log(value.length))}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="card-items">
|
<div class="card-items">
|
||||||
@@ -16,16 +14,16 @@
|
|||||||
<div class="md:w-1/3 lg:w-1/3 2xl:w-1/3">
|
<div class="md:w-1/3 lg:w-1/3 2xl:w-1/3">
|
||||||
<!-- on:change={WSpush(ws, topic, value)} -->
|
<!-- on:change={WSpush(ws, topic, value)} -->
|
||||||
{#if widget.type == "number"}
|
{#if widget.type == "number"}
|
||||||
<input class="widget-input-indigo text-right" step="0.1" on:change={WSpush(widget.ws, widget.topic, value)} bind:value type="number" />
|
<input class="widget-input-indigo widget-input-red={widget['send'] == true} text-right" step="0.1" on:change={((widget["send"] = true), WSpush(widget.ws, widget.topic, widget.status))} bind:value={widget.status} type="number" />
|
||||||
{/if}
|
{/if}
|
||||||
{#if widget.type == "text"}
|
{#if widget.type == "text"}
|
||||||
<input class="widget-input-indigo text-right" on:change={WSpush(widget.ws, widget.topic, value)} bind:value type="text" />
|
<input class="widget-input-indigo text-right" on:change={((widget["send"] = true), WSpush(widget.ws, widget.topic, widget.status))} bind:value={widget.status} type="text" />
|
||||||
{/if}
|
{/if}
|
||||||
{#if widget.type == "date"}
|
{#if widget.type == "date"}
|
||||||
<input class="widget-input-indigo text-right" on:change={WSpush(widget.ws, widget.topic, value)} bind:value type="date" />
|
<input class="widget-input-indigo text-right" on:change={((widget["send"] = true), WSpush(widget.ws, widget.topic, widget.status))} bind:value={widget.status} type="date" />
|
||||||
{/if}
|
{/if}
|
||||||
{#if widget.type == "time"}
|
{#if widget.type == "time"}
|
||||||
<input class="widget-input-indigo text-right" on:change={WSpush(widget.ws, widget.topic, value)} bind:value type="time" />
|
<input class="widget-input-indigo text-right" on:change={((widget["send"] = true), WSpush(widget.ws, widget.topic, widget.status))} bind:value={widget.status} type="time" />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user