From 34b3ec1751c22664a31d77e2262bb568e43e2262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Tr=C3=B6ger?= Date: Wed, 29 May 2024 21:32:52 +0200 Subject: [PATCH] CHANGE: UI improvements and button to switch auto state topci --- src/app/entity/entity.component.css | 4 ++++ src/app/entity/entity.component.html | 18 +++++++++++++----- src/app/entity/entity.component.ts | 2 +- src/app/generator/generator.component.html | 2 +- src/styles.css | 9 ++++----- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/app/entity/entity.component.css b/src/app/entity/entity.component.css index 2f613fb..e95a034 100644 --- a/src/app/entity/entity.component.css +++ b/src/app/entity/entity.component.css @@ -20,4 +20,8 @@ padding: .25rem .75rem; border-radius: 1rem; /* width: 100%; */ +} + +.buttonOff path{ + fill:#535353; } \ No newline at end of file diff --git a/src/app/entity/entity.component.html b/src/app/entity/entity.component.html index c605766..7fda1d1 100644 --- a/src/app/entity/entity.component.html +++ b/src/app/entity/entity.component.html @@ -16,9 +16,9 @@
@@ -49,7 +49,7 @@

Value Template

-
+

Device Class

@@ -57,7 +57,15 @@

State Topic

- +
+ + +
diff --git a/src/app/entity/entity.component.ts b/src/app/entity/entity.component.ts index 0842e2d..245446c 100644 --- a/src/app/entity/entity.component.ts +++ b/src/app/entity/entity.component.ts @@ -55,7 +55,7 @@ export class EntityComponent { select_type(event: unknown) { let ent_type = entity_types[event as keyof typeof entity_types] let ent_class = ent_type[1]; - if (typeof ent_class === 'function') { + if (typeof ent_class === 'function' && event != 0) { this.basemodel = new ent_class(); this.generatorService.selected_entity = this.basemodel } else this.generatorService.selected_entity = null diff --git a/src/app/generator/generator.component.html b/src/app/generator/generator.component.html index e7005af..4b59326 100644 --- a/src/app/generator/generator.component.html +++ b/src/app/generator/generator.component.html @@ -1,5 +1,5 @@
-

MQTT Discovery Creator:

+

MQTT Discovery Creator