Skip to content

Commit f12bd9f

Browse files
denStrigonnixaa
authored andcommitted
fix(temperature): fix temperature dragger gradient, fix switcher button hover background (#1745)
1 parent a6d5d49 commit f12bd9f

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

src/app/@theme/components/theme-switcher/theme-switcher.component.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414

1515
&:hover {
1616
$color: nb-theme(switcher-background);
17+
$percentage: nb-theme(switcher-background-percentage);
1718

18-
background-color: tint($color, 14%);
19+
background-color: tint($color, $percentage);
1920
}
2021

2122
span {

src/app/@theme/styles/themes.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ $nb-themes: nb-register-theme((
1616
font-secondary: Exo,
1717

1818
switcher-background: #ebeff5,
19+
switcher-background-percentage: 50%,
1920
drops-icon-line-gadient: -webkit-linear-gradient(#01dbb5, #0bbb79),
2021
), default, default);
2122

@@ -29,6 +30,7 @@ $nb-themes: nb-register-theme((
2930
font-secondary: Exo,
3031

3132
switcher-background: #4e41a5,
33+
switcher-background-percentage: 14%,
3234
drops-icon-line-gadient: -webkit-linear-gradient(#a258fe, #7958fa),
3335
), cosmic, cosmic);
3436

@@ -42,5 +44,6 @@ $nb-themes: nb-register-theme((
4244
font-secondary: Exo,
4345

4446
switcher-background: #2b2d34,
47+
switcher-background-percentage: 14%,
4548
drops-icon-line-gadient: -webkit-linear-gradient(#e9e8eb, #a7a2be),
4649
), corporate, corporate);

src/app/pages/dashboard/dashboard.component.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Component, OnDestroy} from '@angular/core';
22
import { NbThemeService } from '@nebular/theme';
33
import { takeWhile } from 'rxjs/operators/takeWhile' ;
44

5-
interface ICardSettings {
5+
interface CardSettings {
66
title: string;
77
iconClass: string;
88
type: string;
@@ -17,40 +17,40 @@ export class DashboardComponent implements OnDestroy {
1717

1818
private alive = true;
1919

20-
lightCard: ICardSettings = {
20+
lightCard: CardSettings = {
2121
title: 'Light',
2222
iconClass: 'nb-lightbulb',
2323
type: 'primary',
2424
};
25-
rollerShadesCard: ICardSettings = {
25+
rollerShadesCard: CardSettings = {
2626
title: 'Roller Shades',
2727
iconClass: 'nb-roller-shades',
2828
type: 'success',
2929
};
30-
wirelessAudioCard: ICardSettings = {
30+
wirelessAudioCard: CardSettings = {
3131
title: 'Wireless Audio',
3232
iconClass: 'nb-audio',
3333
type: 'info',
3434
};
35-
coffeeMakerCard: ICardSettings = {
35+
coffeeMakerCard: CardSettings = {
3636
title: 'Coffee Maker',
3737
iconClass: 'nb-coffee-maker',
3838
type: 'warning',
3939
};
4040

4141
statusCards: string;
4242

43-
commonStatusCardsSet: ICardSettings[] = [
43+
commonStatusCardsSet: CardSettings[] = [
4444
this.lightCard,
4545
this.rollerShadesCard,
4646
this.wirelessAudioCard,
4747
this.coffeeMakerCard,
4848
];
4949

5050
statusCardsByThemes: {
51-
default: ICardSettings[];
52-
cosmic: ICardSettings[];
53-
corporate: ICardSettings[];
51+
default: CardSettings[];
52+
cosmic: CardSettings[];
53+
corporate: CardSettings[];
5454
} = {
5555
default: this.commonStatusCardsSet,
5656
cosmic: this.commonStatusCardsSet,

src/app/pages/dashboard/temperature/temperature-dragger/temperature-dragger.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,13 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges {
119119
this.calculateVars();
120120

121121
this.invalidateClipPathStr();
122-
this.invalidateGradientArcs();
123122
this.invalidatePinPosition();
123+
124+
// Chrome fix, temporary solution
125+
// TODO: review set data to styles object
126+
setTimeout(() => {
127+
this.invalidateGradientArcs();
128+
})
124129
}
125130

126131
private calculateVars() {

0 commit comments

Comments
 (0)