fix merge conflicts

This commit is contained in:
Marty Alcala 2016-10-21 09:38:27 -04:00
commit 3f402fbd89
65 changed files with 391 additions and 303 deletions

View file

@ -7,7 +7,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
var unitDecimals;
var satToBtc;
var self = $scope.self;
var SMALL_FONT_SIZE_LIMIT = 13;
var SMALL_FONT_SIZE_LIMIT = 10;
var LENGTH_EXPRESSION_LIMIT = 19;
$scope.$on('$ionicView.leave', function() {
@ -197,18 +197,18 @@ angular.module('copayApp.controllers').controller('amountController', function($
amount: amountUSD,
currency: 'USD'
};
ongoingProcess.set('Processing Transaction...', true);
ongoingProcess.set('Preparing transaction...', true);
$timeout(function() {
bitpayCardService.topUp($scope.cardId, dataSrc, function(err, invoiceId) {
if (err) {
ongoingProcess.set('Processing Transaction...', false);
ongoingProcess.set('Preparing transaction...', false);
popupService.showAlert(gettextCatalog.getString('Error'), bwcError.msg(err));
return;
}
bitpayCardService.getInvoice(invoiceId, function(err, data) {
ongoingProcess.set('Processing Transaction...', false);
ongoingProcess.set('Preparing transaction...', false);
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), bwcError.msg(err));
return;

View file

@ -27,9 +27,9 @@ angular.module('copayApp.controllers').controller('bitpayCardIntroController', f
popupService.showAlert(null, err);
return;
}
var title = gettextCatalog.getString('Add BitPay Card?');
var title = gettextCatalog.getString('Add BitPay Card Account?');
var msg = gettextCatalog.getString('Would you like to add this account ({{email}}) to your wallet?', {email: obj.email});
var ok = gettextCatalog.getString('Add cards');
var ok = gettextCatalog.getString('Add Account');
var cancel = gettextCatalog.getString('Go back');
popupService.showConfirm(title, msg, ok, cancel, function(res) {
if (res) {
@ -59,14 +59,18 @@ angular.module('copayApp.controllers').controller('bitpayCardIntroController', f
}
});
$scope.bitPayCardInfo = function() {
var url = 'https://bitpay.com/visa/faq';
externalLinkService.open(url);
};
$scope.orderBitPayCard = function() {
var url = 'https://bitpay.com/visa/';
var url = 'https://bitpay.com/visa/get-started';
externalLinkService.open(url);
};
$scope.connectBitPayCard = function() {
var url = 'https://bitpay.com/visa/login';
var url = 'https://bitpay.com/visa/dashboard/add-to-bitpay-wallet-confirm';
externalLinkService.open(url);
};
});

View file

@ -1,9 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, gettext, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig) {
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, gettext, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig) {
var cachedTxp = {};
var isChromeApp = platformInfo.isChromeApp;
var countDown = null;
$ionicConfig.views.swipeBackEnabled(false);
$scope.$on("$ionicView.beforeEnter", function(event, data) {
@ -15,6 +15,12 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.toEmail = data.stateParams.toEmail;
$scope.description = data.stateParams.description;
$scope.paypro = data.stateParams.paypro;
$scope.paymentExpired = {
value: false
};
$scope.remainingTimeStr = {
value: null
};
initConfirm();
});
@ -87,6 +93,10 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.alternativeAmountStr = v;
});
if($scope.paypro) {
_paymentTimeControl($scope.paypro.expires);
}
$timeout(function() {
$scope.$apply();
}, 100);
@ -136,6 +146,91 @@ angular.module('copayApp.controllers').controller('confirmController', function(
return amountStr.split(' ')[1];
}
// <<<<<<< HEAD
// =======
// var setFromPayPro = function(uri, cb) {
// if (!cb) cb = function() {};
//
// var wallet = profileService.getWallets({
// onlyComplete: true
// })[0];
//
// if (!wallet) return cb();
//
// if (isChromeApp) {
// popupService.showAlert(gettextCatalog.getString('Payment Protocol not supported on Chrome App'));
// return cb(true);
// }
//
// $log.debug('Fetch PayPro Request...', uri);
//
// ongoingProcess.set('fetchingPayPro', true);
// wallet.fetchPayPro({
// payProUrl: uri,
// }, function(err, paypro) {
//
// ongoingProcess.set('fetchingPayPro', false);
//
// if (err) {
// $log.warn('Could not fetch payment request:', err);
// var msg = err.toString();
// if (msg.match('HTTP')) {
// msg = gettextCatalog.getString('Could not fetch payment information');
// }
// popupService.showAlert(msg);
// return cb(true);
// }
//
// if (!paypro.verified) {
// $log.warn('Failed to verify payment protocol signatures');
// popupService.showAlert(gettextCatalog.getString('Payment Protocol Invalid'));
// return cb(true);
// }
//
// $scope.toAmount = paypro.amount;
// $scope.toAddress = paypro.toAddress;
// $scope.description = paypro.memo;
// $scope.paypro = null;
//
// $scope._paypro = paypro;
// _paymentTimeControl(paypro.expires);
// return initConfirm();
// });
// };
function _paymentTimeControl(expirationTime) {
$scope.paymentExpired.value = false;
setExpirationTime();
countDown = $interval(function() {
setExpirationTime();
}, 1000);
function setExpirationTime() {
var now = Math.floor(Date.now() / 1000);
if (now > expirationTime) {
setExpiredValues();
return;
}
var totalSecs = expirationTime - now;
var m = Math.floor(totalSecs / 60);
var s = totalSecs % 60;
$scope.remainingTimeStr.value = ('0' + m).slice(-2) + ":" + ('0' + s).slice(-2);
}
function setExpiredValues() {
$scope.paymentExpired.value = true;
$scope.remainingTimeStr.value = gettextCatalog.getString('Expired');
if (countDown) $interval.cancel(countDown);
$timeout(function() {
$scope.$apply();
});
}
}
// >>>>>>> de248d56393535b819d879d38692af68c9e6e4da
function setWallet(wallet, delayed) {
var stop;
$scope.wallet = wallet;
@ -242,12 +337,20 @@ angular.module('copayApp.controllers').controller('confirmController', function(
};
$scope.approve = function(onSendStatusChange) {
if ($scope._paypro && $scope.paymentExpired.value) {
popupService.showAlert(null, gettextCatalog.getString('The payment request has expired'));
$scope.sendStatus = '';
$timeout(function() {
$scope.$apply();
});
return;
}
var wallet = $scope.wallet;
if (!wallet) {
return setSendError(gettextCatalog.getString('No wallet selected'));
};
if (!wallet.canSign() && !wallet.isPrivKeyExternal()) {
$log.info('No signing proposal: No private key');
@ -286,10 +389,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}
publishAndSign(wallet, txp, onSendStatusChange);
});
}
else publishAndSign(wallet, txp, onSendStatusChange);
}
else {
} else publishAndSign(wallet, txp, onSendStatusChange);
} else {
popupService.showConfirm(null, message, okText, cancelText, function(ok) {
if (!ok) {
$scope.sendStatus = '';
@ -298,8 +399,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
publishAndSign(wallet, txp, onSendStatusChange);
});
}
}
else publishAndSign(wallet, txp, onSendStatusChange);
} else publishAndSign(wallet, txp, onSendStatusChange);
});
};

View file

@ -7,8 +7,9 @@ angular.module('copayApp.controllers').controller('preferencesAliasController',
var config = configService.getSync();
$scope.walletName = wallet.credentials.walletName;
$scope.walletAlias = config.aliasFor && config.aliasFor[walletId] ? config.aliasFor[walletId] : wallet.credentials.walletName;
$scope.alias = {
value: (config.aliasFor && config.aliasFor[walletId]) || wallet.credentials.walletName
value: $scope.walletAlias
};
$scope.save = function() {
@ -23,11 +24,4 @@ angular.module('copayApp.controllers').controller('preferencesAliasController',
$ionicHistory.goBack();
});
};
$scope.valueCheck = function() {
if ($scope.alias.value == wallet.credentials.walletName || $scope.alias.value == '') $scope.disableSave = true;
else $scope.disableSave = false;
};
$scope.$watch('alias.value', function(newvalue, oldvalue) {
$scope.valueCheck();
});
});

View file

@ -35,3 +35,8 @@ $placeholder-icon-padding: 10px;
.item p {
color: $mid-gray;
}
// we'd like to diverge from the standard ionic formula for left-right card margins
.card {
margin: ($content-padding * 2) 14px;
}

View file

@ -18,6 +18,10 @@
border-color: #e6b500;
background-color: #ffc900;
color: #fff;
&.warning-red{
border-color: #EB475A;
background-color: $warning-red;
}
}
&.error {
background-color: #ef473a;
@ -128,8 +132,8 @@ input[type=number] {
.postfix {
position: absolute;
right: 10px;
background-color: #f8f8f8;
color: #444;
background-color: $subtle-gray;
color: $dark-gray;
border-radius: 4px;
padding: 2px 10px;
cursor: pointer;

View file

@ -8,6 +8,7 @@ $roboto-light: "Roboto-Light", sans-serif-light;
$light-green: rgb(19, 229, 182);
$success-green: #17ae8c;
$warning-orange: #ffa500;
$warning-red: #E15061;
$dark-gray: #445;
$mid-gray: #667;
$light-gray: #9b9bab;

View file

@ -1,4 +1,9 @@
#view-amount {
.recipient-label {
font-size: 14px;
padding-bottom: 0;
color: $mid-gray;
}
.item-no-bottom-border + .item {
border-top: 0;
}
@ -19,7 +24,7 @@
box-shadow: none;
}
}
font-size: 11px;
font-size: 13px;
padding-left: 48px;
}
}
@ -30,7 +35,7 @@
}
.amount-pane {
position: absolute;
top: 125px;
top: 95px;
bottom: 0;
width: 100%;
background-color: #fff;
@ -42,6 +47,8 @@
.title {
float: left;
padding-top: 10px;
color: $dark-gray;
font-weight: bold;
}
}
.amount {
@ -53,11 +60,60 @@
bottom: 254px;
top: 66px;
.light {
color: #A4A4A4;
color: $light-gray;
}
}
}
.amount {
&__editable {
margin-bottom: 1rem;
&--minimize {
font-size: 22px;
}
&--standard {
font-size: 42px;
}
&--placeholder {
color: $light-gray;
}
}
&__number {
color: $dark-gray;
}
&__currency-toggle {
border: 1px solid $subtle-gray;
color: $dark-gray;
border-radius: 3px;
padding: 0 10px;
cursor: pointer;
font-size: .6em;
position: relative;
top: -3px;
line-height: 1;
}
&__results {
&--minimize {
font-size: 12px;
}
&--standard {
font-size: 18px;
}
&--placeholder {
color: $light-gray;
}
}
&__result {
color: $light-gray;
font-size: .9em;
margin-bottom: -.9em;
line-height: 1;
}
&__result-equiv {
color: $mid-gray;
font-size: 1.2em;
margin-top: 2rem;
}
}
.keypad {
text-align: center;
font-size: 24px;
@ -65,6 +121,7 @@
position: absolute;
bottom: 0;
width: 100%;
color: $mid-gray;
.row {
padding: 0 !important;
@ -72,23 +129,23 @@
}
.col {
line-height: 40px;
line-height: 45px;
}
.operator {
background-color: #eaeaea;
background-color: $subtle-gray;
font-weight: normal;
cursor: pointer;
&:active {
background-color: #f8f8f8;
background-color: $light-gray;
}
}
.operator-send {
font-weight: bolder;
color: #f8f8f8;
background-color: #1e3186;
color: #fff;
background-color: $positive;
font-size: 36px;
cursor: pointer;
@ -99,10 +156,10 @@
.digit{
cursor: pointer;
border-top: 1px solid #eaeaea;
border-left: 1px solid #eaeaea;
border-top: 1px solid $subtle-gray;
border-left: 1px solid $subtle-gray;
&:active {
background-color: #eaeaea;
background-color: $subtle-gray;
}
}

View file

@ -1,70 +1,55 @@
#bitpayCard-intro {
.slider-pager .slider-pager-page {
color: #fff;
}
.cta-button{
background: url(../img/onboarding-welcome-bg.png), linear-gradient(to bottom, rgba(30, 49, 134, 1) 0%, rgba(17, 27, 73, 1) 100%);
background-position: top center;
background-size: contain;
background-repeat: no-repeat;
color: #fff;
.cta-button {
text-align: center;
position: absolute;
bottom: 55px;
padding: 0 1.5rem;
width: 100%;
}
background: rgba(30, 49, 134, 1);
background: -moz-linear-gradient(top, rgba(30, 49, 134, 1) 0%, rgba(17, 27, 73, 1) 100%);
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(30, 49, 134, 1)), color-stop(100%, rgba(17, 27, 73, 1)));
background: -webkit-linear-gradient(top, rgba(30, 49, 134, 1) 0%, rgba(17, 27, 73, 1) 100%);
background: -o-linear-gradient(top, rgba(30, 49, 134, 1) 0%, rgba(17, 27, 73, 1) 100%);
background: -ms-linear-gradient(top, rgba(30, 49, 134, 1) 0%, rgba(17, 27, 73, 1) 100%);
background: linear-gradient(to bottom, rgba(30, 49, 134, 1) 0%, rgba(17, 27, 73, 1) 100%);
color: #fff;
height: 100%;
.bar.bar-header {
background: rgb(30, 49, 134);
color: #fff;
button {
color: #fff;
}
.secondary-buttons {
button {
color: rgba(255, 255, 255, .5);
}
}
background: transparent none;
border: 0 none transparent;
}
.bar.bar-stable{
border-color: transparent;
border:none;
}
.button-transparent{
background: none !important;
}
.button-translucent{
background: rgba(215, 215, 215, 0.1)
}
.button-primary{
background: rgb(100, 124, 232) !important;
color:#fff;
}
.light-blue{
color:rgb(100, 124, 232);
}
.text-white{
color: #ffffff;
.bitpayCard {
&__illustration {
padding: 2rem;
&__img {
width: 100%;
max-width: 400px;
}
}
&__info:before {
font-size: 22px;
line-height: 22px;
margin-top: 6px;
}
}
ion-content {
background: url(../img/onboarding-welcome-bg.png);
background-position: top center;
background-size: contain;
background-repeat: repeat-x;
height: 100%;
.scroll{
height: 100%;
}
color: #fff;
p {
text-align: center;
margin: 40px 20px;
font-size: 1.2rem;
color: rgba(255, 255, 255, .5);
}
}
.slider__text {
text-align: center;
margin: 40px 20px;
font-size: 1rem;
color: rgba(255, 255, 255, .7);
}
.slider-pager .slider-pager-page {
color: $soft-blue;
font-size: 8px;
margin: 0;
}
}

View file

@ -28,6 +28,12 @@
margin-bottom:5px;
font-size:13px;
}
&.wallet-number{
visibility: hidden;
}
&.visible{
visibility: visible !important;
}
}
.big-icon-svg{
& > .bg{padding:.3rem;width: 40px;height:40px;}

View file

@ -1,12 +1,20 @@
#glidera {
.glidera-lead {
margin: 1rem;
margin: 2rem 1rem;
color: $dark-gray;
font-size: 20px;
line-height: 1.4;
text-align: center;
}
.glidera-text {
margin: 2rem 1rem;
color: $mid-gray;
font-size: 18px;
font-size: 16px;
line-height: 1.4;
text-align: center;
}
.disclosure {
color: $mid-gray;
color: $light-gray;
font-size: 12px;
text-align: left;
margin: 1rem;

View file

@ -16,16 +16,20 @@
background-image: url("../img/icon-amazon.svg");
}
.bg {
&.wallet{
&.wallet {
padding: .25rem
}
}
.card{
.card {
.item {
color: #444;
border-top:none;
padding-bottom: 1.5rem;
padding-top:1.5rem;
padding-bottom: 1rem;
padding-top:1rem;
&.item-extra-padding {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
}
.item-sub {
&:first-child:before {
@ -85,4 +89,18 @@
color: #666;
font-size: 38px;
}
.tab-home {
&__logo {
height: 18px;
position: relative;
top: 3px;
}
&__wallet {
&__multisig-number {
font-size: .8rem;
font-weight: 300;
color: $light-gray;
}
}
}
}

View file

@ -12,7 +12,7 @@
padding-bottom: .5rem;
@media(max-width: 480px) {
input {
font-size: 12px;
font-size: 14px;
}
}
.icon {

View file

@ -47,11 +47,21 @@
color: $dark-gray;
padding-top: 1.3rem;
padding-bottom: 1.3rem;
&.has-setting-value {
padding-top: .65rem;
padding-bottom: .65rem;
}
&.item-divider {
color: $mid-gray;
padding-bottom: .5rem;
font-size: .9rem;
}
.icon {
color: $light-gray;
}
}
.item-note {
color: $light-gray;
}
}
}