Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move inspect logs button to header menu item #79

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
padding: temp.$spaceBasic;
position: relative;
}

button {
cursor: pointer;
left: 45%;
position: relative;
overflow-clip-margin: content-box;
}

@media (max-width: map-get(points.$breakpoints, xs)) and (min-width: map-get(points.$breakpoints, sm)){
img {
left: 3%;
Expand Down
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
},
});
}
}
5 changes: 0 additions & 5 deletions src/app/features/home/components/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<vc-wallet-layout>
<div body class="container ">
<mat-card appearance="outlined" class="show-logs">
<mat-card-content> <div class="log-button">
<vc-button class="vc-button" name="Inspect transaction logs" id="inspectLogs" mode="none" color="primary" (clicked)="inspectLogs()"></vc-button>
</div> </mat-card-content>
</mat-card>
<mat-tab-group animationDuration="0ms" (selectedIndexChange)="selectedIndexChange($event)">
<mat-tab #pid label="PID authentication">
<ng-container *ngIf="pid.isActive">
Expand Down
14 changes: 1 addition & 13 deletions src/app/features/home/components/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {MatTabsModule} from '@angular/material/tabs';
import {AttestationSelectableModelService} from '@app/core/services/attestation-selectable-model.service';
import { OpenLogsComponent } from '@app/shared/elements/open-logs/open-logs.component';
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
import { MatCardModule } from '@angular/material/card';
@Component({
standalone: true,
imports: [
Expand All @@ -28,8 +27,7 @@ import { MatCardModule } from '@angular/material/card';
InputSchemeComponent,
WalletLayoutComponent,
OpenLogsComponent,
MatDialogModule,
MatCardModule
MatDialogModule
],
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
Expand Down Expand Up @@ -139,14 +137,4 @@ export class HomeComponent implements OnInit {
return item;
});
}
inspectLogs () {
this.dialog.open(OpenLogsComponent, {
data: {
transactionId: '',
label: 'Inspect transaction logs',
isInspectLogs: true
},
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h2 mat-dialog-title>{{label}}</h2>
<mat-dialog-content class="mat-typography">
<div class="dialog-container">
<div *ngIf="isInspectLogs" class="inspect-logs">
<form >
<form class="example-form">
<mat-form-field class="example-full-width">
<mat-label>Transaction ID</mat-label>
<input type="scheme" matInput [formControl]="schemeControl" [errorStateMatcher]="matcher" placeholder="type a transaction ID">
Expand Down
Loading