diff --git a/.gitignore b/.gitignore index 54427aba1..16ebb09f3 100644 --- a/.gitignore +++ b/.gitignore @@ -84,6 +84,9 @@ Session.vim .netrwhist *~ +.tags +.tags1 + # SASS src/sass/*.css .sass-cache diff --git a/app-template/config-template.xml b/app-template/config-template.xml index 5a72f4560..1db63c59a 100644 --- a/app-template/config-template.xml +++ b/app-template/config-template.xml @@ -16,18 +16,21 @@ - - - - - - - + + + + + + + + + + @@ -57,8 +60,9 @@ - - + + + @@ -67,9 +71,8 @@ - - + + @@ -87,7 +90,6 @@ - @@ -101,8 +103,7 @@ - - + diff --git a/package.json b/package.json index 524e9b58b..c690d4989 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "bitcore-wallet-client": "4.3.1", "bower": "^1.7.9", "chai": "^3.5.0", - "cordova": "5.4.1", "cordova-android": "5.1.1", + "cordova-custom-config": "^3.0.5", "cordova-plugin-qrscanner": "^2.3.1", "coveralls": "^2.11.9", "express": "^4.11.2", @@ -89,12 +89,10 @@ "clean-all": "git clean -dfx && npm install" }, "devDependencies": { - "androidmanifest": "^2.0.0", - "cordova": "^5.4.1", - "globby": "^6.0.0", + "cordova": "^6.3.1", + "grunt": "^1.0.1", "ionic": "^2.1.0", - "plist": "^2.0.1", "trash-cli": "^1.4.0", - "xcode": "^0.8.2" + "lodash": "^4.3.0" } } diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index d8dc250c0..465257e7c 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -36,10 +36,12 @@ angular.module('copayApp.controllers').controller('confirmController', function( $scope.data = {}; var config = configService.getSync().wallet; - $scope.feeLevel = config.settings ? config.settings.feeLevel : ''; + $scope.feeLevel = config.settings && config.settings.feeLevel ? config.settings.feeLevel : 'normal'; $scope.toAmount = parseInt($scope.toAmount); $scope.amountStr = txFormatService.formatAmountStr($scope.toAmount); + $scope.displayAmount = getDisplayAmount($scope.amountStr); + $scope.displayUnit = getDisplayUnit($scope.amountStr); var networkName = (new bitcore.Address($scope.toAddress)).network.name; $scope.network = networkName; @@ -65,6 +67,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( if (err || !status) { $log.error(err); } else { + w.status = status; if (!status.availableBalanceSat) $log.debug('No balance available in: ' + w.name); if (status.availableBalanceSat > $scope.toAmount) { filteredWallets.push(w); @@ -75,6 +78,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( if (++index == wallets.length) { if (!lodash.isEmpty(filteredWallets)) { $scope.wallets = lodash.clone(filteredWallets); + setWallet($scope.wallets[0]); } else { if (!enoughFunds) @@ -108,6 +112,14 @@ angular.module('copayApp.controllers').controller('confirmController', function( setWallet(wallet, true); }); + $scope.showWalletSelector = function() { + $scope.showWallets = true; + }; + + $scope.onWalletSelect = function(wallet) { + setWallet(wallet); + }; + $scope.showDescriptionPopup = function() { var message = gettextCatalog.getString('Add description'); @@ -123,6 +135,14 @@ angular.module('copayApp.controllers').controller('confirmController', function( }); }; + function getDisplayAmount(amountStr) { + return amountStr.split(' ')[0]; + } + + function getDisplayUnit(amountStr) { + return amountStr.split(' ')[1]; + } + var setFromPayPro = function(uri, cb) { if (!cb) cb = function() {}; @@ -254,7 +274,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( txp.message = description; txp.payProUrl = paypro; txp.excludeUnconfirmedUtxos = config.spendUnconfirmed ? false : true; - txp.feeLevel = config.settings.feeLevel || 'normal'; + txp.feeLevel = config.settings && config.settings.feeLevel ? config.settings.feeLevel : 'normal'; txp.dryRun = dryRun; walletService.createTx(wallet, txp, function(err, ctxp) { diff --git a/src/js/controllers/copayers.js b/src/js/controllers/copayers.js index 765db7d52..d9568cb1a 100644 --- a/src/js/controllers/copayers.js +++ b/src/js/controllers/copayers.js @@ -3,15 +3,11 @@ angular.module('copayApp.controllers').controller('copayersController', function($scope, $log, $timeout, $stateParams, $state, $rootScope, $ionicHistory, lodash, profileService, walletService, popupService, platformInfo, gettextCatalog, ongoingProcess) { + $scope.isCordova = platformInfo.isCordova; $scope.$on("$ionicView.beforeEnter", function(event, data) { - init(); - }); - - var init = function() { - $scope.isCordova = platformInfo.isCordova; - $scope.wallet = profileService.getWallet($stateParams.walletId); + $scope.wallet = profileService.getWallet(data.stateParams.walletId); updateWallet(); - }; + }); $rootScope.$on('bwsEvent', function() { updateWallet(); @@ -40,7 +36,9 @@ angular.module('copayApp.controllers').controller('copayersController', }; $scope.showDeletePopup = function() { - popupService.showConfirm(gettextCatalog.getString('Confirm'), gettextCatalog.getString('Are you sure you want to delete this wallet?'), null, null, function(res) { + var title = gettextCatalog.getString('Confirm'); + var msg = gettextCatalog.getString('Are you sure you want to cancel and delete this wallet?'); + popupService.showConfirm(title, msg, null, null, function(res) { if (res) deleteWallet(); }); }; diff --git a/src/js/controllers/import.js b/src/js/controllers/import.js index bdc97e984..056d55ed5 100644 --- a/src/js/controllers/import.js +++ b/src/js/controllers/import.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('importController', - function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog) { + function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog) { var isChromeApp = platformInfo.isChromeApp; var isDevel = platformInfo.isDevel; @@ -350,4 +350,16 @@ angular.module('copayApp.controllers').controller('importController', fromOnboarding: $stateParams.fromOnboarding }); }; + + $scope.showAdvChange = function() { + $scope.showAdv = !$scope.showAdv; + $scope.resizeView(); + }; + + $scope.resizeView = function() { + $timeout(function() { + $ionicScrollDelegate.resize(); + }); + }; + }); diff --git a/src/js/controllers/onboarding/disclaimer.js b/src/js/controllers/onboarding/disclaimer.js index 7459b18da..a18be4e6d 100644 --- a/src/js/controllers/onboarding/disclaimer.js +++ b/src/js/controllers/onboarding/disclaimer.js @@ -1,6 +1,11 @@ 'use strict'; -angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService, uxLanguage, externalLinkService, storageService, $stateParams) { +angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService, uxLanguage, externalLinkService, storageService, $stateParams, startupService) { + + $scope.$on("$ionicView.afterEnter", function() { + startupService.ready(); + }); + $scope.init = function() { $scope.lang = uxLanguage.currentLanguage; $scope.terms = {}; diff --git a/src/js/controllers/onboarding/tour.js b/src/js/controllers/onboarding/tour.js index c16eba67e..c2a38791e 100644 --- a/src/js/controllers/onboarding/tour.js +++ b/src/js/controllers/onboarding/tour.js @@ -34,6 +34,9 @@ angular.module('copayApp.controllers').controller('tourController', var rate = rateService.toFiat(btcAmount * 1e8, localCurrency); $scope.localCurrencySymbol = '$'; $scope.localCurrencyPerBtc = $filter('formatFiatAmount')(parseFloat(rate.toFixed(2), 10)); + $timeout(function() { + $scope.$apply(); + }) }); }); @@ -50,7 +53,7 @@ angular.module('copayApp.controllers').controller('tourController', ongoingProcess.set('creatingWallet', false); popupService.showAlert( gettextCatalog.getString('Cannot Create Wallet'), err, - function() { + function() { retryCount = 0; return $scope.createDefaultWallet(); }, gettextCatalog.getString('Retry')); diff --git a/src/js/controllers/onboarding/welcomeController.js b/src/js/controllers/onboarding/welcomeController.js index 6a7154c55..3a1651f75 100644 --- a/src/js/controllers/onboarding/welcomeController.js +++ b/src/js/controllers/onboarding/welcomeController.js @@ -1,9 +1,13 @@ 'use strict'; -angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService) { +angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService, startupService) { $ionicConfig.views.swipeBackEnabled(false); + $scope.$parent.$on("$ionicView.afterEnter", function() { + startupService.ready(); + }); + $scope.goImport = function(code) { $state.go('onboarding.import', { fromOnboarding: true, diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 7cad213aa..c4fa9b106 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -1,7 +1,7 @@ 'use strict'; 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) { + function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, gettextCatalog, lodash, popupService, ongoingProcess, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window, bitpayCardService, startupService) { var wallet; var listeners = []; var notifications = []; @@ -13,6 +13,10 @@ angular.module('copayApp.controllers').controller('tabHomeController', $scope.homeTip = $stateParams.fromOnboarding; $scope.isCordova = platformInfo.isCordova; + $scope.$on("$ionicView.afterEnter", function() { + startupService.ready(); + }); + if (!$scope.homeTip) { storageService.getHomeTipAccepted(function(error, value) { $scope.homeTip = (value == 'false') ? false : true; diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 8c74feb78..55e64b115 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -59,6 +59,10 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }); }; + $scope.openScanner = function() { + $state.go('tabs.scan'); + } + $scope.showMore = function() { currentContactsPage++; updateList(); @@ -106,7 +110,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( var updateHasFunds = function() { - $scope.hasFunds = true; + $scope.hasFunds = null; var wallets = profileService.getWallets({ onlyComplete: true, @@ -127,16 +131,16 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $log.error(err); return; } - if (status.availableBalanceSat && status.availableBalanceSat > 0) { + + if (status.availableBalanceSat) { $scope.hasFunds = true; } - else $scope.hasFunds = false; if (index == wallets.length) { $scope.hasFunds = $scope.hasFunds || false; + $timeout(function() { + $scope.$apply(); + }); } - $timeout(function() { - $scope.$apply(); - }) }); }); }; diff --git a/src/js/directives/actionSheet.js b/src/js/directives/actionSheet.js new file mode 100644 index 000000000..4ca9fddb0 --- /dev/null +++ b/src/js/directives/actionSheet.js @@ -0,0 +1,18 @@ +'use strict'; + +angular.module('copayApp.directives') + .directive('actionSheet', function() { + return { + restrict: 'E', + templateUrl: 'views/includes/actionSheet.html', + transclude: true, + scope: { + show: '=actionSheetShow', + }, + link: function(scope, element, attrs) { + scope.hide = function() { + scope.show = false; + }; + } + }; + }); diff --git a/src/js/directives/walletSelector.js b/src/js/directives/walletSelector.js new file mode 100644 index 000000000..97149d528 --- /dev/null +++ b/src/js/directives/walletSelector.js @@ -0,0 +1,27 @@ +'use strict'; + +angular.module('copayApp.directives') + .directive('walletSelector', function($timeout) { + return { + restrict: 'E', + templateUrl: 'views/includes/walletSelector.html', + transclude: true, + scope: { + show: '=walletSelectorShow', + wallets: '=walletSelectorWallets', + selectedWallet: '=walletSelectorSelectedWallet', + onSelect: '=walletSelectorOnSelect' + }, + link: function(scope, element, attrs) { + scope.hide = function() { + scope.show = false; + }; + scope.selectWallet = function(wallet) { + $timeout(function() { + scope.hide(); + }, 100); + scope.onSelect(wallet); + }; + } + }; + }); diff --git a/src/js/routes.js b/src/js/routes.js index ff3073659..8e9a6729c 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -947,22 +947,21 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }); $ionicPlatform.on('resume', function() { - // Nothing tot do + // Nothing to do }); $ionicPlatform.on('menubutton', function() { window.location = '#/preferences'; }); - - setTimeout(function() { - navigator.splashscreen.hide(); - }, 500); } $log.info('Init profile...'); // Try to open local profile profileService.loadAndBindProfile(function(err) { + $ionicHistory.nextViewOptions({ + disableAnimate: true + }); if (err) { if (err.message && err.message.match('NOPROFILE')) { $log.debug('No profile... redirecting'); diff --git a/src/js/services/platformInfo.js b/src/js/services/platformInfo.js index 9ba4a6d9f..6a8def4be 100644 --- a/src/js/services/platformInfo.js +++ b/src/js/services/platformInfo.js @@ -41,7 +41,7 @@ angular.module('copayApp.services').factory('platformInfo', function($window) { ret.hasClick = false; - if($window.sessionStorage.getItem('hasClick')) { + if ($window.sessionStorage.getItem('hasClick')) { ret.hasClick = true; } diff --git a/src/js/services/startupService.js b/src/js/services/startupService.js new file mode 100644 index 000000000..557d51997 --- /dev/null +++ b/src/js/services/startupService.js @@ -0,0 +1,28 @@ +'use strict'; + +angular.module('copayApp.services').service('startupService', function($log, $timeout) { + + var splashscreenVisible = true; + var statusBarVisible = false; + + function _hideSplash(){ + if(typeof navigator.splashscreen !== "undefined" && splashscreenVisible){ + $log.debug('startupService is hiding the splashscreen...'); + $timeout(function(){ + navigator.splashscreen.hide(); + }, 20); + splashscreenVisible = false; + } + } + function _showStatusBar(){ + if(typeof StatusBar !== "undefined" && !statusBarVisible){ + $log.debug('startupService is showing the StatusBar...'); + StatusBar.show(); + statusBarVisible = true; + } + } + this.ready = function() { + _showStatusBar(); + _hideSplash(); + }; +}); diff --git a/src/sass/buttons.scss b/src/sass/buttons.scss index 5c0c05713..f411f087e 100644 --- a/src/sass/buttons.scss +++ b/src/sass/buttons.scss @@ -19,7 +19,8 @@ $button-secondary-border: transparent; $button-secondary-active-bg: darken($subtle-gray, 5%); $button-secondary-active-border: transparent; -%button-standard { +%button-standard, +click-to-accept { width: 85%; max-width: 300px; margin-left: auto; @@ -35,7 +36,8 @@ $button-secondary-active-border: transparent; @include button-outline($button-primary-bg); } &.button-primary, - &.button-secondary { + &.button-secondary, + &.button-assertive { &.button-standard { @extend %button-standard; & + .button-standard { diff --git a/src/sass/directives/gravatar.scss b/src/sass/directives/gravatar.scss index 49587d201..6a6307ef4 100644 --- a/src/sass/directives/gravatar.scss +++ b/src/sass/directives/gravatar.scss @@ -1,18 +1,4 @@ .gravatar { border-radius: 50%; -} - -.gravatar-content { - position: relative; - height: 70px; - border-color: #172565; - background-color: #1e3186; - background-image: linear-gradient(0deg, #172565, #172565 0%, transparent 0%); - color: #fff; - margin-bottom: 50px; - .gravatar { - position: absolute; - bottom: -30px; - left: 41%; - } + display: inline-block; } diff --git a/src/sass/icons.scss b/src/sass/icons.scss index fd352e9ca..0e7c431a5 100644 --- a/src/sass/icons.scss +++ b/src/sass/icons.scss @@ -1,13 +1,20 @@ .icon.bp-arrow-right { @extend .ion-ios-arrow-right; + @extend .just-a-hint; } .icon.bp-arrow-down { @extend .ion-ios-arrow-down; + @extend .just-a-hint; } .icon.bp-arrow-up { @extend .ion-ios-arrow-up; + @extend .just-a-hint; +} + +.just-a-hint { + opacity: 0.2; } .item.item-big-icon-left { diff --git a/src/sass/ionic.scss b/src/sass/ionic.scss index 4b1d5b6b1..6ea7f90db 100644 --- a/src/sass/ionic.scss +++ b/src/sass/ionic.scss @@ -15,19 +15,6 @@ ion-tabs.ion-tabs-transparent { background: none transparent; } -// Some overrides for the card class which can't be set by variable -.card, .list { - .icon { - color: $light-gray; - } - & > .item-heading { - font-weight: 700; - .icon { - color: $mid-gray; - } - } -} - // .placeholder-icon padding cannot be modified by a variable $placeholder-icon-padding: 10px; .placeholder-icon { @@ -38,3 +25,8 @@ $placeholder-icon-padding: 10px; padding-left: $placeholder-icon-padding; } } + +// .item-input-wrapper background cannot be modified by a variable +.item-input-wrapper { + background: none transparent; +} diff --git a/src/sass/variables.scss b/src/sass/variables.scss index b10787fd0..59f4fbd1a 100644 --- a/src/sass/variables.scss +++ b/src/sass/variables.scss @@ -2,7 +2,7 @@ $royal: #1e3186; $soft-blue: #647ce8; $fill-blue: #D5DFFF; -$subtle-gray: #f7f7f7; +$subtle-gray: darken(#fff, 5%); $roboto: "Roboto", sans-serif; $roboto-light: "Roboto-Light", sans-serif-light; $success-green: #17ae8c; @@ -10,7 +10,7 @@ $warning-orange: #ffa500; $dark-gray: #445; $mid-gray: #667; $light-gray: #9b9bab; -$subtle-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); +$subtle-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); $hovering-box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.3); $subtle-radius: 3px; $visible-radius: 6px; @@ -18,21 +18,34 @@ $unmistakable-radius: 12px; /* Set ionic variables */ -$positive: $soft-blue; +$positive: $soft-blue; -$font-size-base: 16px; -$font-size-small: 12px; -$font-family-sans-serif: $roboto; -$font-family-light-sans-serif: $roboto-light; +$font-size-base: 16px; +$font-size-small: 12px; +$font-family-sans-serif: $roboto; +$font-family-light-sans-serif: $roboto-light; -$button-border-radius: $visible-radius; -$button-height: 52px; -$button-padding: 16px; +$button-border-radius: $visible-radius; +$button-height: 52px; +$button-padding: 16px; -$base-background-color: $subtle-gray; +$base-background-color: $subtle-gray; -$item-default-active-bg: $subtle-gray; -$item-icon-font-size: 24px; +$item-default-active-bg: $subtle-gray; +$item-icon-font-size: 24px; + +$input-color: $dark-gray; +$input-border: $light-gray; +$input-label-color: $mid-gray; +$input-color-placeholder: lighten($dark-gray, 40%); + +$item-default-bg: #ffffff; +$item-default-border: $subtle-gray; +$item-default-text: $dark-gray; +$item-default-active-bg: darken(#ffffff, 7%); +$item-default-active-border: darken($subtle-gray, 7%); + +$bar-default-border: $subtle-gray; $tabs-icon-size: 22px; diff --git a/src/sass/views/add.scss b/src/sass/views/add.scss index 1a7f0b5fc..fbe99d457 100644 --- a/src/sass/views/add.scss +++ b/src/sass/views/add.scss @@ -12,6 +12,9 @@ margin-top: 25px; } } + .add-type { + color: $dark-gray; + } .bg{ background-color:rgb(100,124,232); height: 50px; diff --git a/src/sass/views/address-book.scss b/src/sass/views/address-book.scss index 4b0f49c58..757b71840 100644 --- a/src/sass/views/address-book.scss +++ b/src/sass/views/address-book.scss @@ -1,22 +1,15 @@ -#add-address{ - .list{ - background: #ffffff; +#add-address { + .zero-state-cta { + padding-bottom: 3vh; + } + .list { + background-color: #fff; } } #view-address-book { - .scroll{ + .scroll { height:100%; } - #add-contact{ - min-width: 300px; - img{ - width: 10rem; - display: inline-block; - } - a{ - text-decoration: none; - } - } .list { .item { color: #444; @@ -67,4 +60,26 @@ } } } -} \ No newline at end of file +} + +#address-book-view { + .bar.bar-royal { + border: 0 transparent; + } + .gravatar-content { + position: relative; + height: 70px; + border-color: $royal; + background-color: $royal; + padding-top: 20px; + margin-bottom: 50px; + text-align: center; + } + .address-book-field-label { + text-transform: uppercase; + font-weight: bold; + font-size: 12px; + display: block; + color: $mid-gray; + } +} diff --git a/src/sass/views/advancedSettings.scss b/src/sass/views/advancedSettings.scss index d3da674d9..d86f17101 100644 --- a/src/sass/views/advancedSettings.scss +++ b/src/sass/views/advancedSettings.scss @@ -1,17 +1,6 @@ -.settings { - .item { - color: #444; - border-color: rgba(221, 221, 221, 0.3); - } -} - #advanced-settings { .list { .item { - color: #444; - border-top: none; - padding-top: 1.5rem; - padding-bottom: 1.5rem; &:before { display: block; position: absolute; @@ -23,31 +12,19 @@ content: ''; } &.item-divider { - color: rgba(74, 74, 74, .8); - } - &.item-heading { - &:before { - top: 99% - } - } - &:nth-child(2) { - &:before { - width: 0; - } + color: $dark-gray; } .item-note { - color: rgb(58, 58, 58); + color: $dark-gray; } } + .has-comment { + border-bottom: 0 none; + } .comment { padding: 15px; background-color: #fff; - color: rgba(74, 74, 74, 0.8); - } - .divider-comment { - padding: 15px; - color: rgba(74, 74, 74, 0.8); - font-size: 15px; + color: $mid-gray; } } } diff --git a/src/sass/views/confirm.scss b/src/sass/views/confirm.scss index 667184165..172f82173 100644 --- a/src/sass/views/confirm.scss +++ b/src/sass/views/confirm.scss @@ -1,30 +1,3 @@ #view-confirm { - .icon-bitpay-card { - background-image: url("../img/icon-bitpay.svg"); - } - .slide-to-pay{ - bottom: 149px; - } - .send-gravatar { - left: 11px; - position: absolute; - top: 10px; - } - .accept-slide { - position: fixed; - bottom: 0; - width: 100%; - height: 100px; - background-color: #647CE8; - color: #ffffff; - font-size: 25px; - text-align: center; - padding-top: 34px; - line-height: 32px; - } - .accept-slide i { - float: right; - font-size: 32px; - margin-right: 20px; - } + } diff --git a/src/sass/views/copayers.scss b/src/sass/views/copayers.scss index 27117e859..2f3458a4e 100644 --- a/src/sass/views/copayers.scss +++ b/src/sass/views/copayers.scss @@ -1,7 +1,13 @@ .copayers-secret { - overflow-wrap: break-word; - word-wrap: break-word; text-align: center; - font-size: 14px; + font-size: 12px; margin: 10px; + white-space: -moz-pre-wrap !important; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + white-space: pre-wrap; + word-wrap: break-word; + white-space: -webkit-pre-wrap; + word-break: break-all; + white-space: normal; } diff --git a/src/sass/views/export.scss b/src/sass/views/export.scss new file mode 100644 index 000000000..61ecfd63d --- /dev/null +++ b/src/sass/views/export.scss @@ -0,0 +1,15 @@ +#export { + .list { + background-color: #fff; + } + .top-tabs.row { + padding: 0; + } + .top-tabs .col { + font-size: 14px; + cursor: pointer; + padding: 10px 5px; + border-bottom-width: 2px; + border-bottom-color: #172565; + } +} diff --git a/src/sass/views/import.scss b/src/sass/views/import.scss new file mode 100644 index 000000000..1edb3406c --- /dev/null +++ b/src/sass/views/import.scss @@ -0,0 +1,12 @@ +#import { + .top-tabs.row { + padding: 0; + } + .top-tabs .col { + font-size: 14px; + cursor: pointer; + padding: 10px 5px; + border-bottom-width: 2px; + border-bottom-color: #172565; + } +} diff --git a/src/sass/views/includes/actionSheet.scss b/src/sass/views/includes/actionSheet.scss new file mode 100644 index 000000000..a0137618c --- /dev/null +++ b/src/sass/views/includes/actionSheet.scss @@ -0,0 +1,58 @@ +action-sheet { + .bp-action-sheet { + $border-color: #EFEFEF; + + &__sheet { + background: #fff; + width: calc(100% + 1px); + position: fixed; + bottom: 0; + left: 50%; + transform: translateY(100%) translateX(-50%); + transition: transform 250ms cubic-bezier(0.4, 0.0, 0.2, 1); + z-index: 100; + padding-top: 1.75rem; + padding-left: 2rem; + padding-right: .75rem; + color: #2f2f2f; + padding-bottom: 3.5rem; + max-width: 550px; + max-height: 100vh; + overflow: scroll; + + &.slide-up { + transform: translateY(0) translateX(-50%); + box-shadow: 0px 2px 13px 3px rgba(0, 0, 0, .3); + } + + .back-arrow { + padding-bottom: 1.25rem; + cursor: pointer; + } + + .header { + font-weight: 600; + padding-bottom: 1rem; + border-bottom: 1px solid $border-color; + margin-bottom: 1px; + } + } + + &__backdrop { + height: 100%; + width: 100%; + position: fixed; + top: 0; + left: 0; + background: rgba(0, 0, 0, 0); + transition: background 250ms cubic-bezier(0.4, 0.0, 0.2, 1);; + pointer-events: none; + z-index: 99; + + &.fade-in { + background: rgba(0, 0, 0, .4); + pointer-events: all; + } + } + } +} diff --git a/src/sass/views/includes/txp-details.scss b/src/sass/views/includes/txp-details.scss index 76f48336d..c5d216e8f 100644 --- a/src/sass/views/includes/txp-details.scss +++ b/src/sass/views/includes/txp-details.scss @@ -1,4 +1,5 @@ -#txp-details { +#txp-details, +#view-confirm { $item-lateral-padding: 20px; $item-vertical-padding: 10px; $item-border-color: #EFEFEF; @@ -8,7 +9,7 @@ background: #f5f5f5; } .slide-to-pay { - bottom: 100px; + bottom: 92px; } .head { padding: 30px $item-lateral-padding 4rem; @@ -48,9 +49,19 @@ span { display: block; } + .badge { + border-radius: 0; + padding: .5rem; + } .item { color: #4A4A4A; - padding: $item-vertical-padding $item-lateral-padding; + padding-top: $item-vertical-padding; + padding-bottom: $item-vertical-padding; + padding-left: $item-lateral-padding; + + &:not(.item-icon-right) { + padding-right: $item-lateral-padding; + } .label { font-size: 14px; @@ -61,7 +72,8 @@ &.single-line { display: flex; align-items: center; - padding: 17px $item-lateral-padding; + padding-top: 17px; + padding-bottom: 17px; .label { margin: 0; @@ -112,15 +124,23 @@ display: flex; align-items: center; padding: .2rem 0; - i { - padding: 0; + margin-bottom: 5px; + + ~ .bp-arrow-right { + top: 14px; } - img { - height: 24px; - width: 24px; - padding: 2px; - margin-right: .7rem; - box-shadow: none; + + > i { + padding: 0; + position: static; + + > img { + height: 24px; + width: 24px; + padding: 2px; + margin-right: .7rem; + box-shadow: none; + } } } diff --git a/src/sass/views/includes/walletSelector.scss b/src/sass/views/includes/walletSelector.scss new file mode 100644 index 000000000..d0990b71b --- /dev/null +++ b/src/sass/views/includes/walletSelector.scss @@ -0,0 +1,62 @@ +wallet-selector { + + $border-color: #EFEFEF; + + .wallet-selector { + .wallet { + border: 0; + padding-right: 0; + padding-top: 0; + padding-left: 65px; + padding-bottom: 0; + margin-bottom: 1px; + overflow: visible; + + > i { + padding: 0; + margin-left: -5px; + + > img { + height: 39px; + width: 39px; + padding: 4px; + } + } + } + .wallet-inner { + display: flex; + position: relative; + padding-top: 16px; + padding-bottom: 16px; + + &::after { + display: block; + position: absolute; + width: 100%; + height: 1px; + background: $border-color; + bottom: 0; + right: 0; + content: ''; + } + + .check { + padding: 0 1.2rem; + } + } + .wallet-details { + flex-grow: 1; + + .wallet-name { + padding-bottom: 5px; + } + + .wallet-balance { + color: #3A3A3A; + font-family: "Roboto-Light"; + } + + } + } + +} diff --git a/src/sass/views/onboarding/onboard-disclaimer.scss b/src/sass/views/onboarding/onboard-disclaimer.scss index 00784ec90..68ca6ec7c 100644 --- a/src/sass/views/onboarding/onboard-disclaimer.scss +++ b/src/sass/views/onboarding/onboard-disclaimer.scss @@ -66,7 +66,7 @@ input:checked + .checkbox-icon:after { border-color: rgb(19, 229, 182); top: 4px; - left: 5px; + left: 3px; } .item-content { width: 90%; diff --git a/src/sass/views/tab-home.scss b/src/sass/views/tab-home.scss index 7a1f5c6a6..2956d8ea3 100644 --- a/src/sass/views/tab-home.scss +++ b/src/sass/views/tab-home.scss @@ -22,6 +22,18 @@ border-top:none; padding-bottom: 1.5rem; padding-top:1.5rem; + &.wallet{ + .big-icon-svg{ + & > .bg{ + padding: .25rem + } + } + } + } + .item-sub { + &:first-child:before { + width: 100% + } &:before { display: block; position: absolute; @@ -37,29 +49,6 @@ } } } - &.item-heading{ - &:before{ - width:100% !important; - top:99% - } - } - &:nth-child(1){ - &:before{ - width:0; - } - } - &:nth-child(2):last-child{ - &:before{ - width:0; - } - } - &.wallet{ - .big-icon-svg{ - & > .bg{ - padding: .25rem - } - } - } } } .next-step.item { diff --git a/src/sass/views/tab-receive.scss b/src/sass/views/tab-receive.scss index 0192e213f..e38b8be30 100644 --- a/src/sass/views/tab-receive.scss +++ b/src/sass/views/tab-receive.scss @@ -14,7 +14,7 @@ background: #fff; .incomplete { padding: 50px; - height: 350px; + height: 352px; .title { padding: 20px; font-size: 25px; diff --git a/src/sass/views/tab-settings.scss b/src/sass/views/tab-settings.scss index 9443e05b0..5c93e1c02 100644 --- a/src/sass/views/tab-settings.scss +++ b/src/sass/views/tab-settings.scss @@ -1,17 +1,60 @@ .settings { .item { - color: #444; + color: $dark-gray; border-color: rgba(221, 221, 221, 0.3); } + &-explaination, &-button-group { + padding: 0 1rem; + margin: 1rem 0; + } + &-heading { + font-size: 17px; + color: $dark-gray; + margin: 1rem 0; + } + &-description { + font-size: 15px; + color: $mid-gray; + margin: 1rem 0; + } + .setting-title, .setting-value { + display: block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .setting-value { + color: $light-gray; + font-size: 14px; + } + .settings-input-group { + background-color: #fff; + .item-stacked-label { + padding: 1rem; + } + .input-label { + text-transform: uppercase; + font-size: 12px; + font-weight: bold; + } + } + .settings-list { + .item { + color: $dark-gray; + padding-top: 1.3rem; + padding-bottom: 1.3rem; + &.item-divider { + color: $mid-gray; + padding-bottom: .5rem; + font-size: .9rem; + } + } + } } #tab-settings { .list { .item { - color: #444; - border-top: none; - padding-top: 1.3rem; - padding-bottom: 1.3rem; .big-icon-svg { & > .bg{ width:20px; @@ -23,9 +66,10 @@ left:8px; .bg { border-radius: 50%; - width:30px; - height:30px; + width: 25px; + height: 25px; padding:.1rem; + box-shadow: 0px 1px 5px rgba($mid-gray, .1); } } } @@ -39,11 +83,6 @@ right: 0; content: ''; } - &.item-divider { - color: $mid-gray; - padding-bottom: .5rem; - font-size: .9rem; - } &.item-heading { &:before { top: 99% @@ -54,12 +93,43 @@ width: 0; } } - .item-note { - color: $light-gray; - } } } .item-radio .radio-icon { font-size: 18px; } } + +#settings-fee { + .estimates { + font-size: 15px; + color: $dark-gray; + } + .fee-minutes, .fee-rate { + font-weight: bold; + display: block; + margin-bottom: .5rem; + } + .fee-policies { + border-color: #fff; + border-width: 2px 0; + border-style: solid; + } +} +.settings-color-name { + margin-left: 1rem; +} +.settings-color-block { + display: inline-block; + width: 24px; + height: 24px; + border-radius: 50%; + box-shadow: 0px 0px 10px; + float: left; // we don't want these indicators to affect their container's sizing +} + +#settings-tos { + p { + margin-bottom: 1rem; + } +} diff --git a/src/sass/views/tabs.scss b/src/sass/views/tabs.scss index a58d91359..4a1fd8507 100644 --- a/src/sass/views/tabs.scss +++ b/src/sass/views/tabs.scss @@ -35,3 +35,17 @@ } } } + +#tab-home, #tab-send { + .card, .list { + .icon { + color: $light-gray; + } + & > .item-heading { + font-weight: 700; + .icon { + color: $mid-gray; + } + } + } +} diff --git a/src/sass/views/views.scss b/src/sass/views/views.scss index 8b1319ac0..0112476f3 100644 --- a/src/sass/views/views.scss +++ b/src/sass/views/views.scss @@ -14,9 +14,11 @@ @import "bitpayCard"; @import "address-book"; @import "wallet-backup-phrase"; -@import "address-book"; @import "zero-state"; @import "onboarding/onboarding"; +@import "includes/actionSheet"; +@import "export"; +@import "import"; @import "includes/walletActivity"; @import "includes/wallets"; @import "includes/modals/modals"; @@ -26,4 +28,5 @@ @import "includes/tx-details"; @import "includes/txp-details"; @import "includes/tx-status"; +@import "includes/walletSelector"; @import "integrations/coinbase.scss"; diff --git a/util/hooks/android/add-custom-urls-to-android-manifest.js b/util/hooks/android/add-custom-urls-to-android-manifest.js deleted file mode 100644 index 6fd5747df..000000000 --- a/util/hooks/android/add-custom-urls-to-android-manifest.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -var AndroidManifest = require('androidmanifest'); - -var FILEPATH = 'platforms/android/AndroidManifest.xml'; -var manifest = new AndroidManifest().readFile(FILEPATH); - -var mainActivity = manifest.activity('MainActivity'); - -var customUrls = ['copay', 'bitcoin', 'bitauth']; - -customUrls.forEach(function(url){ - var selector = 'intent-filter > data[android\\:scheme=' + url + ']'; - if(mainActivity.find(selector).length > 0){ - return; - } - - var intentFilter = manifest.$(''); - intentFilter.append(''); - intentFilter.append(''); - intentFilter.append(''); - intentFilter.append(''); - mainActivity.append(intentFilter); -}); - -manifest.writeFile(FILEPATH); -console.log('custome uri schemes written to AndroidManifest'); diff --git a/util/hooks/android/prohibit-cloud-backups-in-android-manifest.js b/util/hooks/android/prohibit-cloud-backups-in-android-manifest.js deleted file mode 100644 index 1f5f4d53a..000000000 --- a/util/hooks/android/prohibit-cloud-backups-in-android-manifest.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = function(ctx) { - var fs = ctx.requireCordovaModule('fs'), - path = ctx.requireCordovaModule('path'), - xml = ctx.requireCordovaModule('cordova-common').xmlHelpers; - - var manifestPath = path.join(ctx.opts.projectRoot, '/platforms/android/AndroidManifest.xml'); - var doc = xml.parseElementtreeSync(manifestPath); - if (doc.getroot().tag !== 'manifest') { - throw new Error(manifestPath + ' has incorrect root node name (expected "manifest")'); - } - - doc.getroot().find('./application').attrib['android:allowBackup'] = "false"; - - //write the manifest file - fs.writeFileSync(manifestPath, doc.write({ - indent: 4 - }), 'utf-8'); -}; diff --git a/www/img/address-book-add.svg b/www/img/address-book-add.svg index fa8866b49..c23e2e98b 100644 --- a/www/img/address-book-add.svg +++ b/www/img/address-book-add.svg @@ -1,27 +1,13 @@ - - - - CF22B02A-463B-4798-B448-F6A878730EDC - Created with sketchtool. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + diff --git a/www/img/icon-back-arrow.svg b/www/img/icon-back-arrow.svg new file mode 100644 index 000000000..18e06f27b --- /dev/null +++ b/www/img/icon-back-arrow.svg @@ -0,0 +1,18 @@ + + + + controls-ico-back + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/www/img/icon-check-selected.svg b/www/img/icon-check-selected.svg new file mode 100644 index 000000000..e68f11eb4 --- /dev/null +++ b/www/img/icon-check-selected.svg @@ -0,0 +1,24 @@ + + + + Icons/Check/Green + Created with Sketch. + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/www/img/icon-link.svg b/www/img/icon-link.svg index 38d3e8cb0..eba22bf4e 100644 --- a/www/img/icon-link.svg +++ b/www/img/icon-link.svg @@ -5,7 +5,7 @@ Created with sketchtool. - + @@ -15,4 +15,4 @@ - \ No newline at end of file + diff --git a/www/views/add.html b/www/views/add.html index dd499e340..9c64d3594 100644 --- a/www/views/add.html +++ b/www/views/add.html @@ -11,7 +11,7 @@ -

New Personal Wallet

+ New Personal Wallet @@ -19,7 +19,7 @@ -

Create Shared Wallet

+ Create Shared Wallet @@ -27,7 +27,7 @@ -

Join shared wallet

+ Join shared wallet @@ -35,7 +35,7 @@ -

Import wallet

+ Import wallet diff --git a/www/views/addressbook.html b/www/views/addressbook.html index e27064b95..ea28dd923 100644 --- a/www/views/addressbook.html +++ b/www/views/addressbook.html @@ -3,7 +3,7 @@ - Addressbook + Address Book - - - + +
+ + + +
No contacts yet
+
You haven’t added any contacts to your address book yet. Get started by adding your first one.
+
+ +
+
+
+
- {{addrEntry.name}}

{{addrEntry.address}}

- -
-
-
-
- -
-
-

No contacts yet

-
-
-

- You haven’t added any contacts to your address book yet. Get started by adding your first one. -

-
- -
-
diff --git a/www/views/addressbook.view.html b/www/views/addressbook.view.html index 88cf0af57..5089a66a3 100644 --- a/www/views/addressbook.view.html +++ b/www/views/addressbook.view.html @@ -1,37 +1,31 @@ - + - Addressbook + {{addressbookEntry.name}} - - - +
- -
+
-

Name

- {{addressbookEntry.name}} + Name + {{addressbookEntry.name}}
-

Email

- {{addressbookEntry.email}} + Email + {{addressbookEntry.email}}
-

Address

- {{addressbookEntry.address}} + Address + {{addressbookEntry.address}}
- - - diff --git a/www/views/advancedSettings.html b/www/views/advancedSettings.html index e0a2d0e5d..505ea7dc6 100644 --- a/www/views/advancedSettings.html +++ b/www/views/advancedSettings.html @@ -6,7 +6,7 @@ -
+
Enabled Integrations
@@ -30,7 +30,7 @@
Wallet Operation
- + Use Unconfirmed Funds
@@ -38,11 +38,13 @@
Experimental Features
-
- These features aren't quite ready for primetime. They may change, stop working, or disappear at any time. +
+
+ These features aren't quite ready for primetime. They may change, stop working, or disappear at any time. +
- + Recent Transaction Card
diff --git a/www/views/confirm.html b/www/views/confirm.html index cb2a3063b..953dc89fb 100644 --- a/www/views/confirm.html +++ b/www/views/confirm.html @@ -7,62 +7,54 @@ - - -
-
- Sending -
{{amountStr}}
-
{{alternativeAmountStr}}
-
-
- -
-
Fee: {{feeLevel}} - - {{fee || '...'}} - -
- -
- -
- - -
-
+ +
+
+
+ + Sending
-
- To: {{toAddress}} -

{{toName}}

- -
- - - {{_paypro.domain}} +
+
{{displayAmount}} {{displayUnit}}
+
{{alternativeAmountStr}}
+
+
+
+
+ To + + + {{toAddress}} + + +
+
+ Insufficient funds +
+ + From +
+ + + +
{{wallet.name}}
-
-
-
- -
- No appropiate wallet to make this payment -
- - - -
- Insufficient funds -
- - - -
Payment Sent Proposal Created + + + + diff --git a/www/views/copayers.html b/www/views/copayers.html index 519ba5195..c026af015 100644 --- a/www/views/copayers.html +++ b/www/views/copayers.html @@ -4,26 +4,29 @@ {{wallet.name}} + + +
- +
Share this invitation with your copayers - -
-
- -
-
- -
-
-
- {{secret || ('Loading...'|translate)}} +
+
+ +
+
+
+
+ {{secret || ('Loading...'|translate)}} +
@@ -36,30 +39,24 @@
-
-

- Waiting for copayers +
+
[ {{wallet.m}}-of-{{wallet.n}} ] -

+ Waiting for copayers +
-
+
- Waiting... + {{'Waiting...'|translate}}
-
+

Wallet incomplete and broken

Delete it and create a new one

- -
- -
diff --git a/www/views/export.html b/www/views/export.html index bdec27e4a..b6117ced1 100644 --- a/www/views/export.html +++ b/www/views/export.html @@ -1,4 +1,4 @@ - + {{'Export wallet' | translate}} @@ -6,11 +6,11 @@ -
-
+
+
File/Text
-
+
QR Code
diff --git a/www/views/import.html b/www/views/import.html index 81c80f651..b5ce0d8fb 100644 --- a/www/views/import.html +++ b/www/views/import.html @@ -1,4 +1,4 @@ - + {{'Import Wallet' | translate}} @@ -6,14 +6,17 @@ -
-
+
+
Recovery phrase
-
+
File/Text
-
+
Hardware wallet
diff --git a/www/views/includes/actionSheet.html b/www/views/includes/actionSheet.html new file mode 100644 index 000000000..df159bc2b --- /dev/null +++ b/www/views/includes/actionSheet.html @@ -0,0 +1,10 @@ +
+
+
+ +
Send from
+ +
diff --git a/www/views/includes/copayers.html b/www/views/includes/copayers.html index 2ab3e5f49..53fbeeebe 100644 --- a/www/views/includes/copayers.html +++ b/www/views/includes/copayers.html @@ -1,8 +1,10 @@ -
- - {{'Me'|translate}} +
+ + + {{'Me'|translate}} - - {{copayer.name}} + + + {{copayer.name}}
diff --git a/www/views/includes/terms.html b/www/views/includes/terms.html index 2870ed1c5..4c80d6bef 100644 --- a/www/views/includes/terms.html +++ b/www/views/includes/terms.html @@ -1,11 +1,11 @@

- The software you are about to use functions as a free, open source, and multi-signature digital wallet. The software does not constitute an account where BitPay or other third parties serve as financial intermediaries or custodians of your bitcoin. + This software functions as a free, open source, and multi-signature digital wallet. The software does not constitute an account where BitPay or other third parties serve as financial intermediaries or custodians of your bitcoin.

- While the software has undergone beta testing and continues to be improved by feedback from the open-source user and developer community, we cannot guarantee that there will be no bugs in the software. You acknowledge that your use of this software is at your own discretion and in compliance with all applicable laws. You are responsible for safekeeping your passwords, private key pairs, PINs and any other codes you use to access the software. + While the software has undergone beta testing and continues to be improved by feedback from the open-source user and developer community, we cannot guarantee that there will be no bugs in the software. You acknowledge that your use of this software is at your own discretion and in compliance with all applicable laws. You are responsible for safekeeping your passwords, private key pairs, PINs, and any other codes you use to access the software.

- IF YOU LOSE ACCESS TO YOUR BITCOIN WALLET OR YOUR ENCRYPTED PRIVATE KEYS AND YOU HAVE NOT SEPARATELY STORED A BACKUP OF YOUR WALLET AND CORRESPONDING PASSWORD, YOU ACKNOWLEDGE AND AGREE THAT ANY BITCOIN YOU HAVE ASSOCIATED WITH THAT WALLET WILL BECOME INACCESSIBLE. All transaction requests are irreversible. The authors of the software, employees and affiliates of Bitpay, copyright holders, and BitPay, Inc. cannot retrieve your private keys or passwords if you lose or forget them and cannot guarantee transaction confirmation as they do not have control over the Bitcoin network. + IF YOU LOSE ACCESS TO YOUR BITCOIN WALLET OR YOUR ENCRYPTED PRIVATE KEYS AND YOU HAVE NOT SEPARATELY STORED A BACKUP OF YOUR WALLET AND CORRESPONDING PASSWORD, YOU ACKNOWLEDGE AND AGREE THAT ANY BITCOIN YOU HAVE ASSOCIATED WITH THAT WALLET WILL BECOME INACCESSIBLE. All transaction requests are irreversible. The authors of the software, employees and affiliates of BitPay, copyright holders, and BitPay, Inc. cannot retrieve your private keys or passwords if you lose or forget them and cannot guarantee transaction confirmation as they do not have control over the Bitcoin network.

To the fullest extent permitted by law, this software is provided “as is” and no representations or warranties can be made of any kind, express or implied, including but not limited to the warranties of merchantability, fitness or a particular purpose and noninfringement. You assume any and all risks associated with the use of the software. In no event shall the authors of the software, employees and affiliates of Bitpay, copyright holders, or BitPay, Inc. be held liable for any claim, damages or other liability, whether in an action of contract, tort, or otherwise, arising from, out of or in connection with the software. We reserve the right to modify this disclaimer from time to time. diff --git a/www/views/includes/walletSelector.html b/www/views/includes/walletSelector.html new file mode 100644 index 000000000..ba97edad0 --- /dev/null +++ b/www/views/includes/walletSelector.html @@ -0,0 +1,30 @@ + + + + + +

+ + diff --git a/www/views/join.html b/www/views/join.html index 62f4083b7..ce24cbf10 100644 --- a/www/views/join.html +++ b/www/views/join.html @@ -1,4 +1,4 @@ - + @@ -10,7 +10,7 @@
-
+