Merge pull request #106 from gabrielbazan7/feat/avatarSendView

avatar in send view
This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-14 10:13:32 -03:00 committed by GitHub
commit d4b9fa99f2
10 changed files with 32 additions and 9 deletions

View file

@ -13,7 +13,7 @@
<div class="item item-no-bottom-border" translate>Recipient</div> <div class="item item-no-bottom-border" translate>Recipient</div>
<div class="item item-text-wrap item-icon-left bitcoin-address"> <div class="item item-text-wrap item-icon-left bitcoin-address">
<i class="icon ion-ios-person-outline"></i> <gravatar class="send-gravatar" name="{{toName}}" width="30" email="{{toEmail}}"></gravatar>
<span>{{toName || toAddress}}</span> <span>{{toName || toAddress}}</span>
</div> </div>
</div> </div>

View file

@ -1,4 +1,4 @@
<ion-view> <ion-view id="view-confirm">
<ion-nav-bar class="bar-royal"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i> <i class="icon ion-ios-arrow-thin-left"></i>
@ -23,7 +23,7 @@
</div> </div>
<div class="item item-icon-left"> <div class="item item-icon-left">
<i class="icon ion-ios-person-outline"></i> <gravatar class="send-gravatar" name="{{toName}}" width="30" email="{{toEmail}}"></gravatar>
<label translate>To</label> {{toAddress}} <label translate>To</label> {{toAddress}}
<p ng-show="toName">{{toName}}</p> <p ng-show="toName">{{toName}}</p>

View file

@ -24,7 +24,7 @@
<div class="item text-center" ng-show="!list[0]" translate>No Wallet - Contact</div> <div class="item text-center" ng-show="!list[0]" translate>No Wallet - Contact</div>
<a class="item item-icon-left" ng-repeat="item in list" ng-click="goToAmount(item)"> <a class="item item-icon-left" ng-repeat="item in list" ng-click="goToAmount(item)">
<i ng-show="item.isWallet" class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i> <i ng-show="item.isWallet" class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i>
<i ng-show="!item.isWallet" class="icon ion-ios-person-outline"></i> <gravatar class="send-gravatar" ng-show="!item.isWallet" name="{{item.name}}" width="30" email="{{item.email}}"></gravatar>
{{item.name}} {{item.name}}
</a> </a>
</div> </div>

View file

@ -50,6 +50,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.toAddress = $stateParams.toAddress; $scope.toAddress = $stateParams.toAddress;
$scope.toName = $stateParams.toName; $scope.toName = $stateParams.toName;
$scope.toEmail = $stateParams.toEmail;
var config = configService.getSync().wallet.settings; var config = configService.getSync().wallet.settings;
$scope.unitName = config.unitName; $scope.unitName = config.unitName;
@ -191,6 +192,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
toAmount: amount * unitToSatoshi, toAmount: amount * unitToSatoshi,
toAddress: $scope.toAddress, toAddress: $scope.toAddress,
toName: $scope.toName, toName: $scope.toName,
toEmail: $scope.toEmail
}); });
}; };
}); });

View file

@ -102,6 +102,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.toAddress = $stateParams.toAddress; $scope.toAddress = $stateParams.toAddress;
$scope.toName = $stateParams.toName; $scope.toName = $stateParams.toName;
$scope.toEmail = $stateParams.toEmail;
$scope.description = $stateParams.description; $scope.description = $stateParams.description;
$scope.paypro = $stateParams.paypro; $scope.paypro = $stateParams.paypro;

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $log, $timeout, addressbookService, profileService, lodash, $state, walletService, incomingData ) { angular.module('copayApp.controllers').controller('tabSendController', function($scope, $log, $timeout, addressbookService, profileService, lodash, $state, walletService, incomingData) {
var originalList; var originalList;
@ -30,6 +30,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
contacts.push({ contacts.push({
name: lodash.isObject(v) ? v.name : v, name: lodash.isObject(v) ? v.name : v,
address: k, address: k,
email: lodash.isObject(v) ? v.email : null,
getAddress: function(cb) { getAddress: function(cb) {
return cb(null, k); return cb(null, k);
}, },
@ -76,7 +77,8 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
$log.debug('Got toAddress:' + addr + ' | ' + item.name); $log.debug('Got toAddress:' + addr + ' | ' + item.name);
return $state.transitionTo('send.amount', { return $state.transitionTo('send.amount', {
toAddress: addr, toAddress: addr,
toName: item.name toName: item.name,
toEmail: item.email
}) })
}); });
}; };

View file

@ -235,7 +235,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
template: '<ion-nav-view name="send"></ion-nav-view>' template: '<ion-nav-view name="send"></ion-nav-view>'
}) })
.state('send.amount', { .state('send.amount', {
url: '/amount/:toAddress/:toName', url: '/amount/:toAddress/:toName/:toEmail',
views: { views: {
'send': { 'send': {
templateUrl: 'views/amount.html' templateUrl: 'views/amount.html'
@ -243,7 +243,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
} }
}) })
.state('send.confirm', { .state('send.confirm', {
url: '/confirm/:toAddress/:toName/:toAmount/:description/:paypro', url: '/confirm/:toAddress/:toName/:toAmount/:toEmail/:description/:paypro',
views: { views: {
'send': { 'send': {
templateUrl: 'views/confirm.html' templateUrl: 'views/confirm.html'

View file

@ -9,7 +9,11 @@
padding-left: 48px; padding-left: 48px;
} }
} }
.send-gravatar {
left: 11px;
position: absolute;
top: 10px;
}
.amount-pane { .amount-pane {
position: absolute; position: absolute;
top: 125px; top: 125px;

View file

@ -0,0 +1,9 @@
#view-confirm {
.send-gravatar {
left: 11px;
position: absolute;
top: 10px;
}
}

View file

@ -11,4 +11,9 @@
padding-bottom: 1px; padding-bottom: 1px;
} }
} }
.send-gravatar {
left: 11px;
position: absolute;
top: 10px;
}
} }