ACS-8404: consolidate application settings (#3952)

This commit is contained in:
Denys Vuika
2024-07-18 09:01:46 -04:00
committed by GitHub
parent 74384f09f8
commit 2ff54affb2
19 changed files with 132 additions and 182 deletions

View File

@@ -6,7 +6,7 @@
(click)="toggleNavBar.emit()"
(keypress)="toggleNavBar.emit()">
<img
src="{{ logo$ | async }}"
src="{{ logoUrl }}"
title="{{'APP.TOOLTIPS.COLLAPSE_NAVIGATION' | translate}}"
alt="{{ 'CORE.HEADER.LOGO_ARIA' | translate }}" />
</div>
@@ -15,7 +15,7 @@
class="aca-sidenav-header-title-text"
data-automation-id="app-sidenav-header-title-text"
[routerLink]="landingPage">
{{ appName$ | async | translate }}
{{ appName | translate }}
</div>
<aca-toolbar [items]="actions"></aca-toolbar>

View File

@@ -23,9 +23,7 @@
*/
import { Component, EventEmitter, inject, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { Store } from '@ngrx/store';
import { Subject } from 'rxjs';
import { AppStore, getAppName, getLogoPath } from '@alfresco/aca-shared/store';
import { ContentActionRef } from '@alfresco/adf-extensions';
import { AppExtensionService, AppSettingsService, ToolbarComponent } from '@alfresco/aca-shared';
import { takeUntil } from 'rxjs/operators';
@@ -43,12 +41,11 @@ import { RouterModule } from '@angular/router';
})
export class SidenavHeaderComponent implements OnInit, OnDestroy {
private onDestroy$ = new Subject<boolean>();
private store = inject<Store<AppStore>>(Store);
private appSettings = inject(AppSettingsService);
private appExtensions = inject(AppExtensionService);
appName$ = this.store.select(getAppName);
logo$ = this.store.select(getLogoPath);
appName = this.appSettings.appName;
logoUrl = this.appSettings.appLogoUrl;
landingPage = this.appSettings.landingPage;
actions: Array<ContentActionRef> = [];