mirror of https://github.com/BTCPrivate/copay.git
Merge branch 'ref/design' of https://github.com/bitpay/bitpay-wallet into feature/address_book
This commit is contained in:
commit
6e23e35171
|
@ -41,7 +41,7 @@
|
||||||
<div class="keypad">
|
<div class="keypad">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-25 col-offset-75 operator-send"
|
<div class="col col-25 col-offset-75 operator-send"
|
||||||
ng-hide="alternativeResult <= 0 && amountResult <= 0" ng-click="finish()">
|
ng-show="amount > 0 || alternativeResult > 0 || amountResult > 0" ng-click="finish()">
|
||||||
<i class="icon ion-ios-arrow-thin-right"></i>
|
<i class="icon ion-ios-arrow-thin-right"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
<i ng-show="!description" class="icon ion-ios-plus-empty size-21"></i>
|
<i ng-show="!description" class="icon ion-ios-plus-empty size-21"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="button button-block button-positive" ng-click="approve()" ng-if="!isCordova" ng-disabled="!fee" translate>Click to pay</button>
|
<button class="button button-block button-positive" ng-click="approve()" ng-if="!isCordova" translate>Click to pay</button>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
<accept class="accept-slide" ng-if="isCordova && fee"></accept>
|
<accept class="accept-slide" ng-if="isCordova"></accept>
|
||||||
</ion-view>
|
</ion-view>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<ion-slides options="{loop: false, effect: 'flip', speed: 500, pagination: false, initialSlide: 1}" slider="data.slider">
|
<ion-slides options="{loop: false, effect: 'flip', speed: 500, pagination: false, initialSlide: 1}" slider="data.slider">
|
||||||
|
<ion-slide-page></ion-slide-page>
|
||||||
<ion-slide-page>
|
<ion-slide-page>
|
||||||
</ion-slide-page>
|
<div>
|
||||||
<ion-slide-page>
|
<i class="icon ion-ios-arrow-thin-right"></i>
|
||||||
<div><h1>Slide to accept</h1><i class="icon-arrow-right3 size-24 right"></i></div>
|
<span translate>Slide to accept</span>
|
||||||
|
</div>
|
||||||
</ion-slide-page>
|
</ion-slide-page>
|
||||||
</ion-slides>
|
</ion-slides>
|
||||||
|
|
|
@ -50,21 +50,6 @@
|
||||||
<i class="icon nav-item-arrow-right"></i>
|
<i class="icon nav-item-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div ng-show="usePushNotifications && PNEnabledByUser">
|
|
||||||
<div class="item item-divider" translate>Notifications</div>
|
|
||||||
|
|
||||||
<ion-toggle ng-model="pushNotifications.value" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
|
|
||||||
<span class="toggle-label" translate>Enable push notifications</span>
|
|
||||||
</ion-toggle>
|
|
||||||
|
|
||||||
<div ng-show="usePushNotifications && !PNEnabledByUser && isIOSApp">
|
|
||||||
<div translate>Push notifications for Copay are currently disabled. Enable them in the Settings app.</div>
|
|
||||||
<ul ng-click="openSettings()">
|
|
||||||
<li translate>Open Settings app</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="item item-divider" translate>Exchanges</div>
|
<div class="item item-divider" translate>Exchanges</div>
|
||||||
|
|
||||||
<ion-toggle ng-show="!isWP" ng-model="glideraEnabled.value" toggle-class="toggle-balanced" ng-change="glideraChange()">
|
<ion-toggle ng-show="!isWP" ng-model="glideraEnabled.value" toggle-class="toggle-balanced" ng-change="glideraChange()">
|
||||||
|
@ -84,6 +69,24 @@
|
||||||
<span class="toggle-label" translate>Use Unconfirmed Funds</span>
|
<span class="toggle-label" translate>Use Unconfirmed Funds</span>
|
||||||
</ion-toggle>
|
</ion-toggle>
|
||||||
|
|
||||||
|
<div ng-show="usePushNotifications && PNEnabledByUser">
|
||||||
|
<div class="item item-divider" translate>Notifications</div>
|
||||||
|
|
||||||
|
<ion-toggle ng-model="pushNotifications.value" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
|
||||||
|
<span class="toggle-label" translate>Enable push notifications</span>
|
||||||
|
</ion-toggle>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-show="usePushNotifications && !PNEnabledByUser && isIOSApp">
|
||||||
|
<div class="item item-divider" translate>Notifications</div>
|
||||||
|
<div class="padding text-light" translate>
|
||||||
|
Push notifications for Copay are currently disabled. Enable them in the Settings app.
|
||||||
|
</div>
|
||||||
|
<a class="item" ng-click="openSettings()">
|
||||||
|
<span translate>Open Settings app</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="item item-divider" translate>Wallets Preferences</div>
|
<div class="item item-divider" translate>Wallets Preferences</div>
|
||||||
<a class="item item-icon-left item-icon-right" href
|
<a class="item item-icon-left item-icon-right" href
|
||||||
ui-sref="tabs.preferences({'walletId': item.id})"
|
ui-sref="tabs.preferences({'walletId': item.id})"
|
||||||
|
|
|
@ -20,6 +20,9 @@ angular.module('copayApp.controllers').controller('addressbookListController', f
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.addressbook = lodash.clone(contacts);
|
$scope.addressbook = lodash.clone(contacts);
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$apply();
|
||||||
|
}, 100);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -89,13 +89,16 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
|
|
||||||
|
|
||||||
$scope.showDescriptionPopup = function() {
|
$scope.showDescriptionPopup = function() {
|
||||||
var title = gettextCatalog.getString('Add description');
|
var message = gettextCatalog.getString('Add description');
|
||||||
var opts = {
|
var opts = {
|
||||||
defaultText: $scope.description
|
defaultText: $scope.description
|
||||||
};
|
};
|
||||||
|
|
||||||
popupService.showPrompt(title, null, opts, function(res) {
|
popupService.showPrompt(null, message, opts, function(res) {
|
||||||
if (res) $scope.description = res;
|
if (res) $scope.description = res;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$apply();
|
||||||
|
}, 100);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -272,8 +275,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
var touchIdEnabled = config.touchIdFor && !config.touchIdFor[wallet.id];
|
var touchIdEnabled = config.touchIdFor && !config.touchIdFor[wallet.id];
|
||||||
var isCordova = $scope.isCordova;
|
var isCordova = $scope.isCordova;
|
||||||
var bigAmount = parseFloat(txFormatService.formatToUSD(txp.amount)) > 20;
|
var bigAmount = parseFloat(txFormatService.formatToUSD(txp.amount)) > 20;
|
||||||
var message = gettextCatalog.getString('Sending {{fee}} from your {{name}} wallet', {
|
var message = gettextCatalog.getString('Sending {{amountStr}} from your {{name}} wallet', {
|
||||||
fee: $scope.fee,
|
amountStr: $scope.amountStr,
|
||||||
name: wallet.name
|
name: wallet.name
|
||||||
});
|
});
|
||||||
var okText = gettextCatalog.getString('Confirm');
|
var okText = gettextCatalog.getString('Confirm');
|
||||||
|
@ -307,7 +310,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
$state.go('tabs.send');
|
$state.go('tabs.send');
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("$ionicView.enter", function(event, data){
|
$scope.$on("$ionicView.enter", function(event, data) {
|
||||||
initConfirm();
|
initConfirm();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,6 +16,7 @@ angular.module('copayApp.controllers').controller('txStatusController', function
|
||||||
disableAnimate: true,
|
disableAnimate: true,
|
||||||
disableBack: true
|
disableBack: true
|
||||||
});
|
});
|
||||||
|
$ionicHistory.removeBackView();
|
||||||
$state.go('tabs.send.addressbook', {
|
$state.go('tabs.send.addressbook', {
|
||||||
fromSendTab: true,
|
fromSendTab: true,
|
||||||
addressbookEntry: addressbookEntry
|
addressbookEntry: addressbookEntry
|
||||||
|
|
|
@ -5,10 +5,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
$scope.isCordova = platformInfo.isCordova;
|
$scope.isCordova = platformInfo.isCordova;
|
||||||
$scope.isNW = platformInfo.isNW;
|
$scope.isNW = platformInfo.isNW;
|
||||||
|
|
||||||
$scope.wallets = profileService.getWallets({
|
|
||||||
onlyComplete: true
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.checkTips = function(force) {
|
$scope.checkTips = function(force) {
|
||||||
storageService.getReceiveTipsAccepted(function(err, accepted) {
|
storageService.getReceiveTipsAccepted(function(err, accepted) {
|
||||||
if (err) $log.warn(err);
|
if (err) $log.warn(err);
|
||||||
|
@ -25,16 +21,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$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();
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.shareAddress = function(addr) {
|
$scope.shareAddress = function(addr) {
|
||||||
if ($scope.generatingAddress) return;
|
if ($scope.generatingAddress) return;
|
||||||
if ($scope.isCordova) {
|
if ($scope.isCordova) {
|
||||||
|
@ -61,5 +47,19 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
}, 1);
|
}, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!$scope.isCordova) $scope.checkTips();
|
$scope.$on("$ionicView.enter", function(event, data) {
|
||||||
|
if (!$scope.isCordova) $scope.checkTips();
|
||||||
|
$scope.wallets = profileService.getWallets({
|
||||||
|
onlyComplete: true
|
||||||
|
});
|
||||||
|
$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();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -189,7 +189,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
function cacheBalance(wallet, balance) {
|
function cacheBalance(wallet, balance) {
|
||||||
if (!balance) return;
|
if (!balance) return;
|
||||||
|
|
||||||
var config = configService.getSync().wallet.settings;
|
var config = configService.getSync().wallet;
|
||||||
|
|
||||||
var cache = wallet.cachedStatus;
|
var cache = wallet.cachedStatus;
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
cache.balanceByAddress = balance.byAddress;
|
cache.balanceByAddress = balance.byAddress;
|
||||||
|
|
||||||
// Spend unconfirmed funds
|
// Spend unconfirmed funds
|
||||||
if (cache.spendUnconfirmed) {
|
if (config.spendUnconfirmed) {
|
||||||
cache.totalBalanceSat = balance.totalAmount;
|
cache.totalBalanceSat = balance.totalAmount;
|
||||||
cache.lockedBalanceSat = balance.lockedAmount;
|
cache.lockedBalanceSat = balance.lockedAmount;
|
||||||
cache.availableBalanceSat = balance.availableAmount;
|
cache.availableBalanceSat = balance.availableAmount;
|
||||||
|
@ -212,9 +212,9 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
}
|
}
|
||||||
|
|
||||||
// Selected unit
|
// Selected unit
|
||||||
cache.unitToSatoshi = config.unitToSatoshi;
|
cache.unitToSatoshi = config.settings.unitToSatoshi;
|
||||||
cache.satToUnit = 1 / cache.unitToSatoshi;
|
cache.satToUnit = 1 / cache.unitToSatoshi;
|
||||||
cache.unitName = config.unitName;
|
cache.unitName = config.settings.unitName;
|
||||||
|
|
||||||
//STR
|
//STR
|
||||||
cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + cache.unitName;
|
cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + cache.unitName;
|
||||||
|
@ -227,8 +227,8 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
cache.pendingAmountStr = null;
|
cache.pendingAmountStr = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache.alternativeName = config.alternativeName;
|
cache.alternativeName = config.settings.alternativeName;
|
||||||
cache.alternativeIsoCode = config.alternativeIsoCode;
|
cache.alternativeIsoCode = config.settings.alternativeIsoCode;
|
||||||
|
|
||||||
rateService.whenAvailable(function() {
|
rateService.whenAvailable(function() {
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,16 @@
|
||||||
bottom: 49px;
|
bottom: 49px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
background-color: #f5f5f5;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue