Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
Merge pull request #518 from blockchain/welcome-modal
Browse files Browse the repository at this point in the history
Show welcome modal
  • Loading branch information
plondon authored Jul 20, 2016
2 parents 0baf88e + b4a4848 commit 35b31c2
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 52 deletions.
6 changes: 4 additions & 2 deletions app/partials/first-login-modal.jade
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
p.mbl.type-h4.em-300(translate="THANK_YOU_FOR_JOINING")
p.mbl.type-h5.width-100.em-300
span(translate="FIRST_LOGIN_TEXT_1")
|  
a.security-red(ui-sref="wallet.common.security-center")
i.bc-icon-security
|
|  
span(translate="SECURITY_CENTER")
|  
span(translate="FIRST_LOGIN_TEXT_2")
button.button-success.mtl(ng-click="ok()", translate="FIRST_LOGIN_ACTION")
button.button-success.mtl(ng-click="$close()" translate="FIRST_LOGIN_ACTION")
8 changes: 0 additions & 8 deletions assets/js/controllers/firstTime.controller.js

This file was deleted.

11 changes: 0 additions & 11 deletions assets/js/controllers/home.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,4 @@ function HomeCtrl ($scope, Wallet, $uibModal) {
return null;
}
};

if (Wallet.status.firstTime) {
$uibModal.open({
templateUrl: 'partials/first-login-modal.jade',
controller: 'FirstTimeCtrl',
resolve: {
firstTime: () => { Wallet.status.firstTime = false; }
},
windowClass: 'bc-modal rocket-modal initial'
});
}
}
2 changes: 1 addition & 1 deletion assets/js/controllers/navigation.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function NavigationCtrl ($scope, $rootScope, $interval, $timeout, $cookies, Wall
});
};

if ($scope.status.firstTime) {
if (Wallet.goal.firstTime) {
$scope.viewedWhatsNew();
}

Expand Down
7 changes: 7 additions & 0 deletions assets/js/controllers/wallet.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ function WalletCtrl ($scope, $rootScope, Wallet, $uibModal, $timeout, Alerts, $i
});
Wallet.goal.auth = void 0;
}
if (Wallet.goal.firstTime) {
$uibModal.open({
templateUrl: 'partials/first-login-modal.jade',
windowClass: 'bc-modal rocket-modal initial'
});
Wallet.goal.firstTime = void 0;
}
if (Wallet.status.didLoadTransactions && Wallet.status.didLoadBalances) {
if (Wallet.goal.send != null) {
$uibModal.open({
Expand Down
2 changes: 1 addition & 1 deletion assets/js/services/wallet.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ function Wallet ($http, $window, $timeout, $location, Alerts, MyWallet, MyBlockc
$cookies.put('session', sessionToken);
$cookies.put('uid', uid);
Alerts.displaySuccess('Wallet created with identifier: ' + uid, true);
wallet.status.firstTime = true;
wallet.goal.firstTime = true;

let loginSuccess = (guid) => {
success_callback(uid);
Expand Down
29 changes: 0 additions & 29 deletions tests/controllers/first_time_ctrl_spec.coffee

This file was deleted.

0 comments on commit 35b31c2

Please sign in to comment.