26 lines
638 B
TypeScript
26 lines
638 B
TypeScript
import {Component, OnInit} from '@angular/core';
|
|
import {ConfigService} from '../../services/config.service';
|
|
|
|
@Component({
|
|
selector: 'framadate-theme-selector',
|
|
templateUrl: './theme-selector.component.html',
|
|
styleUrls: ['./theme-selector.component.scss']
|
|
})
|
|
export class ThemeSelectorComponent implements OnInit {
|
|
|
|
constructor(public config: ConfigService) {
|
|
// this.selectTheme('dark-crystal')
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
}
|
|
|
|
selectTheme(themeName: string) {
|
|
if (this.config.themeChoices.includes(themeName)) {
|
|
|
|
this.config.setPreference('themeName', themeName);
|
|
}
|
|
|
|
}
|
|
}
|