working version

This commit is contained in:
Dmitry Borisenko
2021-09-16 02:21:02 +08:00
parent a1b8fb754f
commit 939b659757
2 changed files with 8 additions and 42 deletions

View File

@@ -51,10 +51,7 @@
widget: "input",
type: "number",
status: "30.5",
<<<<<<< HEAD
after: "°С",
=======
>>>>>>> parent of 37f43f0 (changes2)
page: "",
order: "1",
descr: "Boiler temperature",
@@ -123,7 +120,7 @@
<Card title="Inputs">
{#each wigets as widget, i}
{#if widget.widget === "input"}
<Myinput type={widget.type} ws={1} topic={widget.topic} title={widget.descr} bind:value={widget.status} />
<Myinput bind:value={widget.status} descr={widget.descr} after={widget.after} topic={widget.topic} ws={1} type={widget.type} />
{/if}
{/each}
</Card>
@@ -223,46 +220,27 @@
.btn-indigo {
@apply py-2 px-4 bg-indigo-500 text-white font-semibold rounded-lg shadow-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-400 focus:ring-opacity-75;
}
<<<<<<< HEAD
.block-psn-center {
@apply grid place-items-center mx-2 sm:my-auto;
}
.card {
@apply w-11/12 sm:w-8/12 md:w-6/12 lg:w-5/12 2xl:w-4/12 p-2 sm:px-8 sm:py-4 my-2 bg-white rounded-lg shadow-md lg:shadow-lg;
}
.card-items {
@apply md:items-center md:flex mb-6;
=======
.input-indigo {
@apply py-2 px-4 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;
}
.descr-gray {
@apply block text-gray-500 font-bold md:text-right mb-1 md:mb-0 pr-4;
}
.descr-gray-left {
@apply block text-gray-500 font-bold md:text-left mb-1 md:mb-0 pr-4;
>>>>>>> parent of 37f43f0 (changes2)
}
.card-title-gray {
@apply text-center text-lg text-gray-500 font-bold pb-6;
}
.card-items {
@apply md:items-center md:flex mb-6;
}
.widget-descr-gray-left {
@apply pr-4 block text-gray-500 font-bold md:text-left;
}
<<<<<<< HEAD
.widget-input-indigo {
@apply pr-4 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-after {
@apply pr-4 block text-gray-500 font-bold md:text-right;
=======
.block-psn-center-when-md {
@apply md:flex md:items-center mb-6;
}
.card-normal-size {
@apply w-11/12 p-12 sm:w-8/12 md:w-6/12 lg:w-5/12 2xl:w-4/12 px-2 py-2 my-2 sm:px-10 sm:py-6 bg-white rounded-lg shadow-md lg:shadow-lg;
>>>>>>> parent of 37f43f0 (changes2)
}
}

View File

@@ -3,27 +3,21 @@
</script>
<script>
export let title;
export let value;
export let descr;
export let topic;
export let ws;
export let type;
export let after;
</script>
<div class="container">
<<<<<<< HEAD
<div class="card-items">
<div class="md:w-6/12">
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="widget-descr-gray-left">{!descr ? "" : descr}</label>
=======
<div class="block-psn-center-when-md">
<div class="md:w-1/2">
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="descr-gray-left">{title}</label>
>>>>>>> parent of 37f43f0 (changes2)
</div>
<div class="md:w-1/2">
<div class="md:w-5/12">
<!-- on:change={WSpush(ws, topic, value)} -->
{#if type == "number"}
<input class="widget-input-indigo" on:change={WSpush(ws, topic, value)} bind:value type="number" />
@@ -38,17 +32,11 @@
<input class="widget-input-indigo" on:change={WSpush(ws, topic, value)} bind:value type="time" />
{/if}
</div>
<<<<<<< HEAD
{#if after}
<div class="md:1/12">
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="widget-after">{!after ? "" : after}</label>
</div>
{/if}
=======
<!-- <div class="md:w-3/3"> -->
<!-- <button on:click={WSpush(ws, topic, value)} class="btn-indigo" type="button">Set</button> -->
<!-- </div> -->
>>>>>>> parent of 37f43f0 (changes2)
</div>
</div>