Checkout dialog box working
This commit is contained in:
parent
a0b07d8315
commit
ed7ceb7594
7 changed files with 99 additions and 42 deletions
|
@ -13,8 +13,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- (2022-07-22) Invoice dialog completed. Notifications to inform
|
- (2022-07-23) - Checkout dialog with QR image redesigned.
|
||||||
successful/fail of URL copy to clipboard added.
|
- Invoice dialog completed. Notifications to inform
|
||||||
|
successful/failed URL-copy-to-clipboard added.
|
||||||
- (2022-07-22) Notifier service created - replaces snackbar used for
|
- (2022-07-22) Notifier service created - replaces snackbar used for
|
||||||
reporting invalid viewing key.
|
reporting invalid viewing key.
|
||||||
Notifier component created - used to apply custom style to message sent by Notifier service.
|
Notifier component created - used to apply custom style to message sent by Notifier service.
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: 'Spartan', sans-serif;
|
font-family: 'Spartan', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.askPayment {
|
||||||
|
font-family: "Spartan";
|
||||||
|
background: #ff5722;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
color: white;
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
<div align="center" mat-dialog-title>
|
<div class="container" style="margin-top: 10px;">
|
||||||
<h4 class="text">Scan to make payment</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<mat-dialog-content>
|
<div class="askPayment">
|
||||||
<div align="center"
|
Scan to make payment
|
||||||
id="checkout-qr">
|
|
||||||
</div>
|
</div>
|
||||||
</mat-dialog-content>
|
<pre></pre>
|
||||||
<mat-dialog-actions>
|
<table style="align-content: center;">
|
||||||
|
<tr>
|
||||||
|
<td width="10%"></td>
|
||||||
|
<td width="80%">
|
||||||
|
<div id="checkout-qr"></div>
|
||||||
|
</td>
|
||||||
|
<td width="10%"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<mat-dialog-actions>
|
||||||
<table cellspacing="0"
|
<table cellspacing="0"
|
||||||
width="100%">
|
width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -25,4 +32,6 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
|
@ -32,12 +32,18 @@ export class CheckoutComponent implements OnInit{
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
var qrcode = new QRCode(document.getElementById("checkout-qr"), {
|
var qrcode = new QRCode(document.getElementById("checkout-qr"),
|
||||||
|
{
|
||||||
text: this.codeString,
|
text: this.codeString,
|
||||||
logo: "/assets/zcash.png",
|
logo: "/assets/zcash.png",
|
||||||
logoWidth: 80,
|
width: 220,
|
||||||
logoHeight: 80
|
height: 220,
|
||||||
|
logoWidth: 60,
|
||||||
|
logoHeight: 60,
|
||||||
|
correctLevel: QRCode.CorrectLevel.H
|
||||||
});
|
});
|
||||||
|
console.log(">>> " + qrcode);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
confirm() {
|
confirm() {
|
||||||
|
|
|
@ -40,3 +40,10 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.qr-code{
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
border-bottom-left-radius: 0.5rem;
|
||||||
|
border-bottom-right-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,3 +2,21 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: 'Spartan', sans-serif;
|
font-family: 'Spartan', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.receipt {
|
||||||
|
font-family: "Spartan";
|
||||||
|
background: #ff5722;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
color: white;
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qrbody {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #e8eaf0;
|
||||||
|
}
|
|
@ -1,13 +1,18 @@
|
||||||
<div align="center" mat-dialog-title>
|
<div class="container" style="margin-top: 10px;">
|
||||||
<h4 class="text">Scan for your Receipt</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<mat-dialog-content>
|
<div class="receipt">
|
||||||
<div class="qrcode" id="receipt-qr"> </div>
|
Scan for your Receipt
|
||||||
</mat-dialog-content>
|
</div>
|
||||||
|
|
||||||
<mat-dialog-actions>
|
<div class="qrbody">
|
||||||
|
<div id="receipt-qr"> </div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<mat-dialog-actions>
|
||||||
<button mat-raised-button class="text" (click)="close()">
|
<button mat-raised-button class="text" (click)="close()">
|
||||||
<mat-icon class="icon">close</mat-icon>Close
|
<mat-icon class="icon">close</mat-icon>Close
|
||||||
</button>
|
</button>
|
||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
Loading…
Reference in a new issue