customisable header image url (#1449)

This commit is contained in:
Denys Vuika
2020-05-06 14:17:42 +01:00
committed by GitHub
parent 9c3f3b5987
commit f6c1843b23
9 changed files with 37 additions and 7 deletions

View File

@@ -39,7 +39,8 @@ import {
AppStore,
getHeaderColor,
getAppName,
getLogoPath
getLogoPath,
getHeaderImagePath
} from '@alfresco/aca-shared/store';
@Component({
@@ -68,6 +69,13 @@ export class AppHeaderComponent implements OnInit {
this.headerColor$ = store.select(getHeaderColor);
this.appName$ = store.select(getAppName);
this.logo$ = store.select(getLogoPath);
store.select(getHeaderImagePath).subscribe(path => {
document.body.style.setProperty(
'--header-background-image',
`url('${path}')`
);
});
}
ngOnInit() {