diff --git a/src/app/@theme/components/header/header.component.ts b/src/app/@theme/components/header/header.component.ts index 26709722..b3540146 100644 --- a/src/app/@theme/components/header/header.component.ts +++ b/src/app/@theme/components/header/header.component.ts @@ -2,6 +2,7 @@ import { Component } from '@angular/core'; import { NgaSidebarService, NgaMenuService } from '@akveo/nga-theme'; import { NgaThemeService } from '@akveo/nga-theme/services/theme.service'; +import { UserService } from '../../../@core/data/users.service'; @Component({ selector: 'ngx-header', @@ -22,7 +23,7 @@ import { NgaThemeService } from '@akveo/nga-theme/services/theme.service'; - + @@ -30,6 +31,8 @@ import { NgaThemeService } from '@akveo/nga-theme/services/theme.service'; }) export class HeaderComponent { + user: any; + userMenu = [ { title: 'Profile', @@ -41,7 +44,9 @@ export class HeaderComponent { constructor(private sidebarService: NgaSidebarService, private menuService: NgaMenuService, - private themeService: NgaThemeService) { + private themeService: NgaThemeService, + private userService: UserService) { + this.user = this.userService.getUsers().nick; } toggleSidebar(): boolean { diff --git a/src/app/pages/dashboard/contacts/contacts.component.scss b/src/app/pages/dashboard/contacts/contacts.component.scss index d831cc31..eff7102a 100644 --- a/src/app/pages/dashboard/contacts/contacts.component.scss +++ b/src/app/pages/dashboard/contacts/contacts.component.scss @@ -14,7 +14,7 @@ nga-tab { flex: 1; - overflow-y: scroll; + overflow-y: auto; padding: 0; } diff --git a/src/app/pages/dashboard/electricity/electricity.component.html b/src/app/pages/dashboard/electricity/electricity.component.html index 2ccd5428..47bd4d3d 100644 --- a/src/app/pages/dashboard/electricity/electricity.component.html +++ b/src/app/pages/dashboard/electricity/electricity.component.html @@ -6,37 +6,20 @@ - -
-
- {{ row.month }} - {{ row.delta }} -
-
- {{ row.kWatts }} kWh / {{ row.cost }} USD -
-
-
- - -
+ +
- {{ row.month }} - {{ row.delta }} + {{ month.month }} + {{ month.delta }}
- {{ row.kWatts }} kWh / {{ row.cost }} USD + {{ month.kWatts }} kWh / {{ month.cost }} USD
- - - 2017 year data -
-
diff --git a/src/app/pages/dashboard/electricity/electricity.component.scss b/src/app/pages/dashboard/electricity/electricity.component.scss index 55ea39da..55a7117d 100644 --- a/src/app/pages/dashboard/electricity/electricity.component.scss +++ b/src/app/pages/dashboard/electricity/electricity.component.scss @@ -14,12 +14,13 @@ flex-direction: column; width: 20rem; height: 100%; + z-index: 2; + box-shadow: nga-theme(card-shadow); } .table-header { @include nga-card-header(); font-size: 1.5rem; - border-bottom: 1px solid nga-theme(separator); .subtitle { color: nga-theme(color-fg); @@ -31,10 +32,15 @@ nga-tabset /deep/ { flex: 1; + overflow: hidden; + display: flex; + flex-direction: column; ul { align-items: center; padding: 1rem; + border-top: 1px solid nga-theme(separator); + border-bottom: 1px solid nga-theme(separator); } ul li a { @@ -53,16 +59,26 @@ display: none; } } + + nga-tab { + flex: 1; + overflow-y: auto; + } } - .stats-row { + .stats-month { display: flex; align-items: center; justify-content: space-between; padding: 1rem; - border-top: 1px solid nga-theme(separator); + + &:not(:first-child) { + border-top: 1px solid nga-theme(separator); + } .month { + display: inline-block; + width: 2.75rem; font-family: nga-theme(font-secondary); font-size: 1.25rem; font-weight: nga-theme(font-weight-bolder); @@ -70,15 +86,32 @@ } .delta { + position: relative; display: inline-block; padding-left: 1rem; font-size: 0.75rem; - font-weight: nga-theme(font-weight-light); color: text-danger(); + &::before { + position: absolute; + content: ''; + bottom: 3px; + left: 2px; + + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-bottom: 8px solid text-danger(); + } + &.down { color: text-success(); + + &::before { + top: 3px; + border-top: 8px solid text-success(); + border-bottom: none; + } } } diff --git a/src/app/pages/dashboard/electricity/electricity.component.ts b/src/app/pages/dashboard/electricity/electricity.component.ts index 9edbf116..2aad0c3d 100644 --- a/src/app/pages/dashboard/electricity/electricity.component.ts +++ b/src/app/pages/dashboard/electricity/electricity.component.ts @@ -1,31 +1,64 @@ -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; @Component({ selector: 'ngx-electricity', styleUrls: ['./electricity.component.scss'], templateUrl: './electricity.component.html', }) -export class ElectricityComponent implements OnInit { +export class ElectricityComponent { - data = { - 2015: [ - { month: 'Jan', delta: '0.97', down: true, kWatts: '816', cost: '97' }, - { month: 'Feb', delta: '1.83', down: true, kWatts: '806', cost: '95' }, - { month: 'Mar', delta: '0.64', down: true, kWatts: '803', cost: '94' }, - { month: 'Apr', delta: '2.17', down: false, kWatts: '818', cost: '98' }, - { month: 'May', delta: '1.32', down: true, kWatts: '809', cost: '96' }, - { month: 'Jun', delta: '0.05', down: true, kWatts: '808', cost: '96' }, - { month: 'Jul', delta: '1.39', down: false, kWatts: '815', cost: '97' }, - { month: 'Aug', delta: '0.73', down: true, kWatts: '807', cost: '95' }, - { month: 'Sept', delta: '2.61', down: true, kWatts: '792', cost: '92' }, - { month: 'Oct', delta: '0.16', down: true, kWatts: '791', cost: '92' }, - { month: 'Nov', delta: '1.71', down: true, kWatts: '786', cost: '89' }, - { month: 'Dec', delta: '0.37', down: false, kWatts: '789', cost: '91' }, - ], - 2016: [], - 2017: [], - }; - - ngOnInit() { - } + data = [ + { + title: '2015', + months: [ + { month: 'Jan', delta: '0.97', down: true, kWatts: '816', cost: '97' }, + { month: 'Feb', delta: '1.83', down: true, kWatts: '806', cost: '95' }, + { month: 'Mar', delta: '0.64', down: true, kWatts: '803', cost: '94' }, + { month: 'Apr', delta: '2.17', down: false, kWatts: '818', cost: '98' }, + { month: 'May', delta: '1.32', down: true, kWatts: '809', cost: '96' }, + { month: 'Jun', delta: '0.05', down: true, kWatts: '808', cost: '96' }, + { month: 'Jul', delta: '1.39', down: false, kWatts: '815', cost: '97' }, + { month: 'Aug', delta: '0.73', down: true, kWatts: '807', cost: '95' }, + { month: 'Sept', delta: '2.61', down: true, kWatts: '792', cost: '92' }, + { month: 'Oct', delta: '0.16', down: true, kWatts: '791', cost: '92' }, + { month: 'Nov', delta: '1.71', down: true, kWatts: '786', cost: '89' }, + { month: 'Dec', delta: '0.37', down: false, kWatts: '789', cost: '91' }, + ] + }, + { + title: '2016', + active: true, + months: [ + { month: 'Jan', delta: '1.56', down: true, kWatts: '789', cost: '91' }, + { month: 'Feb', delta: '0.33', down: false, kWatts: '791', cost: '92' }, + { month: 'Mar', delta: '0.62', down: true, kWatts: '790', cost: '92' }, + { month: 'Apr', delta: '1.93', down: true, kWatts: '783', cost: '87' }, + { month: 'May', delta: '2.52', down: true, kWatts: '771', cost: '83' }, + { month: 'Jun', delta: '0.39', down: false, kWatts: '774', cost: '85' }, + { month: 'Jul', delta: '1.61', down: true, kWatts: '767', cost: '81' }, + { month: 'Aug', delta: '1.41', down: true, kWatts: '759', cost: '76' }, + { month: 'Sept', delta: '1.03', down: true, kWatts: '752', cost: '74' }, + { month: 'Oct', delta: '2.94', down: false, kWatts: '769', cost: '82' }, + { month: 'Nov', delta: '0.26', down: true, kWatts: '767', cost: '81' }, + { month: 'Dec', delta: '1.62', down: true, kWatts: '760', cost: '76' }, + ] + }, + { + title: '2017', + months: [ + { month: 'Jan', delta: '1.34', down: false, kWatts: '789', cost: '91' }, + { month: 'Feb', delta: '0.95', down: false, kWatts: '793', cost: '93' }, + { month: 'Mar', delta: '0.25', down: true, kWatts: '791', cost: '92' }, + { month: 'Apr', delta: '1.72', down: false, kWatts: '797', cost: '95' }, + { month: 'May', delta: '2.62', down: true, kWatts: '786', cost: '90' }, + { month: 'Jun', delta: '0.72', down: false, kWatts: '789', cost: '91' }, + { month: 'Jul', delta: '0.78', down: true, kWatts: '784', cost: '89' }, + { month: 'Aug', delta: '0.36', down: true, kWatts: '782', cost: '88' }, + { month: 'Sept', delta: '0.55', down: false, kWatts: '787', cost: '90' }, + { month: 'Oct', delta: '1.81', down: true, kWatts: '779', cost: '86' }, + { month: 'Nov', delta: '1.12', down: true, kWatts: '774', cost: '84' }, + { month: 'Dec', delta: '0.52', down: false, kWatts: '776', cost: '95' }, + ] + }, + ]; } diff --git a/src/app/pages/dashboard/temperature/temperature.component.scss b/src/app/pages/dashboard/temperature/temperature.component.scss index a7020984..7a3ce75a 100644 --- a/src/app/pages/dashboard/temperature/temperature.component.scss +++ b/src/app/pages/dashboard/temperature/temperature.component.scss @@ -74,6 +74,10 @@ } } + .btn-group { + padding: 1.25rem; + } + .btn-icon { display: flex; align-items: center; @@ -82,12 +86,30 @@ border-color: nga-theme(form-control-border-color); width: 4.5rem; height: 4.5rem; - font-size: 2rem; + padding: 0; + margin: 0; &.active { border-color: nga-theme(color-fg-highlight); box-shadow: 0 2px 12px 0 rgba(nga-theme(color-fg-highlight), 0.25); background-color: rgba(nga-theme(color-fg-highlight), 0.25); } + + i { + font-size: 2rem; + line-height: 1; + } + .ion-ios-snowy { + font-size: 2.5rem; + } + .ion-ios-sunny-outline { + font-size: 2.5rem; + } + .ion-ios-flame-outline { + font-size: 2.25rem; + } + .ion-ios-loop { + font-size: 1.75rem; + } } }