mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-07 22:47:41 +00:00
fix(console): header image fallback (#3735)
fix: fallback icon in header Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
parent
f9e9b4b64b
commit
47feced1cb
@ -10,20 +10,20 @@
|
|||||||
alt="home logo"
|
alt="home logo"
|
||||||
*ngIf="isDarkTheme; else customlighttheme"
|
*ngIf="isDarkTheme; else customlighttheme"
|
||||||
[src]="labelpolicy?.iconUrlDark ? labelpolicy.iconUrlDark : './assets/images/zitadel-logo-solo-light.svg'"
|
[src]="labelpolicy?.iconUrlDark ? labelpolicy.iconUrlDark : './assets/images/zitadel-logo-solo-light.svg'"
|
||||||
onerror="this.src='./assets/images/zitadel-logo-solo-light.svg';this.onerror='';"
|
(error)="errorHandler($event, './assets/images/zitadel-logo-solo-light.svg')"
|
||||||
/>
|
/>
|
||||||
<ng-template #customlighttheme>
|
<ng-template #customlighttheme>
|
||||||
<img
|
<img
|
||||||
alt="home logo"
|
alt="home logo"
|
||||||
class="logo"
|
class="logo"
|
||||||
[src]="labelpolicy?.iconUrl ? labelpolicy.iconUrl : './assets/images/zitadel-logo-solo-dark.svg'"
|
[src]="labelpolicy?.iconUrl ? labelpolicy.iconUrl : './assets/images/zitadel-logo-solo-dark.svg'"
|
||||||
onerror="this.src='./assets/images/zitadel-logo-solo-dark.svg';this.onerror='';"
|
(error)="errorHandler($event, './assets/images/zitadel-logo-solo-dark.svg')"
|
||||||
/>
|
/>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<ng-template #defaultHome>
|
<ng-template #defaultHome>
|
||||||
<a *ngIf="org" class="title" [routerLink]="['/']">
|
<a class="title" [routerLink]="['/']">
|
||||||
<img
|
<img
|
||||||
class="logo"
|
class="logo"
|
||||||
alt="zitadel logo"
|
alt="zitadel logo"
|
||||||
@ -31,7 +31,7 @@
|
|||||||
src="./assets/images/zitadel-logo-solo-light.svg"
|
src="./assets/images/zitadel-logo-solo-light.svg"
|
||||||
/>
|
/>
|
||||||
<ng-template #lighttheme>
|
<ng-template #lighttheme>
|
||||||
<img alt="zitadel logo" class="logo" src="../assets/images/zitadel-logo-solo-dark.svg" />
|
<img alt="zitadel logo" class="logo" src="./assets/images/zitadel-logo-solo-dark.svg" />
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</a>
|
</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@ -67,6 +67,10 @@ export class HeaderComponent implements OnDestroy {
|
|||||||
return this.router.url === '/users/me';
|
return this.router.url === '/users/me';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public errorHandler(event: any, fallbackSrc: string) {
|
||||||
|
(event.target as HTMLImageElement).src = fallbackSrc;
|
||||||
|
}
|
||||||
|
|
||||||
public get isOnInstance(): boolean {
|
public get isOnInstance(): boolean {
|
||||||
const pages: string[] = [
|
const pages: string[] = [
|
||||||
'/instance',
|
'/instance',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user