diff --git a/libs/angular-accelerator/src/lib/directives/src.directive.ts b/libs/angular-accelerator/src/lib/directives/src.directive.ts index 7b11454d..c1358349 100644 --- a/libs/angular-accelerator/src/lib/directives/src.directive.ts +++ b/libs/angular-accelerator/src/lib/directives/src.directive.ts @@ -11,18 +11,27 @@ export class SrcDirective { } set ocxSrc(value: string | undefined) { if (value && this._src !== value) { - this.httpClient.get(value, { responseType: 'blob' }).subscribe({ - next: (blob) => { - const url = URL.createObjectURL(blob) - this.el.nativeElement.onload = () => { - URL.revokeObjectURL(url) - } - this.el.nativeElement.src = url - }, - error: () => { - this.el.nativeElement.src = 'error' - }, - }) + try { + if (new URL(value, window.location.origin).origin === window.location.origin) { + this.httpClient.get(value, { responseType: 'blob' }).subscribe({ + next: (blob) => { + const url = URL.createObjectURL(blob) + this.el.nativeElement.onload = () => { + URL.revokeObjectURL(url) + } + this.el.nativeElement.src = url + }, + error: () => { + this.el.nativeElement.src = 'error' + }, + }) + } else { + this.el.nativeElement.src = value + } + } catch (error) { + console.log('Cannot parse URL ', value, error) + this.el.nativeElement.src = value + } this._src = value } } diff --git a/libs/angular-accelerator/src/lib/services/app-config-service.ts b/libs/angular-accelerator/src/lib/services/app-config-service.ts index 4151c533..5772fc53 100644 --- a/libs/angular-accelerator/src/lib/services/app-config-service.ts +++ b/libs/angular-accelerator/src/lib/services/app-config-service.ts @@ -1,3 +1,4 @@ +import { Location } from '@angular/common' import { HttpClient } from '@angular/common/http' import { Injectable } from '@angular/core' import { Config } from '@onecx/integration-interface' @@ -11,7 +12,9 @@ export class AppConfigService { public init(baseUrl: string): Promise { return new Promise((resolve, reject) => { - const loadConfigPromise: Promise = firstValueFrom(this.http.get(baseUrl + 'assets/env.json')) + const loadConfigPromise: Promise = firstValueFrom( + this.http.get(Location.joinWithSlash(baseUrl, 'assets/env.json')) + ) loadConfigPromise .then(async (config) => { diff --git a/libs/shell-core/src/lib/components/portal-header/header.component.html b/libs/shell-core/src/lib/components/portal-header/header.component.html index 7a1db546..90aa15d4 100644 --- a/libs/shell-core/src/lib/components/portal-header/header.component.html +++ b/libs/shell-core/src/lib/components/portal-header/header.component.html @@ -44,6 +44,7 @@
+
    diff --git a/libs/shell-core/src/lib/components/portal-viewport/portal-viewport.component.html b/libs/shell-core/src/lib/components/portal-viewport/portal-viewport.component.html index 0ff4411e..70da7800 100644 --- a/libs/shell-core/src/lib/components/portal-viewport/portal-viewport.component.html +++ b/libs/shell-core/src/lib/components/portal-viewport/portal-viewport.component.html @@ -13,9 +13,7 @@ [menuButtonTitle]="menuButtonTitle" (menuButtonClick)="onMenuButtonClick($event)" > -
    - Horizontal Menu -
    + @@ -23,13 +21,13 @@
    - Announcement Banner + diff --git a/libs/shell-core/src/lib/components/portal-viewport/portal-viewport.component.scss b/libs/shell-core/src/lib/components/portal-viewport/portal-viewport.component.scss index 793a270b..e69de29b 100644 --- a/libs/shell-core/src/lib/components/portal-viewport/portal-viewport.component.scss +++ b/libs/shell-core/src/lib/components/portal-viewport/portal-viewport.component.scss @@ -1,6 +0,0 @@ -.horizontal { - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: center; -}