feat(dashboard): add modes for the temperature component

This commit is contained in:
KostyaDanovsky 2017-07-10 16:35:55 +03:00
parent 2b45625202
commit 60bd13a9f3
3 changed files with 73 additions and 28 deletions

View file

@ -4,36 +4,17 @@ import { NgaThemeService } from '@akveo/nga-theme';
@Component({
selector: 'ngx-temperature',
styleUrls: ['./temperature.component.scss'],
template: `
<nga-card size="xmedium">
<nga-tabset fullWidth>
<nga-tab tabTitle="Temperature">
<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">
<span>Content #2</span>
</nga-tab>
</nga-tabset>
</nga-card>
`,
templateUrl: './temperature.component.html',
})
export class TemperatureComponent {
temperature: number = 23;
powerOff: boolean = false;
temperatureOff: boolean = false;
temperatureMode = 'cool';
humidity: number = 23;
humidityOff: boolean = false;
humidityMode = 'auto';
themeConfig: any = {};