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

This commit is contained in:
Jamal Jackson 2016-09-07 10:33:23 -04:00
commit a2c509092d
41 changed files with 473 additions and 658 deletions

View file

@ -28,8 +28,11 @@ module.exports = function(grunt) {
chrome: { chrome: {
command: 'make -C chrome-app ' command: 'make -C chrome-app '
}, },
wp: { wpinit: {
command: 'make -C cordova wp', command: 'make -C cordova wp-init',
},
wpcopy: {
command: 'make -C cordova wp-copy',
}, },
ios: { ios: {
command: 'make -C cordova ios', command: 'make -C cordova ios',
@ -254,7 +257,8 @@ module.exports = function(grunt) {
grunt.registerTask('osx', ['prod', 'nwjs', 'exec:osx']); grunt.registerTask('osx', ['prod', 'nwjs', 'exec:osx']);
grunt.registerTask('chrome', ['exec:chrome']); grunt.registerTask('chrome', ['exec:chrome']);
grunt.registerTask('wp', ['prod', 'exec:wp']); grunt.registerTask('wp', ['prod', 'exec:wp']);
grunt.registerTask('wp-debug', ['default', 'exec:wp']); grunt.registerTask('wp-copy', ['default', 'exec:wpcopy']);
grunt.registerTask('wp-init', ['default', 'exec:wpinit']);
grunt.registerTask('ios', ['prod', 'exec:ios']); grunt.registerTask('ios', ['prod', 'exec:ios']);
grunt.registerTask('ios-debug', ['default', 'exec:ios']); grunt.registerTask('ios-debug', ['default', 'exec:ios']);
grunt.registerTask('ios-run', ['exec:xcode']); grunt.registerTask('ios-run', ['exec:xcode']);

View file

@ -8,7 +8,7 @@ clean:
rm -Rf $(WORKDIR)* rm -Rf $(WORKDIR)*
$(WORKDIR)android $(WORKDIR)ios $(WORKDIR)wp: config.xml $(WORKDIR)android $(WORKDIR)ios: config.xml
cordova create $@ com.bitpay.*NAMENOSPACE* *NAMECASENOSPACE* || echo "Project Path Existed" cordova create $@ com.bitpay.*NAMENOSPACE* *NAMECASENOSPACE* || echo "Project Path Existed"
cp ProjectMakefile $@/Makefile cp ProjectMakefile $@/Makefile
rm -r $@/www && ln -sF ../../public $@/www rm -r $@/www && ln -sF ../../public $@/www
@ -27,16 +27,23 @@ android: project-android
cp -R android/res/* $(WORKDIR)android/platforms/android/res cp -R android/res/* $(WORKDIR)android/platforms/android/res
make -C $(WORKDIR)android build-android make -C $(WORKDIR)android build-android
wp-init: config.xml
cordova create $(WORKDIR)$@ com.bitpay.*NAMENOSPACE* *NAMECASENOSPACE* || echo "Project Path Existed"
cp ProjectMakefile $(WORKDIR)$@/Makefile
mkdir -p $(WORKDIR)$@/www
cp -Rf ../public/* $(WORKDIR)$@/www
cp config.xml $(WORKDIR)$@/config.xml
make -C $(WORKDIR)$@ $(subst $(WORKDIR),, $(WORKDIR)$@)
wp: build-wp wp-copy:
cp -vf wp/Properties/* $</platforms/wp8/Properties/ cp -rvf wp/Properties/* $(WORKDIR)wp/platforms/wp8/Properties/
cp -vf wp/MainPage.xaml $</platforms/wp8/ cp -rvf wp/MainPage.xaml $(WORKDIR)wp/platforms/wp8/
cp -vf wp/Package.appxmanifest $</platforms/wp8/ cp -rvf wp/Package.appxmanifest $(WORKDIR)wp/platforms/wp8/
cp -vf wp/Assets/* $</platforms/wp8/Assets/ cp -rvf wp/Assets/* $(WORKDIR)wp/platforms/wp8/Assets/
cp -vf wp/SplashScreenImage.jpg $</platforms/wp8/ cp -rvf wp/SplashScreenImage.jpg $(WORKDIR)wp/platforms/wp8/
cp -vf wp/ApplicationIcon.png $</platforms/wp8/ cp -rvf wp/ApplicationIcon.png $(WORKDIR)wp/platforms/wp8/
cp -vf wp/Background.png $</platforms/wp8/ cp -rvf wp/Background.png $(WORKDIR)wp/platforms/wp8/
cp -af ../public/** $</www cp -rvf ../public/* $(WORKDIR)wp/www
wp/fix-svg.sh wp/fix-svg.sh

View file

@ -1,4 +1,4 @@
.PHONY:plugins ios-platform android-platform wp-platform .PHONY:plugins ios-platform android-platform wp8-platform
plugins: plugins:
cordova plugin add cordova-plugin-globalization cordova plugin add cordova-plugin-globalization
@ -30,7 +30,7 @@ plugins:
ios-platform android-platform wp-platform: ios-platform android-platform wp8-platform:
cordova platforms add $(subst -platform,,$@) || echo "Platform already added" cordova platforms add $(subst -platform,,$@) || echo "Platform already added"
ios: ios-platform plugins ios: ios-platform plugins
@ -41,7 +41,7 @@ android: android-platform plugins
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
cordova plugin add phonegap-plugin-push@1.2.3 cordova plugin add phonegap-plugin-push@1.2.3
wp: wp-platform plugins wp: wp8-platform plugins
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
build-ios build-android build-wp8: build-ios build-android build-wp8:

View file

@ -85,7 +85,7 @@
"xcode": "^0.8.2" "xcode": "^0.8.2"
}, },
"scripts": { "scripts": {
"preinstall": "bower install && cd app-template && ./apply.js", "preinstall": "bower install && cd app-template && node apply.js",
"postinstall": "npm run build", "postinstall": "npm run build",
"build": "grunt", "build": "grunt",
"start": "node app.js", "start": "node app.js",

View file

@ -12,17 +12,17 @@
<ion-list> <ion-list>
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create"> <a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create">
<h2 translate>Create new wallet</h2> <h2 translate>Create new wallet</h2>
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.join"> <a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.join">
<h2 translate>Join shared wallet</h2> <h2 translate>Join shared wallet</h2>
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.import.phrase"> <a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.import">
<h2 translate>Import wallet</h2> <h2 translate>Import wallet</h2>
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
</ion-list> </ion-list>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-royal"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button back-button" ui-sref="tabs.home"> <button class="button button-clear" ui-sref="tabs.home">
<i class="icon ion-ios-arrow-thin-left"></i> Close
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Gift cards</ion-nav-title> <ion-nav-title>Gift cards</ion-nav-title>
@ -21,7 +21,7 @@
<div ng-if="!giftCards" class="m20t padding text-center"> <div ng-if="!giftCards" class="m20t padding text-center">
<button class="button" ui-sref="amazon.buy"> <button class="button button-block button-positive" ui-sref="amazon.buy">
Buy now Buy now
</button> </button>
@ -36,12 +36,12 @@
<a class="item item-icon-left item-icon-right" href ui-sref="amazon.buy"> <a class="item item-icon-left item-icon-right" href ui-sref="amazon.buy">
<i class="icon ion-bag"></i> <i class="icon ion-bag"></i>
Buy Gift Card Buy Gift Card
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
</div> </div>
<div class="card"> <div class="card">
<div class="item item-divider"> <div class="item item-heading">
Your cards Your cards
</div> </div>
<div ng-repeat="(id, item) in giftCards | orderObjectBy:'date':true track by $index" <div ng-repeat="(id, item) in giftCards | orderObjectBy:'date':true track by $index"

View file

@ -36,7 +36,7 @@
ng-submit="buy.createTx()" ng-submit="buy.createTx()"
novalidate> novalidate>
<div class="list"> <div class="card list">
<label class="item item-input item-stacked-label"> <label class="item item-input item-stacked-label">
<span class="input-label">Amount</span> <span class="input-label">Amount</span>
<input type="number" <input type="number"
@ -53,7 +53,7 @@
<wallets ng-if="wallets[0]" wallets="wallets"></wallets> <wallets ng-if="wallets[0]" wallets="wallets"></wallets>
</div> </div>
<button class="button button-block" <button class="button button-block button-positive"
ng-disabled="!fiat" ng-disabled="!fiat"
type="submit" type="submit"
value="Buy now"> value="Buy now">
@ -68,10 +68,8 @@
<div class="m10t" ng-show="buy.giftCard"> <div class="m10t" ng-show="buy.giftCard">
<div class="m10h" ng-show="buy.giftCard.status != 'SUCCESS' && buy.giftCard.status != 'PENDING'"> <div class="m10h" ng-show="buy.giftCard.status != 'SUCCESS' && buy.giftCard.status != 'PENDING'">
<h1 class="text-center">Gift card could not be created</h1> <h1 class="text-center">Gift card could not be created</h1>
<div class="box-notification m20b"> <div class="box-notification error">
<span class="text-warning"> There was an error when trying to create the Amazon.com Gift Card. Status: {{buy.giftCard.status}}
There was an error when trying to create the Amazon.com Gift Card. Status: {{buy.giftCard.status}}
</span>
</div> </div>
<div class="text-gray size-12 m20t"> <div class="text-gray size-12 m20t">
<span ng-show="buy.giftCard.status == 'RESEND'"> <span ng-show="buy.giftCard.status == 'RESEND'">
@ -81,7 +79,7 @@
<span ng-show="buy.giftCard.status == 'FAILURE'"> <span ng-show="buy.giftCard.status == 'FAILURE'">
This failure could not be recoverable. Request your refund from your list of cards This failure could not be recoverable. Request your refund from your list of cards
</span> </span>
<button class="m20t button outline round dark-gray expand" ng-click="$root.go('amazon')"> <button class="button button-block button-positive" ng-click="$root.go('amazon')">
Back Back
</button> </button>
</div> </div>
@ -106,13 +104,13 @@
Claim code: <span class="text-bold" copy-to-clipboard="buy.giftCard.claimCode">{{buy.giftCard.claimCode}}</span> Claim code: <span class="text-bold" copy-to-clipboard="buy.giftCard.claimCode">{{buy.giftCard.claimCode}}</span>
</div> </div>
<div class="m10t"> <div class="m10t">
<button class="button black round tiny" <button class="button button-positive"
ng-click="openExternalLink('https://www.amazon.com/gc/redeem?claimCode=' + buy.giftCard.claimCode, '_system')"> ng-click="openExternalLink('https://www.amazon.com/gc/redeem?claimCode=' + buy.giftCard.claimCode, '_system')">
Redeem Now Redeem Now
</button> </button>
</div> </div>
<div class="size-12 m10t text-center"> <div class="m10t text-center">
<a ng-click="openExternalLink(buy.giftCard.invoiceUrl)">See invoice</a> <a class="button button-clear button-calm" ng-click="openExternalLink(buy.giftCard.invoiceUrl)">See invoice</a>
</div> </div>
</div> </div>
<div class="oh m20t p15h size-12"> <div class="oh m20t p15h size-12">

View file

@ -24,7 +24,7 @@
(remaining {{limits.monthlyBuyRemaining|currency:'':2}} {{limits.currency}}) (remaining {{limits.monthlyBuyRemaining|currency:'':2}} {{limits.currency}})
</div> </div>
<div class="box-notification m20b" ng-show="limits.transactDisabledPendingFirstTransaction && !buy.success"> <div class="box-notification warning" ng-show="limits.transactDisabledPendingFirstTransaction && !buy.success">
<span class="text-warning"> <span class="text-warning">
This operation was disabled because you have a pending first transaction This operation was disabled because you have a pending first transaction
</span> </span>
@ -35,7 +35,7 @@
<form name="buyPriceForm" ng-if="token" <form name="buyPriceForm" ng-if="token"
ng-submit="buy.get2faCode(token)" novalidate> ng-submit="buy.get2faCode(token)" novalidate>
<div class="list"> <div class="card list">
<label class="item item-input item-stacked-label"> <label class="item item-input item-stacked-label">
<span class="input-label">Amount in {{showAlternative ? 'USD' : 'BTC'}}</span> <span class="input-label">Amount in {{showAlternative ? 'USD' : 'BTC'}}</span>
<input ng-show="!showAlternative" <input ng-show="!showAlternative"
@ -83,7 +83,7 @@
... ...
</div> </div>
<button class="button button-block" <button class="button button-block button-positive"
type="submit" type="submit"
ng-disabled="limits.transactDisabledPendingFirstTransaction || !buy.buyPrice.qty || buy.loading"> ng-disabled="limits.transactDisabledPendingFirstTransaction || !buy.buyPrice.qty || buy.loading">
Continue Continue
@ -99,12 +99,12 @@
</p> </p>
<form name="buyForm" <form name="buyForm"
ng-submit="buy.sendRequest(token, permissions, twoFaCode)" novalidate> ng-submit="buy.sendRequest(token, permissions, twoFaCode)" novalidate>
<div class="list"> <div class="card list">
<label class="item item-input"> <label class="item item-input">
<input type="number" ng-model="twoFaCode" placeholder="2FA Code" required ignore-mouse-wheel> <input type="number" ng-model="twoFaCode" placeholder="2FA Code" required ignore-mouse-wheel>
</label> </label>
</div> </div>
<button class="button button-block" <button class="button button-block button-positive"
type="submit" ng-disabled="buyForm.$invalid || buy.loading"> type="submit" ng-disabled="buyForm.$invalid || buy.loading">
Buy Buy
</button> </button>
@ -120,7 +120,7 @@
A transfer has been initiated from your bank account. Your bitcoins should arrive to your wallet in 2-4 business days. A transfer has been initiated from your bank account. Your bitcoins should arrive to your wallet in 2-4 business days.
</p> </p>
<button class="button button-block" ui-sref="glidera.main">OK</button> <button class="button button-block button-positive" ui-sref="glidera.main">OK</button>
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,15 +1,12 @@
<ion-view ng-controller="copayersController"> <ion-view>
<ion-nav-bar class="bar-royal"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{wallet.name}}</ion-nav-title> <ion-nav-back-button>
<ion-nav-buttons side="primary"> <i class="icon ion-ios-arrow-thin-left"></i>
<button class="button back-button" ui-sref="tabs.home"> </ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content delegate-handle="my-handle" overflow-scroll="true"> <ion-content ng-controller="copayersController">
<div ng-show="!wallet.notAuthorized"> <div ng-show="!wallet.notAuthorized">
<h1 class="text-center" translate>Share this invitation with your copayers</h1> <h1 class="text-center" translate>Share this invitation with your copayers</h1>
@ -43,14 +40,14 @@
[ <span translate>{{wallet.m}}-of-{{wallet.n}}</span> ] [ <span translate>{{wallet.m}}-of-{{wallet.n}}</span> ]
</span> </span>
</h4> </h4>
<div class="white line-b p10" ng-include="'views/includes/copayers.html'"></div> <div ng-include="'views/includes/copayers.html'"></div>
<div ng-if="!wallet.isComplete()" class="line-b p10 white size-12"> <div ng-if="!wallet.isComplete()" class="line-b p10 white size-12">
<i class="fi-loop m5r p10l"></i> <i class="icon ion-loop"></i>
<span translate>Waiting...</span> <span translate>Waiting...</span>
</div> </div>
<div ng-if="wallet.isComplete()" class="line-b p10 white size-12" href> <div ng-if="wallet.isComplete()" class="line-b p10 white size-12" href>
<button class="button" href ui-sref="tabs.home"> <button class="button" href ui-sref="tabs.home">
<span translate>WALLET COMPLETE!</span> <span translate>WALLET COMPLETE!</span>
</button> </button>
</div> </div>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-royal"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button back-button" ui-sref="tabs.home"> <button class="button button-clear" ui-sref="tabs.home">
<i class="icon ion-ios-arrow-thin-left"></i> Close
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Glidera</ion-nav-title> <ion-nav-title>Glidera</ion-nav-title>
@ -39,7 +39,7 @@
<p class="m20t text-gray size-12">Connect your Glidera account to get started</p> <p class="m20t text-gray size-12">Connect your Glidera account to get started</p>
<button class="button" <button class="button button-block button-positive"
ng-click="openExternalLink(glidera.getAuthenticateUrl(), '_system'); showOauthForm = true"> ng-click="openExternalLink(glidera.getAuthenticateUrl(), '_system'); showOauthForm = true">
Connect to Glidera Connect to Glidera
</button> </button>
@ -51,7 +51,7 @@
</div> </div>
<div ng-show="showOauthForm"> <div ng-show="showOauthForm">
<form name="oauthCodeForm" ng-submit="glidera.submitOauthCode(code)" novalidate> <form name="oauthCodeForm" ng-submit="glidera.submitOauthCode(code)" novalidate>
<div class="list"> <div class="card list">
<label class="item item-input item-stacked-label"> <label class="item item-input item-stacked-label">
<span class="input-label">OAuth Code</span> <span class="input-label">OAuth Code</span>
<input type="text" <input type="text"
@ -63,12 +63,12 @@
<div class="col"> <div class="col">
<input type="button" <input type="button"
value="Cancel" value="Cancel"
class="button button-block" class="button button-block button-light"
ng-click="showOauthForm = false"> ng-click="showOauthForm = false">
</div> </div>
<div class="col"> <div class="col">
<input <input
class="button button-block" class="button button-block button-positive"
type="submit" type="submit"
value="Get started" value="Get started"
ng-disabled="oauthCodeForm.$invalid"> ng-disabled="oauthCodeForm.$invalid">
@ -90,7 +90,7 @@
<span class="item-note" ng-show="email"> <span class="item-note" ng-show="email">
{{email}} {{email}}
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
</div> </div>
<div class="padding"> <div class="padding">
@ -113,21 +113,21 @@
<a ng-show="status.userCanBuy" <a ng-show="status.userCanBuy"
class="item item-icon-right" class="item item-icon-right"
href ui-sref="glidera.buy"> href ui-sref="glidera.buy">
<img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="25"> <img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="35">
Buy Bitcoin Buy Bitcoin
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
<a class="item item-icon-right" <a class="item item-icon-right"
ng-show="status.userCanSell" ng-show="status.userCanSell"
href ui-sref="glidera.sell"> href ui-sref="glidera.sell">
<img src="img/sell-bitcoin.svg" alt="buy bitcoin" width="25"> <img src="img/sell-bitcoin.svg" alt="buy bitcoin" width="35">
Sell Bitcoin Sell Bitcoin
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
</div> </div>
<div class="card" ng-show="permissions.transaction_history"> <div class="list card" ng-show="permissions.transaction_history">
<div class="item item-divider"> <div class="item item-heading">
Activity Activity
</div> </div>
<div ng-show="txs.length == 0 " <div ng-show="txs.length == 0 "

View file

@ -1,33 +1,26 @@
<ion-view ng-controller="tabsController" ng-init="importInit()"> <ion-view ng-controller="tabsController" ng-init="importInit()">
<ion-tabs class="tabs-striped tabs-color-positive tabs-color-active-positive tabs-top"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Import Wallet' | translate}}</ion-nav-title>
<ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button>
</ion-nav-bar>
<div ng-if="!fromOnboarding"> <ion-content ng-controller="importController" ng-init="phrase = true; init()">
<ion-tab title="Recovery Phrase" ui-sref="tabs.import.phrase"> <div class="row text-center">
<ion-nav-view name="tab-import-phrase"></ion-nav-view> <div class="col" ng-click="phrase = true; file = hardware = false" ng-style="phrase && {'border-bottom': '2px solid'}">
</ion-tab> <span translate>Recovery phrase</span>
</div>
<ion-tab title="File/Text" ui-sref="tabs.import.file"> <div class="col" ng-click="file = true; phrase = hardware = false" ng-style="file && {'border-bottom': '2px solid'}">
<ion-nav-view name="tab-import-file"></ion-nav-view> <span translate>File/Text</span>
</ion-tab> </div>
<div class="col" ng-click="hardware = true; phrase = file = false" ng-style="hardware && {'border-bottom': '2px solid'}">
<ion-tab title="Hardware Wallet" ui-sref="tabs.import.hardware"> <span translate>Hardware wallet</span>
<ion-nav-view name="tab-import-hardware"></ion-nav-view> </div>
</ion-tab>
</div> </div>
<div ng-if="fromOnboarding"> <div ng-include="'views/tab-import-phrase.html'" ng-if="phrase"></div>
<ion-tab title="Recovery Phrase" ui-sref="onboarding.import.phrase"> <div ng-include="'views/tab-import-file.html'" ng-if="file"></div>
<ion-nav-view name="tab-import-phrase"></ion-nav-view> <div ng-include="'views/tab-import-hardware.html'" ng-if="hardware"></div>
</ion-tab> </ion-content>
<ion-tab title="File/Text" ui-sref="onboarding.import.file">
<ion-nav-view name="tab-import-file"></ion-nav-view>
</ion-tab>
<ion-tab title="Hardware Wallet" ui-sref="onboarding.import.hardware">
<ion-nav-view name="tab-import-hardware"></ion-nav-view>
</ion-tab>
</div>
</ion-tabs>
</ion-view> </ion-view>

View file

@ -1,10 +1,8 @@
<ul class="no-bullet m0"> <div ng-repeat="copayer in copayers">
<li class="" ng-repeat="copayer in index.copayers"> <span class="item size-12" ng-show="copayer.id == wallet.copayerId">
<span class="size-12" ng-show="copayer.id == index.copayerId"> <i class="icon ion-checkmark"></i> {{'Me'|translate}}
<i class="fi-check m5r"></i> {{'Me'|translate}}
</span> </span>
<span class="size-12 text-gray" ng-show="copayer.id != index.copayerId"> <span class="item size-12 text-gray" ng-show="copayer.id != wallet.copayerId">
<i class="fi-check m5r"></i> {{copayer.name}} <i class="icon ion-checkmark"></i> {{copayer.name}}
</span> </span>
</li> </div>
</ul>

View file

@ -1,5 +1,8 @@
<div class="wallet-activity" ng-class="{'wallet-activity-not-pending':!tx.pendingForUs}"> <div class="wallet-activity" ng-class="{'wallet-activity-not-pending':!tx.pendingForUs}">
<div class="wallet-activity-amount">
{{tx.amountStr}}
</div>
<span ng-show="!tx.merchant"> <span ng-show="!tx.merchant">
<span ng-show="addressbook[tx.toAddress] && !tx.message"> <span ng-show="addressbook[tx.toAddress] && !tx.message">
{{addressbook[tx.toAddress]}} {{addressbook[tx.toAddress]}}
@ -18,11 +21,6 @@
<span> <span>
</span> </span>
<div class="wallet-activity-amount">
{{tx.amountStr}}
</div>
<p class="wallet-activity-note"> <p class="wallet-activity-note">
<i class="icon ion-record wallet-activity-note-child" ng-style="{'color':tx.wallet.color}"></i> <i class="icon ion-record wallet-activity-note-child" ng-style="{'color':tx.wallet.color}"></i>
<span class="wallet-activity-note-child">{{tx.wallet.name}}</span> <span class="wallet-activity-note-child">{{tx.wallet.name}}</span>

View file

@ -1,7 +1,6 @@
<ion-modal-view ng-controller="amazonCardDetailsController"> <ion-modal-view ng-controller="amazonCardDetailsController">
<ion-header-bar align-title="center" class="tab-bar"> <ion-header-bar align-title="center" class="bar-royal">
<button class="button button-clear button-positive" <button class="button button-clear" ng-click="cancel()">
ng-click="cancel()">
Close Close
</button> </button>
<h1 class="title">Details</h1> <h1 class="title">Details</h1>
@ -23,7 +22,7 @@
Claim code: <span class="text-bold" copy-to-clipboard="card.claimCode">{{card.claimCode}}</span> Claim code: <span class="text-bold" copy-to-clipboard="card.claimCode">{{card.claimCode}}</span>
</div> </div>
<div class="m10t" ng-show="card.cardStatus == 'Fulfilled'"> <div class="m10t" ng-show="card.cardStatus == 'Fulfilled'">
<button class="button black round tiny" <button class="button button-positive"
ng-click="openExternalLink('https://www.amazon.com/gc/redeem?claimCode=' + card.claimCode, '_system')"> ng-click="openExternalLink('https://www.amazon.com/gc/redeem?claimCode=' + card.claimCode, '_system')">
Redeem Now Redeem Now
</button> </button>
@ -48,18 +47,12 @@
</span> </span>
</div> </div>
</div> </div>
<div class="size-12 m10t text-center"> <div class="m10t text-center">
<a ng-click="openExternalLink(card.invoiceUrl)">See invoice</a> <a class="button button-clear button-calm" ng-click="openExternalLink(card.invoiceUrl)">See invoice</a>
</div> </div>
</div> </div>
<div class="box-notification m20b" ng-show="error" ng-click="error = null"> <div class="box-notification warning" ng-show="card.status == 'FAILURE' || card.status == 'RESEND'">
<span class="text-warning">
{{error}}
</span>
</div>
<div class="text-center size-12 text-warning m10" ng-show="card.status == 'FAILURE' || card.status == 'RESEND'">
There was a failure to the create gift card. Please, contact BitPay support. There was a failure to the create gift card. Please, contact BitPay support.
</div> </div>
@ -86,7 +79,7 @@
</div> </div>
<div class="size-12 white p15 m30v"> <div class="size-12 p15 m30v">
* <a ng-click="openExternalLink('http://amazon.com')">Amazon.com</a> is not a sponsor of this promotion. * <a ng-click="openExternalLink('http://amazon.com')">Amazon.com</a> is not a sponsor of this promotion.
Except as required by law, <a ng-click="openExternalLink('http://amazon.com')">Amazon.com</a> Except as required by law, <a ng-click="openExternalLink('http://amazon.com')">Amazon.com</a>
Gift Cards ("GCs") cannot be transferred for value or redeemed for cash. GCs may be used only for purchases of Gift Cards ("GCs") cannot be transferred for value or redeemed for cash. GCs may be used only for purchases of

View file

@ -1,6 +1,6 @@
<ion-modal-view ng-controller="glideraTxDetailsController"> <ion-modal-view ng-controller="glideraTxDetailsController">
<ion-header-bar align-title="center" class="bar-royal"> <ion-header-bar align-title="center" class="bar-royal">
<button class="button button-clear button-positive" <button class="button button-clear"
ng-click="cancel()"> ng-click="cancel()">
Close Close
</button> </button>

View file

@ -10,7 +10,7 @@
<ion-content ng-controller="termsController" ng-init="accept = false;"> <ion-content ng-controller="termsController" ng-init="accept = false;">
<div ng-include="'views/includes/terms.html'"></div> <div ng-include="'views/includes/terms.html'"></div>
<div class="padding-vertical" ng-show="lang != 'en'"> <div class="padding-vertical" ng-show="lang != 'en'">
<a ng-click="openExternalLink('https://copay.io/disclaimer')" translate>Official English Disclaimer</a> <a ng-click="openExternalLink(disclaimerUrl)" translate>Official English Disclaimer</a>
</div> </div>
<div id="agree-to-terms"> <div id="agree-to-terms">
<ion-checkbox ng-model="accept"></ion-checkbox> <ion-checkbox ng-model="accept"></ion-checkbox>

View file

@ -14,7 +14,7 @@
<button class="button button-block get-started col col-75" href ui-sref="onboarding.tour" translate>Get started</button> <button class="button button-block get-started col col-75" href ui-sref="onboarding.tour" translate>Get started</button>
</div> </div>
<div class="row"> <div class="row">
<button class="button button-block restore col col-75" translate href ui-sref="onboarding.import.phrase({'fromOnboarding':true})">Restore</button> <button class="button button-block restore col col-75" translate href ui-sref="onboarding.import({'fromOnboarding':true})">Restore</button>
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -7,41 +7,41 @@
<ion-content ng-controller="preferencesController" ng-init="init()"> <ion-content ng-controller="preferencesController" ng-init="init()">
<div class="list"> <div class="list">
<div class="item item-divider"></div> <div class="item item-divider"></div>
<div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesAlias"> <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesAlias">
<span translate>Name</span> <span translate>Name</span>
<span class="item-note"> <span class="item-note">
{{wallet.name}} {{wallet.name}}
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item" ng-show="wallet.isPrivKeyExternal()"> <a class="item" ng-show="wallet.isPrivKeyExternal()">
<span translate>Hardware Wallet</span> <span translate>Hardware Wallet</span>
<span class="item-note"> <span class="item-note">
{{wallet.externalSource}} {{wallet.externalSource}}
</span> </span>
</div> </div>
<div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesColor"> <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesColor">
<span translate>Color</span> <span translate>Color</span>
<span class="item-note" ng-style="{'color': wallet.color}"> <span class="item-note" ng-style="{'color': wallet.color}">
&block; &block;
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesEmail"> <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesEmail">
<span translate>Email Notifications</span> <span translate>Email Notifications</span>
<span class="item-note"> <span class="item-note">
<span ng-if="!wallet.email" translate>Disabled</span> <span ng-if="!wallet.email" translate>Disabled</span>
<span ng-if="wallet.email">{{wallet.email}}</span> <span ng-if="wallet.email">{{wallet.email}}</span>
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-divider" translate> <div class="item item-divider" translate>
Security Security
</div> </div>
<div class="item item-icon-right" href ui-sref="tabs.preferences.backup" ng-hide="wallet.isPrivKeyExternal()"> <a class="item item-icon-right" ui-sref="tabs.preferences.backup" ng-hide="wallet.isPrivKeyExternal()">
<span translate>Backup</span> <span translate>Backup</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div ng-show="wallet.canSign()"> <div ng-show="wallet.canSign()">
<ion-toggle ng-model="encryptEnabled" toggle-class="toggle-balanced" ng-change="encryptChange()"> <ion-toggle ng-model="encryptEnabled" toggle-class="toggle-balanced" ng-change="encryptChange()">
<span class="toggle-label" translate>Request Spending Password</span> <span class="toggle-label" translate>Request Spending Password</span>
@ -52,15 +52,15 @@
<span class="toggle-label" translate>Request Fingerprint</span> <span class="toggle-label" translate>Request Fingerprint</span>
</ion-toggle> </ion-toggle>
</div> </div>
<div class="item item-icon-right" href ui-sref="tabs.preferences.deleteWords" ng-show ="!deleted"> <a class="item item-icon-right" ui-sref="tabs.preferences.deleteWords" ng-show ="!deleted">
<span translate>Delete recovery phrase</span> <span translate>Delete recovery phrase</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-divider"></div> <div class="item item-divider"></div>
<div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesAdvanced"> <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesAdvanced">
<span translate>Advanced</span> <span translate>Advanced</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -27,21 +27,21 @@
</div> </div>
<div class="item item-divider"> <div class="item item-divider">
</div> </div>
<div class="item item-icon-left item-icon-right" href ui-sref="tabs.termsOfUse"> <a class="item item-icon-left item-icon-right" ui-sref="tabs.termsOfUse">
<i class="icon ion-ios-list-outline"></i> <i class="icon ion-ios-list-outline"></i>
<span translate>Terms of Use</span> <span translate>Terms of Use</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-left item-icon-right" href ui-sref="tabs.translators"> <a class="item item-icon-left item-icon-right" ui-sref="tabs.translators">
<i class="icon ion-ios-people-outline"></i> <i class="icon ion-ios-people-outline"></i>
<span translate>Translators</span> <span translate>Translators</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-left item-icon-right" href ui-sref="tabs.logs"> <a class="item item-icon-left item-icon-right" ui-sref="tabs.logs">
<i class="icon ion-ios-copy-outline"></i> <i class="icon ion-ios-copy-outline"></i>
<span translate>Session log</span> <span translate>Session log</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -9,30 +9,30 @@
<div class="list"> <div class="list">
<div class="item item-divider"> <div class="item item-divider">
</div> </div>
<div class="item item-icon-right" href ui-sref="tabs.preferences.information"> <a class="item item-icon-right" ui-sref="tabs.preferences.information">
<span translate>Wallet Information</span> <span translate>Wallet Information</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-right" ng-show="index.network == 'livenet'" href ui-sref="tabs.preferences.paperWallet"> <a class="item item-icon-right" ng-show="index.network == 'livenet'" ui-sref="tabs.preferences.paperWallet">
<span translate>Sweep paper wallet</span> <span translate>Sweep paper wallet</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-right" href ui-sref="tabs.preferences.export.file"> <a class="item item-icon-right" ui-sref="tabs.preferences.export.file">
<span translate>Export Wallet</span> <span translate>Export Wallet</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesBwsUrl"> <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesBwsUrl">
<span translate>Wallet Service URL</span> <span translate>Wallet Service URL</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesHistory"> <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesHistory">
<span translate>Transaction History</span> <span translate>Transaction History</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-right" href ui-sref="tabs.preferences.delete"> <a class="item item-icon-right" ui-sref="tabs.preferences.delete">
<span translate>Delete Wallet</span> <span translate>Delete Wallet</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -10,7 +10,8 @@
<ion-content ng-controller="preferencesGlideraController" ng-init="init()"> <ion-content ng-controller="preferencesGlideraController" ng-init="init()">
<ul ng-if="token" class="list"> <ul class="list">
<div ng-if="token">
<div class="item item-divider"> <div class="item item-divider">
Permissions Permissions
</div> </div>
@ -38,10 +39,9 @@
{{permissions.transaction_history}} {{permissions.transaction_history}}
</span> </span>
</li> </li>
</ul> </div>
<ul ng-if="permissions.view_email_address" <div ng-if="permissions.view_email_address">
class="list">
<div class="item item-divider"> <div class="item item-divider">
Email Email
</div> </div>
@ -57,10 +57,9 @@
{{email.userEmailIsSetup}} {{email.userEmailIsSetup}}
</span> </span>
</li> </li>
</ul> </div>
<ul ng-if="permissions.personal_info" <div ng-if="permissions.personal_info">
class="list">
<div class="item item-divider"> <div class="item item-divider">
Personal Information Personal Information
</div> </div>
@ -137,10 +136,9 @@
{{personalInfo.basicInfoState}} {{personalInfo.basicInfoState}}
</span> </span>
</li> </li>
</ul> </div>
<ul ng-if="token" <div ng-if="token">
class="list">
<div class="item item-divider"> <div class="item item-divider">
Status Status
</div> </div>
@ -200,10 +198,9 @@
{{status.country}} {{status.country}}
</span> </span>
</li> </li>
</ul> </div>
<ul ng-if="token" <div ng-if="token">
class="list">
<div class="item item-divider"> <div class="item item-divider">
Limits Limits
</div> </div>
@ -262,9 +259,8 @@
{{limits.transactDisabledPendingFirstTransaction}} {{limits.transactDisabledPendingFirstTransaction}}
</span> </span>
</li> </li>
</ul> </div>
<ul class="list">
<div class="item item-divider"> <div class="item item-divider">
Account Account
</div> </div>

View file

@ -34,7 +34,7 @@
<form name="sellPriceForm" ng-if="token" <form name="sellPriceForm" ng-if="token"
ng-submit="sell.get2faCode(token)" novalidate> ng-submit="sell.get2faCode(token)" novalidate>
<div class="list"> <div class="card list">
<label class="item item-input item-stacked-label"> <label class="item item-input item-stacked-label">
<span class="input-label"><span>Amount in</span> {{showAlternative ? 'USD' : 'BTC'}}</span> <span class="input-label"><span>Amount in</span> {{showAlternative ? 'USD' : 'BTC'}}</span>
<input ng-show="!showAlternative" <input ng-show="!showAlternative"
@ -83,7 +83,7 @@
... ...
</div> </div>
<button class="button button-block" <button class="button button-block button-positive"
type="submit" type="submit"
ng-disabled="limits.transactDisabledPendingFirstTransaction || !sell.sellPrice.qty"> ng-disabled="limits.transactDisabledPendingFirstTransaction || !sell.sellPrice.qty">
Continue Continue
@ -99,12 +99,12 @@
</p> </p>
<form name="sellForm" <form name="sellForm"
ng-submit="sell.createTx(token, permissions, twoFaCode)" novalidate> ng-submit="sell.createTx(token, permissions, twoFaCode)" novalidate>
<div class="list"> <div class="card list">
<label class="item item-input"> <label class="item item-input">
<input type="number" ng-model="twoFaCode" placeholder="2FA Code" required ignore-mouse-wheel> <input type="number" ng-model="twoFaCode" placeholder="2FA Code" required ignore-mouse-wheel>
</label> </label>
</div> </div>
<button class="button button-block" <button class="button button-block button-positive"
type="submit" type="submit"
ng-disabled="sellForm.$invalid "> ng-disabled="sellForm.$invalid ">
Sell Sell
@ -121,7 +121,7 @@
A transfer has been initiated to your bank account and should arrive in 4-6 business days. A transfer has been initiated to your bank account and should arrive in 4-6 business days.
</p> </p>
<button class="button button-block" ui-sref="glidera.main">OK</button> <button class="button button-block button-positive" ui-sref="glidera.main">OK</button>
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -9,7 +9,7 @@
<div class="list card" ng-hide="!txps[0]"> <div class="list card" ng-hide="!txps[0]">
<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 ion-ios-arrow-right nav-item-arrow-right"></i> <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" ng-show="txpsN>3" translate> {{txpsN}}</span>
</a> </a>
@ -22,7 +22,7 @@
<div class="list card"> <div class="list card">
<a class="item item-icon-right item-heading" ui-sref="tabs.activity" translate> <a class="item item-icon-right item-heading" ui-sref="tabs.activity" translate>
Recent Activity Recent Activity
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
<span ng-if="fetchingNotifications" class="item text-center"> <span ng-if="fetchingNotifications" class="item text-center">
<ion-spinner icon="lines"></ion-spinner> <ion-spinner icon="lines"></ion-spinner>
@ -40,7 +40,7 @@
</div> </div>
<a ng-repeat="wallet in wallets track by $index" <a ng-repeat="wallet in wallets track by $index"
class="item item-icon-left item-big-icon-left item-icon-right" class="item item-icon-left item-big-icon-left item-icon-right"
ui-sref="tabs.details({'walletId': wallet.id})"> ng-click="openWallet(wallet)">
<i class="icon big-icon-svg"> <i class="icon big-icon-svg">
<img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}"/> <img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}"/>
</i> </i>
@ -57,7 +57,7 @@
<p ng-show="wallet.isComplete() && wallet.balanceHidden"> <p ng-show="wallet.isComplete() && wallet.balanceHidden">
<strong class="size-12" translate>[Balance Hidden]</strong> <strong class="size-12" translate>[Balance Hidden]</strong>
</p> </p>
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
<a ui-sref="bitpayCard.main" ng-show="externalServices.BitpayCard" class="item item-icon-left"> <a ui-sref="bitpayCard.main" ng-show="externalServices.BitpayCard" class="item item-icon-left">
<i class="icon ion-card"></i> <i class="icon ion-card"></i>
@ -73,9 +73,8 @@
<div class="item item-heading" translate> <div class="item item-heading" translate>
Buy & Sell Bitcoin Buy & Sell Bitcoin
</div> </div>
<a ng-show="glideraEnabled" ui-sref="glidera.main" class="item item-icon-right"> <a ng-show="glideraEnabled" ui-sref="glidera.main" class="item">
<img src="img/glidera-logo.png" width="90"/> <img src="img/glidera-logo.png" width="90"/>
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i>
</a> </a>
<!-- disable coinbase for this release --> <!-- disable coinbase for this release -->
<!-- <a ng-show="coinbaseEnabled" ui-sref="exchange.coinbase" class="item"> <!-- <a ng-show="coinbaseEnabled" ui-sref="exchange.coinbase" class="item">
@ -93,28 +92,28 @@
<img class="icon-create-wallet"/> <img class="icon-create-wallet"/>
</i> </i>
<span translate>Create a bitcoin wallet</span> <span translate>Create a bitcoin wallet</span>
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
<a ng-show="!externalServices.BuyAndSell" ui-sref="buyandsell" class="item item-icon-left item-big-icon-left item-icon-right"> <a ng-show="!externalServices.BuyAndSell" ui-sref="buyandsell" class="item item-icon-left item-big-icon-left item-icon-right">
<i class="icon big-icon-svg"> <i class="icon big-icon-svg">
<img class="icon-buy-bitcoin"/> <img class="icon-buy-bitcoin"/>
</i> </i>
<span translate>Buy Bitcoin</span> <span translate>Buy Bitcoin</span>
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
<a ui-sref="bitpayCard.main" ng-show="!externalServices.BitpayCard" class="item item-icon-left item-big-icon-left item-icon-right"> <a ui-sref="bitpayCard.main" ng-show="!externalServices.BitpayCard" class="item item-icon-left item-big-icon-left item-icon-right">
<i class="icon big-icon-svg"> <i class="icon big-icon-svg">
<img class="icon-bitpay-card"/> <img class="icon-bitpay-card"/>
</i> </i>
<span translate>Add BitPay Card</span> <span translate>Add BitPay Card</span>
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
<a ui-sref="amazon.main" ng-show="!externalServices.AmazonGiftCards" class="item item-icon-left item-big-icon-left item-icon-right"> <a ui-sref="amazon.main" ng-show="!externalServices.AmazonGiftCards" class="item item-icon-left item-big-icon-left item-icon-right">
<i class="icon big-icon-svg"> <i class="icon big-icon-svg">
<img class="icon-gift"/> <img class="icon-gift"/>
</i> </i>
<span translate>Add Amazon Gift Card</span> <span translate>Add Amazon Gift Card</span>
<i class="icon ion-ios-arrow-right nav-item-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</a> </a>
</div> </div>

View file

@ -1,61 +1,40 @@
<ion-view> <form name="importForm" ng-submit="importBlob(importForm)" novalidate>
<ion-nav-bar class="bar-royal" ng-controller="backController"> <div class="list card">
<ion-nav-buttons side="primary"> <label class="item item-input item-stacked-label no-border" ng-show="!isSafari && !isCordova">
<button class="button back-button" ng-click="importGoBack()"> <div class="input-label" translate>Choose a backup file from your computer</div>
<i class="icon ion-ios-arrow-thin-left"></i> <div>
</button> <input type="file"
</ion-nav-buttons> placeholder="{{'Select a backup file'|translate}}"
<ion-nav-title>{{'Import wallet' | translate}}</ion-nav-title> ng-model="formData.backupFile" ng-file-select>
</ion-nav-bar>
<ion-content ng-controller="importController" ng-init="type='file'">
<form name="importForm" ng-submit="importBlob(importForm)" novalidate>
<div class="list card">
<label class="item item-input item-stacked-label no-border" ng-show="!isSafari && !isCordova">
<div class="input-label" translate>Choose a backup file from your computer</div>
<div>
<input type="file"
placeholder="{{'Select a backup file'|translate}}"
name="backupFile"
ng-model="backupFile" ng-file-select>
</div>
</label>
<label class="item item-input item-stacked-label" ng-show="isSafari || isCordova">
<span class="input-label" translate>Paste the backup plain text code</span>
<textarea name="backupText" ng-model="backupText" rows="5"></textarea>
</label>
<label class="item item-input item-stacked-label">
<span class="input-label" translate>Password</span>
<input type="password"
placeholder="{{'Your password'|translate}}"
name="password"
ng-model="password">
</label>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>
<div ng-show="showAdv">
<label class="item item-input item-stacked-label">
<span class="input-label">Wallet Service URL</span>
<input type="text" id="bwsurl" name="bwsurl" ng-model="bwsurl">
</label>
</div>
</div> </div>
</label>
<button type="submit" class="button button-block button-positive" ng-disabled="importForm.$invalid || !password " translate> <label class="item item-input item-stacked-label" ng-show="isSafari || isCordova">
Import backup <span class="input-label" translate>Paste the backup plain text code</span>
</button> <textarea ng-model="formData.backupText" rows="5"></textarea>
</form> </label>
</ion-content> <label class="item item-input item-stacked-label">
</ion-view> <span class="input-label" translate>Password</span>
<input type="password"
placeholder="{{'Your password'|translate}}"
ng-model="formData.password">
</label>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>
<div ng-show="showAdv">
<label class="item item-input item-stacked-label">
<span class="input-label">Wallet Service URL</span>
<input type="text" ng-model="formData.bwsurl">
</label>
</div>
</div>
<button type="submit" class="button button-block button-positive" ng-disabled="importForm.$invalid || !formData.password" translate>
Import backup
</button>
</form>

View file

@ -1,69 +1,44 @@
<ion-view> <form name="importForm3" ng-submit="importHW(importForm3)" novalidate>
<ion-nav-bar class="bar-royal" ng-controller="backController"> <div class="card" ng-show="!seedOptions[0]">
<ion-nav-buttons side="primary"> <div class="item item-text-wrap" translate>
<button class="button back-button" ng-click="importGoBack()"> No hardware wallets supported on this device
<i class="icon ion-ios-arrow-thin-left"></i> </div>
</button> </div>
</ion-nav-buttons>
<ion-nav-title>{{'Import wallet' | translate}}</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="importController" ng-init="type='hwWallet'"> <div ng-show="seedOptions[0]">
<div class="card list">
<form name="importForm3" ng-submit="importHW(importForm3)" novalidate> <label class="item item-input item-select">
<div class="input-label" translate>
<div class="card" ng-show="!seedOptions[0]"> Wallet Type
<div class="item item-text-wrap" translate>
No hardware wallets supported on this device
</div> </div>
<select ng-model="seedSource" ng-options="seed as seed.label for seed in seedOptions"></select>
</label>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'trezor' || seedSource.id == 'ledger'">
<span class="input-label" translate>Account Number</span>
<input type="number" ng-model="formData.account" ignore-mouse-wheel>
</label>
<ion-toggle ng-show="seedSource.id == 'trezor'" ng-model="formData.isMultisig" toggle-class="toggle-positive">
<span translate>Shared Wallet</span>
</ion-toggle>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>
<div ng-show="showAdv">
<label class="item item-input item-stacked-label">
<span class="input-label">Wallet Service URL</span>
<input type="text" ng-model="formData.bwsurl">
</label>
</div> </div>
</div>
<div ng-show="seedOptions[0]"> <button translate type="submit" class="button button-block button-positive">
<div class="card list"> Import
</button>
<label class="item item-input item-select"> </div> <!-- seedoptions show -->
<div class="input-label" translate> </form>
Wallet Type
</div>
<select ng-model="seedSource"
ng-options="seed as seed.label for seed in seedOptions"
ng-change="setSeedSource()">
</select>
</label>
<label class="item item-input item-stacked-label"
ng-show="seedSourceId == 'trezor' || seedSourceId == 'ledger'">
<span class="input-label" translate>Account Number</span>
<input type="number" id="account" ng-model="account" ignore-mouse-wheel>
</label>
<ion-toggle ng-show="seedSourceId == 'trezor'"
ng-model="isMultisig"
toggle-class="toggle-positive">
<span translate>Shared Wallet</span>
</ion-toggle>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>
<div ng-show="showAdv">
<label class="item item-input item-stacked-label">
<span class="input-label">Wallet Service URL</span>
<input type="text" id="bwsurl" name="bwsurl" ng-model="bwsurl">
</label>
</div>
</div>
<button translate type="submit" class="button button-block button-positive">
Import
</button>
</div> <!-- seedoptions show -->
</form>
</ion-content>
</ion-view>

View file

@ -1,84 +1,66 @@
<ion-view> <div ng-show="importErr" class="padding assertive" ng-click="importErr = null">
<ion-nav-bar class="bar-royal" ng-controller="backController"> <div translate>Could not access the wallet at the server. Please check:</div>
<ion-nav-buttons side="primary"> <ul>
<button class="button back-button" ng-click="importGoBack()"> <li translate>The password of the recovery phrase (if set)</li>
<i class="icon ion-ios-arrow-thin-left"></i> <li translate>The derivation path</li>
</button> <li translate>The wallet service URL</li>
</ion-nav-buttons> </ul>
<ion-nav-title>Import wallet</ion-nav-title> <div translate>
</ion-nav-bar> NOTE: To import a wallet from a 3rd party software, please go to Add Wallet &gt; Create Wallet, and specify the Recovery Phrase there.
</div>
</div>
<ion-content ng-controller="importController" ng-init="type='12'"> <form name="importForm12" ng-submit="importMnemonic(importForm12)" novalidate>
<div class="list card">
<div ng-show="importErr" class="padding assertive" ng-click="importErr = null"> <div class="row">
<div translate>Could not access the wallet at the server. Please check:</div> <div class="col col-90">
<ul> <label class="item item-input item-stacked-label no-border">
<li translate>The password of the recovery phrase (if set)</li> <span class="input-label" translate>Type the Recovery Phrase (usually 12 words)</span>
<li translate>The derivation path</li> <textarea ng-model="formData.words"
<li translate>The wallet service URL</li> rows="3"
</ul> autocapitalize="off"
<div translate> spellcheck="false"></textarea>
NOTE: To import a wallet from a 3rd party software, please go to Add Wallet &gt; Create Wallet, and specify the Recovery Phrase there. </label>
</div>
<div class="col text-center">
<qr-scanner class="qr-icon size-24" on-scan="processWalletInfo(data)"></qr-scanner>
</div> </div>
</div> </div>
<form name="importForm12" ng-submit="importMnemonic(importForm12)" novalidate> <ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
<div class="list card"> <span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>
<div class="row"> <div ng-show="showAdv">
<div class="col col-90"> <label class="item item-input item-stacked-label">
<label class="item item-input item-stacked-label no-border"> <span class="input-label" translate>Password</span>
<span class="input-label" translate>Type the Recovery Phrase (usually 12 words)</span> <input type="text"
<textarea name="words" placeholder="{{'The recovery phrase could require a password to be imported'|translate}}"
ng-model="words" autocapitalize="off"
rows="3" ng-model="formData.passphrase">
autocapitalize="off" </label>
spellcheck="false"></textarea>
</label>
</div>
<div class="col text-center">
<qr-scanner class="qr-icon size-24" on-scan="processWalletInfo(data)"></qr-scanner>
</div>
</div>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable"> <label class="item item-input item-stacked-label">
<span translate ng-show="!showAdv">Show advanced options</span> <span class="input-label" translate>Derivation Path</span>
<span translate ng-show="showAdv">Hide advanced options</span> <input type="text"
</ion-toggle> placeholder="{{'BIP32 path for address derivation'|translate}}"
ng-model="formData.derivationPath">
</label>
<div ng-show="showAdv"> <label class="item item-input item-stacked-label">
<span class="input-label">Wallet Service URL</span>
<input type="text" ng-model="formData.bwsurl">
</label>
<label class="item item-input item-stacked-label"> <ion-toggle ng-model="formData.testnetEnabled" ng-change="setDerivationPath()" toggle-class="toggle-positive">
<span class="input-label">Wallet Service URL</span> Testnet
<input type="text" id="bwsurl" name="bwsurl" ng-model="bwsurl"> </ion-toggle>
</label> </div>
</div>
<label class="item item-input item-stacked-label"> <button type="submit"
<span class="input-label" translate>Password</span> class="button button-block button-positive"
<input type="text" ng-disabled="importForm12.$invalid" translate>Import
placeholder="{{'The recovery phrase could require a password to be imported'|translate}}" </button>
autocapitalize="off" </form>
name="passphrase"
ng-model="passphrase">
</label>
<label class="item item-input item-stacked-label">
<span class="input-label" translate>Derivation Path</span>
<input type="text"
placeholder="{{'BIP32 path for address derivation'|translate}}"
name="derivationPath"
ng-model="derivationPath">
</label>
<ion-toggle ng-model="testnetEnabled" ng-change="setDerivationPath(testnetEnabled)" toggle-class="toggle-positive">
Testnet
</ion-toggle>
</div>
</div>
<button type="submit"
class="button button-block button-positive"
ng-disabled="importForm12.$invalid" translate>Import</button>
</form>
</ion-content>
</ion-view>

View file

@ -6,48 +6,49 @@
<ion-content ng-controller="tabSettingsController" ng-init="init()"> <ion-content ng-controller="tabSettingsController" ng-init="init()">
<div class="list"> <div class="list">
<div class="item item-divider"></div> <div class="item item-divider"></div>
<div class="item item-icon-left" ng-click="openAddressbookModal()"> <a class="item item-icon-left item-icon-right" ng-click="openAddressbookModal()">
<i class="icon ion-ios-book-outline"></i> <i class="icon ion-ios-book-outline"></i>
<span translate>Address Book</span> <span translate>Address Book</span>
</div> <i class="icon nav-item-arrow-right"></i>
</a>
<div class="item item-divider" translate>Preferences</div> <div class="item item-divider" translate>Preferences</div>
<div class="item item-icon-left item-icon-right" ui-sref="tabs.language"> <a class="item item-icon-left item-icon-right" ui-sref="tabs.language">
<i class="icon ion-ios-chatbubble-outline"></i> <i class="icon ion-ios-chatbubble-outline"></i>
<span translate>Language</span> <span translate>Language</span>
<span class="item-note"> <span class="item-note">
{{currentLanguageName|translate}} {{currentLanguageName|translate}}
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-left item-icon-right" ui-sref="tabs.unit"> <a class="item item-icon-left item-icon-right" ui-sref="tabs.unit">
<i class="icon ion-ios-calculator-outline"></i> <i class="icon ion-ios-calculator-outline"></i>
<span translate>Unit</span> <span translate>Unit</span>
<span class="item-note"> <span class="item-note">
{{unitName}} {{unitName}}
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-left item-icon-right" ui-sref="tabs.altCurrency"> <a class="item item-icon-left item-icon-right" ui-sref="tabs.altCurrency">
<i class="icon ion-social-usd-outline"></i> <i class="icon ion-social-usd-outline"></i>
<span translate>Alternative Currency</span> <span translate>Alternative Currency</span>
<span class="item-note"> <span class="item-note">
{{selectedAlternative.name}} {{selectedAlternative.name}}
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-icon-left item-icon-right" ui-sref="tabs.fee"> <a class="item item-icon-left item-icon-right" ui-sref="tabs.fee">
<i class="icon ion-social-bitcoin-outline"></i> <i class="icon ion-social-bitcoin-outline"></i>
<span translate>Bitcoin Network Fee Policy</span> <span translate>Bitcoin Network Fee Policy</span>
<span class="item-note"> <span class="item-note">
{{feeOpts[currentFeeLevel]|translate}} {{feeOpts[currentFeeLevel]|translate}}
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div ng-show="usePushNotifications && PNEnabledByUser"> <div ng-show="usePushNotifications && PNEnabledByUser">
<div class="item item-divider" translate>Notifications</div> <div class="item item-divider" translate>Notifications</div>
@ -84,7 +85,7 @@
</ion-toggle> </ion-toggle>
<div class="item item-divider" translate>Wallets Preferences</div> <div class="item item-divider" translate>Wallets Preferences</div>
<div class="item item-icon-left item-icon-right" href <a class="item item-icon-left item-icon-right" href
ui-sref="tabs.preferences.main({'walletId': item.id})" ui-sref="tabs.preferences.main({'walletId': item.id})"
ng-repeat="item in wallets track by $index"> ng-repeat="item in wallets track by $index">
<i class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i> <i class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i>
@ -95,15 +96,15 @@
<span class="badge badge-assertive" ng-show="!item.isComplete()" translate> <span class="badge badge-assertive" ng-show="!item.isComplete()" translate>
Incomplete Incomplete
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
<div class="item item-divider"></div> <div class="item item-divider"></div>
<div class="item item-icon-left item-icon-right" href ui-sref="tabs.about"> <a class="item item-icon-left item-icon-right" href ui-sref="tabs.about">
<i class="icon ion-ios-information-outline"></i> <i class="icon ion-ios-information-outline"></i>
<span translate>About</span> {{appName}} <span translate>About</span> {{appName}}
<i class="icon ion-ios-arrow-right"></i> <i class="icon nav-item-arrow-right"></i>
</div> </a>
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -10,22 +10,7 @@
</ion-header-bar> </ion-header-bar>
<ion-content delegate-handle="my-handle"> <ion-content delegate-handle="my-handle">
<div ng-show="!wallet" translate> <div class="oh pr" ng-show="wallet && wallet.isComplete()">
No Wallet
<a href ui-sref="tabs.home" class="button" translate>
Go home
</a>
</div>
<div ng-show="!wallet.isComplete()">
<a class="button button-block button-assertive" href ui-sref="wallet.copayers" class="button" translate>
Wallet Incomplete
</a>
</div>
<div class="oh pr" ng-show="wallet && wallet.isComplete()">
<div ng-style="{'background-color':wallet.color}" class="amount"> <div ng-style="{'background-color':wallet.color}" class="amount">
<div ng-if="!notAuthorized && !updatingStatus"> <div ng-if="!notAuthorized && !updatingStatus">

View file

@ -1,13 +1,15 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('copayersController', angular.module('copayApp.controllers').controller('copayersController',
function($scope, $log, $ionicPopup, profileService, platformInfo, gettextCatalog, $stateParams, ongoingProcess, $state) { function($scope, $log, $ionicNavBarDelegate, $stateParams, $state, profileService, popupService, platformInfo, gettextCatalog, ongoingProcess) {
if (!$stateParams.walletId) { if (!$stateParams.walletId) {
$log.debug('No wallet provided...back to home'); $log.debug('No wallet provided...back to home');
return $state.transitionTo('tabs.home'); return $state.go('tabs.home');
} }
var wallet = profileService.getWallet($stateParams.walletId); var wallet = profileService.getWallet($stateParams.walletId);
$ionicNavBarDelegate.title(wallet.name);
var secret; var secret;
try { try {
secret = wallet.status.wallet.secret; secret = wallet.status.wallet.secret;
@ -15,28 +17,12 @@ angular.module('copayApp.controllers').controller('copayersController',
$scope.wallet = wallet; $scope.wallet = wallet;
$scope.secret = secret; $scope.secret = secret;
$scope.copayers = wallet.status.wallet.copayers;
$scope.isCordova = platformInfo.isCordova; $scope.isCordova = platformInfo.isCordova;
$scope.showDeletePopup = function() { $scope.showDeletePopup = function() {
var popup = $ionicPopup.show({ popupService.showConfirm(gettextCatalog.getString('Confirm'), gettextCatalog.getString('Are you sure you want to delete this wallet?'), function(res) {
template: '<span>' + gettextCatalog.getString('Are you sure you want to delete this wallet?') + '</span>', if (res) deleteWallet();
title: gettextCatalog.getString('Confirm'),
buttons: [
{
text: gettextCatalog.getString('Cancel'),
onTap: function(e) {
popup.close();
}
},
{
text: gettextCatalog.getString('Accept'),
type: 'button-positive',
onTap: function(e) {
deleteWallet();
popup.close();
}
}
]
}); });
}; };
@ -47,7 +33,7 @@ angular.module('copayApp.controllers').controller('copayersController',
if (err) { if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err.message || err); popupService.showAlert(gettextCatalog.getString('Error'), err.message || err);
} else { } else {
$state.transitionTo('tabs.home'); $state.go('tabs.home');
} }
}); });
}; };

View file

@ -1,21 +1,26 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('importController', angular.module('copayApp.controllers').controller('importController',
function($scope, $rootScope, $timeout, $log, $state, $stateParams, $ionicHistory, profileService, configService, sjcl, gettext, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog) { function($scope, $timeout, $log, $state, $stateParams, 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;
var reader = new FileReader(); var reader = new FileReader();
var defaults = configService.getDefaults(); var defaults = configService.getDefaults();
var errors = bwcService.getErrors(); var errors = bwcService.getErrors();
$scope.isSafari = platformInfo.isSafari;
$scope.isCordova = platformInfo.isCordova;
$scope.bwsurl = defaults.bws.url;
$scope.derivationPath = derivationPathHelper.default;
$scope.account = 1;
$scope.importErr = false;
var updateSeedSourceSelect = function() { $scope.init = function() {
$scope.isSafari = platformInfo.isSafari;
$scope.isCordova = platformInfo.isCordova;
$scope.formData = {};
$scope.formData.bwsurl = defaults.bws.url;
$scope.formData.derivationPath = derivationPathHelper.default;
$scope.formData.account = 1;
$scope.importErr = false;
if ($stateParams.code)
$scope.processWalletInfo($stateParams.code);
$scope.seedOptions = []; $scope.seedOptions = [];
if (isChromeApp) { if (isChromeApp) {
@ -36,6 +41,7 @@ angular.module('copayApp.controllers').controller('importController',
$scope.processWalletInfo = function(code) { $scope.processWalletInfo = function(code) {
if (!code) return; if (!code) return;
$scope.importErr = false; $scope.importErr = false;
var parsedCode = code.split('|'); var parsedCode = code.split('|');
@ -56,26 +62,19 @@ angular.module('copayApp.controllers').controller('importController',
if (info.type == 1 && info.hasPassphrase) if (info.type == 1 && info.hasPassphrase)
popupService.showAlert(gettextCatalog.getString('Password required. Make sure to enter your password in advanced options')); popupService.showAlert(gettextCatalog.getString('Password required. Make sure to enter your password in advanced options'));
$scope.derivationPath = info.derivationPath; $scope.formData.derivationPath = info.derivationPath;
$scope.testnetEnabled = info.network == 'testnet' ? true : false; $scope.formData.testnetEnabled = info.network == 'testnet' ? true : false;
$timeout(function() { $timeout(function() {
$scope.words = info.data; $scope.formData.words = info.data;
$rootScope.$apply(); $scope.$apply();
}, 1);
};
$scope.setType = function(type) {
$scope.type = type;
$timeout(function() {
$rootScope.$apply();
}, 1); }, 1);
}; };
var _importBlob = function(str, opts) { var _importBlob = function(str, opts) {
var str2, err; var str2, err;
try { try {
str2 = sjcl.decrypt($scope.password, str); str2 = sjcl.decrypt($scope.formData.password, str);
} catch (e) { } catch (e) {
err = gettextCatalog.getString('Could not decrypt file, check your password'); err = gettextCatalog.getString('Could not decrypt file, check your password');
$log.warn(e); $log.warn(e);
@ -83,9 +82,6 @@ angular.module('copayApp.controllers').controller('importController',
if (err) { if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err); popupService.showAlert(gettextCatalog.getString('Error'), err);
$timeout(function() {
$rootScope.$apply();
});
return; return;
} }
@ -147,7 +143,7 @@ angular.module('copayApp.controllers').controller('importController',
if (err) $log.error(err); if (err) $log.error(err);
}); });
} }
$state.go('tabs.home'); $state.go('tabs.home');
}); });
}, 100); }, 100);
@ -176,11 +172,8 @@ angular.module('copayApp.controllers').controller('importController',
}, 100); }, 100);
}; };
$scope.setDerivationPath = function(testnetEnabled) { $scope.setDerivationPath = function() {
if (testnetEnabled) $scope.formData.derivationPath = $scope.formData.testnetEnabled ? derivationPathHelper.defaultTestnet : derivationPathHelper.default;
$scope.derivationPath = derivationPathHelper.defaultTestnet;
else
$scope.derivationPath = derivationPathHelper.default;
}; };
$scope.getFile = function() { $scope.getFile = function() {
@ -188,7 +181,7 @@ angular.module('copayApp.controllers').controller('importController',
reader.onloadend = function(evt) { reader.onloadend = function(evt) {
if (evt.target.readyState == FileReader.DONE) { // DONE == 2 if (evt.target.readyState == FileReader.DONE) { // DONE == 2
var opts = {}; var opts = {};
opts.bwsurl = $scope.bwsurl; opts.bwsurl = $scope.formData.bwsurl;
_importBlob(evt.target.result, opts); _importBlob(evt.target.result, opts);
} }
} }
@ -200,9 +193,9 @@ angular.module('copayApp.controllers').controller('importController',
return; return;
} }
var backupFile = $scope.file; var backupFile = $scope.formData.file;
var backupText = form.backupText.$modelValue; var backupText = $scope.formData.backupText;
var password = form.password.$modelValue; var password = $scope.formData.password;
if (!backupFile && !backupText) { if (!backupFile && !backupText) {
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Please, select your backup file')); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Please, select your backup file'));
@ -213,7 +206,7 @@ angular.module('copayApp.controllers').controller('importController',
reader.readAsBinaryString(backupFile); reader.readAsBinaryString(backupFile);
} else { } else {
var opts = {}; var opts = {};
opts.bwsurl = $scope.bwsurl; opts.bwsurl = $scope.formData.bwsurl;
_importBlob(backupText, opts); _importBlob(backupText, opts);
} }
}; };
@ -225,19 +218,22 @@ angular.module('copayApp.controllers').controller('importController',
} }
var opts = {}; var opts = {};
if ($scope.bwsurl)
opts.bwsurl = $scope.bwsurl;
var pathData = derivationPathHelper.parse($scope.derivationPath); if ($scope.formData.bwsurl)
opts.bwsurl = $scope.formData.bwsurl;
var pathData = derivationPathHelper.parse($scope.formData.derivationPath);
if (!pathData) { if (!pathData) {
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Invalid derivation path')); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Invalid derivation path'));
return; return;
} }
opts.account = pathData.account; opts.account = pathData.account;
opts.networkName = pathData.networkName; opts.networkName = pathData.networkName;
opts.derivationStrategy = pathData.derivationStrategy; opts.derivationStrategy = pathData.derivationStrategy;
var words = form.words.$modelValue || null; var words = $scope.formData.words || null;
if (!words) { if (!words) {
popupService.showAlert(gettextCatalog.getString('Please enter the recovery phrase')); popupService.showAlert(gettextCatalog.getString('Please enter the recovery phrase'));
@ -254,9 +250,7 @@ angular.module('copayApp.controllers').controller('importController',
} }
} }
var passphrase = form.passphrase.$modelValue; opts.passphrase = $scope.formData.passphrase || null;
opts.passphrase = form.passphrase.$modelValue || null;
_importMnemonic(words, opts); _importMnemonic(words, opts);
}; };
@ -269,7 +263,7 @@ angular.module('copayApp.controllers').controller('importController',
} }
lopts.externalSource = 'trezor'; lopts.externalSource = 'trezor';
lopts.bwsurl = $scope.bwsurl; lopts.bwsurl = $scope.formData.bwsurl;
ongoingProcess.set('importingWallet', true); ongoingProcess.set('importingWallet', true);
$log.debug('Import opts', lopts); $log.debug('Import opts', lopts);
@ -285,45 +279,37 @@ angular.module('copayApp.controllers').controller('importController',
}; };
$scope.importHW = function(form) { $scope.importHW = function(form) {
if (form.$invalid || $scope.account < 0) { if (form.$invalid || $scope.formData.ccount < 0) {
popupService.showAlert(gettextCatalog.getString('There is an error in the form')); popupService.showAlert(gettextCatalog.getString('There is an error in the form'));
return; return;
} }
$scope.importErr = false; $scope.importErr = false;
var account = +$scope.account; var account = $scope.formData.ccount;
if ($scope.seedSourceId == 'trezor') { if ($scope.seedSource.id == 'trezor') {
if (account < 1) { if (account < 1) {
$scope.error = gettext('Invalid account number'); popupService.showAlert(gettextCatalog.getString('Invalid account number'));
return; return;
} }
account = account - 1; account = account - 1;
} }
switch ($scope.seedSourceId) { switch ($scope.seedSource.id) {
case ('ledger'): case ('ledger'):
ongoingProcess.set('connectingledger', true); ongoingProcess.set('connectingledger', true);
$scope.importLedger(account); $scope.importLedger(account);
break; break;
case ('trezor'): case ('trezor'):
ongoingProcess.set('connectingtrezor', true); ongoingProcess.set('connectingtrezor', true);
$scope.importTrezor(account, $scope.isMultisig); $scope.importTrezor(account, $scope.formData.isMultisig);
break; break;
default: default:
throw ('Error: bad source id'); throw ('Error: bad source id');
}; };
}; };
$scope.setSeedSource = function() {
if (!$scope.seedSource) return;
$scope.seedSourceId = $scope.seedSource.id;
$timeout(function() {
$rootScope.$apply();
});
};
$scope.importLedger = function(account) { $scope.importLedger = function(account) {
ledger.getInfoForNewWallet(true, account, function(err, lopts) { ledger.getInfoForNewWallet(true, account, function(err, lopts) {
ongoingProcess.clear(); ongoingProcess.clear();
@ -333,7 +319,7 @@ angular.module('copayApp.controllers').controller('importController',
} }
lopts.externalSource = 'ledger'; lopts.externalSource = 'ledger';
lopts.bwsurl = $scope.bwsurl; lopts.bwsurl = $scope.formData.bwsurl;
ongoingProcess.set('importingWallet', true); ongoingProcess.set('importingWallet', true);
$log.debug('Import opts', lopts); $log.debug('Import opts', lopts);
@ -349,7 +335,6 @@ angular.module('copayApp.controllers').controller('importController',
}; };
var finish = function(wallet) { var finish = function(wallet) {
walletService.updateRemotePreferences(wallet, {}, function() { walletService.updateRemotePreferences(wallet, {}, function() {
$log.debug('Remote preferences saved for:' + wallet.credentials.walletId) $log.debug('Remote preferences saved for:' + wallet.credentials.walletId)
}); });
@ -362,8 +347,4 @@ angular.module('copayApp.controllers').controller('importController',
} }
$state.go('tabs.home'); $state.go('tabs.home');
}; };
updateSeedSourceSelect();
$scope.setSeedSource();
if ($stateParams.code) $scope.processWalletInfo($stateParams.code);
}); });

View file

@ -5,6 +5,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
var tx = $scope.tx; var tx = $scope.tx;
var copayers = $scope.copayers; var copayers = $scope.copayers;
var isGlidera = $scope.isGlidera; var isGlidera = $scope.isGlidera;
var GLIDERA_LOCK_TIME = 6 * 60 * 60;
var now = Math.floor(Date.now() / 1000); var now = Math.floor(Date.now() / 1000);
$scope.loading = null; $scope.loading = null;

View file

@ -2,6 +2,7 @@
angular.module('copayApp.controllers').controller('termsController', function($scope, $log, $state, uxLanguage, profileService, externalLinkService) { angular.module('copayApp.controllers').controller('termsController', function($scope, $log, $state, uxLanguage, profileService, externalLinkService) {
$scope.lang = uxLanguage.currentLanguage; $scope.lang = uxLanguage.currentLanguage;
$scope.disclaimerUrl = $window.appConfig.disclaimerUrl;
$scope.confirm = function() { $scope.confirm = function() {
profileService.setDisclaimerAccepted(function(err) { profileService.setDisclaimerAccepted(function(err) {

View file

@ -3,7 +3,7 @@
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, $ionicPopup, profileService) { angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, $ionicPopup, profileService) {
$scope.goImport = function(code) { $scope.goImport = function(code) {
$state.go('onboarding.import.phrase', { $state.go('onboarding.import', {
fromOnboarding: true, fromOnboarding: true,
code: code code: code
}); });

View file

@ -51,7 +51,7 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
if (permissions.view_email_address && opts.fullUpdate) { if (permissions.view_email_address && opts.fullUpdate) {
glideraService.getEmail(accessToken, function(err, data) { glideraService.getEmail(accessToken, function(err, data) {
$scope.email = data.email; $scope.email = data;
}); });
} }
if (permissions.personal_info && opts.fullUpdate) { if (permissions.personal_info && opts.fullUpdate) {

View file

@ -1,19 +1,37 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('tabHomeController', angular.module('copayApp.controllers').controller('tabHomeController',
function($rootScope, $timeout, $scope, $state, $ionicScrollDelegate, lodash, profileService, walletService, configService, txFormatService, $ionicModal, $log, platformInfo, storageService, txpModalService, $window) { function($rootScope, $timeout, $scope, $state, $ionicScrollDelegate, lodash, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window) {
$scope.externalServices = {}; $scope.externalServices = {};
$scope.bitpayCardEnabled = true; // TODO $scope.bitpayCardEnabled = true; // TODO
$scope.openTxpModal = txpModalService.open;
$scope.version = $window.version;
$scope.name = $window.appConfig.nameCase;
configService.whenAvailable(function() {
var config = configService.getSync();
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
$scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp;
$scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp;
});
$scope.openWallet = function(wallet) {
if (!wallet.isComplete()) {
return $state.go('tabs.copayers', {
walletId: wallet.credentials.walletId
});
}
$state.go('tabs.details', {
walletId: wallet.credentials.walletId
});
};
function updateTxps() { function updateTxps() {
profileService.getTxps({ profileService.getTxps({
limit: 3 limit: 3
}, function(err, txps, n) { }, function(err, txps, n) {
if (err) { if (err) $log.error(err);
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
}
$scope.txps = txps; $scope.txps = txps;
$scope.txpsN = n; $scope.txpsN = n;
$ionicScrollDelegate.resize(); $ionicScrollDelegate.resize();
@ -24,7 +42,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
}) })
}; };
$scope.updateAllWallets = function() { $scope.updateAllWallets = function() {
$scope.wallets = profileService.getWallets(); $scope.wallets = profileService.getWallets();
if (lodash.isEmpty($scope.wallets)) return; if (lodash.isEmpty($scope.wallets)) return;
@ -41,7 +58,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
} else { } else {
wallet.status = status; wallet.status = status;
} }
if (++j==i) { if (++j == i) {
updateTxps(); updateTxps();
} }
}); });
@ -106,7 +123,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.updateWallet(wallet); $scope.updateWallet(wallet);
}), }),
$rootScope.$on('Local/TxAction', function(e, walletId) { $rootScope.$on('Local/TxAction', function(e, walletId) {
$log.debug('Got action for wallet '+ walletId); $log.debug('Got action for wallet ' + walletId);
var wallet = profileService.getWallet(walletId); var wallet = profileService.getWallet(walletId);
$scope.updateWallet(wallet); $scope.updateWallet(wallet);
}), }),
@ -117,19 +134,4 @@ angular.module('copayApp.controllers').controller('tabHomeController',
x(); x();
}); });
}); });
configService.whenAvailable(function() {
var config = configService.getSync();
var isWindowsPhoneApp = platformInfo.isWP && isCordova;
$scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp;
$scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp;
});
$scope.openTxpModal = txpModalService.open;
$scope.version = $window.version;
$scope.name = $window.appConfig.nameCase;
}); });

View file

@ -1,21 +1,58 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $ionicNavBarDelegate, $state, $stateParams, bwcError, 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, $ionicNavBarDelegate, $state, $stateParams, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService, $ionicPopup, txpModalService, externalLinkService) {
var isCordova = platformInfo.isCordova;
var isWP = platformInfo.isWP;
var isAndroid = platformInfo.isAndroid;
var isChromeApp = platformInfo.isChromeApp;
var errorPopup;
var HISTORY_SHOW_LIMIT = 10; var HISTORY_SHOW_LIMIT = 10;
var currentTxHistoryPage;
var wallet;
$scope.txps = []; $scope.txps = [];
$scope.openExternalLink = function(url, target) { $scope.openExternalLink = function(url, target) {
externalLinkService.open(url, target); externalLinkService.open(url, target);
}; };
$scope.init = function() {
currentTxHistoryPage = 0;
$scope.completeTxHistory = [];
wallet = profileService.getWallet($stateParams.walletId);
/* Set color for header bar */
$rootScope.walletDetailsColor = wallet.color;
$rootScope.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, {
txid: $stateParams.txid
});
if (tx) {
$scope.openTxModal(tx);
} else {
$ionicPopup.alert({
title: gettext('TX not available'),
});
}
} else if ($stateParams.txpId) {
var txp = lodash.find($scope.txps, {
id: $stateParams.txpId
});
if (txp) {
$scope.openTxpModal(txp);
} else {
$ionicPopup.alert({
title: gettext('Proposal not longer available'),
});
}
}
});
}
var setPendingTxps = function(txps) { var setPendingTxps = function(txps) {
if (!txps) { if (!txps) {
$scope.txps = []; $scope.txps = [];
@ -169,54 +206,4 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
if (err) $log.error(err); if (err) $log.error(err);
}); });
} }
var currentTxHistoryPage;
var wallet;
$scope.init = function() {
currentTxHistoryPage = 0;
$scope.completeTxHistory = [];
wallet = profileService.getWallet($stateParams.walletId);
if (!wallet.isComplete()) {
return $state.go('wallet.copayers');
};
/* Set color for header bar */
$rootScope.walletDetailsColor = wallet.color;
$rootScope.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, {
txid: $stateParams.txid
});
if (tx) {
$scope.openTxModal(tx);
} else {
$ionicPopup.alert({
title: gettext('TX not available'),
});
}
} else if ($stateParams.txpId) {
var txp = lodash.find($scope.txps, {
id: $stateParams.txpId
});
if (txp) {
$scope.openTxpModal(txp);
} else {
$ionicPopup.alert({
title: gettext('Proposal not longer available'),
});
}
}
});
}
}); });

View file

@ -107,7 +107,7 @@ angular.module('copayApp.directives')
return { return {
link: function($scope, el) { link: function($scope, el) {
el.bind('change', function(e) { el.bind('change', function(e) {
$scope.file = (e.srcElement || e.target).files[0]; $scope.formData.file = (e.srcElement || e.target).files[0];
$scope.getFile(); $scope.getFile();
}); });
} }

View file

@ -276,37 +276,12 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}) })
.state('tabs.import', { .state('tabs.import', {
url: '/import', url: '/import',
// abstract: true,
views: { views: {
'tab-home': { 'tab-home': {
templateUrl: 'views/import.html' templateUrl: 'views/import.html'
}, },
}, },
}) })
.state('tabs.import.phrase', {
url: '/tab-import-phrase',
views: {
'tab-import-phrase': {
templateUrl: 'views/tab-import-phrase.html',
},
}
})
.state('tabs.import.file', {
url: '/tab-import-file',
views: {
'tab-import-file': {
templateUrl: 'views/tab-import-file.html',
},
}
})
.state('tabs.import.hardware', {
url: '/tab-import-hardware',
views: {
'tab-import-hardware': {
templateUrl: 'views/tab-import-hardware.html',
},
}
})
.state('tabs.create', { .state('tabs.create', {
url: '/create', url: '/create',
views: { views: {
@ -533,9 +508,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*/ */
.state('tabs.copayers', { .state('tabs.copayers', {
url: '/copayers', url: '/copayers/:walletId',
views: { views: {
'wallet': { 'tab-home': {
templateUrl: 'views/copayers.html' templateUrl: 'views/copayers.html'
} }
} }
@ -626,7 +601,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}) })
.state('onboarding.import', { .state('onboarding.import', {
url: '/import', url: '/import',
abstract: true,
views: { views: {
'onboarding': { 'onboarding': {
templateUrl: 'views/import.html' templateUrl: 'views/import.html'
@ -637,30 +611,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
fromOnboarding: null fromOnboarding: null
}, },
}) })
.state('onboarding.import.phrase', {
url: '/tab-import-phrase',
views: {
'tab-import-phrase': {
templateUrl: 'views/tab-import-phrase.html',
},
}
})
.state('onboarding.import.file', {
url: '/tab-import-file',
views: {
'tab-import-file': {
templateUrl: 'views/tab-import-file.html',
},
}
})
.state('onboarding.import.hardware', {
url: '/tab-import-hardware',
views: {
'tab-import-hardware': {
templateUrl: 'views/tab-import-hardware.html',
},
}
})
/* /*
* *

View file

@ -1,6 +1,7 @@
.icon.nav-item-arrow-right { .icon.nav-item-arrow-right {
color: #666; color: #666;
font-size: 26px; font-size: 26px;
@extend .ion-ios-arrow-right;
} }
.item.item-heading { .item.item-heading {

View file

@ -86,7 +86,7 @@ h3.title {
.box-notification { .box-notification {
padding: 0.5rem; padding: 0.5rem;
border: 1px solid; border: 1px solid;
margin-bottom: 20px; margin: 10px;
a { a {
color: #fff; color: #fff;
} }

View file

@ -1,7 +1,8 @@
.wallet-activity { .wallet-activity {
&-not-pending { &-not-pending {
background-color:#eee; opacity: 0.6;
filter: alpha(opacity=60); /* For IE8 and earlier */
} }
&-amount { &-amount {