Merge branch 'ref/design' of https://github.com/bitpay/bitpay-wallet into feature/home_views_polish

# Conflicts:
#	public/views/tab-home.html
This commit is contained in:
Jamal Jackson 2016-09-27 13:43:36 -04:00
commit 28b6e312a7
19 changed files with 191 additions and 137 deletions

View file

@ -3,7 +3,7 @@
<button class="button button-clear" ng-click="cancel()"> <button class="button button-clear" ng-click="cancel()">
{{'Close' | translate}} {{'Close' | translate}}
</button> </button>
<div class="title" translate> <div class="title">
{{title}} {{title}}
</div> </div>
</ion-header-bar> </ion-header-bar>
@ -16,25 +16,26 @@
<img src="img/icon-wallet.svg" ng-style="{'background-color': color}" class="bg"/> <img src="img/icon-wallet.svg" ng-style="{'background-color': color}" class="bg"/>
</i> </i>
<div class="size-36" copy-to-clipboard="btx.amountStr"> <div class="size-36 m20t" copy-to-clipboard="btx.amountStr">
<span class="enable_text_select">{{btx.amountStr}}</span> {{btx.amountStr}}
</div> </div>
<div class="alternative-amount" ng-click="showRate =! showRate"> <div class="m10t" style="height:20px;" ng-click="showRate =! showRate">
<span class="label gray radius" ng-show="!showRate && alternativeAmountStr"> <span ng-show="!showRate && alternativeAmountStr">
{{alternativeAmountStr}} {{alternativeAmountStr}}
</span> </span>
<span class="size-12" ng-show="showRate && alternativeAmountStr"> <span ng-show="showRate && alternativeAmountStr">
{{rateStr}} ({{rateDate | amDateFormat:'MM/DD/YYYY HH:mm a'}}) {{rateStr}} ({{rateDate | amDateFormat:'MM/DD/YYYY HH:mm a'}})
</span> </span>
</div> </div>
</div> </div>
<div ng-show="btx.action == 'sent'"> <div ng-show="btx.action == 'sent'">
<span translate>Sent from</span> {{wallet.credentials.walletName}} <div>
<div class="padding-vertical"> <span translate>Sent from</span>
<i class="icon ion-ios-arrow-thin-down size-24"></i> <strong ng-style="{'color': color}">{{wallet.credentials.walletName}}</strong>
</div> </div>
<i class="icon ion-ios-arrow-thin-down size-24"></i>
</div> </div>
<div ng-show="btx.action == 'received'"> <div ng-show="btx.action == 'received'">
@ -63,27 +64,26 @@
</span> </span>
<span ng-if="!btx.merchant"> <span ng-if="!btx.merchant">
<span ng-show="btx.labelTo">{{btx.labelTo}}</span> <span ng-show="btx.labelTo">{{btx.labelTo}}</span>
<contact ng-show="!btx.labelTo" class="enable_text_select" address="{{btx.addressTo}}"></contact> <contact ng-show="!btx.labelTo" address="{{btx.addressTo}}"></contact>
</span> </span>
</div> </div>
</div> </div>
<div class="item item-icon-left" ng-click="openExternalLink('https://' + <div class="item item-icon-left"
(getShortNetworkName() == 'test' ? 'test-' : '') + 'insight.bitpay.com/tx/' + btx.txid)"> ng-click="openExternalLink('https://' + (getShortNetworkName() == 'test' ? 'test-' : '') + 'insight.bitpay.com/tx/' + btx.txid)">
<i class="icon ion-ios-upload-outline"></i> <i class="icon ion-ios-upload-outline"></i>
<span class="text-gray" translate>View transaction on the blockchain</span> <span class="text-gray" translate>View transaction on the blockchain</span>
</div> </div>
<div class="item"> <div class="item">
<div ng-if="btx.action == 'received' || 'moved'"> <div ng-if="btx.action == 'received' || btx.action == 'moved'">
<span translate>Date</span> {{'Date'|translate}}
<span class="item-note"> <span class="item-note">
<time>{{ btx.time * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time> <time>{{ btx.time * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
</span> </span>
</div> </div>
<div ng-if="btx.action == 'sent'"> <div ng-if="btx.action == 'sent'">
<div translate>Created by</div> {{'Created by'|translate}} <strong>{{btx.creatorName}}</strong>
<span>{{btx.creatorName}}</span>
<span class="item-note"> <span class="item-note">
<time>{{ btx.createdOn * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time> <time>{{ btx.createdOn * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
</span> </span>
@ -91,9 +91,8 @@
</div> </div>
<div class="item" ng-if="btx.action != 'received' && btx.feeLevel" copy-to-clipboard="btx.feeStr"> <div class="item" ng-if="btx.action != 'received' && btx.feeLevel" copy-to-clipboard="btx.feeStr">
<div translate>Fee</div> {{'Fee'|translate}}: {{btx.feeStr}}
<span class="enable_text_select">{{btx.feeLevel}} ({{btx.feeStr}})</span> <span class="item-note">
<span class="right">
<span class="text-warning" ng-show="!btx.confirmations || btx.confirmations == 0" translate> <span class="text-warning" ng-show="!btx.confirmations || btx.confirmations == 0" translate>
Unconfirmed Unconfirmed
</span> </span>
@ -108,20 +107,23 @@
</div> </div>
<div class="item" ng-if="btx.message && btx.action != 'received'" copy-to-clipboard="btx.message"> <div class="item" ng-if="btx.message && btx.action != 'received'" copy-to-clipboard="btx.message">
<div translate>Description</div> {{'Description'|translate}}
<span class="enable_text_select">{{btx.message}}</span> <span class="item-note">
{{btx.message}}
</span>
</div> </div>
<div ng-if="btx.merchant" class="item" copy-to-clipboard="btx.merchant.pr.pd.memo"> <div ng-if="btx.merchant" class="item" copy-to-clipboard="btx.merchant.pr.pd.memo">
<div translate>Merchant message</div> {{'Merchant message'|translate}}
<span class="enable_text_select"> <span class="item-note">
{{btx.merchant.pr.pd.memo}} {{btx.merchant.pr.pd.memo}}
</span> </span>
</div> </div>
<div ng-show="btx.hasMultiplesOutputs" class="item" ng-click="showMultiplesOutputs = !showMultiplesOutputs"> <div ng-show="btx.hasMultiplesOutputs" class="item" ng-click="showMultiplesOutputs = !showMultiplesOutputs">
<div translate>Recipients</div> {{'Recipients'|translate}}
<span class="right">{{btx.recipientCount}} <span class="item-note">
{{btx.recipientCount}}
<i ng-show="showMultiplesOutputs" class="icon-arrow-up3 size-24"></i> <i ng-show="showMultiplesOutputs" class="icon-arrow-up3 size-24"></i>
<i ng-show="!showMultiplesOutputs" class="icon-arrow-down3 size-24"></i> <i ng-show="!showMultiplesOutputs" class="icon-arrow-down3 size-24"></i>
</span> </span>
@ -138,21 +140,22 @@
</span> </span>
</div> </div>
<div class="item item-icon-right" ng-click="showCommentPopup()"> <div class="item" ng-click="showCommentPopup()">
<span class="text-gray" translate ng-if="!btx.note">Add Memo</i></span> {{'Memo'|translate}}
<span class="text-gray" translate ng-if="btx.note">Memo</span> <span class="item-note" translate ng-if="!btx.note">
<div ng-if="btx.note && btx.note.body"> <i class="icon ion-ios-plus-empty"></i>
<span class="enable_text_select">{{btx.note.body}}</span><br> </span>
<span class="text-italic item-note size-12"> <span class="item-note" ng-if="btx.note && btx.note.body">
<span translate>Edited by</span> <span>{{btx.note.editedByName}}</span>, {{btx.note.body}}
<time>{{btx.note.editedOn * 1000 | amTimeAgo}}</time></span> <div>
</span> <span translate>Edited by</span> {{btx.note.editedByName}},
</div> <time>{{btx.note.editedOn * 1000 | amTimeAgo}}</time>
</div>
</span>
</div> </div>
<div ng-if="actionList[0]"> <div ng-if="actionList[0]">
<div class="item item-divider" translate>Timeline</div> <div class="item item-divider" translate>Timeline</div>
<div class="item" ng-class="{'action-created' : a.type == 'created' || a.type == 'accept', 'action-rejected' : a.type == 'reject'}" ng-repeat="a in actionList track by $index"> <div class="item" ng-class="{'action-created' : a.type == 'created' || a.type == 'accept', 'action-rejected' : a.type == 'reject'}" ng-repeat="a in actionList track by $index">
<div class="row"> <div class="row">
<div class="col col-10"> <div class="col col-10">

View file

@ -22,32 +22,30 @@
<div class="amount">{{tx.amountStr}}</div> <div class="amount">{{tx.amountStr}}</div>
<div class="alternative" ng-show="tx.alternativeAmountStr">{{tx.alternativeAmountStr}}</div> <div class="alternative" ng-show="tx.alternativeAmountStr">{{tx.alternativeAmountStr}}</div>
</div> </div>
</div>
<div class="row" ng-if="tx.removed"> <div class="text-center m10t assertive" ng-if="tx.removed" translate>
<div class="column m20t text-center text-warning size-12" translate>
The payment was removed by creator The payment was removed by creator
</div> </div>
<div class="text-center m10t" ng-show="tx.status != 'pending'">
<div ng-show="tx.status == 'accepted' && !tx.isGlidera">
<div class="m10b positive" translate>Payment accepted, but not yet broadcasted</div>
<button class="button button-positive button-block" ng-click="broadcast(tx)" ng-disabled="loading">
<i class="icon ion-ios-cloud-upload-outline"></i>
<span translate>Broadcast Payment</span>
</button>
</div>
<div ng-show="tx.status == 'accepted' && tx.isGlidera" >
<div class="m10h" translate>Payment accepted. It will be broadcasted by Glidera. In case there is a problem, it can be deleted 6 hours after it was created.</div>
</div>
<div class="balanced" ng-show="tx.status == 'broadcasted'" translate>Payment Sent</div>
<div class="assertive" ng-show="tx.status=='rejected'" translate>Payment Rejected</div>
</div>
</div> </div>
<div ng-show="tx.status != 'pending'"> <div class="item assertive text-center" ng-show="!currentSpendUnconfirmed && tx.hasUnconfirmedInputs" translate>
<div ng-show="tx.status=='accepted' && !tx.isGlidera"> Warning: this transaction has unconfirmed inputs
<div class="m10b" translate>Payment accepted, but not yet broadcasted</div>
<button class="button button-balanced button-block" ng-style="{'background-color':color}" ng-click="broadcast(tx)" ng-disabled="loading">
<i class="fi-upload-cloud"></i>
<span translate>Broadcast Payment</span>
</button>
</div>
<div ng-show="tx.status=='accepted' && tx.isGlidera" >
<div class="m10h" translate>Payment accepted. It will be broadcasted by Glidera. In case there is a problem, it can be deleted 6 hours after it was created.</div>
</div>
<div class="balanced" ng-show="tx.status == 'broadcasted'" translate>Payment Sent</div>
<div class="assertive" ng-show="tx.status=='rejected'" translate>Payment Rejected</div>
</div>
<div class="item" ng-show="!currentSpendUnconfirmed && tx.hasUnconfirmedInputs">
<span class="text-warning" translate>Warning: this transaction has unconfirmed inputs</span>
</div> </div>
<div class="info"> <div class="info">
@ -55,7 +53,7 @@
<span translate>To</span> <span translate>To</span>
<span class="payment-proposal-to" copy-to-clipboard="tx.toAddress"> <span class="payment-proposal-to" copy-to-clipboard="tx.toAddress">
<i class="icon ion-social-bitcoin"></i> <i class="icon ion-social-bitcoin"></i>
<contact ng-if="!tx.hasMultiplesOutputs" class="enable_text_select ellipsis" address="{{tx.toAddress}}"></contact> <contact ng-if="!tx.hasMultiplesOutputs" class="ellipsis" address="{{tx.toAddress}}"></contact>
<span ng-if="tx.hasMultiplesOutputs" translate>Multiple recipients</span> <span ng-if="tx.hasMultiplesOutputs" translate>Multiple recipients</span>
</span> </span>
</div> </div>
@ -73,61 +71,61 @@
</div> </div>
<div class="item"> <div class="item">
<span translate>From</span> {{'From'|translate}}
<i class="icon big-icon-svg"> <span class="item-note">
<img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}" class="bg"/> <i class="icon big-icon-svg right">
</i> <img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}" class="bg"/>
<span> </i>
{{wallet.name}} <div class="m10t m55r">{{wallet.name}}</div>
</span> </span>
</div> </div>
<div class="item"> <div class="item">
<span translate>Created by</span> {{'Created by'|translate}}
<span> <span class="item-note">
{{tx.creatorName}} <time>{{ (tx.ts || tx.createdOn ) * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time> {{tx.creatorName}} <time>{{ (tx.ts || tx.createdOn ) * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
</span> </span>
</div> </div>
<div class="item" ng-show="tx.message"> <div class="item" ng-show="tx.message">
<span translate>Memo</span> {{'Memo'|translate}}
<span> <span class="item-note">
{{tx.message}} {{tx.message}}
</span> </span>
</div> </div>
<div class="item"> <div class="item">
<span translate>Fee</span> {{'Fee'|translate}}
<span> <span class="item-note">
{{tx.feeStr}} {{tx.feeStr}}
</span> </span>
</div> </div>
<div ng-if="tx.paypro"> <div ng-if="tx.paypro">
<div class="item item-divider" translate>Payment details</div> <div class="item item-divider" translate>Payment details</div>
<li class="item"> <div class="item">
<span class="text-gray" translate>To</span> {{'To'|translate}}
<span class="right"> <span class="item-note">
<span> <span>
<span ng-show="tx.merchant.pr.ca"><i class="fi-lock"></i> {{tx.paypro.domain}}</span> <span ng-show="tx.merchant.pr.ca"><i class="fi-lock"></i> {{tx.paypro.domain}}</span>
<span ng-show="!tx.merchant.pr.ca"><i class="fi-unlock"></i> {{tx.paypro.domain}}</span> <span ng-show="!tx.merchant.pr.ca"><i class="fi-unlock"></i> {{tx.paypro.domain}}</span>
</span> </span>
<contact address="{{tx.toAddress}}" ng-hide="tx.merchant"></contact> <contact address="{{tx.toAddress}}" ng-hide="tx.merchant"></contact>
</span> </span>
</li> </div>
<li class="item" ng-if="paymentExpired"> <div class="item" ng-if="paymentExpired">
<span class="text-gray" translate>Expired</span> {{'Expired'|translate}}
<span class="right text-alert"> <span class="item-note">
<time>{{tx.paypro.expires * 1000 | amTimeAgo }}</time> <time>{{tx.paypro.expires * 1000 | amTimeAgo }}</time>
</span> </span>
</li> </div>
<li class="item" ng-if="!paymentExpired"> <div class="item" ng-if="!paymentExpired">
<span class="text-gray" translate>Expires</span> {{'Expires'|translate}}
<span class="right"> <span class="item-note">
<time>{{expires}}</time> <time>{{expires}}</time>
</span> </span>
</li> </div>
<li class="item"> <div class="item">
<span class="text-gray" translate>Merchant Message</span> {{'Merchant Message'|translate}}
<span class="db">{{tx.paypro.pr.pd.memo}}</span> <span class="item-note">{{tx.paypro.pr.pd.memo}}</span>
</li> </div>
</div> </div>
<div ng-if="actionList[0]"> <div ng-if="actionList[0]">
<div class="item item-divider" translate>Timeline</div> <div class="item item-divider" translate>Timeline</div>
@ -151,16 +149,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class="m20t" ng-if="tx.canBeRemoved || (tx.status == 'accepted' && !tx.broadcastedOn)"> <button class="button button-block button-positive"
ng-click="sign()"
ng-if="tx.pendingForUs && canSign && !loading && !paymentExpired && !isCordova" translate>
Click to accept
</button>
<div class="m30t text-center" ng-if="tx.canBeRemoved || (tx.status == 'accepted' && !tx.broadcastedOn)">
<div class="size-12 padding" ng-show="!tx.isGlidera && isShared" translate> <div class="size-12 padding" ng-show="!tx.isGlidera && isShared" translate>
* A payment proposal can be deleted if 1) you are the creator, and no other copayer has signed, or 2) 24 hours have passed since the proposal was created. * A payment proposal can be deleted if 1) you are the creator, and no other copayer has signed, or 2) 24 hours have passed since the proposal was created.
</div> </div>
<button class="button button-assertive button-block" ng-click="remove()" ng-disabled="loading"> <button class="button button-assertive button-clear" ng-click="remove()" ng-disabled="loading">
<i class="fi-trash size-14 m5r"></i> <i class="fi-trash size-14 m5r"></i>
<span translate>Delete Payment Proposal</span> <span translate>Delete Payment Proposal</span>
</button> </button>
</div> </div>
<button class="button button-block button-positive" ng-click="approve()" ng-if="tx.pendingForUs && canSign && !loading && !paymentExpired && !isCordova" translate>Click to pay</button>
</ion-content> </ion-content>
<accept class="accept-slide" ng-if="tx.pendingForUs && canSign && !loading && !paymentExpired && isCordova"></accept> <accept class="accept-slide" ng-if="tx.pendingForUs && canSign && !loading && !paymentExpired && isCordova"></accept>
</ion-modal-view> </ion-modal-view>

View file

@ -25,7 +25,6 @@
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals" translate> <a class="item item-icon-right item-heading" ui-sref="tabs.proposals" translate>
Payment Proposals Payment Proposals
<i class="icon nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
<span class="badge badge-assertive" ng-if="txpsN>3" translate> {{txpsN}}</span> <span class="badge badge-assertive" ng-if="txpsN>3" translate> {{txpsN}}</span>
</a> </a>

View file

@ -31,7 +31,7 @@
</div> </div>
</article> </article>
<article ng-if="wallet.isComplete()"> <article ng-if="wallet.isComplete()">
<div class="row backup" ng-show="!wallet.showBackupNeededModal" ng-click="goToBackupFlow()"> <div class="row backup" ng-show="!wallet.showBackupNeededModal && wallet.needsBackup" ng-click="goToBackupFlow()">
<div class="m15t text-center col center-block"> <div class="m15t text-center col center-block">
<i class="icon ion-alert"></i><span translate>Wallet not backed up</span><i class="icon ion-ios-arrow-thin-right"></i> <i class="icon ion-alert"></i><span translate>Wallet not backed up</span><i class="icon ion-ios-arrow-thin-right"></i>
</div> </div>

View file

@ -4,45 +4,47 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content>
<div> <div class="item item-heading" translate>Recipient</div>
<div class="item item-heading" translate>Recipient</div> <label class="item item-input bitcoin-address">
<label class="item item-input bitcoin-address"> <i class="icon ion-social-bitcoin placeholder-icon"></i>
<i class="icon ion-search placeholder-icon"></i> <div class="qr-scan-icon" ng-style="{'width': '100%'}">
<div class="qr-scan-icon" ng-style="{'width': '100%'}"> <qr-scanner class="qr-icon size-24" ng-style="{'top': '3px'}" on-scan="onQrCodeScanned(data)"></qr-scanner>
<qr-scanner class="qr-icon size-24" ng-style="{'top': '3px'}" on-scan="onQrCodeScanned(data)"></qr-scanner> <input type="text"
<input type="text" placeholder="{{'Search or enter bitcoin address' | translate}}"
placeholder="Search or enter bitcoin address" ng-model="formData.search"
ng-model="formData.search" ng-change="findContact(formData.search)"
ng-change="findContact(formData.search)" ng-model-onblur>
ng-model-onblur> </div>
</div> </label>
</label>
</div>
<div class="card"> <div class="card">
<div class="item item-icon-right item-heading"> <div class="item item-icon-right item-heading">
<span translate>Contacts</span> <span translate>Contacts</span>
<a ui-sref="tabs.send.addressbook"><i class="icon ion-ios-plus-empty list-add-button"></i></a> <a ng-show="hasContacts" ui-sref="tabs.send.addressbook"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
</div> </div>
<a class="item item-icon-left ng-hide" ng-show="!hasContacts" ui-sref="tabs.send.addressbook"> <a class="item item-icon-left item-icon-right ng-hide" ng-show="!hasContacts" ui-sref="tabs.send.addressbook">
<gravatar class="send-gravatar" name="" width="30" email=""></gravatar> <gravatar class="send-gravatar" name="" width="30" email=""></gravatar>
<span translate>Add a Contact</span> <span translate>Add a Contact</span>
<i class="icon nav-item-arrow-right"></i>
</a> </a>
<a class="item item-icon-left ng-hide" ng-repeat="item in list" ng-show="hasContacts && !item.isWallet" ng-click="goToAmount(item)"> <a class="item item-icon-left item-icon-right ng-hide" ng-repeat="item in list" ng-show="hasContacts && !item.isWallet" ng-click="goToAmount(item)">
<gravatar class="send-gravatar" name="{{item.name}}" width="30" email="{{item.email}}"></gravatar> <gravatar class="send-gravatar" name="{{item.name}}" width="30" email="{{item.email}}"></gravatar>
{{item.name}} {{item.name}}
<i class="icon nav-item-arrow-right"></i>
</a> </a>
<div class="show-more" ng-show="contactsShowMore" ng-click="showMore()" translate>
Show more
</div>
</div> </div>
<div class="card"> <div class="card" ng-show="hasWallets && !oneWallet">
<div class="item item-heading"> <div class="item item-heading">
<span translate>Transfer to Wallet</span> <span translate>Transfer to Wallet</span>
</div> </div>
<div class="item text-center ng-hide" ng-show="!hasWallets" translate>No Wallet</div> <a class="item item-icon-left item-icon-right ng-hide" ng-repeat="item in list" ng-show="hasWallets && item.isWallet" ng-click="goToAmount(item)">
<a class="item item-icon-left ng-hide" ng-repeat="item in list" ng-show="hasWallets && item.isWallet" 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>
<gravatar class="send-gravatar" ng-show="!item.isWallet" name="{{item.name}}" width="30" email="{{item.email}}"></gravatar>
{{item.name}} {{item.name}}
<i class="icon nav-item-arrow-right"></i>
</a> </a>
</div> </div>
</ion-content> </ion-content>

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, gettext, txFormatService, ongoingProcess, $ionicModal, $ionicHistory, popupService) { angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, gettext, txFormatService, ongoingProcess, $ionicModal, popupService) {
var cachedTxp = {}; var cachedTxp = {};
var isChromeApp = platformInfo.isChromeApp; var isChromeApp = platformInfo.isChromeApp;

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('importController', angular.module('copayApp.controllers').controller('importController',
function($scope, $timeout, $log, $state, $stateParams, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog) { function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog) {
var isChromeApp = platformInfo.isChromeApp; var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel; var isDevel = platformInfo.isDevel;

View file

@ -126,6 +126,9 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
$scope.rateDate = res.fetchedOn; $scope.rateDate = res.fetchedOn;
$scope.rateStr = res.rate + ' ' + $scope.alternativeIsoCode; $scope.rateStr = res.rate + ' ' + $scope.alternativeIsoCode;
$scope.alternativeAmountStr = $filter('formatFiatAmount')(alternativeAmountBtc * res.rate) + ' ' + $scope.alternativeIsoCode; $scope.alternativeAmountStr = $filter('formatFiatAmount')(alternativeAmountBtc * res.rate) + ' ' + $scope.alternativeIsoCode;
$timeout(function() {
$scope.$apply();
});
} }
}); });
}; };

View file

@ -3,7 +3,7 @@
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $ionicHistory, $log, addressbookService) { angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $ionicHistory, $log, addressbookService) {
if ($scope.cb) $timeout($scope.cb, 100); if ($scope.cb) $timeout($scope.cb, 100);
$scope.fromSendTab = $ionicHistory.viewHistory().backView.stateName === "tabs.send.amount" || "tabs.send"; $scope.fromSendTab = $ionicHistory.viewHistory().backView && $ionicHistory.viewHistory().backView.stateName === "tabs.send.amount" ||  "tabs.send";
$scope.cancel = function() { $scope.cancel = function() {
$scope.txStatusModal.hide(); $scope.txStatusModal.hide();

View file

@ -7,6 +7,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
var isGlidera = $scope.isGlidera; var isGlidera = $scope.isGlidera;
var GLIDERA_LOCK_TIME = 6 * 60 * 60; var GLIDERA_LOCK_TIME = 6 * 60 * 60;
var now = Math.floor(Date.now() / 1000); var now = Math.floor(Date.now() / 1000);
var countDown;
$scope.init = function() { $scope.init = function() {
$scope.loading = null; $scope.loading = null;
@ -18,6 +19,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
$scope.data = {}; $scope.data = {};
initActionList(); initActionList();
checkPaypro();
} }
function initActionList() { function initActionList() {
@ -53,8 +55,6 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
$scope.sign(); $scope.sign();
}); });
checkPaypro();
// ToDo: use tx.customData instead of tx.message // ToDo: use tx.customData instead of tx.message
if (tx.message === 'Glidera transaction' && isGlidera) { if (tx.message === 'Glidera transaction' && isGlidera) {
tx.isGlidera = true; tx.isGlidera = true;
@ -154,7 +154,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
$scope.paymentExpired = false; $scope.paymentExpired = false;
setExpirationTime(); setExpirationTime();
self.countDown = $interval(function() { countDown = $interval(function() {
setExpirationTime(); setExpirationTime();
}, 1000); }, 1000);
@ -162,7 +162,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
var now = Math.floor(Date.now() / 1000); var now = Math.floor(Date.now() / 1000);
if (now > expirationTime) { if (now > expirationTime) {
$scope.paymentExpired = true; $scope.paymentExpired = true;
if (self.countDown) $interval.cancel(self.countDown); if (countDown) $interval.cancel(countDown);
return; return;
} }
var totalSecs = expirationTime - now; var totalSecs = expirationTime - now;

View file

@ -33,12 +33,16 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.addr = null; $scope.addr = null;
$scope.generatingAddress = true; $scope.generatingAddress = true;
$timeout(function() {
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
$scope.generatingAddress = false;
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
$scope.addr = addr;
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
$scope.$apply();
});
}, 100);
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
$scope.generatingAddress = false;
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
$scope.addr = addr;
});
}; };
$scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.$on("$ionicView.beforeEnter", function(event, data) {
@ -49,13 +53,9 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$log.debug('No wallet provided'); $log.debug('No wallet provided');
return; return;
} }
$timeout(function() { $scope.wallet = wallet;
$scope.wallet = wallet; $log.debug('Wallet changed: ' + wallet.name);
$log.debug('Wallet changed: ' + wallet.name); $scope.setAddress();
$scope.setAddress();
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
$scope.$apply();
});
}); });
}); });

View file

@ -1,8 +1,10 @@
'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, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData) {
var originalList; var originalList;
var CONTACTS_SHOW_LIMIT = 10;
var currentContactsPage = 0;
var updateList = function() { var updateList = function() {
originalList = []; originalList = [];
@ -11,6 +13,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
onlyComplete: true onlyComplete: true
}); });
$scope.hasWallets = lodash.isEmpty(wallets) ? false : true; $scope.hasWallets = lodash.isEmpty(wallets) ? false : true;
$scope.oneWallet = wallets.length == 1;
lodash.each(wallets, function(v) { lodash.each(wallets, function(v) {
originalList.push({ originalList.push({
@ -27,9 +30,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
if (err) $log.error(err); if (err) $log.error(err);
$scope.hasContacts = lodash.isEmpty(ab) ? false : true; $scope.hasContacts = lodash.isEmpty(ab) ? false : true;
var contacts = []; var completeContacts = [];
lodash.each(ab, function(v, k) { lodash.each(ab, function(v, k) {
contacts.push({ completeContacts.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, email: lodash.isObject(v) ? v.email : null,
@ -39,15 +42,23 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
}); });
}); });
var contacts = completeContacts.slice(0, (currentContactsPage + 1) * CONTACTS_SHOW_LIMIT);
$scope.contactsShowMore = completeContacts.length > contacts.length;
originalList = originalList.concat(contacts); originalList = originalList.concat(contacts);
$scope.list = lodash.clone(originalList); $scope.list = lodash.clone(originalList);
$timeout(function() { $timeout(function() {
$ionicScrollDelegate.resize();
$scope.$apply(); $scope.$apply();
}, 1); }, 10);
}); });
}; };
$scope.showMore = function() {
currentContactsPage++;
updateList();
};
$scope.findContact = function(search) { $scope.findContact = function(search) {
if (incomingData.redir(search)) { if (incomingData.redir(search)) {

View file

@ -31,6 +31,10 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro
'tabs.addressbook', 'tabs.addressbook',
'tabs.addressbook.add', 'tabs.addressbook.add',
'tabs.addressbook.view', 'tabs.addressbook.view',
'tabs.preferences.backupWarning',
'tabs.preferences.backup',
'tabs.receive.backupWarning',
'tabs.receive.backup',
]; ];
$rootScope.$on('$ionicView.beforeEnter', function() { $rootScope.$on('$ionicView.beforeEnter', function() {

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.services') angular.module('copayApp.services')
.factory('profileService', function profileServiceFactory($rootScope, $timeout, $filter, $log, sjcl, lodash, storageService, bwcService, configService, pushNotificationsService, gettext, gettextCatalog, bwcError, uxLanguage, platformInfo, $ionicHistory, txFormatService, $state) { .factory('profileService', function profileServiceFactory($rootScope, $timeout, $filter, $log, sjcl, lodash, storageService, bwcService, configService, pushNotificationsService, gettext, gettextCatalog, bwcError, uxLanguage, platformInfo, txFormatService, $state) {
var isChromeApp = platformInfo.isChromeApp; var isChromeApp = platformInfo.isChromeApp;
@ -118,7 +118,8 @@ angular.module('copayApp.services')
}); });
_showBackupNeededModal(wallet, function(val) { _showBackupNeededModal(wallet, function(val) {
wallet.showBackupNeededModal = val; if (wallet.needsBackup) wallet.showBackupNeededModal = val;
else wallet.showBackupNeededModal = false;
}); });
wallet.removeAllListeners(); wallet.removeAllListeners();

View file

@ -594,6 +594,10 @@ ul.wallet-selection.wallets {
margin-right: 40px; margin-right: 40px;
} }
.m55r {
margin-right: 55px;
}
.m25r { .m25r {
margin-right: 25px; margin-right: 25px;
} }

View file

@ -3,7 +3,7 @@
bottom: 100px; bottom: 100px;
} }
.head { .head {
padding-bottom: 55px; padding-bottom: 30px;
.sending-label{ .sending-label{
line-height: 70px; line-height: 70px;
font-size: 25px; font-size: 25px;

View file

@ -15,9 +15,14 @@
position: absolute; position: absolute;
bottom: 0; bottom: 0;
} }
@media (min-width: 400px){
.warning{
height:16rem;
}
}
} }
@media (max-width: 400px){ @media (max-width: 399px){
#onboarding-backup-request{ #onboarding-backup-request{
.warning{ .warning{
margin: 2rem auto 1rem; margin: 2rem auto 1rem;
@ -52,7 +57,7 @@
@media (min-height: 980px){ @media (min-height: 980px){
#onboarding-backup-request{ #onboarding-backup-request{
#arrow-down{ #arrow-down{
margin-top: 15rem; margin-top: 7rem;
} }
} }
} }

View file

@ -80,6 +80,19 @@
font-size:.8rem; font-size:.8rem;
} }
} }
@media (min-width: 400px){
&{
max-width: 400px;
label{
.checkbox{
left:1rem;
}
.item-content{
font-size: 1rem;
}
}
}
}
} }
} }
} }

View file

@ -16,4 +16,11 @@
position: absolute; position: absolute;
top: 10px; top: 10px;
} }
.show-more {
text-align: center;
padding: 20px;
font-size: 16px;
color: #387ef5;
font-weight: bold;
}
} }