Fix applying theme from local broswer
This commit is contained in:
@@ -52,6 +52,7 @@ export class AppConfiguratorComponent {
|
|||||||
config: PrimeNG = inject(PrimeNG);
|
config: PrimeNG = inject(PrimeNG);
|
||||||
configService: AppConfigService = inject(AppConfigService);
|
configService: AppConfigService = inject(AppConfigService);
|
||||||
presets = Object.keys(presets);
|
presets = Object.keys(presets);
|
||||||
|
platformId = inject(PLATFORM_ID);
|
||||||
|
|
||||||
surfaces = [
|
surfaces = [
|
||||||
{
|
{
|
||||||
@@ -216,6 +217,14 @@ export class AppConfiguratorComponent {
|
|||||||
return palettes;
|
return palettes;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
if (isPlatformBrowser(this.platformId)) {
|
||||||
|
this.onPresetChange(this.configService.appState().preset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
getPresetExt() {
|
getPresetExt() {
|
||||||
const color = this.primaryColors().find((c) => c.name === this.selectedPrimaryColor());
|
const color = this.primaryColors().find((c) => c.name === this.selectedPrimaryColor());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user