Merge pull request #5329 from mempool/nymkappa/external-menu-link

[menu] link can be external
This commit is contained in:
wiz 2024-07-13 16:01:10 +09:00 committed by GitHub
commit 1d827a9724
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -34,7 +34,12 @@
<li class="nav-item d-flex justify-content-start align-items-center menu-click">
<fa-icon class="menu-click" [icon]="['fas', item.faIcon]" [fixedWidth]="true"></fa-icon>
<button *ngIf="item.link === 'logout'" class="btn nav-link menu-click" role="tab" (click)="logout()">{{ item.title }}</button>
<a *ngIf="item.title !== 'Logout'" class="nav-link menu-click" [routerLink]="[item.link]" role="tab">{{ item.title }}</a>
<a *ngIf="item.title !== 'Logout'" class="nav-link menu-click" [routerLink]="[item.link]" role="tab">
{{ item.title }}
@if (item.isExternal === true) {
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="margin-left: 5px; font-size: 13px; color: lightgray"></fa-icon>
}
</a>
</li>
</ul>
</div>

View File

@ -5,6 +5,7 @@ export type MenuItem = {
i18n: string;
faIcon: IconName;
link: string;
isExternal?: boolean;
};
export type MenuGroup = {
title: string;