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'; '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; var contacts;
$scope.isChromeApp = platformInfo.isChromeApp;
var initAddressbook = function() { var initAddressbook = function() {
addressbookService.list(function(err, ab) { addressbookService.list(function(err, ab) {

View file

@ -1,7 +1,7 @@
'use strict'; '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 = {};
$scope.addressbookEntry.name = $stateParams.name; $scope.addressbookEntry.name = $stateParams.name;
$scope.addressbookEntry.email = $stateParams.email; $scope.addressbookEntry.email = $stateParams.email;

View file

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

View file

@ -1,11 +1,11 @@
'use strict'; '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 originalList;
var CONTACTS_SHOW_LIMIT; var CONTACTS_SHOW_LIMIT;
var currentContactsPage; var currentContactsPage;
$scope.isChromeApp = platformInfo.isChromeApp;
var updateList = function() { var updateList = function() {
CONTACTS_SHOW_LIMIT = 10; CONTACTS_SHOW_LIMIT = 10;

View file

@ -130,4 +130,20 @@
display: block; display: block;
color: $mid-gray; 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" <ion-item ng-repeat="addrEntry in addressbook"
class="item-icon-right item-avatar" class="item-icon-right item-avatar"
ui-sref="tabs.addressbook.view({address:addrEntry.address, email: addrEntry.email, name: addrEntry.name})"> 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> <h2>{{addrEntry.name}}</h2>
<p>{{addrEntry.address}}</p> <p>{{addrEntry.address}}</p>
<i class="icon bp-arrow-right"></i> <i class="icon bp-arrow-right"></i>

View file

@ -8,7 +8,10 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content scroll="false"> <ion-content scroll="false">
<div class="gravatar-content"> <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>
<div class="list"> <div class="list">
<div class="item item-text-wrap"> <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"/> <img src="img/icon-wallet.svg" ng-style="{'background-color': toColor}" class="bg"/>
</i> </i>
<span ng-if="!isWallet && !isGiftCard && !isGlidera"> <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"> <i ng-if="cardId" class="icon big-icon-svg">
<div class="bg icon-bitpay-card"></div> <div class="bg icon-bitpay-card"></div>
</i> </i>

View file

@ -44,7 +44,8 @@
</a> </a>
<a class="item item-icon-left item-icon-right" ng-repeat="item in list" ng-if="hasContacts && !item.isWallet" ng-click="goToAmount(item)"> <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"> <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> </i>
{{item.name}} {{item.name}}
<i class="icon bp-arrow-right"></i> <i class="icon bp-arrow-right"></i>