From 21a2f41ef98e7baed4bd05a17eae297d12906c99 Mon Sep 17 00:00:00 2001 From: Jamal Jackson Date: Wed, 7 Sep 2016 09:46:00 -0400 Subject: [PATCH 1/8] began update for wallet module and receive screen --- public/views/includes/wallets.html | 22 +++++---- public/views/tab-receive.html | 68 +++++++++++++++++----------- src/sass/common.scss | 4 ++ src/sass/main.scss | 6 +++ src/sass/mixins/layout.scss | 4 ++ src/sass/views/includes/wallets.scss | 33 ++++++++++++++ src/sass/views/tab-receive.scss | 34 ++++++++++++++ 7 files changed, 135 insertions(+), 36 deletions(-) create mode 100644 src/sass/views/includes/wallets.scss create mode 100644 src/sass/views/tab-receive.scss diff --git a/public/views/includes/wallets.html b/public/views/includes/wallets.html index 356ce9135..3fa2178ff 100644 --- a/public/views/includes/wallets.html +++ b/public/views/includes/wallets.html @@ -1,16 +1,18 @@
-
- - {{wallet.name || wallet.id}} - - {{wallet.m}}-of-{{wallet.n}} - - - Incomplete - - +
+
+ + {{wallet.name || wallet.id}} + + {{wallet.m}}-of-{{wallet.n}} + + + Incomplete + + +
diff --git a/public/views/tab-receive.html b/public/views/tab-receive.html index 780360ccb..eb284a0d0 100644 --- a/public/views/tab-receive.html +++ b/public/views/tab-receive.html @@ -1,36 +1,52 @@ - + {{'Receive' | translate}} - -
- -
- Before receiving funds, you must backup your wallet. If this device is lost, it is impossible to access your funds without a backup. +
+
+
+ +
+ Before receiving funds, you must backup your wallet. If this device is lost, it is impossible to access your funds without a backup. +
+
-
- -
- No Wallet -
- -
-
- - Share address +
+
+
+ + Share +
+
+
+
+ + Next Address +
+
-
- - Next Address +
+
+
+ + ... + {{addr}} +
+
-
- - ... - {{addr}} + +
+
+ No Wallet
- - -
+
+ + +
+ diff --git a/src/sass/common.scss b/src/sass/common.scss index 9350009f1..f866cfd60 100644 --- a/src/sass/common.scss +++ b/src/sass/common.scss @@ -63,3 +63,7 @@ ion-header-bar{ border:none; } } + +.border-top{ + border-top:1px solid rgb(228,228,228); +} diff --git a/src/sass/main.scss b/src/sass/main.scss index b0f2c402a..5a0672550 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -772,6 +772,10 @@ ul.wallet-selection.wallets { margin: 30px 0; } +.m15v { + margin: 15px 0; +} + .m10h { margin: 0 10px; } @@ -995,6 +999,8 @@ input[type=number] { @import 'mixins/mixins'; @import "views/add"; @import "views/tab-home"; +@import "views/tab-receive"; @import "views/walletDetails"; @import 'views/onboarding/onboarding'; @import "views/includes/walletActivity"; +@import "views/includes/wallets"; diff --git a/src/sass/mixins/layout.scss b/src/sass/mixins/layout.scss index 71affb4b8..c55eb4932 100644 --- a/src/sass/mixins/layout.scss +++ b/src/sass/mixins/layout.scss @@ -1,4 +1,8 @@ @mixin center-block($topBottom: 0) { float:none; margin: $topBottom auto; +} + +.center-block{ + @include center-block(); } \ No newline at end of file diff --git a/src/sass/views/includes/wallets.scss b/src/sass/views/includes/wallets.scss new file mode 100644 index 000000000..4f73f3ce6 --- /dev/null +++ b/src/sass/views/includes/wallets.scss @@ -0,0 +1,33 @@ +.wallets{ + .slides{ + .swiper-container{ + width:75% !important; + overflow:visible; + } + .card{ + padding: .7rem; + padding-left:.25rem; + padding-right:.25rem; + border-radius: .25rem; + } + .swiper-slide{ + width:100% !important; + &.swiper-slide-prev, &.swiper-slide-next{ + opacity: .2; + } + &.swiper-slide-prev{ + left:-5%; + } + &.swiper-slide-next{ + left:4%; + } + span{ + float:right; + clear:both; + } + } + } + .swiper-pagination{ + visibility: hidden; + } +} \ No newline at end of file diff --git a/src/sass/views/tab-receive.scss b/src/sass/views/tab-receive.scss new file mode 100644 index 000000000..7651accbf --- /dev/null +++ b/src/sass/views/tab-receive.scss @@ -0,0 +1,34 @@ +#tab-receive { + #address { + background: #fff; + .item { + border: none; + font-size: .9rem; + i { + font-size: 1.3rem; + &.ion-social-bitcoin-outline { + border-right: 1px solid rgb(228, 228, 228); + } + } + } + .bit-address { + font-size: .8rem; + .item { + padding-top: 5px; + padding-bottom: 5px; + } + &-gen-address {} + } + } + #wallets { + &:before { + content: ""; + display: inline-block; + width: 0; + height: 0; + border-style: solid; + border-width: 0 20px 20px 20px; + border-color: transparent transparent #6980fe transparent; + } + } +} From ad862bc78cc1b91f080aec689cf7106165b9ec05 Mon Sep 17 00:00:00 2001 From: Jamal Jackson Date: Wed, 7 Sep 2016 09:56:52 -0400 Subject: [PATCH 2/8] added arrow top to wallets background --- src/sass/views/tab-receive.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sass/views/tab-receive.scss b/src/sass/views/tab-receive.scss index 7651accbf..eda75cf8f 100644 --- a/src/sass/views/tab-receive.scss +++ b/src/sass/views/tab-receive.scss @@ -28,7 +28,10 @@ height: 0; border-style: solid; border-width: 0 20px 20px 20px; - border-color: transparent transparent #6980fe transparent; + border-color: transparent transparent #f5f5f5 transparent; + top: -9px; + position: absolute; + left: 45%; } } } From b0c5fc22db479aa371eeac0358f063d86e855fa7 Mon Sep 17 00:00:00 2001 From: Jamal Jackson Date: Wed, 7 Sep 2016 13:49:08 -0400 Subject: [PATCH 3/8] added help circle and tip modal --- public/views/tab-receive.html | 18 ++++++++++- src/sass/views/tab-receive.scss | 56 ++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/public/views/tab-receive.html b/public/views/tab-receive.html index eb284a0d0..669b6ac96 100644 --- a/public/views/tab-receive.html +++ b/public/views/tab-receive.html @@ -1,6 +1,11 @@ {{'Receive' | translate}} + + +
@@ -41,7 +46,7 @@ No Wallet
- @@ -49,4 +54,15 @@
+
+ +
+

Receive bitcoin by sharing your address

+
+
+

+ Other bitcoin users can scan this code to send you money +

+
+
diff --git a/src/sass/views/tab-receive.scss b/src/sass/views/tab-receive.scss index eda75cf8f..88fd844ed 100644 --- a/src/sass/views/tab-receive.scss +++ b/src/sass/views/tab-receive.scss @@ -1,9 +1,17 @@ #tab-receive { + ion-header-bar{ + button{ + i{ + color:#fff; + font-size: 1.1rem; + } + } + } #address { background: #fff; .item { border: none; - font-size: .9rem; + font-size: .8rem; i { font-size: 1.3rem; &.ion-social-bitcoin-outline { @@ -21,6 +29,7 @@ } } #wallets { + position: relative; &:before { content: ""; display: inline-block; @@ -34,4 +43,49 @@ left: 45%; } } + #first-time-tip { + background: rgba(30, 49, 134, 1); + background: -moz-linear-gradient(top, rgba(30, 49, 134, 1) 0%, rgba(30, 49, 134, 0) 88%, rgba(30, 49, 134, 0) 100%); + background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(30, 49, 134, 1)), color-stop(88%, rgba(30, 49, 134, 0)), color-stop(100%, rgba(30, 49, 134, 0))); + background: -webkit-linear-gradient(top, rgba(30, 49, 134, 1) 0%, rgba(30, 49, 134, 0) 88%, rgba(30, 49, 134, 0) 100%); + background: -o-linear-gradient(top, rgba(30, 49, 134, 1) 0%, rgba(30, 49, 134, 0) 88%, rgba(30, 49, 134, 0) 100%); + background: -ms-linear-gradient(top, rgba(30, 49, 134, 1) 0%, rgba(30, 49, 134, 0) 88%, rgba(30, 49, 134, 0) 100%); + background: linear-gradient(to bottom, rgba(30, 49, 134, 1) 0%, rgba(30, 49, 134, 0) 88%, rgba(30, 49, 134, 0) 100%); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + animation-name: fadeIn; + animation-iteration-count: 1; + animation-timing-function: ease-in; + animation-duration: .4s; + animation-delay: 2s; + animation-fill-mode: forwards; + z-index: 10; + text-align: center; + color: #fff; + padding-top: 3rem; + .close { + top: .5rem; + right: 1rem; + position: absolute; + font-size: 1.5rem; + opacity: .5; + } + h3 { + color: #fff; + margin-bottom:1rem; + } + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } } From fefdc0de93431fedbadbd380c33d546169d11fec Mon Sep 17 00:00:00 2001 From: Jamal Jackson Date: Wed, 7 Sep 2016 15:09:53 -0400 Subject: [PATCH 4/8] fixed full screen positioning issue with qr code --- public/views/tab-receive.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/views/tab-receive.html b/public/views/tab-receive.html index 669b6ac96..43f3eb9f1 100644 --- a/public/views/tab-receive.html +++ b/public/views/tab-receive.html @@ -10,7 +10,7 @@
-
+
Before receiving funds, you must backup your wallet. If this device is lost, it is impossible to access your funds without a backup. From 967fdff063e42a8bd6b480867dabf239b31656fa Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 8 Sep 2016 11:28:41 -0300 Subject: [PATCH 5/8] separate create tab views --- public/views/add.html | 9 +- public/views/create.html | 22 --- public/views/tab-create-personal.html | 162 +++++++++--------- public/views/tab-create-shared.html | 228 ++++++++++++++------------ src/js/controllers/create.js | 8 +- src/js/routes.js | 14 +- 6 files changed, 229 insertions(+), 214 deletions(-) delete mode 100644 public/views/create.html diff --git a/public/views/add.html b/public/views/add.html index 01c54b81c..28a01d1cb 100644 --- a/public/views/add.html +++ b/public/views/add.html @@ -10,8 +10,13 @@ - -

Create new wallet

+
+

New Personal Wallet

+ +
+ + +

Create Shared Wallet

diff --git a/public/views/create.html b/public/views/create.html deleted file mode 100644 index 49a483906..000000000 --- a/public/views/create.html +++ /dev/null @@ -1,22 +0,0 @@ - - - {{'Create new wallet' | translate}} - - - - - - -
-
- Personal Wallet -
-
- Shared Wallet -
-
- -
-
-
-
diff --git a/public/views/tab-create-personal.html b/public/views/tab-create-personal.html index 94887a3ba..754afc81d 100644 --- a/public/views/tab-create-personal.html +++ b/public/views/tab-create-personal.html @@ -1,88 +1,100 @@ -
-
- + + + {{'Create Personal Wallet' | translate}} + + + + - - Show advanced options - Hide advanced options - + + +
+ -
- + + Show advanced options + Hide advanced options + - +
+ - + -
-
- WARNING: The password cannot be recovered. Be sure to write it down. The wallet can not be restored without the password. -
-
+ - +
+
+ WARNING: The password cannot be recovered. Be sure to write it down. The wallet can not be restored without the password. +
+
- + - + - + - - Testnet - + - - Single Address Wallet - For audit purposes - + + Testnet + -
-
+ + Single Address Wallet + For audit purposes + + +
+
+ + +
+
+ - - diff --git a/public/views/tab-create-shared.html b/public/views/tab-create-shared.html index a40c1df8b..db6420a7a 100644 --- a/public/views/tab-create-shared.html +++ b/public/views/tab-create-shared.html @@ -1,119 +1,131 @@ -
-
- + + + {{'Create Shared Wallet' | translate}} + + + + - + + +
+ - + - + - - Show advanced options - Hide advanced options - + -
- + + Show advanced options + Hide advanced options + - +
+ - + -
-
- WARNING: The password cannot be recovered. Be sure to write it down. The wallet can not be restored without the password. -
-
+ - +
+
+ WARNING: The password cannot be recovered. Be sure to write it down. The wallet can not be restored without the password. +
+
+ + + + + + + + + + + Testnet + + + + Single Address Wallet + For audit purposes + + +
+
+ + + + + - - - - - - - - Testnet - - - - Single Address Wallet - For audit purposes - - -
-
- - - diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js index f2b49c79e..d2bfe37a8 100644 --- a/src/js/controllers/create.js +++ b/src/js/controllers/create.js @@ -23,7 +23,7 @@ angular.module('copayApp.controllers').controller('createController', 12: 1, }; - $scope.init = function() { + $scope.init = function(tc) { $scope.formData = {}; var defaults = configService.getDefaults(); $scope.formData.account = 1; @@ -31,9 +31,9 @@ angular.module('copayApp.controllers').controller('createController', $scope.TCValues = lodash.range(2, defaults.limits.totalCopayers + 1); $scope.formData.totalCopayers = defaults.wallet.totalCopayers; $scope.formData.derivationPath = derivationPathHelper.default; - $scope.setTotalCopayers(1); - updateRCSelect(1); - updateSeedSourceSelect(1); + $scope.setTotalCopayers(tc); + updateRCSelect(tc); + updateSeedSourceSelect(tc); }; $scope.showAdvChange = function() { diff --git a/src/js/routes.js b/src/js/routes.js index 0f858cc81..e37d8efa2 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -282,11 +282,19 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }, }, }) - .state('tabs.create', { - url: '/create', + .state('tabs.create-personal', { + url: '/create-personal', views: { 'tab-home': { - templateUrl: 'views/create.html' + templateUrl: 'views/tab-create-personal.html' + }, + } + }) + .state('tabs.create-shared', { + url: '/create-shared', + views: { + 'tab-home': { + templateUrl: 'views/tab-create-shared.html' }, } }) From d0d4f85c59b6f2a19c095a7ae6b4bab8163c7b32 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Thu, 8 Sep 2016 12:13:37 -0300 Subject: [PATCH 6/8] allow recreate --- public/views/walletDetails.html | 5 +++ src/js/controllers/walletDetails.js | 25 ++++++++++++--- src/js/services/onGoingProcess.js | 36 +++++++++++----------- src/js/services/walletService.js | 47 ++++++++++++----------------- 4 files changed, 63 insertions(+), 50 deletions(-) diff --git a/public/views/walletDetails.html b/public/views/walletDetails.html index 3bd314da6..59d725aa4 100644 --- a/public/views/walletDetails.html +++ b/public/views/walletDetails.html @@ -19,6 +19,11 @@
+
+ This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information. + +
+
Scan status finished with error
Tap to retry diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index afa0e3223..f9a23f91c 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -1,6 +1,11 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $ionicNavBarDelegate, $state, $stateParams, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService, $ionicPopup, txpModalService, externalLinkService) { +angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $ionicNavBarDelegate, $state, $stateParams, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService, $ionicPopup, txpModalService, externalLinkService) { + 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; @@ -65,14 +70,19 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.updateStatus = function(force) { $scope.updatingStatus = true; $scope.updateStatusError = false; + $scope.walletNotRegistered = false; walletService.getStatus(wallet, { force: !!force, }, function(err, status) { $scope.updatingStatus = false; if (err) { + if (err === 'WALLET_NOT_REGISTERED') { + $scope.walletNotRegistered = true; + } else { + $scope.updateStatusError = true; + } $scope.status = null; - $scope.updateStatusError = true; return; } @@ -140,7 +150,15 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }; $scope.recreate = function() { - walletService.recreate(); + walletService.recreate(wallet, function(err) { + $scope.init(); + if (err) return; + $timeout(function() { + walletService.startScan(wallet, function() { + $scope.$apply(); + }); + }); + }); }; $scope.updateTxHistory = function(cb) { @@ -158,7 +176,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $timeout(function() { $scope.$apply(); }, 1); - }; $timeout(function() { diff --git a/src/js/services/onGoingProcess.js b/src/js/services/onGoingProcess.js index 8f6b3c014..be1d5ee70 100644 --- a/src/js/services/onGoingProcess.js +++ b/src/js/services/onGoingProcess.js @@ -7,31 +7,31 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti var ongoingProcess = {}; var processNames = { - 'scanning': gettext('Scanning Wallet funds...'), - 'recreating': gettext('Recreating Wallet...'), - 'generatingCSV': gettext('Generating .csv file...'), - 'creatingTx': gettext('Creating transaction'), - 'sendingTx': gettext('Sending transaction'), - 'signingTx': gettext('Signing transaction'), 'broadcastingTx': gettext('Broadcasting transaction'), - 'rejectTx': gettext('Rejecting payment proposal'), - 'removeTx': gettext('Deleting payment proposal'), - 'fetchingPayPro': gettext('Fetching Payment Information'), 'calculatingFee': gettext('Calculating fee'), - 'joiningWallet': gettext('Joining Wallet...'), - 'retrivingInputs': gettext('Retrieving inputs information'), - 'creatingWallet': gettext('Creating Wallet...'), - 'validatingWallet': gettext('Validating wallet integrity...'), - 'connectingledger': gettext('Waiting for Ledger...'), - 'connectingtrezor': gettext('Waiting for Trezor...'), - 'validatingWords': gettext('Validating recovery phrase...'), 'connectingCoinbase': gettext('Connecting to Coinbase...'), 'connectingGlidera': gettext('Connecting to Glidera...'), - 'importingWallet': gettext('Importing Wallet...'), - 'sweepingWallet': gettext('Sweeping Wallet...'), + 'connectingledger': gettext('Waiting for Ledger...'), + 'connectingtrezor': gettext('Waiting for Trezor...'), + 'creatingTx': gettext('Creating transaction'), + 'creatingWallet': gettext('Creating Wallet...'), 'deletingWallet': gettext('Deleting Wallet...'), 'extractingWalletInfo': gettext('Extracting Wallet Information...'), + 'fetchingPayPro': gettext('Fetching Payment Information'), + 'generatingCSV': gettext('Generating .csv file...'), 'gettingFeeLevels': gettext('Getting fee levels...'), + 'importingWallet': gettext('Importing Wallet...'), + 'joiningWallet': gettext('Joining Wallet...'), + 'recreating': gettext('Recreating Wallet...'), + 'rejectTx': gettext('Rejecting payment proposal'), + 'removeTx': gettext('Deleting payment proposal'), + 'retrivingInputs': gettext('Retrieving inputs information'), + 'scanning': gettext('Scanning Wallet funds...'), + 'sendingTx': gettext('Sending transaction'), + 'signingTx': gettext('Signing transaction'), + 'sweepingWallet': gettext('Sweeping Wallet...'), + 'validatingWallet': gettext('Validating wallet integrity...'), + 'validatingWords': gettext('Validating recovery phrase...'), }; root.clear = function() { diff --git a/src/js/services/walletService.js b/src/js/services/walletService.js index f5bf2e45d..204869c61 100644 --- a/src/js/services/walletService.js +++ b/src/js/services/walletService.js @@ -10,6 +10,8 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim root.SOFT_CONFIRMATION_LIMIT = 12; root.SAFE_CONFIRMATIONS = 6; + var errors = bwcService.getErrors(); + // UI Related root.openStatusModal = function(type, txp, cb) { var scope = $rootScope.$new(true); @@ -175,6 +177,9 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim twoStep: true }, function(err, ret) { if (err) { + if (err instanceof errors.NOT_AUTHORIZED) { + return cb('WALLET_NOT_REGISTERED'); + } return cb(bwcError.msg(err, gettext('Could not update Wallet'))); } return cb(null, ret); @@ -296,7 +301,6 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim }; var getSavedTxs = function(walletId, cb) { - storageService.getTxHistory(walletId, function(err, txs) { if (err) return cb(err); @@ -671,41 +675,30 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim }); }; - // walletHome root.recreate = function(wallet, cb) { + $log.debug('Recreating wallet:', wallet.id); ongoingProcess.set('recreating', true); wallet.recreateWallet(function(err) { wallet.notAuthorized = false; ongoingProcess.set('recreating', false); - - if (err) { - handleError(err); - return; - } - root.startScan(wallet); - - // TODO TODO TODO TODO: - // Do it on the controller - // profileService.bindWalletClient(wallet, { - // force: true - // }); + return cb(err); }); }; - root.startScan = function(wallet) { - $log.debug('Scanning wallet ' + wallet.credentials.walletId); + root.startScan = function(wallet, cb) { + cb = cb || function() {}; + + $log.debug('Scanning wallet ' + wallet.id); if (!wallet.isComplete()) return; - // wallet.updating = true; - + wallet.updating = true; + ongoingProcess.set('scanning', true); wallet.startScan({ includeCopayerBranches: true, }, function(err) { - - if (err && wallet.walletId == walletId) { - wallet.updating = false; - handleError(err); - } + wallet.updating = false; + ongoingProcess.set('scanning', false); + return cb(err); }); }; @@ -861,7 +854,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim askPassword(wallet.name, gettext('Enter Spending Password'), function(password) { if (!password) return cb('no password'); if (!wallet.checkPassword(password)) return cb('wrong password'); - + return cb(null, password); }); @@ -956,8 +949,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim $rootScope.$emit('Local/TxAction', wallet.id); var type = root.getViewStatus(wallet, broadcastedTxp); - root.openStatusModal(type, broadcastedTxp, function() { - }); + root.openStatusModal(type, broadcastedTxp, function() {}); return cb(null, broadcastedTxp) }); @@ -965,8 +957,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim $rootScope.$emit('Local/TxAction', wallet.id); var type = root.getViewStatus(wallet, signedTxp); - root.openStatusModal(type, signedTxp, function() { - }); + root.openStatusModal(type, signedTxp, function() {}); return cb(null, signedTxp); } }); From 7e29b9eb98abbc3848d2b27b2f916b7193d5efc9 Mon Sep 17 00:00:00 2001 From: Nick Cardin Date: Thu, 8 Sep 2016 11:20:43 -0400 Subject: [PATCH 7/8] send view first pass --- public/views/amount.html | 75 +++++++++++++++--------------- public/views/tab-send.html | 27 +++++------ src/sass/common.scss | 6 ++- src/sass/main.scss | 40 +--------------- src/sass/views/amount.scss | 88 ++++++++++++++++++++++++++++++++++++ src/sass/views/tab-send.scss | 14 ++++++ 6 files changed, 158 insertions(+), 92 deletions(-) create mode 100644 src/sass/views/amount.scss create mode 100644 src/sass/views/tab-send.scss diff --git a/public/views/amount.html b/public/views/amount.html index ab8060e86..cc39806df 100644 --- a/public/views/amount.html +++ b/public/views/amount.html @@ -1,4 +1,4 @@ - + - + +
-
-
7
-
8
-
9
-
/
+
+
7
+
8
+
9
+
/
-
-
4
-
5
-
6
-
x
+
+
4
+
5
+
6
+
x
-
-
1
-
2
-
3
-
+
+
+
1
+
2
+
3
+
+
-
-
.
-
0
-
-
-
+
+
.
+
0
+
+
-
diff --git a/public/views/tab-send.html b/public/views/tab-send.html index d9251a946..a230be863 100644 --- a/public/views/tab-send.html +++ b/public/views/tab-send.html @@ -1,26 +1,23 @@ - + {{'Send' | translate}} -
-
Recipient
- -
- -
+
+
Recipient
+
-
+
Contacts & Wallets
diff --git a/src/sass/common.scss b/src/sass/common.scss index cb13008c2..c4532042c 100644 --- a/src/sass/common.scss +++ b/src/sass/common.scss @@ -21,6 +21,10 @@ padding-left: 74px; } +.item-no-bottom-border + .item { + border-top: 0; +} + .icon.big-icon-svg { padding: 0 7px; > img { @@ -30,7 +34,7 @@ box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.3); } } -.overlay{ +.overlay { position: absolute; top:0; left:0; diff --git a/src/sass/main.scss b/src/sass/main.scss index 4651a0516..c98dceee4 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -897,44 +897,6 @@ input[type=file] { font-size: 16px; } -/* - * Calculator - */ - -.calculator .header-calc { - position: absolute; - width: 100%; - text-align: center; -} - -.calculator .button-calc { - position: absolute; - width: 100%; - bottom: 0; -} - -.calculator .button-calc .row { - padding: 0 !important; -} - -.calculator .button-calc .columns { - cursor: pointer; - text-align: center; -} - -.calculator .button-calc .operator { - color: #2C3E50; - background-color: #eee; -} - -.calculator .button-calc .columns:active { - background-color: #eee; -} - -.calculator .button-calc .operator:active { - background-color: #f8f8f8; -} - // No looks likes locked input[type="number"] { &[readonly] { @@ -994,7 +956,9 @@ input[type=number] { @import "forms"; @import 'mixins/mixins'; @import "views/add"; +@import "views/amount"; @import "views/tab-home"; +@import "views/tab-send"; @import "views/walletDetails"; @import "views/bitpayCard"; @import 'views/onboarding/onboarding'; diff --git a/src/sass/views/amount.scss b/src/sass/views/amount.scss new file mode 100644 index 000000000..d89984be6 --- /dev/null +++ b/src/sass/views/amount.scss @@ -0,0 +1,88 @@ +#view-amount { + @media(max-width: 480px) { + .bitcoin-address { + .icon { + left: 8px; + font-size: 24px; + } + font-size: 11px; + padding-left: 48px; + } + } + + .amount-pane { + position: absolute; + top: 125px; + bottom: 0; + width: 100%; + background-color: #fff; + padding: 0 16px; + + .amount-bar { + padding: 24px 0; + font-size: 18px; + .title { + float: left; + padding-top: 10px; + } + } + .amount { + display: flex; + flex-direction: column; + justify-content: center; + flex-grow: 1; + position: absolute; + bottom: 254px; + top: 66px; + } + } + + .keypad { + text-align: center; + font-size: 24px; + font-weight: lighter; + position: absolute; + bottom: 0; + width: 100%; + + .row { + padding: 0 !important; + margin: 0 !important; + } + + .col { + line-height: 40px; + } + + .operator { + background-color: #eaeaea; + font-weight: normal; + cursor: pointer; + + &:active { + background-color: #f8f8f8; + } + } + + .operator-send { + font-weight: bolder; + background-color: #f7f7f7; + font-size: 36px; + cursor: pointer; + + &:active { + background-color: #eaeaea; + } + } + + .digit{ + cursor: pointer; + border-top: 1px solid #eaeaea; + border-left: 1px solid #eaeaea; + &:active { + background-color: #eaeaea; + } + } + + } +} diff --git a/src/sass/views/tab-send.scss b/src/sass/views/tab-send.scss new file mode 100644 index 000000000..44d2a2b1b --- /dev/null +++ b/src/sass/views/tab-send.scss @@ -0,0 +1,14 @@ +#tab-send { + .bitcoin-address { + @media(max-width: 480px) { + input { + font-size: 12px; + } + } + .icon { + line-height: 31px; + padding-top: 2px; + padding-bottom: 1px; + } + } +} From ff44eb3879d59ef65afff77df81e37d70741a4fa Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 8 Sep 2016 14:54:18 -0300 Subject: [PATCH 8/8] open terms of use as a modal --- .../views/{onboarding => modals}/terms.html | 14 ++++++------- public/views/onboarding/disclaimer.html | 9 +++++---- src/js/controllers/onboarding/disclaimer.js | 20 ++++++++++++------- 3 files changed, 25 insertions(+), 18 deletions(-) rename public/views/{onboarding => modals}/terms.html (57%) diff --git a/public/views/onboarding/terms.html b/public/views/modals/terms.html similarity index 57% rename from public/views/onboarding/terms.html rename to public/views/modals/terms.html index 61767e604..00f4b896f 100644 --- a/public/views/onboarding/terms.html +++ b/public/views/modals/terms.html @@ -1,21 +1,21 @@ - + {{'Terms of Use' | translate}} - - +
- +

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

- +
-
+ diff --git a/public/views/onboarding/disclaimer.html b/public/views/onboarding/disclaimer.html index da93c7b8e..9f48d769c 100644 --- a/public/views/onboarding/disclaimer.html +++ b/public/views/onboarding/disclaimer.html @@ -1,5 +1,5 @@ - +

Almost done! Let's review

@@ -12,9 +12,10 @@ I understand my funds are held securely on this device, not by a company. I understand if this wallet is lost or deleted, my bitcoin can only be recovered with the backup phrase. -
-

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

- +
+ +

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

+
diff --git a/src/js/controllers/onboarding/disclaimer.js b/src/js/controllers/onboarding/disclaimer.js index 1cd51cc26..ccb64ed82 100644 --- a/src/js/controllers/onboarding/disclaimer.js +++ b/src/js/controllers/onboarding/disclaimer.js @@ -1,6 +1,14 @@ 'use strict'; -angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $state, $log, $ionicModal, profileService) { +angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService) { + + $scope.init = function() { + $scope.terms = {}; + $scope.accept1 = $scope.accept2 = $scope.accept3 = false; + $timeout(function() { + $scope.$apply(); + }, 1); + }; $scope.confirm = function() { profileService.setDisclaimerAccepted(function(err) { @@ -11,14 +19,12 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi }); }; - this.openModal = function() { - - $ionicModal.fromTemplateUrl('views/modals/addressbook.html', { + $scope.openTermsModal = function() { + $ionicModal.fromTemplateUrl('views/modals/terms.html', { scope: $scope }).then(function(modal) { - $scope.addressbookModal = modal; - $scope.addressbookModal.show(); + $scope.termsModal = modal; + $scope.termsModal.show(); }); }; - });