25 lines
674 B
TypeScript
25 lines
674 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) {
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
}
|
|
|
|
selectTheme(themeName: string) {
|
|
if (this.config.themeChoices.includes(themeName)) {
|
|
this.config.themeSelected = this.config.themeChoices.indexOf(themeName);
|
|
this.config.themeClass = `theme-${themeName}`;
|
|
}
|
|
|
|
}
|
|
}
|