From 322e4852b1aedbd815fe131b33b1a0d72366a4c0 Mon Sep 17 00:00:00 2001 From: Feilner Date: Tue, 30 Nov 2021 01:09:28 +0100 Subject: [PATCH 1/4] SmokeSensor untested first commit --- .../core/accessories/accessories.module.ts | 2 ++ .../accessory-tile.component.html | 2 ++ .../smokesensor/smokeensor.component.scss | 25 ++++++++++++++ .../smokesensor/smokesensor.component.html | 16 +++++++++ .../smokesensor/smokesensor.component.ts | 17 ++++++++++ ui/src/assets/hap-icons/smokesensor-alarm.svg | 34 +++++++++++++++++++ ui/src/assets/hap-icons/smokesensor-idle.svg | 34 +++++++++++++++++++ 7 files changed, 130 insertions(+) create mode 100644 ui/src/app/core/accessories/types/smokesensor/smokeensor.component.scss create mode 100644 ui/src/app/core/accessories/types/smokesensor/smokesensor.component.html create mode 100644 ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts create mode 100644 ui/src/assets/hap-icons/smokesensor-alarm.svg create mode 100644 ui/src/assets/hap-icons/smokesensor-idle.svg diff --git a/ui/src/app/core/accessories/accessories.module.ts b/ui/src/app/core/accessories/accessories.module.ts index 89d8dcd41..5929c393a 100644 --- a/ui/src/app/core/accessories/accessories.module.ts +++ b/ui/src/app/core/accessories/accessories.module.ts @@ -44,6 +44,7 @@ import { SpeakerManageComponent } from './types/speaker/speaker.manage.component import { SecuritysystemComponent } from './types/securitysystem/securitysystem.component'; import { SecuritysystemManageComponent } from './types/securitysystem/securitysystem.manage.component'; import { LeaksensorComponent } from './types/leaksensor/leaksensor.component'; +import { SmokesensorComponent } from './types/smokesensor/smokesensor.component'; import { ValveComponent } from './types/valve/valve.component'; import { ValveManageComponent } from './types/valve/valve.manage.component'; import { IrrigationSystemComponent } from './types/irrigationsystem/irrigationsystem.component'; @@ -109,6 +110,7 @@ import { AccessoryTileComponent } from './accessory-tile/accessory-tile.componen SecuritysystemComponent, SecuritysystemManageComponent, LeaksensorComponent, + SmokesensorComponent, ValveComponent, ValveManageComponent, IrrigationSystemComponent, diff --git a/ui/src/app/core/accessories/accessory-tile/accessory-tile.component.html b/ui/src/app/core/accessories/accessory-tile/accessory-tile.component.html index 8c3ea5942..1bee1f35c 100644 --- a/ui/src/app/core/accessories/accessory-tile/accessory-tile.component.html +++ b/ui/src/app/core/accessories/accessory-tile/accessory-tile.component.html @@ -43,6 +43,8 @@ Leak Sensor + Smoke Sensor + Valve Irrigation System diff --git a/ui/src/app/core/accessories/types/smokesensor/smokeensor.component.scss b/ui/src/app/core/accessories/types/smokesensor/smokeensor.component.scss new file mode 100644 index 000000000..3f91632a9 --- /dev/null +++ b/ui/src/app/core/accessories/types/smokesensor/smokeensor.component.scss @@ -0,0 +1,25 @@ +::ng-deep { + .switch-off { + svg { + .leak_sensor_droplet { + fill: #e0e0e0; + } + .smoke_sensor_trigger_lines { + display: none; + } + .smoke_sensor_background { + fill: #808080; + } + } + } +} + +::ng-deep body.dark-mode { + .switch-off { + svg { + .leak_sensor_droplet { + fill: #2b2b2b; + } + } + } +} diff --git a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.html b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.html new file mode 100644 index 000000000..49f372ec1 --- /dev/null +++ b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.html @@ -0,0 +1,16 @@ +
+
+
+
+
+
{{ service.customName || service.serviceName }}
+
+ {{ 'accessories.control.label_triggered' | translate }} +
+
+
\ No newline at end of file diff --git a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts new file mode 100644 index 000000000..5f69a9ecc --- /dev/null +++ b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts @@ -0,0 +1,17 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { ServiceTypeX } from '../../accessories.interfaces'; + +@Component({ + selector: 'app-smokesensor', + templateUrl: './smokesensor.component.html', + styleUrls: ['./smokesensor.component.scss'], +}) +export class LeaksensorComponent implements OnInit { + @Input() public service: ServiceTypeX; + + constructor() { } + + ngOnInit() { + } + +} diff --git a/ui/src/assets/hap-icons/smokesensor-alarm.svg b/ui/src/assets/hap-icons/smokesensor-alarm.svg new file mode 100644 index 000000000..4e66e308c --- /dev/null +++ b/ui/src/assets/hap-icons/smokesensor-alarm.svg @@ -0,0 +1,34 @@ + + + +Created with Fabric.js 4.6.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui/src/assets/hap-icons/smokesensor-idle.svg b/ui/src/assets/hap-icons/smokesensor-idle.svg new file mode 100644 index 000000000..17e4b33ff --- /dev/null +++ b/ui/src/assets/hap-icons/smokesensor-idle.svg @@ -0,0 +1,34 @@ + + + +Created with Fabric.js 4.6.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From bf8d95226feb158898c63d547931af39ff040550 Mon Sep 17 00:00:00 2001 From: feilner Date: Mon, 27 Dec 2021 16:45:24 +0000 Subject: [PATCH 2/4] Tested --- .../{smokeensor.component.scss => smokesensor.component.scss} | 2 +- .../core/accessories/types/smokesensor/smokesensor.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename ui/src/app/core/accessories/types/smokesensor/{smokeensor.component.scss => smokesensor.component.scss} (91%) diff --git a/ui/src/app/core/accessories/types/smokesensor/smokeensor.component.scss b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.scss similarity index 91% rename from ui/src/app/core/accessories/types/smokesensor/smokeensor.component.scss rename to ui/src/app/core/accessories/types/smokesensor/smokesensor.component.scss index 3f91632a9..874e63554 100644 --- a/ui/src/app/core/accessories/types/smokesensor/smokeensor.component.scss +++ b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.scss @@ -17,7 +17,7 @@ ::ng-deep body.dark-mode { .switch-off { svg { - .leak_sensor_droplet { + .smoke_sensor_droplet { fill: #2b2b2b; } } diff --git a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts index 5f69a9ecc..58927e963 100644 --- a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts +++ b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts @@ -6,7 +6,7 @@ import { ServiceTypeX } from '../../accessories.interfaces'; templateUrl: './smokesensor.component.html', styleUrls: ['./smokesensor.component.scss'], }) -export class LeaksensorComponent implements OnInit { +export class SmokesensorComponent implements OnInit { @Input() public service: ServiceTypeX; constructor() { } From 59262b0f3b88b08d55ca77e759d37d553fee6afe Mon Sep 17 00:00:00 2001 From: feilner Date: Mon, 27 Dec 2021 17:34:44 +0000 Subject: [PATCH 3/4] update icons --- ui/src/assets/hap-icons/smokesensor-alarm.svg | 30 ++----------------- ui/src/assets/hap-icons/smokesensor-idle.svg | 30 ++----------------- 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/ui/src/assets/hap-icons/smokesensor-alarm.svg b/ui/src/assets/hap-icons/smokesensor-alarm.svg index 4e66e308c..d67dded9b 100644 --- a/ui/src/assets/hap-icons/smokesensor-alarm.svg +++ b/ui/src/assets/hap-icons/smokesensor-alarm.svg @@ -4,31 +4,7 @@ Created with Fabric.js 4.6.0 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/ui/src/assets/hap-icons/smokesensor-idle.svg b/ui/src/assets/hap-icons/smokesensor-idle.svg index 17e4b33ff..728c8af72 100644 --- a/ui/src/assets/hap-icons/smokesensor-idle.svg +++ b/ui/src/assets/hap-icons/smokesensor-idle.svg @@ -4,31 +4,7 @@ Created with Fabric.js 4.6.0 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + From 01b189cbd6b170823e4c225c8e13e389fd189f9c Mon Sep 17 00:00:00 2001 From: feilner Date: Mon, 27 Dec 2021 22:53:41 +0000 Subject: [PATCH 4/4] use single icon only --- .../types/smokesensor/smokesensor.component.html | 9 +++------ .../types/smokesensor/smokesensor.component.scss | 14 +------------- ui/src/assets/hap-icons/smokesensor-alarm.svg | 10 ---------- ui/src/assets/hap-icons/smokesensor-idle.svg | 10 ---------- ui/src/assets/hap-icons/smokesensor.svg | 13 +++++++++++++ 5 files changed, 17 insertions(+), 39 deletions(-) delete mode 100644 ui/src/assets/hap-icons/smokesensor-alarm.svg delete mode 100644 ui/src/assets/hap-icons/smokesensor-idle.svg create mode 100644 ui/src/assets/hap-icons/smokesensor.svg diff --git a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.html b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.html index 49f372ec1..de386fe68 100644 --- a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.html +++ b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.html @@ -3,14 +3,11 @@ 'switch-off': !service.values.SmokeDetected }">
-
-
-
+
{{ service.customName || service.serviceName }}
{{ 'accessories.control.label_triggered' | translate }}
- \ No newline at end of file + + diff --git a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.scss b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.scss index 874e63554..40773251e 100644 --- a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.scss +++ b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.scss @@ -1,25 +1,13 @@ ::ng-deep { .switch-off { svg { - .leak_sensor_droplet { - fill: #e0e0e0; - } .smoke_sensor_trigger_lines { display: none; } - .smoke_sensor_background { + .smoke_sensor_box { fill: #808080; } } } } -::ng-deep body.dark-mode { - .switch-off { - svg { - .smoke_sensor_droplet { - fill: #2b2b2b; - } - } - } -} diff --git a/ui/src/assets/hap-icons/smokesensor-alarm.svg b/ui/src/assets/hap-icons/smokesensor-alarm.svg deleted file mode 100644 index d67dded9b..000000000 --- a/ui/src/assets/hap-icons/smokesensor-alarm.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - -Created with Fabric.js 4.6.0 - - - - - - diff --git a/ui/src/assets/hap-icons/smokesensor-idle.svg b/ui/src/assets/hap-icons/smokesensor-idle.svg deleted file mode 100644 index 728c8af72..000000000 --- a/ui/src/assets/hap-icons/smokesensor-idle.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - -Created with Fabric.js 4.6.0 - - - - - - diff --git a/ui/src/assets/hap-icons/smokesensor.svg b/ui/src/assets/hap-icons/smokesensor.svg new file mode 100644 index 000000000..8fc3325fd --- /dev/null +++ b/ui/src/assets/hap-icons/smokesensor.svg @@ -0,0 +1,13 @@ + + + +Created with Fabric.js 4.6.0 + + + + + + + + +