Merge branch 'ref/design' of github.com:bitpay/bitpay-wallet into scanHandling
This commit is contained in:
commit
01d5e1d2eb
36 changed files with 332 additions and 145 deletions
|
|
@ -139,7 +139,6 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
|
|||
|
||||
$scope.wallets = profileService.getWallets({
|
||||
network: $scope.network,
|
||||
n: 1,
|
||||
onlyComplete: true
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,14 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $timeout, $stateParams, $ionicConfig, profileService, configService) {
|
||||
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $timeout, $stateParams, $ionicConfig, profileService, configService, $interval) {
|
||||
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
$scope.walletId = $stateParams.walletId;
|
||||
|
||||
$scope.allowNotif = function() {
|
||||
$scope.notificationDialogOpen = true;
|
||||
$timeout(function() {
|
||||
profileService.pushNotificationsInit();
|
||||
});
|
||||
$scope.notificationPromise = $interval(function() {
|
||||
PushNotification.hasPermission(function(data) {
|
||||
if (data.isEnabled) {
|
||||
$interval.cancel($scope.notificationPromise);
|
||||
$state.go('onboarding.backupRequest', {
|
||||
walletId: $scope.walletId
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
|
||||
$scope.continue = function() {
|
||||
$interval.cancel($scope.notificationPromise);
|
||||
$state.go('onboarding.backupRequest', {
|
||||
walletId: $scope.walletId
|
||||
});
|
||||
|
|
|
|||
|
|
@ -113,10 +113,13 @@ angular.module('copayApp.directives')
|
|||
}
|
||||
}
|
||||
})
|
||||
.directive('contact', ['addressbookService', 'lodash',
|
||||
function(addressbookService, lodash) {
|
||||
.directive('contact', ['addressbookService', 'lodash', 'gettextCatalog',
|
||||
function(addressbookService, lodash, gettextCatalog) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
label: '='
|
||||
},
|
||||
link: function(scope, element, attrs) {
|
||||
var addr = attrs.address;
|
||||
addressbookService.get(addr, function(err, ab) {
|
||||
|
|
@ -124,7 +127,11 @@ angular.module('copayApp.directives')
|
|||
var name = lodash.isObject(ab) ? ab.name : ab;
|
||||
element.append(name);
|
||||
} else {
|
||||
element.append(addr);
|
||||
if (scope.label && scope.label == 'Sent') {
|
||||
element.append(gettextCatalog.getString('Sent'));
|
||||
} else {
|
||||
element.append(addr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,10 @@ angular.module('copayApp.directives')
|
|||
email: '@'
|
||||
},
|
||||
link: function(scope, el, attr) {
|
||||
scope.emailHash = md5.createHash(scope.email || '');
|
||||
if(typeof scope.email === "string"){
|
||||
scope.emailHash = md5.createHash(scope.email.toLowerCase() || '');
|
||||
}
|
||||
},
|
||||
template: '<img class="gravatar" alt="{{ name }}" height="{{ height }}" width="{{ width }}" src="https://secure.gravatar.com/avatar/{{ emailHash }}.jpg?s={{ width }}&d=mm">'
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
reconnectDelay: 5000,
|
||||
idleDurationMin: 4,
|
||||
settings: {
|
||||
unitName: 'bits',
|
||||
unitName: 'BTC',
|
||||
unitToSatoshi: 100,
|
||||
unitDecimals: 2,
|
||||
unitCode: 'bit',
|
||||
unitCode: 'btc',
|
||||
alternativeName: 'US Dollar',
|
||||
alternativeIsoCode: 'USD',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -601,6 +601,16 @@ angular.module('copayApp.services')
|
|||
$log.debug('Importing Wallet:', opts);
|
||||
|
||||
try {
|
||||
var c = JSON.parse(str);
|
||||
|
||||
if (c.xPrivKey && c.xPrivKeyEncrypted) {
|
||||
$log.warn('Found both encrypted and decrypted key. Deleting the encrypted version');
|
||||
delete c.xPrivKeyEncrypted;
|
||||
delete c.mnemonicEncrypted;
|
||||
}
|
||||
|
||||
str = JSON.stringify(c);
|
||||
|
||||
walletClient.import(str, {
|
||||
compressed: opts.compressed,
|
||||
password: opts.password
|
||||
|
|
@ -609,14 +619,6 @@ angular.module('copayApp.services')
|
|||
return cb(gettext('Could not import. Check input file and spending password'));
|
||||
}
|
||||
|
||||
str = JSON.parse(str);
|
||||
|
||||
if (str.xPrivKey && str.xPrivKeyEncrypted) {
|
||||
$log.warn('Found both encrypted and decrypted key. Deleting the encrypted version');
|
||||
delete str.xPrivKeyEncrypted;
|
||||
delete str.mnemonicEncrypted;
|
||||
}
|
||||
|
||||
var addressBook = str.addressBook || {};
|
||||
|
||||
addAndBindWalletClient(walletClient, {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@
|
|||
position: absolute;
|
||||
bottom: 254px;
|
||||
top: 66px;
|
||||
.light {
|
||||
color: #A4A4A4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +87,8 @@
|
|||
|
||||
.operator-send {
|
||||
font-weight: bolder;
|
||||
background-color: #f7f7f7;
|
||||
color: #f8f8f8;
|
||||
background-color: #1e3186;
|
||||
font-size: 36px;
|
||||
cursor: pointer;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#tab-home {
|
||||
.icon-create-wallet {
|
||||
background-image: url("../img/icon-wallet.svg");
|
||||
background-color: #4A90E2; // default wallet color
|
||||
}
|
||||
.icon-buy-bitcoin {
|
||||
|
|
@ -16,19 +15,17 @@
|
|||
.icon-amazon {
|
||||
background-image: url("../img/icon-amazon.svg");
|
||||
}
|
||||
.bg {
|
||||
&.wallet{
|
||||
padding: .25rem
|
||||
}
|
||||
}
|
||||
.card{
|
||||
.item {
|
||||
color: #444;
|
||||
border-top:none;
|
||||
padding-bottom: 1.5rem;
|
||||
padding-top:1.5rem;
|
||||
&.wallet{
|
||||
.big-icon-svg{
|
||||
& > .bg{
|
||||
padding: .25rem
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-sub {
|
||||
&:first-child:before {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,30 @@
|
|||
.wallet-details {
|
||||
&__tx-amount {
|
||||
font-size: 16px;
|
||||
&--recent {
|
||||
color: $mid-gray;
|
||||
font-weight: bold;
|
||||
}
|
||||
&--received {
|
||||
color: #30af6c;
|
||||
}
|
||||
&--sent {
|
||||
color: $dark-gray;
|
||||
}
|
||||
}
|
||||
&__tx-time {
|
||||
color: $light-gray;
|
||||
}
|
||||
&__tx-title {
|
||||
padding-top: 10px;
|
||||
color: $dark-gray;
|
||||
}
|
||||
&__tx-icon {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
#walletDetails {
|
||||
.bar-header {
|
||||
border: 0;
|
||||
|
|
@ -31,23 +58,8 @@
|
|||
.item.item-footer {
|
||||
font-weight: lighter;
|
||||
}
|
||||
}
|
||||
|
||||
.wallet-details-release {
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
background-color: #E9E9EC;
|
||||
margin-top: -30px;
|
||||
margin-bottom: 5px;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
text-color: #444;
|
||||
span {
|
||||
margin-left: 15px;
|
||||
}
|
||||
i {
|
||||
margin-right: 15px;
|
||||
.tx-search:before {
|
||||
font-size: 22px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue