-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use smoke detector icon for carbon monoxide and dioxide sensors
- Loading branch information
Showing
10 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
ui/src/app/core/accessories/types/carbondioxidesensor/carbondioxidesensor.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<div | ||
class="accessory-box" | ||
[ngClass]="{ | ||
'switch-on': service.values.CarbonDioxideDetected, | ||
'switch-off': !service.values.CarbonDioxideDetected | ||
}" | ||
> | ||
<div class="d-flex flex-column h-100"> | ||
<div | ||
[inlineSVG]="'/assets/hap-icons/smokesensor.svg'" | ||
[attr.aria-label]="'Carbon Dioxide Sensor'" | ||
class="accessory-svg" | ||
></div> | ||
<div class="accessory-label mt-auto">{{ service.customName || service.serviceName }}</div> | ||
<div class="accessory-label red-text" *ngIf="service.values.CarbonDioxideDetected"> | ||
{{ 'accessories.control.detected' | translate }} | ||
</div> | ||
<div class="accessory-label grey-text" *ngIf="!service.values.CarbonDioxideDetected"> | ||
{{ 'accessories.control.not_detected' | translate }} | ||
</div> | ||
</div> | ||
</div> |
12 changes: 12 additions & 0 deletions
12
ui/src/app/core/accessories/types/carbondioxidesensor/carbondioxidesensor.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
::ng-deep { | ||
.switch-off { | ||
svg { | ||
.smoke_sensor_trigger_lines { | ||
display: none; | ||
} | ||
.smoke_sensor_box { | ||
fill: #808080; | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
ui/src/app/core/accessories/types/carbondioxidesensor/carbondioxidesensor.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ServiceTypeX } from '@/app/core/accessories/accessories.interfaces' | ||
import { Component, Input } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'app-carbondioxidesensor', | ||
templateUrl: './carbondioxidesensor.component.html', | ||
styleUrls: ['./carbondioxidesensor.component.scss'], | ||
}) | ||
export class CarbondioxidesensorComponent { | ||
@Input() public service: ServiceTypeX | ||
|
||
constructor() {} | ||
} |
22 changes: 22 additions & 0 deletions
22
ui/src/app/core/accessories/types/carbonmonoxidesensor/carbonmonoxidesensor.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<div | ||
class="accessory-box" | ||
[ngClass]="{ | ||
'switch-on': service.values.CarbonMonoxideDetected, | ||
'switch-off': !service.values.CarbonMonoxideDetected | ||
}" | ||
> | ||
<div class="d-flex flex-column h-100"> | ||
<div | ||
[inlineSVG]="'/assets/hap-icons/smokesensor.svg'" | ||
[attr.aria-label]="'Carbon Monoxide Sensor'" | ||
class="accessory-svg" | ||
></div> | ||
<div class="accessory-label mt-auto">{{ service.customName || service.serviceName }}</div> | ||
<div class="accessory-label red-text" *ngIf="service.values.CarbonMonoxideDetected"> | ||
{{ 'accessories.control.detected' | translate }} | ||
</div> | ||
<div class="accessory-label grey-text" *ngIf="!service.values.CarbonMonoxideDetected"> | ||
{{ 'accessories.control.not_detected' | translate }} | ||
</div> | ||
</div> | ||
</div> |
12 changes: 12 additions & 0 deletions
12
ui/src/app/core/accessories/types/carbonmonoxidesensor/carbonmonoxidesensor.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
::ng-deep { | ||
.switch-off { | ||
svg { | ||
.smoke_sensor_trigger_lines { | ||
display: none; | ||
} | ||
.smoke_sensor_box { | ||
fill: #808080; | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
ui/src/app/core/accessories/types/carbonmonoxidesensor/carbonmonoxidesensor.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ServiceTypeX } from '@/app/core/accessories/accessories.interfaces' | ||
import { Component, Input } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'app-carbonmonoxidesensor', | ||
templateUrl: './carbonmonoxidesensor.component.html', | ||
styleUrls: ['./carbonmonoxidesensor.component.scss'], | ||
}) | ||
export class CarbonmonoxidesensorComponent { | ||
@Input() public service: ServiceTypeX | ||
|
||
constructor() {} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.