diff --git a/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.ts b/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.ts index 4c1e7569..e6e1ed7a 100644 --- a/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.ts @@ -83,6 +83,9 @@ export class PortalViewportComponent implements OnInit, AfterViewInit, OnDestroy this.themeService.currentTheme$.pipe(untilDestroyed(this)).subscribe((theme: any) => { this.logoUrl = theme.logoUrl || this.portalDefinition.logoUrl + if (this.logoUrl && !this.logoUrl.startsWith('/portal-api')) { + this.logoUrl = '/portal-api' + this.logoUrl + } document.getElementById('favicon')?.setAttribute('href', theme.faviconUrl) }) diff --git a/libs/portal-integration-angular/src/lib/services/theme.service.ts b/libs/portal-integration-angular/src/lib/services/theme.service.ts index cead809d..3dfe52bf 100644 --- a/libs/portal-integration-angular/src/lib/services/theme.service.ts +++ b/libs/portal-integration-angular/src/lib/services/theme.service.ts @@ -25,13 +25,13 @@ export class ThemeService implements OnDestroy { return this.http.get(`${this.baseUrlV1}/internal/themes/${encodeURI(themeName)}`).pipe( tap((theme) => { this.apply(theme) - this.currentTheme$.publish(theme) }) ) } public apply(theme: Theme) { console.log(`🎨 Applying theme: ${theme.name}`) + this.currentTheme$.publish(theme) if (theme.properties) { Object.values(theme.properties).forEach((group) => { for (const [key, value] of Object.entries(group)) {