diff --git a/public/roboto-font/roboto-black-webfont.woff b/public/roboto-font/roboto-black-webfont.woff new file mode 100755 index 000000000..235a22e7f Binary files /dev/null and b/public/roboto-font/roboto-black-webfont.woff differ diff --git a/public/roboto-font/roboto-black-webfont.woff2 b/public/roboto-font/roboto-black-webfont.woff2 new file mode 100755 index 000000000..7b2da40dd Binary files /dev/null and b/public/roboto-font/roboto-black-webfont.woff2 differ diff --git a/public/roboto-font/roboto-blackitalic-webfont.woff b/public/roboto-font/roboto-blackitalic-webfont.woff new file mode 100755 index 000000000..bc72f1191 Binary files /dev/null and b/public/roboto-font/roboto-blackitalic-webfont.woff differ diff --git a/public/roboto-font/roboto-blackitalic-webfont.woff2 b/public/roboto-font/roboto-blackitalic-webfont.woff2 new file mode 100755 index 000000000..5585aeb5e Binary files /dev/null and b/public/roboto-font/roboto-blackitalic-webfont.woff2 differ diff --git a/public/roboto-font/roboto-bold-webfont.woff b/public/roboto-font/roboto-bold-webfont.woff new file mode 100755 index 000000000..25eafea79 Binary files /dev/null and b/public/roboto-font/roboto-bold-webfont.woff differ diff --git a/public/roboto-font/roboto-bold-webfont.woff2 b/public/roboto-font/roboto-bold-webfont.woff2 new file mode 100755 index 000000000..9eb35cc57 Binary files /dev/null and b/public/roboto-font/roboto-bold-webfont.woff2 differ diff --git a/public/roboto-font/roboto-bolditalic-webfont.woff b/public/roboto-font/roboto-bolditalic-webfont.woff new file mode 100755 index 000000000..93374b9ce Binary files /dev/null and b/public/roboto-font/roboto-bolditalic-webfont.woff differ diff --git a/public/roboto-font/roboto-bolditalic-webfont.woff2 b/public/roboto-font/roboto-bolditalic-webfont.woff2 new file mode 100755 index 000000000..f10418b7b Binary files /dev/null and b/public/roboto-font/roboto-bolditalic-webfont.woff2 differ diff --git a/public/roboto-font/roboto-italic-webfont.woff b/public/roboto-font/roboto-italic-webfont.woff new file mode 100755 index 000000000..6fb4026ee Binary files /dev/null and b/public/roboto-font/roboto-italic-webfont.woff differ diff --git a/public/roboto-font/roboto-italic-webfont.woff2 b/public/roboto-font/roboto-italic-webfont.woff2 new file mode 100755 index 000000000..5153a0e55 Binary files /dev/null and b/public/roboto-font/roboto-italic-webfont.woff2 differ diff --git a/public/roboto-font/roboto-light-webfont.woff b/public/roboto-font/roboto-light-webfont.woff new file mode 100755 index 000000000..2ea28a7c5 Binary files /dev/null and b/public/roboto-font/roboto-light-webfont.woff differ diff --git a/public/roboto-font/roboto-light-webfont.woff2 b/public/roboto-font/roboto-light-webfont.woff2 new file mode 100755 index 000000000..37b1f938a Binary files /dev/null and b/public/roboto-font/roboto-light-webfont.woff2 differ diff --git a/public/roboto-font/roboto-lightitalic-webfont.woff b/public/roboto-font/roboto-lightitalic-webfont.woff new file mode 100755 index 000000000..baaeabf23 Binary files /dev/null and b/public/roboto-font/roboto-lightitalic-webfont.woff differ diff --git a/public/roboto-font/roboto-lightitalic-webfont.woff2 b/public/roboto-font/roboto-lightitalic-webfont.woff2 new file mode 100755 index 000000000..8eb516501 Binary files /dev/null and b/public/roboto-font/roboto-lightitalic-webfont.woff2 differ diff --git a/public/roboto-font/roboto-medium-webfont.woff b/public/roboto-font/roboto-medium-webfont.woff new file mode 100755 index 000000000..17a6b6509 Binary files /dev/null and b/public/roboto-font/roboto-medium-webfont.woff differ diff --git a/public/roboto-font/roboto-medium-webfont.woff2 b/public/roboto-font/roboto-medium-webfont.woff2 new file mode 100755 index 000000000..d8f2d61cb Binary files /dev/null and b/public/roboto-font/roboto-medium-webfont.woff2 differ diff --git a/public/roboto-font/roboto-mediumitalic-webfont.woff b/public/roboto-font/roboto-mediumitalic-webfont.woff new file mode 100755 index 000000000..57361fc80 Binary files /dev/null and b/public/roboto-font/roboto-mediumitalic-webfont.woff differ diff --git a/public/roboto-font/roboto-mediumitalic-webfont.woff2 b/public/roboto-font/roboto-mediumitalic-webfont.woff2 new file mode 100755 index 000000000..cd17dbcc4 Binary files /dev/null and b/public/roboto-font/roboto-mediumitalic-webfont.woff2 differ diff --git a/public/roboto-font/roboto-regular-webfont.woff b/public/roboto-font/roboto-regular-webfont.woff new file mode 100755 index 000000000..1ab884777 Binary files /dev/null and b/public/roboto-font/roboto-regular-webfont.woff differ diff --git a/public/roboto-font/roboto-regular-webfont.woff2 b/public/roboto-font/roboto-regular-webfont.woff2 new file mode 100755 index 000000000..a429e364b Binary files /dev/null and b/public/roboto-font/roboto-regular-webfont.woff2 differ diff --git a/public/roboto-font/roboto-thin-webfont.woff b/public/roboto-font/roboto-thin-webfont.woff new file mode 100755 index 000000000..2b03a0f74 Binary files /dev/null and b/public/roboto-font/roboto-thin-webfont.woff differ diff --git a/public/roboto-font/roboto-thin-webfont.woff2 b/public/roboto-font/roboto-thin-webfont.woff2 new file mode 100755 index 000000000..444575dba Binary files /dev/null and b/public/roboto-font/roboto-thin-webfont.woff2 differ diff --git a/public/roboto-font/roboto-thinitalic-webfont.woff b/public/roboto-font/roboto-thinitalic-webfont.woff new file mode 100755 index 000000000..5352aa47b Binary files /dev/null and b/public/roboto-font/roboto-thinitalic-webfont.woff differ diff --git a/public/roboto-font/roboto-thinitalic-webfont.woff2 b/public/roboto-font/roboto-thinitalic-webfont.woff2 new file mode 100755 index 000000000..b8e2886b5 Binary files /dev/null and b/public/roboto-font/roboto-thinitalic-webfont.woff2 differ diff --git a/public/views/copayers.html b/public/views/copayers.html index 62590dba8..89d97ca40 100644 --- a/public/views/copayers.html +++ b/public/views/copayers.html @@ -20,7 +20,7 @@ -
+
{{secret || ('Loading...'|translate)}}
@@ -29,11 +29,11 @@
- - + Share invitation - +
diff --git a/public/views/modals/txp-details.html b/public/views/modals/txp-details.html index 1f89f7b4a..da8959262 100644 --- a/public/views/modals/txp-details.html +++ b/public/views/modals/txp-details.html @@ -1,5 +1,5 @@ - + diff --git a/public/views/onboarding/disclaimer.html b/public/views/onboarding/disclaimer.html index d00df84e9..47fb3e0c4 100644 --- a/public/views/onboarding/disclaimer.html +++ b/public/views/onboarding/disclaimer.html @@ -1,9 +1,17 @@ - - + + + + + + + +

Almost done! Let's review

-
+

Bitcoin is different - it cannot be safely held with a bank or web service

@@ -12,7 +20,7 @@ I understand my funds are held securely on this device, not by a company. I understand if this app moved to another device or deleted, my bitcoin can only be recovered with the backup phrase -
+

I have read, understood, and agree with the Terms of use.

diff --git a/public/views/tab-home.html b/public/views/tab-home.html index d3592e704..7ef233580 100644 --- a/public/views/tab-home.html +++ b/public/views/tab-home.html @@ -69,10 +69,11 @@ Incomplete -
+ {{wallet.status.availableBalanceStr}} [Balance Hidden] -
+ +  

@@ -115,35 +116,36 @@
+ ng-show="(!externalServices.AmazonGiftCards || !externalServices.BitpayCard || !externalServices.BuyAndSell || + !wallets[0]) && nextStepEnabled">
Next steps - - + +
-
- +
+
Create a bitcoin wallet
- +
Add BitPay Card
- +
Buy or Sell Bitcoin
- +
diff --git a/public/views/tab-receive.html b/public/views/tab-receive.html index 29a605958..cbec1d415 100644 --- a/public/views/tab-receive.html +++ b/public/views/tab-receive.html @@ -9,7 +9,7 @@
-
+
Incomplete wallet @@ -30,7 +30,7 @@
-
+
Wallet not backed up diff --git a/public/views/walletDetails.html b/public/views/walletDetails.html index 6f822579f..e630506f3 100644 --- a/public/views/walletDetails.html +++ b/public/views/walletDetails.html @@ -1,6 +1,6 @@ - - {{walletDetailsName}} + + {{wallet.name}} @@ -14,14 +14,13 @@
-
- {{updateStatusError|translate}} - + -
+
@@ -30,7 +29,7 @@
-
+
{{status.totalBalanceStr}}
{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
@@ -46,10 +45,10 @@
-
- ... -
+
+ ...
+
@@ -108,8 +107,8 @@
No transactions yet {{status.totalBalanceStr}} + ng-show="!txHistory[0] && !updatingTxHistory && !txHistoryError && !updateStatusError && !notAuthorized" translate> + No transactions yet
@@ -124,20 +123,6 @@
-
-
-
- -
-
-   -
-
-   -
-
-
-
diff --git a/src/css/links.css b/src/css/links.css deleted file mode 100644 index 61d7cf1f5..000000000 --- a/src/css/links.css +++ /dev/null @@ -1,30 +0,0 @@ -@font-face { - font-family: 'roboto-regular'; - font-style: normal; - font-weight: 400; - src: local('Roboto Regular'), - local('Roboto-Regular'), - url(../roboto-font/Roboto-Regular.ttf) format('truetype'), - url(../roboto-font/Roboto-Regular.woff) format('woff'), - url(../roboto-font/Roboto-Regular.woff2) format('woff2'); -} -@font-face { - font-family: 'roboto-bold'; - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), - local('Roboto-Bold'), - url(../roboto-font/Roboto-Bold.ttf) format('truetype'), - url(../roboto-font/Roboto-Bold.woff) format('woff'), - url(../roboto-font/Roboto-Bold.woff2) format('woff2'); -} -@font-face { - font-family: 'roboto-italic'; - font-style: italic; - font-weight: 400; - src: local('Roboto Italic'), - local('Roboto-Italic'), - url(../roboto-font/Roboto-Italic.ttf) format('truetype'), - url(../roboto-font/Roboto-Italic.woff) format('woff'), - url(../roboto-font/Roboto-Italic.woff2) format('woff2'); -} diff --git a/src/js/controllers/backup.js b/src/js/controllers/backup.js index 01eeae6ec..b8d21bc90 100644 --- a/src/js/controllers/backup.js +++ b/src/js/controllers/backup.js @@ -91,7 +91,7 @@ angular.module('copayApp.controllers').controller('backupController', $ionicHistory.removeBackView(); $state.go('tabs.home'); } - else $state.go('onboarding.disclaimer'); + else $state.go('onboarding.disclaimer', {walletId: $stateParams.walletId, backedUp: true}); }); }; @@ -205,4 +205,4 @@ angular.module('copayApp.controllers').controller('backupController', }); }); - }); + }); \ No newline at end of file diff --git a/src/js/controllers/onboarding/backupRequest.js b/src/js/controllers/onboarding/backupRequest.js index abf63c661..e2290e62c 100644 --- a/src/js/controllers/onboarding/backupRequest.js +++ b/src/js/controllers/onboarding/backupRequest.js @@ -18,7 +18,7 @@ angular.module('copayApp.controllers').controller('backupRequestController', fun var cancelText = gettextCatalog.getString('Go back'); popupService.showConfirm(title, message, okText, cancelText, function(val) { if (val) { - $state.go('onboarding.disclaimer'); + $state.go('onboarding.disclaimer', {walletId: $scope.walletId, backedUp: false}); } }); } diff --git a/src/js/controllers/onboarding/disclaimer.js b/src/js/controllers/onboarding/disclaimer.js index 3a66c39d8..6298cac08 100644 --- a/src/js/controllers/onboarding/disclaimer.js +++ b/src/js/controllers/onboarding/disclaimer.js @@ -1,11 +1,11 @@ 'use strict'; -angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService, uxLanguage, externalLinkService) { - +angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService, uxLanguage, externalLinkService, storageService, $stateParams) { $scope.init = function() { $scope.lang = uxLanguage.currentLanguage; $scope.terms = {}; $scope.accept1 = $scope.accept2 = $scope.accept3 = false; + $scope.backedUp = $stateParams.backedUp; $timeout(function() { $scope.$apply(); }, 1); @@ -34,4 +34,10 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi $scope.termsModal.show(); }); }; + + $scope.goBack = function(){ + $state.go('onboarding.backupRequest', {walletId: $stateParams.walletId}); + } + + }); diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 2d05b9263..5fd146fa5 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -3,6 +3,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, gettextCatalog, lodash, popupService, ongoingProcess, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window, bitpayCardService) { var wallet; + var listeners = []; $scope.externalServices = {}; $scope.bitpayCardEnabled = true; // TODO $scope.openTxpModal = txpModalService.open; @@ -81,7 +82,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', }); }; - function updateTxps() { + var updateTxps = function() { profileService.getTxps({ limit: 3 }, function(err, txps, n) { @@ -90,12 +91,11 @@ angular.module('copayApp.controllers').controller('tabHomeController', $scope.txpsN = n; $timeout(function() { $ionicScrollDelegate.resize(); - $scope.$apply(); - }, 10); + }, 100); }) }; - $scope.updateAllWallets = function() { + var updateAllWallets = function() { $scope.wallets = profileService.getWallets(); if (lodash.isEmpty($scope.wallets)) return; @@ -123,7 +123,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', limit: 3 }, function(err, n) { if (err) { - console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO + $log.error(err); return; } $scope.fetchingNotifications = false; @@ -132,16 +132,16 @@ angular.module('copayApp.controllers').controller('tabHomeController', $timeout(function() { $ionicScrollDelegate.resize(); $scope.$apply(); - }, 10); + }, 100); }) }; - $scope.updateWallet = function(wallet) { + var updateWallet = function(wallet) { $log.debug('Updating wallet:' + wallet.name) walletService.getStatus(wallet, {}, function(err, status) { if (err) { - $log.error(err); //TODO + $log.error(err); return; } wallet.status = status; @@ -155,11 +155,11 @@ angular.module('copayApp.controllers').controller('tabHomeController', }, function(err, notifications) { $scope.fetchingNotifications = false; if (err) { - console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO + $log.error(err); return; } $scope.notifications = notifications; - }) + }); }); }; @@ -172,7 +172,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', }); }; - $scope.nextStep = function() { + var nextStep = function() { lodash.each(['AmazonGiftCards', 'BitpayCard', 'BuyAndSell'], function(service) { storageService.getNextStep(service, function(err, value) { $scope.externalServices[service] = value ? true : false; @@ -187,27 +187,10 @@ angular.module('copayApp.controllers').controller('tabHomeController', $scope.hideNextSteps = !$scope.hideNextSteps; $timeout(function() { $ionicScrollDelegate.resize(); - }, 10); + $scope.$apply(); + }, 100); }; - var listeners = [ - $rootScope.$on('bwsEvent', function(e, walletId, type, n) { - var wallet = profileService.getWallet(walletId); - $scope.updateWallet(wallet); - }), - $rootScope.$on('Local/TxAction', function(e, walletId) { - $log.debug('Got action for wallet ' + walletId); - var wallet = profileService.getWallet(walletId); - $scope.updateWallet(wallet); - }), - ]; - - $scope.$on('$destroy', function() { - lodash.each(listeners, function(x) { - x(); - }); - }); - var bitpayCardCache = function() { bitpayCardService.getCacheData(function(err, data) { if (err ||  lodash.isEmpty(data)) return; @@ -217,10 +200,24 @@ angular.module('copayApp.controllers').controller('tabHomeController', $scope.$on("$ionicView.enter", function(event, data) { $scope.bitpayCard = null; + nextStep(); + updateAllWallets(); + + listeners = [ + $rootScope.$on('bwsEvent', function(e, walletId, type, n) { + var wallet = profileService.getWallet(walletId); + updateWallet(wallet); + }), + $rootScope.$on('Local/TxAction', function(e, walletId) { + $log.debug('Got action for wallet ' + walletId); + var wallet = profileService.getWallet(walletId); + updateWallet(wallet); + }) + ]; + configService.whenAvailable(function() { var config = configService.getSync(); var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova; - $scope.hideNextSteps = false; $scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp; $scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp; $scope.amazonEnabled = config.amazon.enabled; @@ -230,7 +227,12 @@ angular.module('copayApp.controllers').controller('tabHomeController', if ($scope.bitpayCardEnabled) bitpayCardCache(); }); - $scope.nextStep(); - $scope.updateAllWallets(); }); + + $scope.$on("$ionicView.leave", function(event, data) { + lodash.each(listeners, function(x) { + x(); + }); + }); + }); diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 9b7b2c672..a5571fed8 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -33,31 +33,13 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi $scope.addr = null; $scope.generatingAddress = true; - $timeout(function() { - walletService.getAddress($scope.wallet, forceNew, function(err, addr) { - $scope.generatingAddress = false; - if (err) popupService.showAlert(gettextCatalog.getString('Error'), err); - $scope.addr = addr; - if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal(); - $scope.$apply(); - }); - }, 100); - - }; - - $scope.$on("$ionicView.beforeEnter", function(event, data) { - if (!$scope.isCordova) $scope.checkTips(); - $scope.wallets = profileService.getWallets(); - $scope.$on('Wallet/Changed', function(event, wallet) { - if (!wallet) { - $log.debug('No wallet provided'); - return; - } - $scope.wallet = wallet; - $log.debug('Wallet changed: ' + wallet.name); - $scope.setAddress(); + walletService.getAddress($scope.wallet, forceNew, function(err, addr) { + $scope.generatingAddress = false; + if (err) popupService.showAlert(gettextCatalog.getString('Error'), err); + $scope.addr = addr; + if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal(); }); - }); + }; $scope.goCopayers = function() { $ionicHistory.removeBackView(); @@ -99,5 +81,23 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi from: 'tabs.receive', walletId: $scope.wallet.credentials.walletId }); - } + }; + + if (!$scope.isCordova) $scope.checkTips(); + $scope.$on('Wallet/Changed', function(event, wallet) { + if (!wallet) { + $log.debug('No wallet provided'); + return; + } + $scope.wallet = wallet; + $log.debug('Wallet changed: ' + wallet.name); + $scope.setAddress(); + $timeout(function() { + $scope.$apply(); + }, 100); + }); + + $scope.$on("$ionicView.beforeEnter", function(event, data) { + $scope.wallets = profileService.getWallets(); + }); }); diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index dbb357ca4..4bcdbebbd 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -1,15 +1,13 @@ 'use strict'; angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, profileService, lodash, configService, gettextCatalog, platformInfo, walletService, txpModalService, externalLinkService, popupService) { - var isCordova = platformInfo.isCordova; - var isWP = platformInfo.isWP; - var isAndroid = platformInfo.isAndroid; - var isChromeApp = platformInfo.isChromeApp; var HISTORY_SHOW_LIMIT = 10; - var currentTxHistoryPage; - var wallet; + var currentTxHistoryPage = 0; + var listeners = []; $scope.txps = []; + $scope.completeTxHistory = []; + $scope.openTxpModal = txpModalService.open; $scope.openExternalLink = function(url, target) { externalLinkService.open(url, target); @@ -24,7 +22,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun // fee: 1000, // createdOn: new Date() / 1000, // outputs: [], - // wallet: wallet + // wallet: $scope.wallet // }; // // function addOutput(n) { @@ -44,13 +42,12 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.txps = lodash.sortBy(txps, 'createdOn').reverse(); }; - - $scope.updateStatus = function(force) { + var updateStatus = function(force) { $scope.updatingStatus = true; $scope.updateStatusError = false; $scope.walletNotRegistered = false; - walletService.getStatus(wallet, { + walletService.getStatus($scope.wallet, { force: !!force, }, function(err, status) { $scope.updatingStatus = false; @@ -74,29 +71,8 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }); }; - - $scope.openTxpModal = txpModalService.open; - - var listeners = [ - $rootScope.$on('bwsEvent', function(e, walletId) { - if (walletId == wallet.id) - $scope.updateStatus(); - }), - $rootScope.$on('Local/TxAction', function(e, walletId) { - if (walletId == wallet.id) - $scope.updateStatus(); - }), - ]; - - $scope.$on('$destroy', function() { - lodash.each(listeners, function(x) { - x(); - }); - }); - - $scope.openSearchModal = function() { - $scope.color = wallet.color; + $scope.color = $scope.wallet.color; $ionicModal.fromTemplateUrl('views/modals/search.html', { scope: $scope, @@ -113,7 +89,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.openTxModal = function(btx) { $scope.btx = lodash.cloneDeep(btx); - $scope.walletId = wallet.id; + $scope.walletId = $scope.wallet.id; $ionicModal.fromTemplateUrl('views/modals/tx-details.html', { scope: $scope }).then(function(modal) { @@ -123,24 +99,24 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }; $scope.recreate = function() { - walletService.recreate(wallet, function(err) { + walletService.recreate($scope.wallet, function(err) { $scope.init(); if (err) return; $timeout(function() { - walletService.startScan(wallet, function() { + walletService.startScan($scope.wallet, function() { $scope.$apply(); }); }); }); }; - $scope.updateTxHistory = function(cb) { + var updateTxHistory = function(cb) { if (!cb) cb = function() {}; if ($scope.updatingTxHistory) return; $scope.updatingTxHistory = true; $scope.updateTxHistoryError = false; - $scope.updatingTxHistoryProgress = null; + $scope.updatingTxHistoryProgress = 0; var progressFn = function(txs) { $scope.updatingTxHistoryProgress = txs ? txs.length : 0; @@ -148,11 +124,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.showHistory(); $timeout(function() { $scope.$apply(); - }, 1); + }); }; $timeout(function() { - walletService.getTxHistory(wallet, { + walletService.getTxHistory($scope.wallet, { progressFn: progressFn, }, function(err, txHistory) { $scope.updatingTxHistory = false; @@ -162,12 +138,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun return; } $scope.completeTxHistory = txHistory; - $scope.showHistory(); - $timeout(function() { $scope.$apply(); - }, 1); + }); return cb(); }); }); @@ -186,51 +160,39 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.$broadcast('scroll.infiniteScrollComplete'); }; - $scope.updateAll = function(cb)  { - $scope.updateStatus(false); - $scope.updateTxHistory(cb); + $scope.updateAll = function(force, cb)  { + updateStatus(force); + updateTxHistory(cb); }; $scope.hideToggle = function() { - profileService.toggleHideBalanceFlag(wallet.credentials.walletId, function(err) { + profileService.toggleHideBalanceFlag($scope.wallet.credentials.walletId, function(err) { if (err) $log.error(err); }); }; - $scope.$on("$ionicView.beforeEnter", function(event, data){ - currentTxHistoryPage = 0; - $scope.completeTxHistory = []; + $scope.$on("$ionicView.beforeEnter", function(event, data) { - wallet = profileService.getWallet($stateParams.walletId); + $scope.wallet = profileService.getWallet(data.stateParams.walletId); + $scope.requiresMultipleSignatures = $scope.wallet.credentials.m > 1; - /* Set color for header bar */ - $scope.walletDetailsColor = wallet.color; - $scope.walletDetailsName = wallet.name; - $scope.wallet = wallet; + $scope.updateAll(); - $scope.requiresMultipleSignatures = wallet.credentials.m > 1; - $scope.newTx = false; + listeners = [ + $rootScope.$on('bwsEvent', function(e, walletId) { + if (walletId == $scope.wallet.id) + updateStatus(); + }), + $rootScope.$on('Local/TxAction', function(e, walletId) { + if (walletId == $scope.wallet.id) + updateStatus(); + }), + ]; + }); - $scope.updateAll(function() { - if ($stateParams.txid) { - var tx = lodash.find($scope.completeTxHistory, { - txid: $stateParams.txid - }); - if (tx) { - $scope.openTxModal(tx); - } else { - popupService.showAlert(null, gettextCatalog.getString('TX not available')); - } - } else if ($stateParams.txpId) { - var txp = lodash.find($scope.txps, { - id: $stateParams.txpId - }); - if (txp) { - $scope.openTxpModal(txp); - } else { - popupService.showAlert(null, gettextCatalog.getString('Proposal not longer available')); - } - } + $scope.$on("$ionicView.leave", function(event, data) { + lodash.each(listeners, function(x) { + x(); }); }); }); diff --git a/src/js/routes.js b/src/js/routes.js index b8301f47f..f522e5689 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -157,11 +157,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr controller: 'walletDetailsController', templateUrl: 'views/walletDetails.html' } - }, - params: { - txid: null, - txpId: null, - }, + } }) .state('tabs.activity', { url: '/activity', @@ -685,7 +681,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('onboarding.disclaimer', { - url: '/disclaimer', + url: '/disclaimer/:walletId/:backedUp', views: { 'onboarding': { templateUrl: 'views/onboarding/disclaimer.html' diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index ace8bbb11..506af8f12 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -927,9 +927,9 @@ angular.module('copayApp.services') if (x.pendingTxps) txps = txps.concat(x.pendingTxps); }); - txps = lodash.sortBy(txps, 'pendingForUs', 'createdOn'); - txps = lodash.compact(lodash.flatten(txps)).slice(0, MAX); var n = txps.length; + txps = lodash.sortBy(txps, 'pendingForUs', 'createdOn'); + txps = lodash.compact(lodash.flatten(txps)).slice(0, opts.limit || MAX); return cb(null, txps, n); }; diff --git a/src/js/services/walletService.js b/src/js/services/walletService.js index a34b210d3..f2f8d9a13 100644 --- a/src/js/services/walletService.js +++ b/src/js/services/walletService.js @@ -421,8 +421,8 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim var endingTxid = confirmedTxs[0] ? confirmedTxs[0].txid : null; var endingTs = confirmedTxs[0] ? confirmedTxs[0].time : null; - // First update + progressFn(txsFromLocal); wallet.completeHistory = txsFromLocal; function getNewTxs(newTxs, skip, cb) { @@ -431,7 +431,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim newTxs = newTxs.concat(processNewTxs(wallet, lodash.compact(res))); - progressFn(newTxs); + progressFn(newTxs.concat(txsFromLocal)); skip = skip + requestLimit; diff --git a/src/sass/fonts.scss b/src/sass/fonts.scss new file mode 100644 index 000000000..7039ac3bf --- /dev/null +++ b/src/sass/fonts.scss @@ -0,0 +1,140 @@ +@font-face { + font-family: 'Roboto-Black'; + src: url('../roboto-font/roboto-black-webfont.woff2') format('woff2'), + url('roboto-black-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Black-Italic'; + src: url('../roboto-font/roboto-blackitalic-webfont.woff2') format('woff2'), + url('roboto-blackitalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Bold'; + src: url('../roboto-font/roboto-bold-webfont.woff2') format('woff2'), + url('roboto-bold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Bold-Italic'; + src: url('../roboto-font/roboto-bolditalic-webfont.woff2') format('woff2'), + url('roboto-bolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Italic'; + src: url('../roboto-font/roboto-italic-webfont.woff2') format('woff2'), + url('roboto-italic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Light'; + src: url('../roboto-font/roboto-light-webfont.woff2') format('woff2'), + url('roboto-light-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Light-Italic'; + src: url('../roboto-font/roboto-lightitalic-webfont.woff2') format('woff2'), + url('roboto-lightitalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Medium'; + src: url('../roboto-font/roboto-medium-webfont.woff2') format('woff2'), + url('roboto-medium-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Medium-Italic'; + src: url('../roboto-font/roboto-mediumitalic-webfont.woff2') format('woff2'), + url('roboto-mediumitalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto'; + src: url('../roboto-font/roboto-regular-webfont.woff2') format('woff2'), + url('roboto-regular-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Thin'; + src: url('../roboto-font/roboto-thin-webfont.woff2') format('woff2'), + url('roboto-thin-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} + + + + +@font-face { + font-family: 'Roboto-Thin-Italic'; + src: url('../roboto-font/roboto-thinitalic-webfont.woff2') format('woff2'), + url('roboto-thinitalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; + +} \ No newline at end of file diff --git a/src/sass/main.scss b/src/sass/main.scss index c2cb10722..7ceb64a70 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -983,6 +983,7 @@ input[type=number] { } } +@import "fonts"; @import "ionic"; @import "common"; @import "forms"; diff --git a/src/sass/views/onboarding/onboard-disclaimer.scss b/src/sass/views/onboarding/onboard-disclaimer.scss index 3bf455da5..f8142a8d2 100644 --- a/src/sass/views/onboarding/onboard-disclaimer.scss +++ b/src/sass/views/onboarding/onboard-disclaimer.scss @@ -3,6 +3,9 @@ height: 100%; ion-content{ height: 100%; + &.has-header{ + top:40px !important; + } .scroll{ height: 100%; } @@ -10,9 +13,17 @@ margin-top:1.5rem; } } + .tag{ + padding-bottom: 0; + } .list{ max-width: 600px; @include center-block(); + .item{ + &:first-child{ + padding-top: 0; + } + } } .item { background: transparent; @@ -59,6 +70,9 @@ position: absolute; bottom: 0; width: 100%; + &.header-present{ + bottom:16px; + } &-content{ max-width: 600px; @include center-block(); diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index b34001952..5dd85fb2d 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -17,7 +17,7 @@ text-align: center; padding: 2rem 1rem 1.5rem 1rem; color: #fff; - min-height: 115px; + height: 140px; margin-bottom: 10px; &-alternative {