mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-02-11 19:04:20 +01:00
feat(dashboard): add logic for temperature dragger
This commit is contained in:
parent
ce8055ca84
commit
2ed871ff20
13 changed files with 262 additions and 47 deletions
|
|
@ -8,9 +8,19 @@ import { NgaThemeService } from '@akveo/nga-theme';
|
|||
<nga-card size="xmedium">
|
||||
<nga-tabset fullWidth>
|
||||
<nga-tab tabTitle="Temperature">
|
||||
<ngx-temperature-dragger [(value)]="temperature" [arcThickness]="20" [knobRadius]="15" [bottomAngle]="90"
|
||||
[disableArcColor]="themeConfig.layoutBg"
|
||||
<ngx-temperature-dragger [(value)]="temperature" (power)="powerOff = !$event" [min]="12" [max]="30"
|
||||
[arcThickness]="20" [knobRadius]="15" [bottomAngle]="90" [disableArcColor]="themeConfig.layoutBg"
|
||||
[fillColors]="[themeConfig.colorInfo, themeConfig.colorSuccess, themeConfig.colorWarning]">
|
||||
|
||||
<div class="temperature" [ngClass]="{ 'off': powerOff }">
|
||||
<div class="value">
|
||||
{{ powerOff ? '--' : (temperature | ngxRound) }}
|
||||
</div>
|
||||
<div class="desc">
|
||||
Celsius
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ngx-temperature-dragger>
|
||||
</nga-tab>
|
||||
<nga-tab tabTitle="Humidity">
|
||||
|
|
@ -21,12 +31,14 @@ import { NgaThemeService } from '@akveo/nga-theme';
|
|||
`,
|
||||
})
|
||||
export class TemperatureComponent {
|
||||
temperature = 0.5;
|
||||
|
||||
themeConfig = {};
|
||||
temperature: number = 23;
|
||||
powerOff: boolean = false;
|
||||
|
||||
themeConfig: any = {};
|
||||
|
||||
constructor(private theme: NgaThemeService) {
|
||||
this.theme.getConfig().subscribe((config) => {
|
||||
this.theme.getConfig().subscribe(config => {
|
||||
this.themeConfig = config;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue