Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
74769d16
Commit
74769d16
authored
May 19, 2017
by
Pieterjan Vanhoof
Committed by
GitHub
May 19, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #64 from stratisproject/ui
Adjust dashboard and history components to new history structure
parents
554eaa01
5b6cf1bf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
22 deletions
+24
-22
dashboard.component.html
Breeze.UI/src/app/wallet/dashboard/dashboard.component.html
+6
-4
dashboard.component.ts
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
+9
-11
history.component.html
Breeze.UI/src/app/wallet/history/history.component.html
+7
-5
history.component.ts
Breeze.UI/src/app/wallet/history/history.component.ts
+2
-2
No files found.
Breeze.UI/src/app/wallet/dashboard/dashboard.component.html
View file @
74769d16
...
...
@@ -21,18 +21,20 @@
<div>
Transactions
</div>
<table
cellspacing=
"5px"
cellpadding=
"5px"
class=
"transactionsTable"
*
ngIf=
"transactions; else noTransactions"
>
<thead>
<th>
Type
</th>
<th>
Amount
</th>
<th>
Confirmed
</th>
<th>
Timestamp
</th>
<th>
Transaction ID
</th>
<th>
Confirmed in block
</th>
<th>
Timestamp
</th>
</thead>
<tr
*
ngFor=
"let transaction of transactions; let i=index"
>
<!--<td *ngIf="{{ transaction.amount }} < 0">SENT</td>
<td *ngIf="{{ transaction.amount }} > 0">RECEIVED</td>-->
<td
*
ngIf=
"i<5"
>
{{ transaction.type }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.amount | coinNotation | coinAbbreviation }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.confirmed }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.id }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.confirmedInBlock }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.timestamp * 1000 | date:'medium' }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.txId }}
</td>
</tr>
</table>
<ng-template
#
noTransactions
>
Looks like you haven't made any transactions yet
</ng-template>
...
...
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
View file @
74769d16
...
...
@@ -17,11 +17,9 @@ import { ReceiveComponent } from '../receive/receive.component';
export
class
DashboardComponent
{
constructor
(
private
apiService
:
ApiService
,
private
globalService
:
GlobalService
,
private
modalService
:
NgbModal
)
{}
private
balanceResponse
:
any
;
private
confirmedBalance
:
number
;
private
unconfirmedBalance
:
number
;
private
transactions
:
any
;
private
errorMessage
:
string
;
ngOnInit
()
{
this
.
getWalletBalance
();
...
...
@@ -42,15 +40,15 @@ export class DashboardComponent {
.
subscribe
(
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
this
.
balanceResponse
=
response
.
json
();
this
.
confirmedBalance
=
this
.
balanceResponse
.
balances
[
0
].
amountConfirmed
;
this
.
unconfirmedBalance
=
this
.
balanceResponse
.
balances
[
0
].
amountUnconfirmed
;
let
balanceResponse
=
response
.
json
();
this
.
confirmedBalance
=
balanceResponse
.
balances
[
0
].
amountConfirmed
;
this
.
unconfirmedBalance
=
balanceResponse
.
balances
[
0
].
amountUnconfirmed
;
}
},
error
=>
{
if
(
error
.
status
>=
400
)
{
this
.
errorMessage
=
<
any
>
error
;
console
.
log
(
this
.
errorMessage
);
let
errorMessage
=
<
any
>
error
;
console
.
log
(
errorMessage
);
}
}
);
...
...
@@ -62,15 +60,15 @@ export class DashboardComponent {
.
subscribe
(
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
if
(
response
.
json
().
transactions
.
length
>
0
)
{
this
.
transactions
=
response
.
json
().
transactions
;
if
(
response
.
json
().
transactions
History
.
length
>
0
)
{
this
.
transactions
=
response
.
json
().
transactions
History
;
}
}
},
error
=>
{
if
(
error
.
status
>=
400
)
{
this
.
errorMessage
=
<
any
>
error
;
console
.
log
(
this
.
errorMessage
);
let
errorMessage
=
<
any
>
error
;
console
.
log
(
errorMessage
);
}
}
);
...
...
Breeze.UI/src/app/wallet/history/history.component.html
View file @
74769d16
...
...
@@ -3,18 +3,20 @@
<div
class=
"col"
>
<table
*
ngIf=
"transactions; else noTransactions"
>
<thead>
<th>
T
imestamp
</th>
<th>
T
ype
</th>
<th>
Amount
</th>
<th>
Confirmed
</th>
<th>
Transaction ID
</th>
<th>
Confirmed in block
</th>
<th>
Timestamp
</th>
</thead>
<tr
*
ngFor=
"let transaction of transactions"
>
<!--<td *ngIf="{{ transaction.amount }} < 0; else received">SENT</td>
<td #received>RECEIVED</td>-->
<td>
{{ transaction.t
imestamp
}}
</td>
<td>
{{ transaction.t
ype
}}
</td>
<td>
{{ transaction.amount | coinNotation | coinAbbreviation }}
</td>
<td>
{{ transaction.confirmed }}
</td>
<td>
{{ transaction.txId }}
</td>
<td>
{{ transaction.id }}
</td>
<td>
{{ transaction.confirmedInBlock }}
</td>
<td>
{{ transaction.timestamp * 1000 | date:'medium' }}
</td>
</tr>
</table>
</div>
...
...
Breeze.UI/src/app/wallet/history/history.component.ts
View file @
74769d16
...
...
@@ -27,8 +27,8 @@ export class HistoryComponent {
.
subscribe
(
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
if
(
response
.
json
().
transactions
.
length
>
0
)
{
this
.
transactions
=
response
.
json
().
transactions
;
if
(
response
.
json
().
transactions
History
.
length
>
0
)
{
this
.
transactions
=
response
.
json
().
transactions
History
;
}
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment