From 1679106e8df722d1bce7de8a848a3eefc84df36b Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 4 Dec 2017 04:08:46 +0000 Subject: [PATCH] ability to control full logo path (#102) helps switching between root hosting and virtual paths --- src/app.config.json | 2 +- src/app/components/header/header.component.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app.config.json b/src/app.config.json index 80383e6d4..e5ea19e7f 100644 --- a/src/app.config.json +++ b/src/app.config.json @@ -4,7 +4,7 @@ "name": "Alfresco Example Content Application", "build": "1234" }, - "logo": "alfresco-logo-white.svg", + "logo": "/assets/images/alfresco-logo-white.svg", "languagePicker": false, "document-list": { "supportedPageSizes": [ diff --git a/src/app/components/header/header.component.ts b/src/app/components/header/header.component.ts index 2249309dc..f54b8bef9 100644 --- a/src/app/components/header/header.component.ts +++ b/src/app/components/header/header.component.ts @@ -25,8 +25,7 @@ import { AppConfigService } from '@alfresco/adf-core'; encapsulation: ViewEncapsulation.None }) export class HeaderComponent { - static ASSETS_PATH = '/assets/images/'; - static DEFAULT_LOGO = 'alfresco-logo-white.svg'; + private defaultPath = '/assets/images/alfresco-logo-white.svg'; constructor(private appConfig: AppConfigService) {} @@ -35,6 +34,6 @@ export class HeaderComponent { } get logo() { - return `${HeaderComponent.ASSETS_PATH}${this.appConfig.get('logo', HeaderComponent.DEFAULT_LOGO)}`; + return this.appConfig.get('logo', this.defaultPath); } }