-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move inspect logs button to header menu item (#79)
- Loading branch information
Showing
6 changed files
with
52 additions
and
25 deletions.
There are no files selected for viewing
14 changes: 13 additions & 1 deletion
14
src/app/core/layout/wallet-layout/wallet-layout-header/wallet-layout-header.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
<img src="assets/ic-logo.svg" (click)="goHome()" alt="wallet-logo"/> | ||
|
||
<img src="assets/ic-logo.svg" (click)="goHome()" alt="wallet-logo"/> | ||
|
||
|
||
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="menu"> | ||
<mat-icon>menu</mat-icon> | ||
</button> | ||
|
||
<mat-menu #menu="matMenu"> | ||
<button mat-menu-item> | ||
<a id="inspectLogs" (click)="inspectLogs()">Inspect transaction logs</a> | ||
</button> | ||
</mat-menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 29 additions & 5 deletions
34
src/app/core/layout/wallet-layout/wallet-layout-header/wallet-layout-header.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,40 @@ | ||
import { Component } from '@angular/core'; | ||
import {Component, inject} from '@angular/core'; | ||
import { NavigateService } from '@app/core/services/navigate.service'; | ||
import {MatButtonModule} from "@angular/material/button"; | ||
import {MatIconModule} from "@angular/material/icon"; | ||
import {MatMenuModule} from "@angular/material/menu"; | ||
import {MatToolbarModule} from '@angular/material/toolbar'; | ||
import {OpenLogsComponent} from "@shared/elements/open-logs/open-logs.component"; | ||
import {MatDialog} from "@angular/material/dialog"; | ||
|
||
@Component({ | ||
selector: 'vc-wallet-layout-header', | ||
standalone: true, | ||
templateUrl: './wallet-layout-header.component.html', | ||
styleUrls: ['./wallet-layout-header.component.scss'] | ||
selector: 'vc-wallet-layout-header', | ||
standalone: true, | ||
templateUrl: './wallet-layout-header.component.html', | ||
imports: [ | ||
MatButtonModule, | ||
MatIconModule, | ||
MatMenuModule, | ||
MatToolbarModule | ||
], | ||
styleUrls: ['./wallet-layout-header.component.scss'] | ||
}) | ||
export class WalletLayoutHeaderComponent { | ||
constructor (private readonly navigateService: NavigateService) {} | ||
|
||
private dialog: MatDialog = inject(MatDialog); | ||
|
||
goHome () { | ||
this.navigateService.goHome(); | ||
} | ||
|
||
inspectLogs () { | ||
this.dialog.open(OpenLogsComponent, { | ||
data: { | ||
transactionId: '', | ||
label: 'Inspect transaction logs', | ||
isInspectLogs: true | ||
}, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters