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
af74d078
Commit
af74d078
authored
Sep 20, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Blank pop up workaround
parent
e042fbe8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
9 deletions
+47
-9
dashboard.component.ts
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
+29
-6
history.component.ts
Breeze.UI/src/app/wallet/history/history.component.ts
+18
-3
No files found.
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
View file @
af74d078
...
...
@@ -28,13 +28,11 @@ export class DashboardComponent implements OnInit {
private
walletHistorySubscription
:
Subscription
;
ngOnInit
()
{
this
.
getWalletBalance
();
this
.
getHistory
();
this
.
startSubscriptions
();
};
ngOnDestroy
()
{
this
.
walletBalanceSubscription
.
unsubscribe
();
this
.
walletHistorySubscription
.
unsubscribe
();
this
.
cancelSubscriptions
();
};
private
openSendDialog
()
{
...
...
@@ -70,7 +68,12 @@ export class DashboardComponent implements OnInit {
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
description
);
if
(
error
.
json
().
errors
[
0
].
description
)
{
alert
(
error
.
json
().
errors
[
0
].
description
);
}
else
{
this
.
cancelSubscriptions
();
this
.
startSubscriptions
();
}
}
}
}
...
...
@@ -98,11 +101,31 @@ export class DashboardComponent implements OnInit {
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
description
);
if
(
error
.
json
().
errors
[
0
].
description
)
{
alert
(
error
.
json
().
errors
[
0
].
description
);
}
else
{
this
.
cancelSubscriptions
();
this
.
startSubscriptions
();
}
}
}
}
)
;
};
private
cancelSubscriptions
()
{
if
(
this
.
walletBalanceSubscription
)
{
this
.
walletBalanceSubscription
.
unsubscribe
();
}
if
(
this
.
walletHistorySubscription
)
{
this
.
walletHistorySubscription
.
unsubscribe
();
}
};
private
startSubscriptions
()
{
this
.
getWalletBalance
();
this
.
getHistory
();
}
}
Breeze.UI/src/app/wallet/history/history.component.ts
View file @
af74d078
...
...
@@ -25,11 +25,11 @@ export class HistoryComponent {
private
walletHistorySubscription
:
Subscription
;
ngOnInit
()
{
this
.
getHistory
();
this
.
startSubscriptions
();
}
ngOnDestroy
()
{
this
.
walletHistorySubscription
.
unsubscribe
();
this
.
cancelSubscriptions
();
}
private
openTransactionDetailDialog
(
transaction
:
any
)
{
...
...
@@ -57,11 +57,26 @@ export class HistoryComponent {
console
.
log
(
error
);
}
else
{
alert
(
error
.
json
().
errors
[
0
].
description
);
if
(
error
.
json
().
errors
[
0
].
description
)
{
alert
(
error
.
json
().
errors
[
0
].
description
);
}
else
{
this
.
cancelSubscriptions
();
this
.
startSubscriptions
();
}
}
}
}
)
;
};
private
cancelSubscriptions
()
{
if
(
this
.
walletHistorySubscription
)
{
this
.
walletHistorySubscription
.
unsubscribe
();
}
};
private
startSubscriptions
()
{
this
.
getHistory
();
}
}
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