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

This commit is contained in:
Jamal Jackson 2016-09-28 13:46:03 -04:00
commit 7ab4756e78
69 changed files with 1127 additions and 672 deletions

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,63 @@
<ion-view id="advanced-settings" class="settings">
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Advanced Settings' | translate}}</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<div class="list">
<div class="item item-divider" translate>Enabled Integrations</div>
<ion-toggle ng-show="!isWP" ng-model="bitpayCardEnabled.value" toggle-class="toggle-balanced" ng-change="bitpayCardChange()">
<span class="toggle-label" translate>Enable Bitpay Card Integration</span>
</ion-toggle>
<ion-toggle ng-show="!isWP" ng-model="amazonEnabled.value" toggle-class="toggle-balanced" ng-change="amazonChange()">
<span class="toggle-label" translate>Enable Amazon Integration</span>
</ion-toggle>
<ion-toggle ng-show="!isWP" ng-model="glideraEnabled.value" toggle-class="toggle-balanced" ng-change="glideraChange()">
<span class="toggle-label" translate>Enable Glidera Service</span>
</ion-toggle>
<!-- disable coinbase for this release -->
<!-- <ion-toggle ng-show="!isWP" ng-model="coinbaseEnabled" toggle-class="toggle-balanced" ng-change="coinbaseChange()">
<span class="toggle-label" translate>Enable Coinbase Service</span>
</ion-toggle> -->
<div class="item item-divider" translate>Wallet Operation</div>
<ion-toggle ng-model="spendUnconfirmed.value" toggle-class="toggle-balanced" ng-change="spendUnconfirmedChange()">
<span class="toggle-label" translate>Use Unconfirmed Funds</span>
</ion-toggle>
<div class="comment">
<span translate>If enabled, wallets will also try to spend unconfirmed funds. This option may cause transaction delays.</span>
</div>
<div class="item item-divider" translate>Experimental Features</div>
<div class="divider-comment">
<span translate>These features aren't quite ready for primetime. They may change, stop working, or disappear at any time.</span>
</div>
<ion-toggle ng-show="!isWP" ng-model="recentTransactionsEnabled.value" toggle-class="toggle-balanced" ng-change="recentTransactionsChange()">
<span class="toggle-label" translate>Recent Transaction Card</span>
</ion-toggle>
<div class="comment">
<span transaction>If enabled, the Recent Transactions card - a list of transactions occuring across all wallets - will appear in the Home tab.</span>
</div>
<!-- disable frequently used for this release -->
<!-- <ion-toggle ng-show="!isWP" ng-model="frequentlyUsedEnabled.value" toggle-class="toggle-balanced" ng-change="frequentlyUsedChange()">
<span class="toggle-label" translate>Frequently Used Card</span>
</ion-toggle>
<div ng-style="{'padding':'15px', 'background-color': '#fff', 'color': 'rgba(74, 74, 74, 0.8)'}">
<span transaction>If enabled, the Frequently Used card - a list of the most commonly chosen recipients - will appear in the Send tab.</span>
</div> -->
</div>
</ion-content>
</ion-view>

View File

@ -1,10 +1,10 @@
<ion-view id="wallet-backup-phrase" title="{{viewTitle}}">
<ion-view id="wallet-backup-phrase">
<ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary">
<button class="button button-back button-clear" ng-click="backupGoBack()">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-title>
{{viewTitle}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<div class="ng-hide" ng-show="deleted">

View File

@ -1,7 +1,7 @@
<ion-view id="onboarding-backup-warning" class="onboarding" ng-controller="backupWarningController">
<ion-view id="backup-warning" class="onboarding" ng-controller="backupWarningController">
<ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary">
<button class="button button-back button-clear" href ui-sref="onboarding.backupRequest({walletId: walletId})">
<button class="button button-back button-clear" ng-click="goBack()">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
@ -18,7 +18,7 @@
</p>
</div>
<div class="row">
<img src="img/onboarding-backup-warning.svg" class="col col-60 warning-image">
<img src="img/backup-warning.svg" class="col col-60 warning-image">
</div>
<div class="row text-center">
<p class="col col-60">

View File

@ -0,0 +1,27 @@
<div id="backup-needed-modal" class="popup-modal">
<div class="popup-modal-header popup-modal-header-warning">
<div class="popup-modal-header-img-warning popup-modal-header-img"></div>
</div>
<div class="popup-modal-content popup-modal-content-warning">
<div class="text-center">
<h5 translate>Backup Needed</h5>
<p translate>Now is a good time to backup your wallet. If this device is lost, it is impossible to access your funds without a backup.</p>
<div class="row">
<div class="col">
<button
class="button button-clear expand"
ng-click="close()"
translate>Not now
</button>
</div>
<div class="col">
<button
class="button button-clear expand"
ng-click="doBackup()"
translate>Backup wallet now
</button>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,5 @@
<div id="screenshot-warning-modal" class="popup-modal">
<div class="popup-modal-header">
<div class="popup-modal-header-success">
<div class="popup-modal-header-img"></div>
</div>
<div class="popup-modal-content" ng-class="{'popup-modal-content-success': !backupError, 'popup-modal-content-fail': backupError}">

View File

@ -8,10 +8,6 @@
<span class="item-note m10l" ng-show="wallet.n > 1 && wallet.isComplete()">
{{wallet.m}}-of-{{wallet.n}}
</span>
<span class="badge badge-assertive" ng-show="!wallet.isComplete()" translate>
Incomplete
</span>
<!-- <i ng-show="wallet.needsBackup" class="icon ion-android-warning assertive"></i> -->
</div>
</div>
</ion-slide-page>

View File

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

View File

@ -22,32 +22,30 @@
<div class="amount">{{tx.amountStr}}</div>
<div class="alternative" ng-show="tx.alternativeAmountStr">{{tx.alternativeAmountStr}}</div>
</div>
</div>
<div class="row" ng-if="tx.removed">
<div class="column m20t text-center text-warning size-12" translate>
<div class="text-center m10t assertive" ng-if="tx.removed" translate>
The payment was removed by creator
</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 ng-show="tx.status != 'pending'">
<div ng-show="tx.status=='accepted' && !tx.isGlidera">
<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 class="item assertive text-center" ng-show="!currentSpendUnconfirmed && tx.hasUnconfirmedInputs" translate>
Warning: this transaction has unconfirmed inputs
</div>
<div class="info">
@ -55,7 +53,7 @@
<span translate>To</span>
<span class="payment-proposal-to" copy-to-clipboard="tx.toAddress">
<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>
</div>
@ -73,61 +71,61 @@
</div>
<div class="item">
<span translate>From</span>
<i class="icon big-icon-svg">
<img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}" class="bg"/>
</i>
<span>
{{wallet.name}}
{{'From'|translate}}
<span class="item-note">
<i class="icon big-icon-svg right">
<img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}" class="bg"/>
</i>
<div class="m10t m55r">{{wallet.name}}</div>
</span>
</div>
<div class="item">
<span translate>Created by</span>
<span>
{{'Created by'|translate}}
<span class="item-note">
{{tx.creatorName}} <time>{{ (tx.ts || tx.createdOn ) * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
</span>
</div>
<div class="item" ng-show="tx.message">
<span translate>Memo</span>
<span>
{{'Memo'|translate}}
<span class="item-note">
{{tx.message}}
</span>
</div>
<div class="item">
<span translate>Fee</span>
<span>
{{'Fee'|translate}}
<span class="item-note">
{{tx.feeStr}}
</span>
</div>
<div ng-if="tx.paypro">
<div class="item item-divider" translate>Payment details</div>
<li class="item">
<span class="text-gray" translate>To</span>
<span class="right">
<div class="item">
{{'To'|translate}}
<span class="item-note">
<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>
<contact address="{{tx.toAddress}}" ng-hide="tx.merchant"></contact>
</span>
</li>
<li class="item" ng-if="paymentExpired">
<span class="text-gray" translate>Expired</span>
<span class="right text-alert">
</div>
<div class="item" ng-if="paymentExpired">
{{'Expired'|translate}}
<span class="item-note">
<time>{{tx.paypro.expires * 1000 | amTimeAgo }}</time>
</span>
</li>
<li class="item" ng-if="!paymentExpired">
<span class="text-gray" translate>Expires</span>
<span class="right">
</div>
<div class="item" ng-if="!paymentExpired">
{{'Expires'|translate}}
<span class="item-note">
<time>{{expires}}</time>
</span>
</li>
<li class="item">
<span class="text-gray" translate>Merchant Message</span>
<span class="db">{{tx.paypro.pr.pd.memo}}</span>
</li>
</div>
<div class="item">
{{'Merchant Message'|translate}}
<span class="item-note">{{tx.paypro.pr.pd.memo}}</span>
</div>
</div>
<div ng-if="actionList[0]">
<div class="item item-divider" translate>Timeline</div>
@ -151,16 +149,20 @@
</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>
* 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>
<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>
<span translate>Delete Payment Proposal</span>
</button>
</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>
<accept class="accept-slide" ng-if="tx.pendingForUs && canSign && !loading && !paymentExpired && isCordova"></accept>
</ion-modal-view>

View File

@ -19,7 +19,7 @@
<div class="cta-buttons">
<div class="row">
<button class="button button-block button-positive col-75 col" href
ui-sref="onboarding.backupWarning({walletId: walletId})" translate>Backup wallet</button>
ui-sref="onboarding.backupWarning({from: 'onboarding.backupRequest', walletId: walletId})" translate>Backup wallet</button>
</div>
<div class="row">
<button class="button button-block button-transparent col-75 col" ng-click="openPopup()" translate>I'll backup my wallet later</button>

View File

@ -13,9 +13,11 @@
<ion-checkbox ng-model="accept2"><span translate>I understand if this app moved to another device or deleted, my bitcoin can only be recovered with the backup phrase</span></ion-checkbox>
</ion-list>
<div id="agree-to-terms" ng-if="accept1 && accept2">
<ion-checkbox ng-model="terms.accept3"></ion-checkbox>
<p translate>I have read, understood, and agree with the <a ng-click="openTermsModal()" translate>Terms of use</a>.</p>
<button ng-disabled="!accept1 || !accept2 || !terms.accept3" class="button button-block button-positive" ng-click="confirm()" translate>Confirm & Finish</button>
<div id="agree-to-terms-content" class="center-block">
<ion-checkbox ng-model="terms.accept3"></ion-checkbox>
<p translate>I have read, understood, and agree with the <a ng-click="openTermsModal()" translate>Terms of use</a>.</p>
<button ng-disabled="!accept1 || !accept2 || !terms.accept3" class="button button-block button-positive" ng-click="confirm()" translate>Confirm & Finish</button>
</div>
</div>
</ion-content>
</ion-view>

View File

@ -40,7 +40,7 @@
<div class="item item-divider" translate>
Security
</div>
<a class="item item-icon-right" ui-sref="tabs.preferences.backup" ng-hide="wallet.isPrivKeyExternal()">
<a class="item item-icon-right" ui-sref="tabs.preferences.backupWarning({from: 'tabs.preferences'})" ng-hide="wallet.isPrivKeyExternal()">
<span translate>Backup</span>
<i class="icon nav-item-arrow-right"></i>
</a>

View File

@ -1,5 +1,6 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{title}}</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>

View File

@ -5,13 +5,17 @@
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<div class="card">
<h1 class="text-center" translate>Warning!</h2>
<div class="assertive padding" translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div>
<div class="text-center padding">
<span ng-show="alias">{{alias}}</span>{{walletName}}
<div class="white-bg padding">
<h1 class="text-center assertive" translate>Warning!</h2>
<div class="padding text-center">
<p translate>
Permanently delete this wallet.
</p>
<p translate class="bold-text">
THIS ACTION CANNOT BE REVERSED
</p>
</div>
</div>
<button class="button button-block button-assertive" ng-click="showDeletePopup()"translate>Delete</button>
<button class="button button-block button-assertive" ng-click="showDeletePopup()"translate>Delete <span ng-show="alias">{{alias}}</span>{{walletName}}</button>
</ion-content>
</ion-view>

View File

@ -0,0 +1,29 @@
<ion-view id="tab-notifications" class="settings">
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Notifications' | translate}}</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<div class="list">
<div ng-show="PNEnabledByUser">
<div class="item item-divider" translate>Notifications</div>
<ion-toggle ng-model="pushNotifications.value" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
<span class="toggle-label" translate>Enable push notifications</span>
</ion-toggle>
</div>
<div ng-show="!PNEnabledByUser && isIOSApp">
<div class="item item-divider" translate>Notifications</div>
<div class="padding text-light" translate>
Push notifications for Copay are currently disabled. Enable them in the Settings app.
</div>
<a class="item" ng-click="openSettings()">
<span translate>Open Settings app</span>
</a>
</div>
</div>
</ion-content>
</ion-view>

View File

@ -4,7 +4,7 @@
</ion-nav-bar>
<ion-content class="padding">
<div class="list card homeTip" ng-show="homeTip">
<div class="list card homeTip" ng-if="homeTip">
<div class="item item-icon-right item-heading">
<a ng-click="hideHomeTip()"><i class="icon ion-ios-close-empty close-home-tip"></i></a>
</div>
@ -22,11 +22,10 @@
</div>
<div class="list card" ng-hide="!txps[0]">
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals" translate>
Payment Proposals
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals">
{{'Payment Proposals'|translate}}
<i class="icon nav-item-arrow-right"></i>
<span class="badge badge-assertive" ng-show="txpsN>3" translate> {{txpsN}}</span>
<span class="badge badge-assertive m5t m10r" ng-show="txpsN>3"> {{txpsN}}</span>
</a>
<a ng-repeat="tx in txps" class="item" ng-click="openTxpModal(tx)">
@ -34,9 +33,9 @@
</a>
</div>
<div class="list card" ng-if="notifications[0]">
<div class="list card" ng-if="notifications[0] && recentTransactions">
<a class="item item-icon-right item-heading" ui-sref="tabs.activity">
<span translate>Recent Activity</span>
<span translate>Recent Transactions</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<span ng-if="fetchingNotifications" class="item text-center">
@ -61,24 +60,24 @@
</i>
<h2>
{{wallet.name || wallet.id}}
<span class="size-12 text-light" ng-show="wallet.n > 1">
<span class="size-12 text-light" ng-if="wallet.n > 1">
{{wallet.m}}-of-{{wallet.n}}
</span>
</h2>
<p>
<span ng-show="!wallet.isComplete()" class="assertive" translate>
<span ng-if="!wallet.isComplete()" class="assertive" translate>
Incomplete
</span>
<div ng-show="wallet.isComplete()">
<span ng-show="!wallet.balanceHidden">{{wallet.status.availableBalanceStr}}</span>
<span ng-show="wallet.balanceHidden" translate>[Balance Hidden]</span>
<div ng-if="wallet.isComplete()">
<span ng-if="!wallet.balanceHidden">{{wallet.status.availableBalanceStr}}</span>
<span ng-if="wallet.balanceHidden" translate>[Balance Hidden]</span>
</div>
</p>
<i class="icon nav-item-arrow-right"></i>
</a>
<a ui-sref="bitpayCard.main"
ng-show="externalServices.BitpayCard"
ng-if="externalServices.BitpayCard"
class="item item-icon-left item-big-icon-left item-icon-right">
<i class="icon big-icon-svg">
<div class="bg icon-bitpay-card"></div>
@ -89,22 +88,22 @@
</a>
</div>
<div class="list card" ng-show="externalServices.BuyAndSell && (glideraEnabled || coinbaseEnabled)">
<div class="list card" ng-if="externalServices.BuyAndSell && (glideraEnabled || coinbaseEnabled)">
<div class="item item-icon-right item-heading" translate>
Buy &amp; Sell Bitcoin
<a ui-sref="tabs.buyandsell"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
</div>
<a ng-show="glideraEnabled" ui-sref="tabs.buyandsell.glidera" class="item item-icon-right">
<a ng-if="glideraEnabled" ui-sref="tabs.buyandsell.glidera" class="item item-icon-right">
<img src="img/glidera-logo.png" width="90"/>
<i class="icon nav-item-arrow-right"></i>
</a>
<!-- disable coinbase for this release -->
<!-- <a ng-show="coinbaseEnabled" ui-sref="exchange.coinbase" class="item">
<!-- <a ng-if="coinbaseEnabled" ui-sref="exchange.coinbase" class="item">
<img src="img/coinbase-logo.png" width="90"> TODO
</a> -->
</div>
<div class="list card" ng-show="externalServices.AmazonGiftCards">
<div class="list card" ng-if="externalServices.AmazonGiftCards">
<a class="item item-icon-left item-icon-right item-big-icon-left" ui-sref="tabs.giftcards.amazon">
<i class="icon big-icon-svg">
<div class="bg icon-gift"></div>
@ -115,38 +114,42 @@
</div>
<div class="list card"
ng-show="!externalServices.AmazonGiftCards || !externalServices.BitpayCard || !externalServices.BuyAndSell || !wallets[0]">
<div class="item item-heading" translate>
ng-if="(!externalServices.AmazonGiftCards || !externalServices.BitpayCard || !externalServices.BuyAndSell || !wallets[0]) && nextStepEnabled">
<div class="item item-icon-right item-heading" ng-click="shouldHideNextSteps()" translate>
Next steps
<i class="icon nav-item-arrow-down" ng-if="!hideNextSteps"></i>
<i class="icon nav-item-arrow-up" ng-if="hideNextSteps"></i>
</div>
<div ng-if="hideNextSteps">
<a ng-if="!wallets[0]" ui-sref="tabs.add" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-create-wallet"></div>
</i>
<span translate>Create a bitcoin wallet</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<a ui-sref="bitpayCard.main" ng-if="!externalServices.BitpayCard && bitpayCardEnabled" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-bitpay-card"></div>
</i>
<span translate>Add BitPay Card</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<a ng-if="!externalServices.BuyAndSell && (coinbaseEnabled || glideraEnabled)" ui-sref="tabs.buyandsell" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-buy-bitcoin"></div>
</i>
<span translate>Buy or Sell Bitcoin</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<a ui-sref="tabs.giftcards.amazon" ng-if="!externalServices.AmazonGiftCards && amazonEnabled" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-gift"></div>
</i>
<span translate>Buy Amazon.com Gift Card</span>
<i class="icon nav-item-arrow-right"></i>
</a>
</div>
<a ng-if="!wallets[0]" ui-sref="tabs.add" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-create-wallet"></div>
</i>
<span translate>Create a bitcoin wallet</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<a ui-sref="bitpayCard.main" ng-if="!externalServices.BitpayCard" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-bitpay-card"></div>
</i>
<span translate>Add BitPay Card</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<a ng-if="!externalServices.BuyAndSell" ui-sref="tabs.buyandsell" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-buy-bitcoin"></div>
</i>
<span translate>Buy or Sell Bitcoin</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<a ui-sref="tabs.giftcards.amazon" ng-if="!externalServices.AmazonGiftCards" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-gift"></div>
</i>
<span translate>Buy Amazon.com Gift Card</span>
<i class="icon nav-item-arrow-right"></i>
</a>
</div>
<p class="padding" style="text-align:center; color:#999">

View File

@ -8,42 +8,67 @@
</ion-nav-buttons>
</ion-nav-bar>
<ion-content>
<article id="address">
<div class="row">
<div class="m15t text-center col center-block" copy-to-clipboard="addr">
<qrcode ng-if="addr" size="220" data="bitcoin:{{addr}}"></qrcode>
<div ng-if="!addr" style="height:220px; width:220px; margin:auto; background: white; padding-top: 20%;">
...
<div id="address">
<article class="text-center" ng-if="!wallet.isComplete()">
<div class="incomplete">
<div class="title">
<span translate>Incomplete wallet</span>
</div>
<div ng-if="wallet.needsBackup" class="assertive m10t" translate>
Before receiving funds, you must backup your wallet. If this device is lost, it is impossible to access your funds without a backup.
<div class="subtitle">
<span translate>All signing devices must be added to this multisig wallet before bitcoin addresses can be created.</span>
</div>
<div>
<button class="button button-block button-positive" ng-click="goCopayers()" translate>Open wallet</button>
</div>
</div>
</div>
<div class="row">
<div class="col" ng-show="isCordova && addr">
<div class="item item-icon-left" ng-click="shareAddress(addr)">
<i class="icon ion-ios-upload-outline"></i>
<span translate>Share</span>
<div class="row border-top">
<div class="col col-90 center-block bit-address text-center">
<div class="item item-icon-left">
<i class="icon ion-social-bitcoin-outline"></i>
<span class="bit-address-gen-address" ng-if="!generatingAddress" translate>address not yet available</span>
</div>
</div>
</div>
<div class="col" ng-class="{'center-block col-50': !isCordova || !addr}">
<div class="item item-icon-left" ng-click="setAddress(true)">
<i class="icon ion-ios-loop"></i>
<span translate>Next Address</span>
</article>
<article ng-if="wallet.isComplete()">
<div class="row backup" ng-show="!wallet.showBackupNeededModal && wallet.needsBackup" ng-click="goToBackupFlow()">
<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>
</div>
</div>
</div>
<div class="row border-top">
<div class="col col-90 center-block bit-address text-center">
<div class="item item-icon-left">
<i class="icon ion-social-bitcoin-outline"></i>
<span ng-if="generatingAddress">...</span>
<span class="bit-address-gen-address" ng-if="!generatingAddress" copy-to-clipboard="addr">{{addr}}</span>
<div class="row qr">
<div class="m15t text-center col center-block" copy-to-clipboard="addr">
<qrcode ng-if="addr" size="220" data="bitcoin:{{addr}}"></qrcode>
<div ng-if="!addr" style="height:220px; width:220px; margin:auto; background: white; padding-top: 20%;">
...
</div>
</div>
</div>
</div>
</article>
<div class="row">
<div class="col" ng-show="isCordova && addr">
<div class="item item-icon-left" ng-click="shareAddress(addr)">
<i class="icon ion-ios-upload-outline"></i>
<span translate>Share</span>
</div>
</div>
<div class="col" ng-class="{'center-block col-50': !isCordova || !addr}">
<div class="item item-icon-left" ng-click="setAddress(true)">
<i class="icon ion-ios-loop"></i>
<span translate>Next Address</span>
</div>
</div>
</div>
<div class="row border-top">
<div class="col col-90 center-block bit-address text-center">
<div class="item item-icon-left">
<i class="icon ion-social-bitcoin-outline"></i>
<span ng-if="generatingAddress">...</span>
<span class="bit-address-gen-address" ng-if="!generatingAddress" copy-to-clipboard="addr">{{addr}}</span>
</div>
</div>
</div>
</article>
</div>
<article id="wallets">
<div class="list card padding text-center" ng-if="!wallets[0]">
<span translate>No Wallet</span>

View File

@ -4,42 +4,47 @@
</ion-nav-bar>
<ion-content>
<div>
<div class="item item-heading" translate>Recipient</div>
<label class="item item-input bitcoin-address">
<i class="icon ion-search placeholder-icon"></i>
<div class="item item-heading" translate>Recipient</div>
<label class="item item-input bitcoin-address">
<i class="icon ion-social-bitcoin placeholder-icon"></i>
<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>
<input type="text"
placeholder="Search or enter bitcoin address"
placeholder="{{'Search or enter bitcoin address' | translate}}"
ng-model="formData.search"
ng-change="findContact(formData.search)"
ng-model-onblur>
</label>
</div>
</div>
</label>
<div class="card">
<div class="item item-icon-right item-heading">
<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>
<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>
<span translate>Add a Contact</span>
<i class="icon nav-item-arrow-right"></i>
</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>
{{item.name}}
<i class="icon nav-item-arrow-right"></i>
</a>
<div class="show-more" ng-show="contactsShowMore" ng-click="showMore()" translate>
Show more
</div>
</div>
<div class="card">
<div class="card" ng-show="hasWallets && !oneWallet">
<div class="item item-heading">
<span translate>Transfer to Wallet</span>
</div>
<div class="item text-center ng-hide" ng-show="!hasWallets" translate>No Wallet</div>
<a class="item item-icon-left ng-hide" ng-repeat="item in list" ng-show="hasWallets && item.isWallet" ng-click="goToAmount(item)">
<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)">
<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}}
<i class="icon nav-item-arrow-right"></i>
</a>
</div>
</ion-content>

View File

@ -14,6 +14,12 @@
<div class="item item-divider" translate>Preferences</div>
<a class="item item-icon-left item-icon-right" ui-sref="tabs.notifications" ng-show="usePushNotifications">
<i class="icon ion-ios-bell-outline"></i>
<span translate>Notifications</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<a class="item item-icon-left item-icon-right" ui-sref="tabs.language">
<i class="icon ion-ios-chatbubble-outline"></i>
<span translate>Language</span>
@ -50,43 +56,6 @@
<i class="icon nav-item-arrow-right"></i>
</a>
<div class="item item-divider" translate>Exchanges</div>
<ion-toggle ng-show="!isWP" ng-model="glideraEnabled.value" toggle-class="toggle-balanced" ng-change="glideraChange()">
<span class="toggle-label" translate>Enable Glidera Service</span>
</ion-toggle>
<!-- disable coinbase for this release -->
<!--
<ion-toggle ng-show="!isWP" ng-model="coinbaseEnabled" toggle-class="toggle-balanced" ng-change="coinbaseChange()">
<span class="toggle-label" translate>Enable Coinbase Service</span>
</ion-toggle>
-->
<div class="item item-divider" translate>Others</div>
<ion-toggle ng-model="spendUnconfirmed.value" toggle-class="toggle-balanced" ng-change="spendUnconfirmedChange()">
<span class="toggle-label" translate>Use Unconfirmed Funds</span>
</ion-toggle>
<div ng-show="usePushNotifications && PNEnabledByUser">
<div class="item item-divider" translate>Notifications</div>
<ion-toggle ng-model="pushNotifications.value" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
<span class="toggle-label" translate>Enable push notifications</span>
</ion-toggle>
</div>
<div ng-show="usePushNotifications && !PNEnabledByUser && isIOSApp">
<div class="item item-divider" translate>Notifications</div>
<div class="padding text-light" translate>
Push notifications for Copay are currently disabled. Enable them in the Settings app.
</div>
<a class="item" ng-click="openSettings()">
<span translate>Open Settings app</span>
</a>
</div>
<div class="item item-divider" translate>Wallets Preferences</div>
<a class="item item-icon-left item-icon-right" href
ui-sref="tabs.preferences({'walletId': item.id})"
@ -102,6 +71,12 @@
<i class="icon nav-item-arrow-right"></i>
</a>
<div class="item item-divider"></div>
<a class="item item-icon-right" href ui-sref="tabs.advanced">
<span translate>Advanced</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<div class="item item-divider"></div>
<a class="item item-icon-left item-icon-right" href ui-sref="tabs.about">
<i class="icon ion-ios-information-outline"></i>

View File

@ -3,13 +3,13 @@ Create tabs with an icon and label, using the tabs-positive style.
Each tab's child <ion-nav-view> directive will have its own
navigation history that also transitions its views in and out.
-->
<ion-tabs class="tabs-icon-top tabs-color-active-positive" ng-controller="tabsController">
<ion-tabs class="tabs-icon-top tabs-color-active-positive" ng-class="{'tabs-item-hide': hideTabs}">
<ion-tab title="Home" icon-off="ico-home" icon-on="ico-home-selected" href="#/tabs/home">
<ion-tab title="Home" icon-off="ico-home" icon-on="ico-home-selected" ui-sref="tabs.home">
<ion-nav-view name="tab-home"></ion-nav-view>
</ion-tab>
<ion-tab title="Receive" icon-off="ico-receive" icon-on="ico-receive-selected" href="#/tabs/receive">
<ion-tab title="Receive" icon-off="ico-receive" icon-on="ico-receive-selected" ui-sref="tabs.receive">
<ion-nav-view name="tab-receive"></ion-nav-view>
</ion-tab>
@ -21,7 +21,7 @@ navigation history that also transitions its views in and out.
<ion-tab title="Scan" icon-off="ico-scan" ng-click="scan()" >
</ion-tab>
<ion-tab title="Send" icon-off="ico-send" icon-on="ico-send-selected" href="#/tabs/send">
<ion-tab title="Send" icon-off="ico-send" icon-on="ico-send-selected" ui-sref="tabs.send">
<ion-nav-view name="tab-send"></ion-nav-view>
</ion-tab>

View File

@ -0,0 +1,113 @@
'use strict';
angular.module('copayApp.controllers').controller('advancedSettingsController', function($scope, $rootScope, $log, $window, lodash, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService) {
var updateConfig = function() {
var config = configService.getSync();
$scope.spendUnconfirmed = {
value: config.wallet.spendUnconfirmed
};
$scope.bitpayCardEnabled = {
value: config.bitpayCard.enabled
};
$scope.amazonEnabled = {
value: config.amazon.enabled
};
$scope.glideraEnabled = {
value: config.glidera.enabled
};
$scope.coinbaseEnabled = {
value: config.coinbase.enabled
};
$scope.recentTransactionsEnabled = {
value: config.recentTransactions.enabled
};
$scope.frequentlyUsedEnabled = {
value: config.frequentlyUsed.enabled
};
};
$scope.spendUnconfirmedChange = function() {
var opts = {
wallet: {
spendUnconfirmed: $scope.spendUnconfirmed.value
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.bitpayCardChange = function() {
var opts = {
bitpayCard: {
enabled: $scope.bitpayCardEnabled.value
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.amazonChange = function() {
var opts = {
amazon: {
enabled: $scope.amazonEnabled.value
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.glideraChange = function() {
var opts = {
glidera: {
enabled: $scope.glideraEnabled.value
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.coinbaseChange = function() {
var opts = {
coinbase: {
enabled: $scope.coinbaseEnabled
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.recentTransactionsChange = function() {
var opts = {
recentTransactions: {
enabled: $scope.recentTransactionsEnabled
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.frequentlyUsedChange = function() {
var opts = {
frequentlyUsed: {
enabled: $scope.frequentlyUsedEnabled
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.$on("$ionicView.enter", function(event, data) {
updateConfig();
});
});

View File

@ -15,11 +15,11 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.toName = $stateParams.toName;
$scope.toEmail = $stateParams.toEmail;
$scope.$on('$ionicView.beforeLeave', function() {
$scope.$on('$ionicView.leave', function() {
angular.element($window).off('keydown');
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.$on("$ionicView.enter", function(event, data) {
if (!$stateParams.toAddress) {
$log.error('Bad params at amount')
@ -60,6 +60,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
satToBtc = 1 / 100000000;
unitDecimals = config.unitDecimals;
$scope.resetAmount();
// in SAT ALWAYS
if ($stateParams.toAmount) {
$scope.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals);

View File

@ -49,15 +49,6 @@ angular.module('copayApp.controllers').controller('backupController',
}, 10);
};
$scope.goBack = function() {
if ($scope.step == 1) {
if ($stateParams.fromOnboarding) $state.go('onboarding.backupRequest');
else $state.go('wallet.preferences');
} else {
$scope.goToStep($scope.step - 1);
}
};
var backupError = function(err) {
ongoingProcess.set('validatingWords', false);
$log.debug('Failed to verify backup: ', err);
@ -93,13 +84,15 @@ angular.module('copayApp.controllers').controller('backupController',
$scope.closeBackupResultModal = function() {
$scope.confirmBackupModal.hide();
$scope.confirmBackupModal.remove();
if ($stateParams.fromOnboarding) {
$state.go('onboarding.disclaimer');
} else {
$ionicHistory.removeBackView();
$state.go('tabs.home');
}
profileService.isDisclaimerAccepted(function(val) {
if (val) {
$ionicHistory.removeBackView();
$state.go('tabs.home');
}
else $state.go('onboarding.disclaimer');
});
};
var confirm = function(cb) {
@ -193,16 +186,6 @@ angular.module('copayApp.controllers').controller('backupController',
$scope.selectComplete = false;
};
$scope.backupGoBack = function() {
if ($stateParams.fromOnboarding) $state.go('onboarding.backupWarning', {
walletId: $stateParams.walletId,
fromOnboarding: true
});
else $state.go('tabs.preferences', {
walletId: $stateParams.walletId
});
};
$scope.$on("$ionicView.enter", function(event, data) {
$scope.deleted = isDeletedSeed();
if ($scope.deleted) {

View File

@ -1,6 +1,6 @@
'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, gettext, txFormatService, ongoingProcess, $ionicModal, popupService) {
var cachedTxp = {};
var isChromeApp = platformInfo.isChromeApp;

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('copayersController',
function($scope, $log, $ionicNavBarDelegate, $timeout, $stateParams, $state, $rootScope, $ionicHistory, lodash, profileService, walletService, popupService, platformInfo, gettextCatalog, ongoingProcess) {
function($scope, $log, $timeout, $stateParams, $state, $rootScope, $ionicHistory, lodash, profileService, walletService, popupService, platformInfo, gettextCatalog, ongoingProcess) {
$scope.$on("$ionicView.beforeEnter", function(event, data) {
init();

View File

@ -1,7 +1,7 @@
'use strict';
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 isDevel = platformInfo.isDevel;

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('joinController',
function($scope, $rootScope, $timeout, $state, profileService, configService, storageService, applicationService, gettext, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService) {
function($scope, $rootScope, $timeout, $state, $ionicHistory, profileService, configService, storageService, applicationService, gettext, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService) {
var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel;
@ -146,7 +146,19 @@ angular.module('copayApp.controllers').controller('joinController',
$log.debug('Remote preferences saved for:' + client.credentials.walletId)
});
$ionicHistory.removeBackView();
$state.go('tabs.home');
if (!client.isComplete()) {
$ionicHistory.nextViewOptions({
disableAnimate: true
});
$state.go('tabs.home');
$timeout(function() {
$state.transitionTo('tabs.copayers', {
walletId: client.credentials.walletId
});
}, 100);
}
else $state.go('tabs.home')
});
}, 100);
};

View File

@ -73,6 +73,8 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
time: $scope.btx.time,
description: actionDescriptions['broadcasted'],
});
$scope.actionList.reverse();
};
$scope.showCommentPopup = function() {
@ -126,6 +128,9 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
$scope.rateDate = res.fetchedOn;
$scope.rateStr = res.rate + ' ' + $scope.alternativeIsoCode;
$scope.alternativeAmountStr = $filter('formatFiatAmount')(alternativeAmountBtc * res.rate) + ' ' + $scope.alternativeIsoCode;
$timeout(function() {
$scope.$apply();
});
}
});
};

View File

@ -3,13 +3,16 @@
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $ionicHistory, $log, addressbookService) {
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.txStatusModal.hide();
if ($scope.fromSendTab) {
$ionicHistory.removeBackView();
$state.go('tabs.home');
$state.go('tabs.send');
$timeout(function() {
$state.transitionTo('tabs.home');
}, 100);
}
};

View File

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

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $stateParams, $ionicPopup, popupService, gettextCatalog) {
angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $stateParams, popupService, gettextCatalog) {
$scope.walletId = $stateParams.walletId;

View File

@ -1,24 +1,35 @@
'use strict';
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $timeout, $stateParams, $ionicPopup, profileService, $ionicModal) {
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $timeout, $stateParams, profileService, $ionicModal) {
$scope.walletId = $stateParams.walletId;
$scope.openPopup = function() {
$ionicModal.fromTemplateUrl('views/includes/screenshotWarningModal.html', {
scope: $scope,
backdropClickToClose: false,
hardwareBackButtonClose: false
}).then(function(modal) {
$scope.warningModal = modal;
$scope.warningModal.show();
});
scope: $scope,
backdropClickToClose: false,
hardwareBackButtonClose: false
}).then(function(modal) {
$scope.warningModal = modal;
$scope.warningModal.show();
});
$scope.close = function() {
$scope.warningModal.hide();
$state.go('onboarding.backup', {
walletId: $stateParams.walletId,
fromOnboarding: true
});
if ($stateParams.from == 'onboarding.backupRequest')
$state.go('onboarding.backup', {
walletId: $stateParams.walletId
});
else
$state.go($stateParams.from + '.backup', {
walletId: $stateParams.walletId
});
};
}
$scope.goBack = function() {
$state.go($stateParams.from, {
walletId: $stateParams.walletId
});
};
});

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, $ionicPopup, profileService) {
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, profileService) {
$scope.goImport = function(code) {
$state.go('onboarding.import', {

View File

@ -1,11 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesAbout',
function($scope, $window, $ionicNavBarDelegate, gettextCatalog, externalLinkService) {
$scope.$on("$ionicView.beforeEnter", function(event, data){
$ionicNavBarDelegate.title(gettextCatalog.getString('About') + ' ' + $window.appConfig.nameCase);
});
function($scope, $window, gettextCatalog, externalLinkService) {
$scope.title = gettextCatalog.getString('About') + ' ' + $window.appConfig.nameCase;
$scope.version = $window.version;
$scope.commitHash = $window.commitHash;
$scope.name = $window.appConfig.gitHubRepoName;

View File

@ -4,7 +4,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
function($scope, $stateParams, $ionicHistory, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService) {
var wallet = profileService.getWallet($stateParams.walletId);
$scope.alias = lodash.isEqual(wallet.name, wallet.credentials.walletName) ? null : wallet.name + ' ';
$scope.walletName = '[' + wallet.credentials.walletName + ']';
$scope.walletName = wallet.credentials.walletName;
$scope.showDeletePopup = function() {
var title = gettextCatalog.getString('Warning!');

View File

@ -0,0 +1,52 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesNotificationsController',
function($scope, $rootScope, $log, $window, lodash, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService) {
var updateConfig = function() {
var config = configService.getSync();
var isCordova = platformInfo.isCordova;
var isIOS = platformInfo.isIOS;
$scope.PNEnabledByUser = true;
$scope.isIOSApp = isIOS && isCordova;
if ($scope.isIOSApp) {
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
$scope.PNEnabledByUser = isEnabled;
$scope.$digest();
});
}
$scope.pushNotifications = {
value: config.pushNotifications.enabled
};
};
$scope.openSettings = function() {
cordova.plugins.diagnostic.switchToSettings(function() {
$log.debug('switched to settings');
}, function(err) {
$log.debug(err);
});
};
$scope.pushNotificationsChange = function() {
var opts = {
pushNotifications: {
enabled: $scope.pushNotifications.value
}
};
configService.set(opts, function(err) {
if (opts.pushNotifications.enabled)
pushNotificationsService.enableNotifications(profileService.walletClients);
else
pushNotificationsService.disableNotifications(profileService.walletClients);
if (err) $log.debug(err);
});
};
$scope.$on("$ionicView.enter", function(event, data) {
updateConfig();
});
});

View File

@ -180,6 +180,11 @@ angular.module('copayApp.controllers').controller('tabHomeController',
});
};
$scope.shouldHideNextSteps = function() {
$scope.hideNextSteps = !$scope.hideNextSteps;
$ionicScrollDelegate.resize();
};
var listeners = [
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
var wallet = profileService.getWallet(walletId);
@ -204,6 +209,10 @@ angular.module('copayApp.controllers').controller('tabHomeController',
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
$scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp;
$scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp;
$scope.amazonEnabled = config.amazon.enabled;
$scope.bitpayCardEnabled = config.bitpayCard.enabled;
$scope.nextStepEnabled = $scope.glideraEnabled || $scope.coinbaseEnabled || $scope.amazonEnabled || $scope.bitpayCardEnabled;
$scope.recentTransactionsEnabled = config.recentTransactions.enabled;
});
$scope.nextStep();
$scope.updateAllWallets();

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, $ionicModal, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, $ionicModal, $state, $ionicHistory, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
$scope.isCordova = platformInfo.isCordova;
$scope.isNW = platformInfo.isNW;
@ -29,29 +29,25 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
};
$scope.setAddress = function(forceNew) {
if ($scope.generatingAddress) return;
if ($scope.generatingAddress || !$scope.wallet.isComplete()) return;
$scope.addr = null;
$scope.generatingAddress = true;
$timeout(function() {
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
$scope.generatingAddress = false;
if (err || lodash.isEmpty(addr)) {
popupService.showAlert(gettextCatalog.getString('Error'), err || gettextCatalog.getString('Address is empty'));
return;
}
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
$scope.addr = addr;
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
$scope.$apply();
});
}, 1);
}, 100);
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
if (!$scope.isCordova) $scope.checkTips();
$scope.wallets = profileService.getWallets({
onlyComplete: true
});
$scope.wallets = profileService.getWallets();
$scope.$on('Wallet/Changed', function(event, wallet) {
if (!wallet) {
$log.debug('No wallet provided');
@ -62,4 +58,46 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.setAddress();
});
});
$scope.goCopayers = function() {
$ionicHistory.removeBackView();
$ionicHistory.nextViewOptions({
disableAnimate: true
});
$state.go('tabs.home');
$timeout(function() {
$state.transitionTo('tabs.copayers', {
walletId: $scope.wallet.credentials.walletId
});
}, 100);
};
$scope.openBackupNeededModal = function() {
$ionicModal.fromTemplateUrl('views/includes/backupNeededPopup.html', {
scope: $scope,
backdropClickToClose: false,
hardwareBackButtonClose: false
}).then(function(modal) {
$scope.BackupNeededModal = modal;
$scope.BackupNeededModal.show();
});
};
$scope.close = function() {
$scope.BackupNeededModal.hide();
$scope.BackupNeededModal.remove();
profileService.setBackupNeededModalFlag($scope.wallet.credentials.walletId);
};
$scope.doBackup = function() {
$scope.close();
$scope.goToBackupFlow();
};
$scope.goToBackupFlow = function() {
$state.go('tabs.receive.backupWarning', {
from: 'tabs.receive',
walletId: $scope.wallet.credentials.walletId
});
}
});

View File

@ -1,8 +1,10 @@
'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, popupService) {
var originalList;
var CONTACTS_SHOW_LIMIT = 10;
var currentContactsPage = 0;
var updateList = function() {
originalList = [];
@ -11,6 +13,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
onlyComplete: true
});
$scope.hasWallets = lodash.isEmpty(wallets) ? false : true;
$scope.oneWallet = wallets.length == 1;
lodash.each(wallets, function(v) {
originalList.push({
@ -27,9 +30,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
if (err) $log.error(err);
$scope.hasContacts = lodash.isEmpty(ab) ? false : true;
var contacts = [];
var completeContacts = [];
lodash.each(ab, function(v, k) {
contacts.push({
completeContacts.push({
name: lodash.isObject(v) ? v.name : v,
address: k,
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);
$scope.list = lodash.clone(originalList);
$timeout(function() {
$ionicScrollDelegate.resize();
$scope.$apply();
}, 1);
}, 10);
});
};
$scope.showMore = function() {
currentContactsPage++;
updateList();
};
$scope.findContact = function(search) {
if (incomingData.redir(search)) {
@ -86,8 +97,16 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
});
};
$scope.$on("$ionicView.beforeEnter", function(event, data){
$scope.formData = { search: null };
$scope.onQrCodeScanned = function(data) {
if (!incomingData.redir(data)) {
popupService.showAlert(null, gettextCatalog.getString('Invalid data'));
}
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.formData = {
search: null
};
updateList();
});

View File

@ -9,6 +9,8 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
var isWP = platformInfo.isWP;
var isIOS = platformInfo.isIOS;
$scope.usePushNotifications = isCordova && !isWP;
$scope.appName = $window.appConfig.nameCase;
$scope.unitName = config.wallet.settings.unitName;
@ -19,87 +21,13 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
};
$scope.feeOpts = feeService.feeOpts;
$scope.currentFeeLevel = feeService.getCurrentFeeLevel();
$scope.usePushNotifications = isCordova && !isWP;
$scope.PNEnabledByUser = true;
$scope.isIOSApp = isIOS && isCordova;
if ($scope.isIOSApp) {
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
$scope.PNEnabledByUser = isEnabled;
$scope.$digest();
});
}
$scope.spendUnconfirmed = {
value: config.wallet.spendUnconfirmed
};
$scope.glideraEnabled = {
value: config.glidera.enabled
};
$scope.coinbaseEnabled = config.coinbase.enabled;
$scope.pushNotifications = {
value: config.pushNotifications.enabled
};
$scope.otherWallets = lodash.filter(profileService.getWallets(self.network), function(w) {
return w.id != self.walletId;
});
$scope.wallets = profileService.getWallets();
};
$scope.openSettings = function() {
cordova.plugins.diagnostic.switchToSettings(function() {
$log.debug('switched to settings');
}, function(err) {
$log.debug(err);
});
};
$scope.spendUnconfirmedChange = function() {
var opts = {
wallet: {
spendUnconfirmed: $scope.spendUnconfirmed.value
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.pushNotificationsChange = function() {
var opts = {
pushNotifications: {
enabled: $scope.pushNotifications.value
}
};
configService.set(opts, function(err) {
if (opts.pushNotifications.enabled)
pushNotificationsService.enableNotifications(profileService.walletClients);
else
pushNotificationsService.disableNotifications(profileService.walletClients);
if (err) $log.debug(err);
});
};
$scope.glideraChange = function() {
var opts = {
glidera: {
enabled: $scope.glideraEnabled.value
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.coinbaseChange = function() {
var opts = {
coinbase: {
enabled: $scope.coinbaseEnabled
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.$on("$ionicView.enter", function(event, data) {
updateConfig();
});

View File

@ -1,12 +1,10 @@
'use strict';
angular.module('copayApp.controllers').controller('tabsController', function($log, $scope, $stateParams, $ionicModal, $timeout, incomingData) {
angular.module('copayApp.controllers').controller('tabsController', function($rootScope, $log, $scope, $state, $stateParams, $timeout, incomingData, lodash, popupService) {
$scope.onScan = function(data) {
if (!incomingData.redir(data)) {
$ionicPopup.alert({
title: 'Invalid data',
});
popupService.showAlert(null, gettextCatalog.getString('Invalid data'));
}
}
@ -22,6 +20,32 @@ angular.module('copayApp.controllers').controller('tabsController', function($lo
$timeout(function() {
$scope.$apply();
}, 1);
}
};
var hideTabsViews = [
'tabs.send.amount',
'tabs.send.confirm',
'tabs.send.addressbook',
'tabs.addressbook',
'tabs.addressbook.add',
'tabs.addressbook.view',
'tabs.preferences.backupWarning',
'tabs.preferences.backup',
'tabs.receive.backupWarning',
'tabs.receive.backup',
];
$rootScope.$on('$ionicView.beforeEnter', function() {
$rootScope.hideTabs = false;
var currentState = $state.current.name;
lodash.each(hideTabsViews, function(view) {
if (currentState === view) {
$rootScope.hideTabs = true;
}
});
});
});

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $ionicNavBarDelegate, $state, $stateParams, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService, $ionicPopup, txpModalService, externalLinkService) {
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, profileService, lodash, configService, gettextCatalog, platformInfo, walletService, txpModalService, externalLinkService, popupService) {
var isCordova = platformInfo.isCordova;
var isWP = platformInfo.isWP;
var isAndroid = platformInfo.isAndroid;
@ -204,15 +204,13 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
wallet = profileService.getWallet($stateParams.walletId);
/* Set color for header bar */
$rootScope.walletDetailsColor = wallet.color;
$rootScope.walletDetailsName = wallet.name;
$scope.walletDetailsColor = wallet.color;
$scope.walletDetailsName = wallet.name;
$scope.wallet = wallet;
$scope.requiresMultipleSignatures = wallet.credentials.m > 1;
$scope.newTx = false;
$ionicNavBarDelegate.title(wallet.name);
$scope.updateAll(function() {
if ($stateParams.txid) {
var tx = lodash.find($scope.completeTxHistory, {
@ -221,9 +219,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
if (tx) {
$scope.openTxModal(tx);
} else {
$ionicPopup.alert({
title: gettext('TX not available'),
});
popupService.showAlert(null, gettextCatalog.getString('TX not available'));
}
} else if ($stateParams.txpId) {
var txp = lodash.find($scope.txps, {
@ -232,9 +228,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
if (txp) {
$scope.openTxpModal(txp);
} else {
$ionicPopup.alert({
title: gettext('Proposal not longer available'),
});
popupService.showAlert(null, gettextCatalog.getString('Proposal not longer available'));
}
}
});

View File

@ -191,6 +191,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs', {
url: '/tabs',
abstract: true,
controller: 'tabsController',
templateUrl: 'views/tabs.html'
})
.state('tabs.home', {
@ -236,7 +237,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*
*/
.state('tabs.send.amount', {
.state('tabs.send.amount', {
url: '/amount/:isWallet/:toAddress/:toName/:toEmail',
views: {
'tab-send@tabs': {
@ -317,7 +318,16 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*
*/
.state('tabs.language', {
.state('tabs.notifications', {
url: '/notifications',
views: {
'tab-settings@tabs': {
controller: 'preferencesNotificationsController',
templateUrl: 'views/preferencesNotifications.html'
}
}
})
.state('tabs.language', {
url: '/language',
views: {
'tab-settings@tabs': {
@ -389,6 +399,15 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
}
})
.state('tabs.advanced', {
url: '/advanced',
views: {
'tab-settings@tabs': {
controller: 'advancedSettingsController',
templateUrl: 'views/advancedSettings.html'
}
}
})
/*
*
@ -432,6 +451,14 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
}
})
.state('tabs.preferences.backupWarning', {
url: '/backupWarning/:from',
views: {
'tab-settings@tabs': {
templateUrl: 'views/backupWarning.html'
}
}
})
.state('tabs.preferences.backup', {
url: '/backup',
views: {
@ -551,7 +578,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
/*
*
*TO DO
* Copayers
*
*/
@ -565,6 +592,30 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
/*
*
* Back flow from receive
*
*/
.state('tabs.receive.backupWarning', {
url: '/backupWarning/:from/:walletId',
views: {
'tab-receive@tabs': {
templateUrl: 'views/backupWarning.html'
}
}
})
.state('tabs.receive.backup', {
url: '/backup/:walletId',
views: {
'tab-receive@tabs': {
controller: 'backupController',
templateUrl: 'views/backup.html'
}
}
})
/*
*
* Onboarding
@ -617,15 +668,15 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('onboarding.backupWarning', {
url: '/backupWarning/:walletId',
url: '/backupWarning/:from/:walletId',
views: {
'onboarding': {
templateUrl: 'views/onboarding/backupWarning.html'
templateUrl: 'views/backupWarning.html'
}
}
})
.state('onboarding.backup', {
url: '/backup/:walletId/:fromOnboarding',
url: '/backup/:walletId',
views: {
'onboarding': {
templateUrl: 'views/backup.html',
@ -944,6 +995,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
$log.debug('Route change from:', fromState.name || '-', ' to:', toState.name);
$log.debug(' toParams:' + JSON.stringify(toParams || {}));
$log.debug(' fromParams:' + JSON.stringify(fromParams || {}));
if (!toState.name.match(/onboarding/)) return;
var state = {};
state.name = toState.name;
state.toParams = toParams;

View File

@ -39,10 +39,28 @@ angular.module('copayApp.services').factory('configService', function(storageSer
},
coinbase: {
enabled: true,
enabled: false, //disable coinbase for this release
testnet: false
},
bitpayCard: {
enabled: true
},
amazon: {
enabled: true
},
//Experimental Features
recentTransactions: {
enabled: true
},
frequentlyUsed: {
enabled: true
},
rates: {
url: 'https://insight.bitpay.com:443/api/rates',
},
@ -111,6 +129,18 @@ angular.module('copayApp.services').factory('configService', function(storageSer
if (!configCache.coinbase) {
configCache.coinbase = defaultConfig.coinbase;
}
if (!configCache.amazon) {
configCache.amazon = defaultConfig.amazon;
}
if (!configCache.bitpayCard) {
configCache.bitpayCard = defaultConfig.bitpayCard;
}
if (!configCache.recentTransactions) {
configCache.recentTransactions = defaultConfig.recentTransactions;
}
if (!configCache.frequentlyUsed) {
configCache.frequentlyUsed = defaultConfig.frequentlyUsed;
}
if (!configCache.pushNotifications) {
configCache.pushNotifications = defaultConfig.pushNotifications;
}

View File

@ -1,6 +1,6 @@
'use strict';
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;
@ -38,6 +38,22 @@ angular.module('copayApp.services')
});
}
root.setBackupNeededModalFlag = function(walletId) {
storageService.setBackupNeededModalFlag(walletId, true, function(err) {
if (err) $log.error(err);
$log.debug('Backup warning modal flag stored');
root.wallet[walletId].showBackupNeededModal = false;
});
};
function _showBackupNeededModal(wallet, cb) {
storageService.getBackupNeededModalFlag(wallet.credentials.walletId, function(err, val) {
if (err) $log.error(err);
if (val) return cb(false);
return cb(true);
});
};
root.setBackupFlag = function(walletId) {
storageService.setBackupFlag(walletId, function(err) {
if (err) $log.error(err);
@ -101,6 +117,11 @@ angular.module('copayApp.services')
wallet.balanceHidden = val;
});
_showBackupNeededModal(wallet, function(val) {
if (wallet.needsBackup) wallet.showBackupNeededModal = val;
else wallet.showBackupNeededModal = false;
});
wallet.removeAllListeners();
wallet.on('report', function(n) {
@ -759,21 +780,11 @@ angular.module('copayApp.services')
var TIME_STAMP = 60 * 60 * 24 * 7;
var MAX = 100;
var typeFilter1 = {
'NewBlock': 1,
'BalanceUpdated': 1,
'NewOutgoingTxByThirdParty': 1,
'NewAddress': 1,
'TxProposalFinallyAccepted': 1,
'TxProposalFinallyRejected': 1,
var typeFilter = {
'NewOutgoingTx': 1,
'NewIncomingTx': 1
};
var typeFilter2 = {
'TxProposalAcceptedBy': 1,
'TxProposalRejectedBy': 1,
'NewTxProposal': 1,
}
var w = root.getWallets();
if (lodash.isEmpty(w)) return cb();
@ -874,15 +885,9 @@ angular.module('copayApp.services')
var n;
n = lodash.filter(wallet.cachedActivity.n, function(x) {
return !typeFilter1[x.type];
return typeFilter[x.type];
});
if (wallet.m == 1) {
n = lodash.filter(n, function(x) {
return !typeFilter2[x.type];
});
}
var idToName = {};
if (wallet.cachedStatus) {
lodash.each(wallet.cachedStatus.wallet.copayers, function(c) {

View File

@ -365,6 +365,14 @@ angular.module('copayApp.services')
storage.get('receiveTips', cb);
};
root.setBackupNeededModalFlag = function(walletId, val, cb) {
storage.set('showBackupNeededModal-' + walletId, val, cb);
};
root.getBackupNeededModalFlag = function(walletId, cb) {
storage.get('showBackupNeededModal-' + walletId, cb);
};
root.setAmazonGiftCards = function(network, gcs, cb) {
storage.set('amazonGiftCards-' + network, gcs, cb);
};

View File

@ -1,150 +0,0 @@
'use strict';
/*
* This is a modification from https://github.com/angular/angular.js/blob/master/src/ngTouch/swipe.js
*/
angular.module('copayApp.services')
.factory('$swipe', [
function() {
// The total distance in any direction before we make the call on swipe vs. scroll.
var MOVE_BUFFER_RADIUS = 10;
var POINTER_EVENTS = {
'touch': {
start: 'touchstart',
move: 'touchmove',
end: 'touchend',
cancel: 'touchcancel'
}
};
function getCoordinates(event) {
var originalEvent = event.originalEvent || event;
var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];
var e = (originalEvent.changedTouches && originalEvent.changedTouches[0]) || touches[0];
return {
x: e.clientX,
y: e.clientY
};
}
function getEvents(pointerTypes, eventType) {
var res = [];
angular.forEach(pointerTypes, function(pointerType) {
var eventName = POINTER_EVENTS[pointerType][eventType];
if (eventName) {
res.push(eventName);
}
});
return res.join(' ');
}
return {
/**
* @ngdoc method
* @name $swipe#bind
*
* @description
* The main method of `$swipe`. It takes an element to be watched for swipe motions, and an
* object containing event handlers.
* The pointer types that should be used can be specified via the optional
* third argument, which is an array of strings `'mouse'` and `'touch'`. By default,
* `$swipe` will listen for `mouse` and `touch` events.
*
* The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end`
* receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }`.
*
* `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is
* watching for `touchmove` or `mousemove` events. These events are ignored until the total
* distance moved in either dimension exceeds a small threshold.
*
* Once this threshold is exceeded, either the horizontal or vertical delta is greater.
* - If the horizontal distance is greater, this is a swipe and `move` and `end` events follow.
* - If the vertical distance is greater, this is a scroll, and we let the browser take over.
* A `cancel` event is sent.
*
* `move` is called on `mousemove` and `touchmove` after the above logic has determined that
* a swipe is in progress.
*
* `end` is called when a swipe is successfully completed with a `touchend` or `mouseup`.
*
* `cancel` is called either on a `touchcancel` from the browser, or when we begin scrolling
* as described above.
*
*/
bind: function(element, eventHandlers, pointerTypes) {
// Absolute total movement, used to control swipe vs. scroll.
var totalX, totalY;
// Coordinates of the start position.
var startCoords;
// Last event's position.
var lastPos;
// Whether a swipe is active.
var active = false;
pointerTypes = pointerTypes || ['touch'];
element.on(getEvents(pointerTypes, 'start'), function(event) {
startCoords = getCoordinates(event);
active = true;
totalX = 0;
totalY = 0;
lastPos = startCoords;
eventHandlers['start'] && eventHandlers['start'](startCoords, event);
});
var events = getEvents(pointerTypes, 'cancel');
if (events) {
element.on(events, function(event) {
active = false;
eventHandlers['cancel'] && eventHandlers['cancel'](event);
});
}
element.on(getEvents(pointerTypes, 'move'), function(event) {
if (!active) return;
// Android will send a touchcancel if it thinks we're starting to scroll.
// So when the total distance (+ or - or both) exceeds 10px in either direction,
// we either:
// - On totalX > totalY, we send preventDefault() and treat this as a swipe.
// - On totalY > totalX, we let the browser handle it as a scroll.
if (!startCoords) return;
var coords = getCoordinates(event);
totalX += Math.abs(coords.x - lastPos.x);
totalY += Math.abs(coords.y - lastPos.y);
lastPos = coords;
if (totalX < MOVE_BUFFER_RADIUS && totalY < MOVE_BUFFER_RADIUS) {
return;
}
// One of totalX or totalY has exceeded the buffer, so decide on swipe vs. scroll.
if (totalY > totalX) {
// Allow native scrolling to take over.
active = false;
eventHandlers['cancel'] && eventHandlers['cancel'](event);
return;
} else {
// Prevent the browser from scrolling.
event.preventDefault();
eventHandlers['move'] && eventHandlers['move'](coords, event);
}
});
element.on(getEvents(pointerTypes, 'end'), function(event) {
if (!active) return;
active = false;
eventHandlers['end'] && eventHandlers['end'](getCoordinates(event), event);
});
}
};
}
]);

View File

@ -792,29 +792,16 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
root.getAddress = function(wallet, forceNew, cb) {
var firstStep;
if (forceNew) {
firstStep = storageService.clearLastAddress;
} else {
firstStep = function(walletId, cb) {
return cb();
};
}
firstStep(wallet.id, function(err) {
storageService.getLastAddress(wallet.id, function(err, addr) {
if (err) return cb(err);
storageService.getLastAddress(wallet.id, function(err, addr) {
if (err) return cb(err);
if (!forceNew && addr) return cb(null, addr);
if (addr) return cb(null, addr);
createAddress(wallet, function(err, addr) {
createAddress(wallet, function(err, _addr) {
if (err) return cb(err, addr);
storageService.storeLastAddress(wallet.id, _addr, function() {
if (err) return cb(err);
storageService.storeLastAddress(wallet.id, addr, function() {
if (err) return cb(err);
return cb(null, addr);
});
return cb(null, _addr);
});
});
});
@ -833,32 +820,12 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
// An alert dialog
var askPassword = function(name, title, cb) {
var scope = $rootScope.$new(true);
scope.data = [];
var pass = $ionicPopup.show({
template: '<input type="password" ng-model="data.pass">',
title: title,
subTitle: name,
scope: scope,
buttons: [{
text: 'Cancel'
}, {
text: '<b>OK</b>',
type: 'button-positive',
onTap: function(e) {
if (!scope.data.pass) {
//don't allow the user to close unless he enters wifi password
e.preventDefault();
return;
}
return scope.data.pass;
}
}]
});
pass.then(function(res) {
return cb(res);
var opts = {
inputType: 'password'
};
popupService.showPrompt(title, name, opts, function(res) {
if (!res) return cb();
if (res) return cb(res)
});
};

View File

@ -4,6 +4,18 @@
@extend .ion-ios-arrow-right;
}
.icon.nav-item-arrow-down {
color: #666;
font-size: 26px;
@extend .ion-ios-arrow-down;
}
.icon.nav-item-arrow-up {
color: #666;
font-size: 26px;
@extend .ion-ios-arrow-up;
}
.item.item-heading {
font-weight: bold;
}
@ -45,6 +57,11 @@
}
}
}
.white-bg{
background: #fff;
}
.overlay {
position: absolute;
top:0;

View File

@ -594,6 +594,10 @@ ul.wallet-selection.wallets {
margin-right: 40px;
}
.m55r {
margin-right: 55px;
}
.m25r {
margin-right: 25px;
}
@ -992,6 +996,7 @@ input[type=number] {
@import "views/tab-send";
@import "views/tab-settings";
@import "views/walletDetails";
@import "views/advancedSettings";
@import "views/bitpayCard";
@import "views/address-book";
@import "views/wallet-backup-phrase";

View File

@ -20,8 +20,6 @@
.item {
color: #444;
border-top: none;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
&:before {
display: block;
position: absolute;

View File

@ -0,0 +1,53 @@
.settings {
.item {
color: #444;
border-color: rgba(221, 221, 221, 0.3);
}
}
#advanced-settings {
.list {
.item {
color: #444;
border-top: none;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
&:before {
display: block;
position: absolute;
width: 100%;
height: 1px;
background: rgba(221, 221, 221, 0.3);
top: 0;
right: 0;
content: '';
}
&.item-divider {
color: rgba(74, 74, 74, .8);
}
&.item-heading {
&:before {
top: 99%
}
}
&:nth-child(2) {
&:before {
width: 0;
}
}
.item-note {
color: rgb(58, 58, 58);
}
}
.comment {
padding: 15px;
background-color: #fff;
color: rgba(74, 74, 74, 0.8);
}
.divider-comment {
padding: 15px;
color: rgba(74, 74, 74, 0.8);
font-size: 15px;
}
}
}

View File

@ -1,4 +1,4 @@
#onboarding-backup-warning{
#backup-warning{
.warning{
margin:4rem auto 1rem;
height: 11rem;
@ -21,7 +21,7 @@
}
@media (max-width: 400px){
#onboarding-backup-warning{
#backup-warning{
.warning{
margin: 2rem auto 1rem;
height: 8rem;
@ -45,10 +45,10 @@
}
}
@media (max-height: 540px){
#onboarding-backup-warning{
#backup-warning{
.cta-buttons{
float:left;
position: relative;
}
}
}
}

View File

@ -9,7 +9,7 @@
}
.accept-slide {
position: fixed;
bottom: 49px;
bottom: 0;
width: 100%;
height: 100px;
background-color: #647CE8;

View File

@ -9,7 +9,12 @@
transform: translate(-50%, -50%);
border-radius: .25rem;
&-header {
background: rgb(1, 209, 162);
&-success {
background: rgb(1, 209, 162);
}
&-warning {
background: orange;
}
padding: 1rem;
border-radius: .25rem .25rem 0 0;
min-height: 120px;
@ -26,6 +31,12 @@
background-size: contain;
margin-top: .3rem;
}
&-img-warning {
background-image: url('../img/onboarding-success.svg');
height: 6rem;
background-size: contain;
margin-top: .3rem;
}
}
&-content {
padding: .5rem .8rem;
@ -42,11 +53,16 @@
font-weight: 200;
}
}
&-content-success{
&-content-success {
button{
color:rgb(23, 174, 140) !important;
}
}
&-content-warning {
button{
color: orange !important;
}
}
}
.modal-backdrop.active {

View File

@ -1,7 +1,7 @@
#screenshot-warning-modal{
.popup-modal-header{
&-img{
background-image: url('../img/onboarding-no-screenshot.svg');
background-image: url('../img/no-screenshot.svg');
}
}
}
}

View File

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

View File

@ -9,6 +9,7 @@
padding-left:.25rem;
padding-right:.25rem;
border-radius: .25rem;
max-width: 350px;
}
.swiper-slide{
width:100% !important;

View File

@ -0,0 +1,43 @@
.settings {
.item {
color: #444;
border-color: rgba(221, 221, 221, 0.3);
}
}
#tab-notifications {
.list {
.item {
color: #444;
border-top: none;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
&:before {
display: block;
position: absolute;
width: 100%;
height: 1px;
background: rgba(221, 221, 221, 0.3);
top: 0;
right: 0;
content: '';
}
&.item-divider {
color: rgba(74, 74, 74, .8);
}
&.item-heading {
&:before {
top: 99%
}
}
&:nth-child(2) {
&:before {
width: 0;
}
}
.item-note {
color: rgb(58, 58, 58);
}
}
}
}

View File

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

View File

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

View File

@ -10,6 +10,10 @@
margin-top:1.5rem;
}
}
.list{
max-width: 600px;
@include center-block();
}
.item {
background: transparent;
border: none;
@ -42,6 +46,7 @@
.item-content {
width: 90%;
margin-left: 6%;
white-space: normal;
}
}
.item-checkbox .checkbox {
@ -54,6 +59,10 @@
position: absolute;
bottom: 0;
width: 100%;
&-content{
max-width: 600px;
@include center-block();
}
.item{
color:rgb(58,58,58);
padding-bottom: 2.5rem;

View File

@ -1,40 +1,49 @@
#onboarding-push-notifications{
h2{
margin-top:2rem;
#onboarding-push-notifications {
h2 {
margin-top: 2rem;
}
#cta{
#cta {
background-image: url('../img/onboarding-push-notifications.svg');
height: 15rem;
margin-top: .75rem;
}
.cta-buttons{
float:none;
bottom:0;
.cta-buttons {
float: none;
bottom: 0;
position: absolute;
width:100%;
button{
width: 100%;
button {
max-width: 400px;
}
}
}
@media (max-width: 400px){
#onboarding-push-notifications{
.cta-buttons{
float:none;
bottom:0;
@media (max-width: 400px) {
#onboarding-push-notifications {
.cta-buttons {
float: none;
bottom: 0;
position: absolute;
}
}
}
@media (max-height: 540px){
#onboarding-push-notifications{
#cta{
@media (max-height: 540px) {
#onboarding-push-notifications {
#cta {
margin-bottom: 0;
}
.cta-buttons{
float:left;
.cta-buttons {
float: left;
position: relative;
}
}
}
}
@media (min-width: 450px) {
#onboarding-push-notifications {
#cta {
height: 26rem;
}
}
}

View File

@ -87,17 +87,21 @@
}
}
@media (min-width: 400px){
@media (min-width: 415px){
.onboarding{
ion-content{
h2{
font-size: 1.2rem;
font-size: 2rem;
}
p{
font-size: 1.4rem;
line-height: 1.9rem;
}
p,h2,h3{
max-width: 600px !important;
}
button{
max-width: 400px !important;
max-width: 400px !important;
}
}
}
@ -108,6 +112,6 @@
@import "onboard-tour";
@import "onboard-collect-email";
@import "onboard-backup-request";
@import "onboard-backup-warning";
@import "../backup-warning";
@import "onboard-disclaimer";
@import "onboard-push-notifications";

View File

@ -26,14 +26,24 @@
top:0;
right:0;
content:'';
@media (min-width: 450px){
&{
width:90%;
}
}
}
&.item-heading{
&:before{
width:100%;
width:100% !important;
top:99%
}
}
&:nth-child(2){
&:nth-child(1){
&:before{
width:0;
}
}
&:nth-child(2):last-child{
&:before{
width:0;
}

View File

@ -9,6 +9,20 @@
}
#address {
background: #fff;
.incomplete {
padding: 50px;
.title {
padding: 20px;
font-size: 25px;
color: #444;
}
.subtitle {
padding: 20px;
color: #444;
}
.button {
}
}
.item {
border: none;
font-size: .8rem;
@ -29,6 +43,16 @@
}
&-gen-address {}
}
.qr {
padding: 30px;
}
.backup {
background-color: orange;
color: #fff;
i {
padding: 10px;
}
}
}
#wallets {
position: relative;

View File

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

View File

@ -84,7 +84,7 @@
}
}
@media (min-width : 320px) and (max-width : 340px) and (orientation : portrait), (min-width : 650px) and (max-width : 770px) and (orientation : portrait){
@media (min-width : 320px) and (max-width : 415px) and (orientation : portrait), (min-width : 650px) and (max-width : 770px) and (orientation : portrait){
#wallet-backup-phrase{
.cta-buttons,#select-phrase{
bottom: 64px;