diff --git a/package-lock.json b/package-lock.json index d78dc8d..f956b3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "zgo", - "version": "1.1.1", + "version": "1.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "zgo", - "version": "1.1.1", + "version": "1.1.2", "dependencies": { "@angular/animations": "~13.0.2", "@angular/cdk": "^12.2.8", diff --git a/src/app/fullnode.service.ts b/src/app/fullnode.service.ts index b85ebf1..ca57ecd 100644 --- a/src/app/fullnode.service.ts +++ b/src/app/fullnode.service.ts @@ -9,7 +9,7 @@ var Buffer = require('buffer/').Buffer; @Injectable({providedIn: 'root'}) export class FullnodeService{ - beUrl = 'http://localhost:3000/'; + beUrl = 'https://test.zgo.cash/'; private dataStore: { height: number, memoList: string[], addr: string, price: number } = { height: 0, memoList: [], addr: '', price:0 }; private _heightUpdated: BehaviorSubject = new BehaviorSubject(this.dataStore.height); private _memoUpdated: BehaviorSubject = new BehaviorSubject(this.dataStore.memoList); @@ -48,7 +48,7 @@ export class FullnodeService{ }; constructor(private http: HttpClient, public userService: UserService){ - var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64'); + var auth = 'Basic ' + Buffer.from('user:superSecret2').toString('base64'); this.reqHeaders = new HttpHeaders().set('Authorization', auth); this.ownerUpdate = userService.ownerUpdate; this.getAddr(); diff --git a/src/app/items/items.service.ts b/src/app/items/items.service.ts index ed851a5..a23ea37 100644 --- a/src/app/items/items.service.ts +++ b/src/app/items/items.service.ts @@ -8,7 +8,7 @@ var Buffer = require('buffer/').Buffer; @Injectable({providedIn: 'root'}) export class ItemService{ - beUrl = 'http://localhost:3000/'; + beUrl = 'https://test.zgo.cash/'; private dataStore: { items: Item[] } = { items: [] } ; private _itemsUpdated: BehaviorSubject = new BehaviorSubject(this.dataStore.items); public readonly itemsUpdated: Observable = this._itemsUpdated.asObservable(); @@ -16,7 +16,7 @@ export class ItemService{ private reqHeaders: HttpHeaders; constructor(private http: HttpClient){ - var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64'); + var auth = 'Basic ' + Buffer.from('user:superSecret2').toString('base64'); this.reqHeaders = new HttpHeaders().set('Authorization', auth); } diff --git a/src/app/listorders/listorders.component.css b/src/app/listorders/listorders.component.css index 024432a..335fd28 100644 --- a/src/app/listorders/listorders.component.css +++ b/src/app/listorders/listorders.component.css @@ -1,32 +1,63 @@ .text{ font-family: 'Spartan', sans-serif; } + +.text2 { + font-family: 'Noto sans'; + font-size: 15px; + color: #000080; + text-align: left; + margin-left: 5px; + background: lightgray; +} + +.orderheader { + background-color: lightgrey !important; +} + +.orderdetail { + font-family: 'Noto sans'; + font-size: 15px; + color: #000080; + text-align: left; + margin-left: 5px; + background: lightyellow; + +} + .number{ font-family: 'Roboto Mono', monospace; } + img.icon{ margin-bottom: -2px; } + .price{ display: flex; align-items: center; } + .mini{ font-size: x-small; align-items: center; display: flex; padding: 3px; } + .small{ font-size: small; } + .total{ font-size: large; font-family: 'Roboto Mono', monospace; } + img.total{ margin-bottom:-2px; } + .central{ max-width: 450px; } diff --git a/src/app/listorders/listorders.component.html b/src/app/listorders/listorders.component.html index e1d2cb9..5119ca5 100644 --- a/src/app/listorders/listorders.component.html +++ b/src/app/listorders/listorders.component.html @@ -12,11 +12,21 @@

Today's Total:

-

{{todayTotal | number: '1.0-6'}}

+

+ + {{todayTotal | number: '1.0-6'}} +

Overall Total:

-

{{total | number: '1.0-6'}}

+

+ + {{total | number: '1.0-6'}} +

@@ -29,16 +39,40 @@ - {{order.totalZec}} + +  {{order.totalZec | number: '1.0-6'}} + - - {{order.timestamp | date: 'short'}} + + +
+ {{order.timestamp | date: 'short'}} +
-

Order: {{order._id}}

-

Zcash price: {{order.price | currency: order.currency.toUpperCase()}}

+
+
Order Id: {{order._id}}
+
ZCash price: {{order.price | currency: order.currency.toUpperCase()}} +
+
+ +
+ {{ item.name }} Qty.: {{ item.qty }} +
diff --git a/src/app/listorders/listorders.component.ts b/src/app/listorders/listorders.component.ts index c9d5302..2791e71 100644 --- a/src/app/listorders/listorders.component.ts +++ b/src/app/listorders/listorders.component.ts @@ -6,6 +6,12 @@ import { UserService } from '../user.service'; import {Owner} from '../owner.model'; import { OrderService } from '../order/order.service'; +import { faTimes } from '@fortawesome/free-solid-svg-icons' +import { faTimesCircle } from '@fortawesome/free-solid-svg-icons' +import { faCheck } from '@fortawesome/free-solid-svg-icons' +import { faCheckCircle } from '@fortawesome/free-solid-svg-icons' +import { faHourglass } from '@fortawesome/free-solid-svg-icons' + @Component({ selector: 'app-list-orders', templateUrl: './listorders.component.html', @@ -19,6 +25,17 @@ export class ListOrdersComponent implements OnInit, OnDestroy{ public ownerUpdate: Observable; public ordersUpdate: Observable; + // ------------------------------------ + // + faTimes = faTimes; + faTimesCircle = faTimesCircle; + faCheck = faCheck; + faCheckCircle = faCheckCircle; + faHourglass = faHourglass; + // ------------------------------------- + + + constructor( public orderService: OrderService, public userService: UserService @@ -50,4 +67,18 @@ export class ListOrdersComponent implements OnInit, OnDestroy{ this.total = 0; this.todayTotal = 0; } + + getIcon(order : Order) { + if( order.paid ) + return faCheckCircle; + return faHourglass; + } + + getIconStyle(order : Order) { + if( order.paid ) + return "font-size: 16px; color: #72cc50; margin: auto;"; + return "color: #88293d; cursor: pointer;"; + + } + } diff --git a/src/app/order/order.service.ts b/src/app/order/order.service.ts index 9824b52..4deb7bb 100644 --- a/src/app/order/order.service.ts +++ b/src/app/order/order.service.ts @@ -13,7 +13,7 @@ var Buffer = require('buffer/').Buffer; @Injectable({providedIn: 'root'}) export class OrderService { - beUrl = 'http://localhost:3000/'; + beUrl = 'https://test.zgo.cash/'; private dataStore: {allOrders: Order[], user: User, order: Order, owner: Owner } = { allOrders: [], user:{ @@ -81,7 +81,7 @@ export class OrderService { public fullnodeService: FullnodeService, public userService: UserService ) { - var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64'); + var auth = 'Basic ' + Buffer.from('user:superSecret2').toString('base64'); this.reqHeaders = new HttpHeaders().set('Authorization', auth); this.userUpdate = userService.userUpdate; this.ownerUpdate = userService.ownerUpdate; diff --git a/src/app/receipt.service.ts b/src/app/receipt.service.ts index 452c044..096a150 100644 --- a/src/app/receipt.service.ts +++ b/src/app/receipt.service.ts @@ -11,7 +11,7 @@ var Buffer = require('buffer/').Buffer; providedIn: 'root' }) export class ReceiptService { - beUrl = 'http://localhost:3000/'; + beUrl = 'https://test.zgo.cash/'; private dataStore: {order: Order, owner: Owner } = { owner: { _id: '', @@ -67,7 +67,7 @@ export class ReceiptService { private http: HttpClient, public userService: UserService ) { - var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64'); + var auth = 'Basic ' + Buffer.from('user:superSecret2').toString('base64'); this.reqHeaders = new HttpHeaders().set('Authorization', auth); this.ownerUpdate = userService.ownerUpdate; } diff --git a/src/app/user.service.ts b/src/app/user.service.ts index f8e7483..4e462a5 100644 --- a/src/app/user.service.ts +++ b/src/app/user.service.ts @@ -11,7 +11,7 @@ var Buffer = require('buffer/').Buffer; @Injectable({providedIn: 'root'}) export class UserService{ - beUrl = 'http://localhost:3000/'; + beUrl = 'https://test.zgo.cash/'; private dataStore: { user: User, owner: Owner, txs: Tx[], countries: Country[]} = { user: { address: '', @@ -66,7 +66,7 @@ export class UserService{ private reqHeaders: HttpHeaders; constructor(private http: HttpClient){ - var auth = 'Basic ' + Buffer.from('user:superSecret').toString('base64'); + var auth = 'Basic ' + Buffer.from('user:superSecret2').toString('base64'); this.reqHeaders = new HttpHeaders().set('Authorization', auth); //console.log('US:', this.reqHeaders); this.session = localStorage.getItem('s4z_token');