comments addressed

This commit is contained in:
Drew Ansbacher
2021-09-26 15:31:32 -06:00
committed by Matt Hill
parent f01cff00f0
commit 18a290f502
5 changed files with 13 additions and 36 deletions

View File

@@ -2,9 +2,6 @@ import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { IonicModule } from '@ionic/angular'
import { ActionSuccessPage } from './action-success.page'
import { SharingModule } from 'src/app/modules/sharing.module'
import { FormsModule } from '@angular/forms'
import { QRComponentModule } from 'src/app/components/qr/qr.component.module'
import { QrCodeModule } from 'ng-qrcode'
@NgModule({
@@ -12,8 +9,6 @@ import { QrCodeModule } from 'ng-qrcode'
imports: [
CommonModule,
IonicModule,
FormsModule,
SharingModule,
QrCodeModule,
],
exports: [ActionSuccessPage],

View File

@@ -1,23 +1,23 @@
<ion-header>
<ion-toolbar>
<ion-title>{{ header }}</ion-title>
<ion-title>Execution Complete</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="ion-padding">
<div style="height: 100%">
<h2 style="margin: 0; text-align: center;">{{ message }}</h2>
<h2 style="margin: 0; text-align: center;">{{ actionRes.message }}</h2>
<ion-item *ngIf="value" style="width: 250px; margin: auto; margin-top: 20px;" color="light">
<ion-item *ngIf="actionRes.value" style="width: 250px; margin: auto; margin-top: 20px;" color="light">
<ion-label>
<p>{{ value }}</p>
<p>{{ actionRes.value }}</p>
</ion-label>
<ion-button *ngIf="copyable" fill="clear" (click)="copy(value)">
<ion-button *ngIf="actionRes.copyable" fill="clear" (click)="copy(actionRes.value)">
<ion-icon slot="icon-only" name="copy-outline" size="small"></ion-icon>
</ion-button>
</ion-item>
<div *ngIf="qr" class="ion-padding" style="text-align: center;">
<qr-code [value]="value" size="150"></qr-code>
<div *ngIf="actionRes.qr" class="ion-padding" style="text-align: center;">
<qr-code [value]="actionRes.value" size="150"></qr-code>
</div>
@@ -26,8 +26,8 @@
<ion-footer>
<ion-toolbar>
<ion-buttons *ngIf="!loadingText" slot="end" class="ion-padding-end">
<ion-button *ngIf="!hasConfig" fill="outline" (click)="dismiss()" class="enter-click">
<ion-buttons slot="end" class="ion-padding-end">
<ion-button fill="outline" (click)="dismiss()" class="enter-click">
Close
</ion-button>
</ion-buttons>

View File

@@ -1,11 +0,0 @@
.close-button {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
min-height: 100px;
}
.main-content {
color: var(--ion-color-dark);
}

View File

@@ -1,5 +1,6 @@
import { Component, Input } from '@angular/core'
import { ModalController, ToastController } from '@ionic/angular'
import { ActionResponse } from 'src/app/services/api/api.types'
import { copyToClipboard } from 'src/app/util/web.util'
@Component({
@@ -8,12 +9,8 @@ import { copyToClipboard } from 'src/app/util/web.util'
styleUrls: ['./action-success.page.scss'],
})
export class ActionSuccessPage {
@Input() version: string
@Input() header: string
@Input() message: string
@Input() value: string
@Input() qr: boolean = false
@Input() copyable: boolean = false
@Input() actionRes: ActionResponse
constructor (
private readonly modalCtrl: ModalController,

View File

@@ -163,11 +163,7 @@ export class AppActionsPage {
component: ActionSuccessPage,
cssClass: res.qr ? 'action-success-modal-qr' : 'action-success-modal',
componentProps: {
header: 'Execution Complete',
message: res.message,
value: res.value,
qr: res.qr,
copyable: res.copyable,
actionRes: res,
},
})