arch(sprint1): move UI env reads behind runtime facade

This commit is contained in:
sdarbinyan
2026-07-03 01:58:08 +04:00
parent 3cbb28a116
commit ae258382e1
9 changed files with 144 additions and 24 deletions

View File

@@ -1,9 +1,9 @@
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { RouterLink } from '@angular/router';
import { environment } from '../../../environments/environment';
import { LangRoutePipe } from '../../pipes/lang-route.pipe';
import { TranslatePipe } from '../../i18n/translate.pipe';
import { LogoComponent } from '../logo/logo.component';
import { UiRuntimeFacade } from '../../facades/runtime/ui-runtime.facade';
@Component({
selector: 'app-footer',
@@ -13,9 +13,23 @@ import { LogoComponent } from '../logo/logo.component';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class FooterComponent {
constructor(private readonly uiRuntime: UiRuntimeFacade) {}
currentYear = new Date().getFullYear();
brandName = environment.brandName;
contactEmail = environment.contactEmail;
isnovo = environment.theme === 'novo';
islavero = environment.theme === 'lavero';
get brandName(): string {
return this.uiRuntime.brandName();
}
get contactEmail(): string {
return this.uiRuntime.contactEmail();
}
get isnovo(): boolean {
return this.uiRuntime.isNovo();
}
get islavero(): boolean {
return this.uiRuntime.isLavero();
}
}