Remove non-material themes

This commit is contained in:
eugene-sinitsyn 2020-03-10 15:57:33 +03:00 committed by Sergey Andrievskiy
parent ffb55fa240
commit 87e5d9f318
24 changed files with 116 additions and 1580 deletions

View file

@ -4,7 +4,7 @@ import { NbMediaBreakpointsService, NbMenuService, NbSidebarService, NbThemeServ
import { UserData } from '../../../@core/data/users';
import { LayoutService } from '../../../@core/utils';
import { map, takeUntil } from 'rxjs/operators';
import { Subject, Observable } from 'rxjs';
import { Subject } from 'rxjs';
import { RippleService } from '../../../@core/utils/ripple.service';
@Component({
@ -15,39 +15,15 @@ import { RippleService } from '../../../@core/utils/ripple.service';
export class HeaderComponent implements OnInit, OnDestroy {
private destroy$: Subject<void> = new Subject<void>();
public readonly materialTheme$: Observable<boolean>;
userPictureOnly: boolean = false;
user: any;
themes = [
{
value: 'default',
name: 'Light',
},
{
value: 'dark',
name: 'Dark',
},
{
value: 'cosmic',
name: 'Cosmic',
},
{
value: 'corporate',
name: 'Corporate',
},
{
value: 'material-light',
name: 'Material Light',
},
{
value: 'material-dark',
name: 'Material Dark',
},
public currentTheme = 'material-light';
public readonly themes = [
{ value: 'material-light', name: 'Material Light' },
{ value: 'material-dark', name: 'Material Dark' },
];
currentTheme = 'default';
userMenu = [ { title: 'Profile' }, { title: 'Log out' } ];
public constructor(
@ -58,13 +34,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
private layoutService: LayoutService,
private breakpointService: NbMediaBreakpointsService,
private rippleService: RippleService,
) {
this.materialTheme$ = this.themeService.onThemeChange()
.pipe(map(theme => {
const themeName: string = theme?.name || '';
return themeName.startsWith('material');
}));
}
) {}
ngOnInit() {
this.currentTheme = this.themeService.currentTheme;