diff --git a/src/.prettierrc b/src/.prettierrc index c391ff1..95fe477 100644 --- a/src/.prettierrc +++ b/src/.prettierrc @@ -4,7 +4,7 @@ "svelteBracketNewLine": false, "svelteAllowShorthand": false, "svelteIndentScriptAndStyle": true, - "printWidth": 600, + "printWidth": 1000, "sxBracketSameLine": true, "overrides": [ { diff --git a/src/App.svelte b/src/App.svelte index 9181929..90940ef 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -6,7 +6,7 @@ //router.mode.memory(); // enables in-memory navigation method import Chart from "svelte-frappe-charts"; - import Card from "./widgets/Card.svelte"; + import Card from "./components/Card.svelte"; import Modal from "./components/Modal.svelte"; import Input from "./widgets/Input.svelte"; import Toggle from "./widgets/Toggle.svelte"; @@ -176,13 +176,13 @@ { name: "Устройство 1", id: "987654321", - ip: "192.168.88.233", + ip: "192.168.88.235", status: false, }, { name: "Устройство 2", id: "987654321", - ip: "192.168.88.235", + ip: "192.168.88.233", status: false, }, ]; @@ -623,33 +623,49 @@ - - - - - - + + + + + {#each config as element} - - - + + - - - - + + + + + + {#each Object.entries(element) as [key, param]} + {#if key != "type" && key != "subtype" && key != "id" && key != "widget" && key != "page" && key != "descr"} + + + + + {/if} + {/each} {/each}
ПодтипIdВиджетВкладкаНазвание - + ТипIdВиджетВкладкаНазвание +
{element.subtype}{element.subtype}
+ + + +

{key}

+
+ +
@@ -681,27 +697,27 @@ - - - - + + + + {#each deviceList as device} - - - - + + + + {/each} {#if showInput} - - - - + + + {/if} @@ -771,13 +787,19 @@ } /*====================================================table=====================================================*/ .table-head-element { - @apply px-2 py-2 text-center break-words text-gray-500 font-bold; + @apply px-2 py-2 break-words text-gray-500 font-bold; } .table-body-element { - @apply px-2 py-2 text-center break-words; + @apply px-2 py-2 break-words; } .table-input { - @apply content-center h-8 bg-gray-50 focus:bg-white appearance-none border-2 border-gray-100 w-full text-gray-700 leading-tight focus:outline-none text-center focus:border-indigo-500; + @apply content-center h-8 bg-gray-50 focus:bg-white appearance-none border-2 border-gray-100 text-gray-700 leading-tight focus:outline-none text-center focus:border-indigo-500; + } + .table-sub-text { + @apply text-sm inline-block italic align-top text-right text-gray-500; + } + .table-sub-input { + @apply content-center h-6 bg-gray-50 focus:bg-white appearance-none border-2 border-gray-100 text-gray-700 leading-tight focus:outline-none text-center focus:border-indigo-500 rounded-sm; } /*====================================================buttons=====================================================*/ .long-button { diff --git a/src/widgets/Card.svelte b/src/components/Card.svelte similarity index 100% rename from src/widgets/Card.svelte rename to src/components/Card.svelte
Название устройстваIP адресИдентификаторСостояниеНазвание устройстваIP адресИдентификаторСостояние
{device.name}{device.ip}{device.id}{device.status ? "online" : "offline"}{device.name}{device.ip}{device.id}{device.status ? "online" : "offline"}
+