use default contact icon for chrome app

This commit is contained in:
Javier 2017-01-05 16:58:58 -03:00 committed by Matias Alejo Garcia
commit 3ef0a93337
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
9 changed files with 35 additions and 9 deletions

View file

@ -1,8 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('addressbookListController', function($scope, $log, $timeout, addressbookService, lodash, popupService, gettextCatalog) {
angular.module('copayApp.controllers').controller('addressbookListController', function($scope, $log, $timeout, addressbookService, lodash, popupService, gettextCatalog, platformInfo) {
var contacts;
$scope.isChromeApp = platformInfo.isChromeApp;
var initAddressbook = function() {
addressbookService.list(function(err, ab) {

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, $state, $timeout, $stateParams, lodash, addressbookService, popupService, $ionicHistory) {
angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, $state, $timeout, $stateParams, lodash, addressbookService, popupService, $ionicHistory, platformInfo) {
$scope.isChromeApp = platformInfo.isChromeApp;
$scope.addressbookEntry = {};
$scope.addressbookEntry.name = $stateParams.name;
$scope.addressbookEntry.email = $stateParams.email;

View file

@ -7,6 +7,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
var satToBtc;
var SMALL_FONT_SIZE_LIMIT = 10;
var LENGTH_EXPRESSION_LIMIT = 19;
$scope.isChromeApp = platformInfo.isChromeApp;
$scope.$on('$ionicView.leave', function() {
angular.element($window).off('keydown');

View file

@ -1,11 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService) {
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo) {
var originalList;
var CONTACTS_SHOW_LIMIT;
var currentContactsPage;
$scope.isChromeApp = platformInfo.isChromeApp;
var updateList = function() {
CONTACTS_SHOW_LIMIT = 10;

View file

@ -130,4 +130,20 @@
display: block;
color: $mid-gray;
}
.big-icon-svg {
padding: 0 7px;
> .bg {
background-color: #f2f2f2;
border-radius: 50%;
width: 70px;
height: 70px;
box-shadow: 0px 1px 5px rgba($mid-gray, .1);
background-repeat: no-repeat;
background-clip: padding-box;
background-size: 103%;
&.green {
background: rgb(1, 209, 162);
}
}
}
}

View file

@ -37,7 +37,8 @@
<ion-item ng-repeat="addrEntry in addressbook"
class="item-icon-right item-avatar"
ui-sref="tabs.addressbook.view({address:addrEntry.address, email: addrEntry.email, name: addrEntry.name})">
<gravatar name="{{addrEntry.name}}" width="50" email="{{addrEntry.email}}"></gravatar>
<img src="img/contact-placeholder.svg" class="bg"/ ng-if="isChromeApp">
<gravatar name="{{addrEntry.name}}" width="50" email="{{addrEntry.email}}" ng-if="!isChromeApp"></gravatar>
<h2>{{addrEntry.name}}</h2>
<p>{{addrEntry.address}}</p>
<i class="icon bp-arrow-right"></i>

View file

@ -8,7 +8,10 @@
</ion-nav-bar>
<ion-content scroll="false">
<div class="gravatar-content">
<gravatar name="{{addressbookEntry.name}}" width="80" email="{{addressbookEntry.email}}"></gravatar>
<i class="icon big-icon-svg" ng-if="isChromeApp">
<img src="img/contact-placeholder.svg" class="bg"/>
</i>
<gravatar name="{{addressbookEntry.name}}" width="80" email="{{addressbookEntry.email}}" ng-if="!isChromeApp"></gravatar>
</div>
<div class="list">
<div class="item item-text-wrap">

View file

@ -22,7 +22,10 @@
<img src="img/icon-wallet.svg" ng-style="{'background-color': toColor}" class="bg"/>
</i>
<span ng-if="!isWallet && !isGiftCard && !isGlidera">
<gravatar ng-if="!cardId" class="send-gravatar" name="{{toName}}" height="30" width="30" email="{{toEmail}}"></gravatar>
<i class="icon big-icon-svg" ng-if="isChromeApp">
<img src="img/contact-placeholder.svg" class="bg"/>
</i>
<gravatar ng-if="!cardId && !isChromeApp" class="send-gravatar" name="{{toName}}" height="30" width="30" email="{{toEmail}}"></gravatar>
<i ng-if="cardId" class="icon big-icon-svg">
<div class="bg icon-bitpay-card"></div>
</i>

View file

@ -44,7 +44,8 @@
</a>
<a class="item item-icon-left item-icon-right" ng-repeat="item in list" ng-if="hasContacts && !item.isWallet" ng-click="goToAmount(item)">
<i class="icon big-icon-svg">
<gravatar class="send-gravatar" name="{{item.name}}" width="30" email="{{item.email}}"></gravatar>
<img src="img/contact-placeholder.svg" class="bg"/ ng-if="isChromeApp">
<gravatar class="send-gravatar" name="{{item.name}}" width="30" email="{{item.email}}" ng-if="!isChromeApp"></gravatar>
</i>
{{item.name}}
<i class="icon bp-arrow-right"></i>