Enhance UI look and feel
This commit is contained in:
parent
2265ab6512
commit
e5ff05d814
17 changed files with 66 additions and 18 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -45,3 +45,4 @@ testem.log
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
txs.json
|
txs.json
|
||||||
|
.angular
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: "Roboto Mono", monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: "Roboto Mono", monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
a{
|
a{
|
||||||
|
@ -18,9 +18,12 @@ ul{
|
||||||
}
|
}
|
||||||
|
|
||||||
.mini {
|
.mini {
|
||||||
font-size: 9px;
|
font-size: 10px;
|
||||||
line-height: 0.8;
|
line-height: 0.8;
|
||||||
}
|
}
|
||||||
.icon {
|
.icon {
|
||||||
font-family: "Material Icons";
|
font-family: "Material Icons";
|
||||||
}
|
}
|
||||||
|
.logo {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<mat-toolbar color="primary">
|
<mat-toolbar color="primary">
|
||||||
<span align="center">
|
<span align="center">
|
||||||
<img src="/assets/logo.png" height="45px" />
|
<img class="logo" src="/assets/logo-new-white.png" height="40px" />
|
||||||
</span>
|
</span>
|
||||||
<span class="spacer"></span>
|
<span class="spacer"></span>
|
||||||
<span align="center">
|
<span align="center">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: "Roboto Mono", monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=number]{
|
input[type=number]{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=number]{
|
input[type=number]{
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.card {
|
.card {
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
.small {
|
.small {
|
||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
.text{
|
.text{
|
||||||
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
|
}
|
||||||
|
.number{
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: 'Roboto Mono', monospace;
|
||||||
}
|
}
|
||||||
img.icon{
|
img.icon{
|
||||||
|
@ -19,6 +22,7 @@ img.icon{
|
||||||
}
|
}
|
||||||
.total{
|
.total{
|
||||||
font-size: large;
|
font-size: large;
|
||||||
|
font-family: 'Roboto Mono', monospace;
|
||||||
}
|
}
|
||||||
img.total{
|
img.total{
|
||||||
margin-bottom:-2px;
|
margin-bottom:-2px;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<mat-expansion-panel class="text" *ngFor = "let order of orders">
|
<mat-expansion-panel class="text" *ngFor = "let order of orders">
|
||||||
<mat-expansion-panel-header class="text" >
|
<mat-expansion-panel-header class="text" >
|
||||||
<mat-panel-title>
|
<mat-panel-title>
|
||||||
<span class="price"><img src="/assets/zec-roboto.png" height="50%" />{{order.totalZec}}</span>
|
<span class="price number"><img src="/assets/zec-roboto.png" height="50%" />{{order.totalZec}}</span>
|
||||||
</mat-panel-title>
|
</mat-panel-title>
|
||||||
<mat-panel-description>
|
<mat-panel-description>
|
||||||
{{order.timestamp | date: 'short'}}
|
{{order.timestamp | date: 'short'}}
|
||||||
|
@ -39,3 +39,7 @@
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
</mat-accordion>
|
</mat-accordion>
|
||||||
<p class="text" *ngIf = "orders.length <= 0">No orders</p>
|
<p class="text" *ngIf = "orders.length <= 0">No orders</p>
|
||||||
|
<mat-divider></mat-divider>
|
||||||
|
<div align="center">
|
||||||
|
<p class="text"> <mat-icon class="icon" inline>copyright</mat-icon> 2021 ZGo </p>
|
||||||
|
</div>
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { ScanComponent} from '../scan/scan.component';
|
||||||
import { Tx } from '../tx.model';
|
import { Tx } from '../tx.model';
|
||||||
import {User} from '../user.model';
|
import {User} from '../user.model';
|
||||||
import { Subscription, Observable } from 'rxjs';
|
import { Subscription, Observable } from 'rxjs';
|
||||||
|
import { take } from 'rxjs/operators';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
var QRCode = require('easyqrcodejs');
|
var QRCode = require('easyqrcodejs');
|
||||||
var URLSafeBase64 = require('urlsafe-base64');
|
var URLSafeBase64 = require('urlsafe-base64');
|
||||||
|
@ -146,7 +147,7 @@ export class LoginComponent implements OnInit {
|
||||||
dialogRef.afterClosed().subscribe((val) => {
|
dialogRef.afterClosed().subscribe((val) => {
|
||||||
console.log('Awaiting confirmation');
|
console.log('Awaiting confirmation');
|
||||||
this.confirmedMemo = val;
|
this.confirmedMemo = val;
|
||||||
this.heightUpdate.subscribe((block) => {
|
this.heightUpdate.pipe(take(1)).subscribe(block => {
|
||||||
this.targetBlock = block + 10;
|
this.targetBlock = block + 10;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: "Roboto Mono", monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.number{
|
||||||
|
font-family: 'Roboto Mono', monospace;
|
||||||
|
}
|
||||||
img.icon{
|
img.icon{
|
||||||
margin-bottom: -3px;
|
margin-bottom: -3px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>Order Total:</td>
|
<td>Order Total:</td>
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<p class="text">{{total | currency: 'USD'}}</p>
|
<p class="number">{{total | currency: 'USD'}}</p>
|
||||||
<p class="text"><img class="icon" src="/assets/zec-roboto.png" width="14px" />{{(total/price) | number: '1.0-6'}}</p>
|
<p class="number"><img class="icon" src="/assets/zec-roboto.png" width="14px" />{{(total/price) | number: '1.0-6'}}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
* {
|
* {
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: 'Saira Semi Condensed', sans-serif;
|
||||||
}
|
}
|
||||||
.icon{
|
.icon{
|
||||||
font-family: 'Material Icons';
|
font-family: 'Material Icons';
|
||||||
}
|
}
|
||||||
.small{
|
.small{
|
||||||
font-size: x-small;
|
font-size: x-small;
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
h3{
|
||||||
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,32 @@
|
||||||
<h3>{{(ownerUpdate | async)!.name}}</h3>
|
<h3>{{(ownerUpdate | async)!.name}}</h3>
|
||||||
<p class="small">{{ shortenZaddr((ownerUpdate | async)!.address) }}</p>
|
<p class="small">{{ shortenZaddr((ownerUpdate | async)!.address) }}</p>
|
||||||
<span align="center">
|
<span align="center">
|
||||||
|
<button mat-raised-button [routerLink]="['/orders']">View Orders</button>
|
||||||
<button mat-raised-button class="text" (click)="openSettings()">
|
<button mat-raised-button class="text" (click)="openSettings()">
|
||||||
<mat-icon class="icon">manage_accounts</mat-icon>
|
<mat-icon class="icon">manage_accounts</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
<a href="https://zgo.cash/" mat-raised-button target="_blank" rel="noopener noreferrer">
|
||||||
|
<mat-icon class="icon">help</mat-icon>
|
||||||
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<button mat-raised-button [routerLink]="['/orders']">View Orders</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="orientation">
|
||||||
<app-order></app-order>
|
<app-order></app-order>
|
||||||
<app-item-list></app-item-list>
|
<app-item-list></app-item-list>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="!orientation" align="center">
|
||||||
|
<table cellspacing="0" width="75%">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<app-item-list></app-item-list>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<app-order></app-order>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<mat-divider></mat-divider>
|
||||||
|
<div align="center">
|
||||||
|
<p> <mat-icon class="icon" inline>copyright</mat-icon> 2021 ZGo </p>
|
||||||
|
</div>
|
||||||
|
|
|
@ -32,6 +32,7 @@ export class ViewerComponent implements OnInit {
|
||||||
public addrUpdate: Observable<string>;
|
public addrUpdate: Observable<string>;
|
||||||
public ownerUpdate: Observable<Owner>;
|
public ownerUpdate: Observable<Owner>;
|
||||||
public userUpdate: Observable<User>;
|
public userUpdate: Observable<User>;
|
||||||
|
orientation: boolean = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public fullnodeService: FullnodeService,
|
public fullnodeService: FullnodeService,
|
||||||
|
@ -51,6 +52,7 @@ export class ViewerComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(){
|
ngOnInit(){
|
||||||
|
this.orientation = (window.innerWidth <= 500);
|
||||||
this.ownerUpdate.subscribe((owner) => {
|
this.ownerUpdate.subscribe((owner) => {
|
||||||
this.message = owner.name;
|
this.message = owner.name;
|
||||||
});
|
});
|
||||||
|
@ -63,12 +65,17 @@ export class ViewerComponent implements OnInit {
|
||||||
ngOnDestroy(){
|
ngOnDestroy(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onResize(event: any){
|
||||||
|
this.orientation = (event.target.innerWidth <= 500);
|
||||||
|
}
|
||||||
|
|
||||||
shortenZaddr(address:string) {
|
shortenZaddr(address:string) {
|
||||||
var addr = address;
|
var addr = address;
|
||||||
var end = addr.length;
|
var end = addr.length;
|
||||||
var last = end - 5;
|
var last = end - 5;
|
||||||
return addr.substring(0,5).concat('...').concat(addr.substring(last, end));
|
return addr.substring(0,5).concat('...').concat(addr.substring(last, end));
|
||||||
}
|
}
|
||||||
|
|
||||||
openSettings() {
|
openSettings() {
|
||||||
|
|
||||||
const dialogConfig = new MatDialogConfig();
|
const dialogConfig = new MatDialogConfig();
|
||||||
|
@ -88,7 +95,7 @@ export class ViewerComponent implements OnInit {
|
||||||
|
|
||||||
loginCheck(){
|
loginCheck(){
|
||||||
var today = new Date().getTime() / 1000;
|
var today = new Date().getTime() / 1000;
|
||||||
console.log('User check', this.user.validated);
|
//console.log('User check', this.user.validated);
|
||||||
if (this.user.expiration < today || !this.user.validated) {
|
if (this.user.expiration < today || !this.user.validated) {
|
||||||
console.log('Log in expired!');
|
console.log('Log in expired!');
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/login']);
|
||||||
|
|
Loading…
Reference in a new issue