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

# Conflicts:
#	public/views/onboarding/backupWarning.html
#	src/sass/common.scss
This commit is contained in:
Jamal Jackson 2016-09-02 06:57:50 -04:00
commit ee7bb0f455
96 changed files with 610 additions and 607 deletions

6
.gitignore vendored
View file

@ -3,10 +3,6 @@ i18n/po/*.mo
i18n/crowdin_api_key.txt i18n/crowdin_api_key.txt
src/js/translations.js src/js/translations.js
# Coinbase API ClientID/Secret
coinbase.json
src/js/coinbase.js
# cordova # cordova
cordova/project-*/* cordova/project-*/*
cordova/*.keystore cordova/*.keystore
@ -101,6 +97,7 @@ public/fonts
## templates ## templates
/appConfig.json /appConfig.json
externalServices.json
cordova/Makefile cordova/Makefile
cordova/ProjectMakefile cordova/ProjectMakefile
app-template/bpapp app-template/bpapp
@ -110,6 +107,7 @@ cordova/wp/Package.appxmanifest
public/img/logo-negative.svg public/img/logo-negative.svg
public/img/logo.svg public/img/logo.svg
src/js/appConfig.js src/js/appConfig.js
src/js/externalServices.js
cordova/Makefile cordova/Makefile

View file

@ -10,8 +10,8 @@ module.exports = function(grunt) {
appConfig: { appConfig: {
command: 'node ./util/buildAppConfig.js' command: 'node ./util/buildAppConfig.js'
}, },
coinbase: { externalServices: {
command: 'node ./util/coinbase.js' command: 'node ./util/buildExternalServices.js'
}, },
clean: { clean: {
command: 'rm -Rf bower_components node_modules' command: 'rm -Rf bower_components node_modules'
@ -94,7 +94,7 @@ module.exports = function(grunt) {
}, },
files: [{ files: [{
expand: true, expand: true,
src: ['src/sass/*.scss'], src: ['src/sass/main.scss'],
dest: './', dest: './',
ext: '.css' ext: '.css'
}] }]
@ -134,7 +134,7 @@ module.exports = function(grunt) {
'src/js/controllers/**/*.js', 'src/js/controllers/**/*.js',
'src/js/translations.js', 'src/js/translations.js',
'src/js/appConfig.js', 'src/js/appConfig.js',
'src/js/coinbase.js', 'src/js/externalServices.js',
'src/js/init.js', 'src/js/init.js',
'src/js/trezor-url.js', 'src/js/trezor-url.js',
'bower_components/trezor-connect/login.js' 'bower_components/trezor-connect/login.js'
@ -193,12 +193,6 @@ module.exports = function(grunt) {
src: 'bower_components/ionic/release/js/ionic.bundle.min.js', src: 'bower_components/ionic/release/js/ionic.bundle.min.js',
dest: 'public/lib/' dest: 'public/lib/'
}, },
ionic_css: {
expand: true,
flatten: true,
src: 'bower_components/ionic/release/css/ionic.min.css',
dest: 'public/css/'
},
linux: { linux: {
files: [{ files: [{
expand: true, expand: true,
@ -251,7 +245,7 @@ module.exports = function(grunt) {
} }
}); });
grunt.registerTask('default', ['nggettext_compile', 'exec:appConfig', 'exec:coinbase', 'browserify', 'sass', 'concat', 'copy:ionic_fonts', 'copy:ionic_js', 'copy:ionic_css']); grunt.registerTask('default', ['nggettext_compile', 'exec:appConfig', 'exec:externalServices', 'browserify', 'sass', 'concat', 'copy:ionic_fonts', 'copy:ionic_js']);
grunt.registerTask('prod', ['default', 'uglify']); grunt.registerTask('prod', ['default', 'uglify']);
grunt.registerTask('translate', ['nggettext_extract']); grunt.registerTask('translate', ['nggettext_extract']);
grunt.registerTask('test', ['karma:unit']); grunt.registerTask('test', ['karma:unit']);

View file

@ -42,4 +42,4 @@ wp: build-wp
androidrun: androidrun:
make -C $(WORKDIR)android run make -C $(WORKDIR)android run
adb logcat | grep copay.js adb logcat | grep chromium

View file

@ -68,7 +68,16 @@ console.log('Copying ' + configDir + '/appConfig.json' + ' to root');
configBlob = configBlob.replace('{', JSONheader); configBlob = configBlob.replace('{', JSONheader);
fs.writeFileSync('../appConfig.json', configBlob, 'utf8'); fs.writeFileSync('../appConfig.json', configBlob, 'utf8');
////////////////
var externalServices;
try {
console.log('Copying ' + configDir + '/externalServices.json' + ' to root');
externalServices = fs.readFileSync(configDir + '/externalServices.json', 'utf8');
} catch(err) {
externalServices = '{}';
console.log('External services not configured');
}
fs.writeFileSync('../externalServices.json', externalServices, 'utf8');
function copyDir(from, to, cb) { function copyDir(from, to, cb) {
console.log('Copying dir ' + from + ' to'); console.log('Copying dir ' + from + ' to');

View file

@ -1 +0,0 @@
/Users/jamal/dev/bitpay-wallet-app-template/

View file

@ -5,7 +5,7 @@
"manifest_version": 2, "manifest_version": 2,
"name": "BitPay", "name": "BitPay",
"description": "The BitPay Bitcoin Wallet", "description": "The BitPay Bitcoin Wallet",
"version": "0.7.0", "version": "0.8.0",
"permissions": [ "permissions": [
"storage", "storage",
"unlimitedStorage", "unlimitedStorage",

View file

@ -6,7 +6,7 @@
"name": "bitpay", "name": "bitpay",
"description": "The BitPay Bitcoin Wallet", "description": "The BitPay Bitcoin Wallet",
"author": "BitPay", "author": "BitPay",
"version": "0.7.0", "version": "0.8.0",
"keywords": [ "keywords": [
"wallet", "wallet",
"copay", "copay",

View file

@ -1,10 +1,10 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>Recent Activity</ion-nav-title> <ion-nav-title>Recent Activity</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.home"> <button class="button back-button" ui-sref="tabs.home">
<span translate>Close</span> <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,29 +1,29 @@
<ion-view> <ion-view id="view-add">
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Add wallet' | translate}}</ion-nav-title> <ion-nav-title>{{'Add wallet' | translate}}</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.home"> <button class="button back-button" ui-sref="tabs.home">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content>
<ion-list> <ion-list>
<ion-item class="item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create.personal"> <a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create.personal">
<h2 translate>Create new wallet</h2> <h2 translate>Create new wallet</h2>
<i class="icon ion-chevron-right icon-accessory"></i> <i class="icon ion-ios-arrow-right nav-item-arrow-right"></i>
</ion-item> </a>
<ion-item class="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-chevron-right icon-accessory"></i> <i class="icon ion-ios-arrow-right nav-item-arrow-right"></i>
</ion-item> </a>
<ion-item class="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.phrase">
<h2 translate>Import wallet</h2> <h2 translate>Import wallet</h2>
<i class="icon ion-chevron-right icon-accessory"></i> <i class="icon ion-ios-arrow-right nav-item-arrow-right"></i>
</ion-item> </a>
</ion-list> </ion-list>
</ion-content> </ion-content>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.home"> <button class="button back-button" ui-sref="tabs.home">
Close <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Gift cards</ion-nav-title> <ion-nav-title>Gift cards</ion-nav-title>
@ -65,4 +65,3 @@
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ng-click="$ionicGoBack()"> <button class="button back-button" ng-click="$ionicGoBack()">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.home"> <button class="button back-button" ui-sref="tabs.home">
Close <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>BitPay Card</ion-nav-title> <ion-nav-title>BitPay Card</ion-nav-title>
@ -38,7 +38,7 @@
ng-submit="bitpayCard.authenticate()" ng-submit="bitpayCard.authenticate()"
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">Email</span> <span class="input-label">Email</span>
<input name="email" <input name="email"
@ -58,7 +58,7 @@
</label> </label>
</div> </div>
<input class="button button-block" <input class="button button-block button-positive"
type="submit" type="submit"
ng-disabled="!authenticateForm.$valid || bitpayCard.authenticating" ng-disabled="!authenticateForm.$valid || bitpayCard.authenticating"
value="Login"> value="Login">
@ -85,7 +85,7 @@
</label> </label>
</div> </div>
<input class="button button-block" <input class="button button-block button-positive"
type="submit" type="submit"
ng-disabled="!authenticate2FAForm.$valid || bitpayCard.authenticating" ng-disabled="!authenticate2FAForm.$valid || bitpayCard.authenticating"
value="Login"> value="Login">
@ -216,4 +216,3 @@
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="amazon.main"> <button class="button back-button" ui-sref="amazon.main">
<i class="icon ion-chevron-left"></i> Back <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Buy</ion-nav-title> <ion-nav-title>Buy</ion-nav-title>
@ -154,4 +154,3 @@
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="glidera.main"> <button class="button back-button" ui-sref="glidera.main">
<i class="icon ion-chevron-left"></i> Back <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Buy</ion-nav-title> <ion-nav-title>Buy</ion-nav-title>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.home"> <button class="button back-button" ui-sref="tabs.home">
Close <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title translate>Buy and sell</ion-nav-title> <ion-nav-title translate>Buy and sell</ion-nav-title>

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,10 +1,10 @@
<ion-view ng-controller="copayersController"> <ion-view ng-controller="copayersController">
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{wallet.name}}</ion-nav-title> <ion-nav-title>{{wallet.name}}</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button" href ui-sref="tabs.home"> <button class="button back-button" ui-sref="tabs.home">
<i class="ion-arrow-left-c"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.home"> <button class="button back-button" ui-sref="tabs.home">
Close <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Glidera</ion-nav-title> <ion-nav-title>Glidera</ion-nav-title>
@ -10,6 +10,10 @@
<ion-content ng-controller="glideraController as glidera" ng-init="init()"> <ion-content ng-controller="glideraController as glidera" ng-init="init()">
<div class="box-notification error" ng-show="!network">
Glidera is disabled for this application
</div>
<div class="box-notification warning" ng-show="network == 'testnet'"> <div class="box-notification warning" ng-show="network == 'testnet'">
Testnet wallets only work with Glidera Sandbox Accounts Testnet wallets only work with Glidera Sandbox Accounts
</div> </div>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.home"> <button class="button back-button" ui-sref="tabs.home">
Close <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Glidera</ion-nav-title> <ion-nav-title>Glidera</ion-nav-title>

View file

@ -1,17 +1,33 @@
<ion-view > <ion-view ng-controller="tabsController" ng-init="importInit()">
<ion-tabs class="tabs-striped tabs-color-positive tabs-color-active-positive tabs-top"> <ion-tabs class="tabs-striped tabs-color-positive tabs-color-active-positive tabs-top">
<ion-tab title="Recovery Phrare" ui-sref="tabs.import.phrase"> <div ng-if="!fromOnboarding">
<ion-nav-view name="tab-import-phrase"></ion-nav-view> <ion-tab title="Recovery Phrase" ui-sref="tabs.import.phrase">
</ion-tab> <ion-nav-view name="tab-import-phrase"></ion-nav-view>
</ion-tab>
<ion-tab title="File/Text" ui-sref="tabs.import.file"> <ion-tab title="File/Text" ui-sref="tabs.import.file">
<ion-nav-view name="tab-import-file"></ion-nav-view> <ion-nav-view name="tab-import-file"></ion-nav-view>
</ion-tab> </ion-tab>
<ion-tab title="Hardware Wallet" ui-sref="tabs.import.hardware"> <ion-tab title="Hardware Wallet" ui-sref="tabs.import.hardware">
<ion-nav-view name="tab-import-hardware"></ion-nav-view> <ion-nav-view name="tab-import-hardware"></ion-nav-view>
</ion-tab> </ion-tab>
</div>
<div ng-if="fromOnboarding">
<ion-tab title="Recovery Phrase" ui-sref="onboarding.import.phrase">
<ion-nav-view name="tab-import-phrase"></ion-nav-view>
</ion-tab>
<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-tabs>
</ion-view> </ion-view>

View file

@ -1,14 +1,14 @@
<span class="wallet-activity"> <span class="wallet-activity">
<div ng-if="x.types.indexOf('NewCopayer')>=0 && x.wallet.n>1"> <div ng-if="x.type == 'NewCopayer' && x.wallet.n>1">
Copayer joined Copayer joined
</div> </div>
<div ng-if="x.types.indexOf('NewCopayer')>=0 && x.wallet.n==1"> <div ng-if="x.type == 'NewCopayer' && x.wallet.n==1">
Wallet created Wallet created
</div> </div>
<div ng-if="x.types.indexOf('NewOutgoingTx')>=0"> <div ng-if="x.type == 'NewOutgoingTx'">
<span translate>Payment Sent </span> <span translate>Payment Sent </span>
<div class="wallet-activity-amount"> <div class="wallet-activity-amount">
{{x.amountStr}} {{x.amountStr}}
@ -17,36 +17,48 @@
<div ng-if="x.types.indexOf('NewIncomingTx')>=0"> <div ng-if="x.type == 'NewIncomingTx'">
<span translate>Payment Received</span> <span translate>Payment Received</span>
<div class="wallet-activity-amount"> <div class="wallet-activity-amount">
{{x.amountStr}} {{x.amountStr}}
</div> </div>
</div> </div>
<div ng-if="x.types.indexOf('TxProposalRemoved')>=0"> <div ng-if="x.type == 'TxProposalRemoved'">
<i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i> <i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Deleted</span> <span translate>Proposal Deleted</span>:
<i>{{x.message}}</i>
<div class="wallet-activity-amount">
{{x.amountStr}}:
</div>
</div> </div>
<div ng-if="x.types.indexOf('TxProposalRejected')>=0"> <div ng-if="x.type == 'TxProposalRejected'">
<i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i> <i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Rejected</span> <span translate>Proposal Rejected</span>:
<i>{{x.message}}</i>
<div class="wallet-activity-amount">
{{x.amountStr}}:
</div>
</div> </div>
<div ng-if="x.types.indexOf('TxProposalRemoved') == -1 && x.types.indexOf('TxProposalRejected') == -1"> <span ng-if="x.type == 'NewTxProposal'">
<span ng-if="x.types.indexOf('NewTxProposal')>=0 && x.types.indexOf('NewOutgoingTx')==-1 "> <i class="icon ion-arrow-up-c size-21" ng-style="{'color':x.wallet.color}"></i>
<i class="icon ion-arrow-up-c size-21" ng-style="{'color':x.wallet.color}"></i> <span translate>New Proposal</span>:
<i>{{x.message}}</i>
{{x.amountStr}} <div class="wallet-activity-amount">
<i>{{x.message}}</i> {{x.amountStr}}
</span> </div>
<span ng-if="x.types.indexOf('TxProposalAcceptedBy')>=0 && x.types.indexOf('NewTxProposal') == -1 && x.types.indexOf('NewOutgoingTx')==-1"> </span>
<i class="icon ion-checkmark-round size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Accepted</span>
</span>
</div>
<span ng-if="x.type == 'TxProposalAcceptedBy'">
<i class="icon ion-checkmark-round size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Accepted</span>
<i>{{x.message}}</i>
<div class="wallet-activity-amount">
{{x.amountStr}}
</div>
</span>
<p class="wallet-activity-note"> <p class="wallet-activity-note">
<!-- {{x.types}} --> <!-- {{x.types}} -->

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.add"> <button class="button back-button" ui-sref="tabs.add">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>{{'Join shared wallet' | translate}}</ion-nav-title> <ion-nav-title>{{'Join shared wallet' | translate}}</ion-nav-title>
@ -11,13 +11,9 @@
<ion-content ng-controller="joinController as join"> <ion-content ng-controller="joinController as join">
<div class="padding assertive" ng-show="join.error">
{{join.error|translate}}
</div>
<form name="joinForm" ng-submit="join.join(joinForm)" novalidate> <form name="joinForm" ng-submit="join.join(joinForm)" novalidate>
<div class="list"> <div class="card list">
<div class="row"> <div class="row">
<div class="col"> <div class="col">

View file

@ -1,8 +1,7 @@
<ion-modal-view ng-controller="addressbookModalController" ng-init="initAddressbook()"> <ion-modal-view ng-controller="addressbookModalController" ng-init="initAddressbook()">
<ion-header-bar align-title="center" class="bar-stable"> <ion-header-bar align-title="center" class="bar-royal">
<button class="button button-clear button-positive" <button class="button back-button" ng-click="closeAddressbookModal()">
ng-click="closeAddressbookModal()" translate> <i class="icon ion-ios-arrow-thin-left"></i>
Close
</button> </button>
<div class="h1 title"> <div class="h1 title">
<span ng-show="!addAddressbookEntry" translate>Addressbook</span> <span ng-show="!addAddressbookEntry" translate>Addressbook</span>

View file

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

View file

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

View file

@ -25,9 +25,6 @@
</li> </li>
<li class="item"> <li class="item">
<div class="assertive" ng-show="error">
<span class="text-warning size-14">{{error|translate}}</span>
</div>
<div class="row" ng-if="tx.removed"> <div class="row" ng-if="tx.removed">
<div class="column m20t text-center text-warning size-12" translate> <div class="column m20t text-center text-warning size-12" translate>

View file

@ -14,7 +14,7 @@
</p> </p>
</div> </div>
<div class="row text-center"> <div class="row text-center">
<i class="ion-arrow-down-c light-blue col col-60" id="arrow-down"></i> <i class="ion-ios-arrow-thin-down light-blue col col-60" id="arrow-down"></i>
</div> </div>
<div class="row"> <div class="row">
<button class="button button-block button-positive col-75 col" href ui-sref="onboarding.backupWarning" translate>Backup wallet</button> <button class="button button-block button-positive col-75 col" href ui-sref="onboarding.backupWarning" translate>Backup wallet</button>

View file

@ -2,7 +2,7 @@
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" href ui-sref="onboarding.backupRequest"> <button class="button no-border" href ui-sref="onboarding.backupRequest">
<i class="icon ion-arrow-left-c"></i> <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,6 +1,6 @@
<ion-view id="onboard-welcome" class="onboarding"> <ion-view id="onboard-welcome" class="onboarding">
<ion-content ng-controller="welcomeController" ng-init="createProfile()"> <ion-content ng-controller="welcomeController" ng-init="createProfile()">
<img src="../img/onboarding-welcome-shopping24.png" id="shopping-24" /> <qr-scanner id="shopping-24" on-scan="goImport(data)"></qr-scanner>
<div class="text-center"> <div class="text-center">
<div class="row"> <div class="row">
<img src='../../img/bitpay-logo.svg' class="logo col col-50" /> <img src='../../img/bitpay-logo.svg' class="logo col col-50" />
@ -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="tabs.import({'fromOnboarding':true})">Restore</button> <button class="button button-block restore col col-75" translate href ui-sref="onboarding.import.phrase({'fromOnboarding':true})">Restore</button>
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesController" ng-init="init()"> <ion-content ng-controller="preferencesController" ng-init="init()">

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button button-stable no-border" ui-sref="tabs.settings"> <button class="button back-button" ui-sref="tabs.settings">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,8 +1,8 @@
<ion-view > <ion-view >
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Advanced Preferences' | translate}}</ion-nav-title> <ion-nav-title>{{'Advanced Preferences' | translate}}</ion-nav-title>
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content>

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesAliasController" > <ion-content ng-controller="preferencesAliasController" >

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesAltCurrencyController" ng-init="init()" > <ion-content ng-controller="preferencesAltCurrencyController" ng-init="init()" >

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="bitpayCard.main"> <button class="button back-button" ui-sref="bitpayCard.main">
<i class="icon ion-chevron-left"></i> Back <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Preferences</ion-nav-title> <ion-nav-title>Preferences</ion-nav-title>
@ -16,4 +16,3 @@
</ul> </ul>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,16 +1,22 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesBwsUrlController" > <ion-content ng-controller="preferencesBwsUrlController">
<form name="settingsBwsUrlForm" ng-submit="save(settingsBwsUrlForm)" novalidate>
<label class="item item-input item-stacked-label"> <div class="row no-border">
<span class="input-label" transalate>Wallet Service URL</span><a ng-click="resetDefaultUrl()" translate> Set default url</a> <div class="col col-90">
<input type="text" id="bwsurl" type="text" name="bwsurl" ng-model="bwsurl"> <label class="item item-input item-stacked-label no-border">
</label> <span class="input-label" transalate>Wallet Service URL</span>
<input type="submit" class="button button-block button-stable" value="{{'Save'|translate}}"></input> <input type="text" id="bwsurl" type="text" name="bwsurl" ng-model="bwsurl">
</form> </label>
</div>
<div class="col">
<i class="icon ion-ios-reload" ng-click="resetDefaultUrl()"></i>
</div>
</div>
<button class="button button-block button-balanced" ng-click="save()" translate>Save</button>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesColorController" > <ion-content ng-controller="preferencesColorController" >

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header" ng-controller="preferencesDeleteWalletController" > <ion-content class="has-header" ng-controller="preferencesDeleteWalletController" >

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesDeleteWordsController" > <ion-content ng-controller="preferencesDeleteWordsController" >

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesEmailController" > <ion-content ng-controller="preferencesEmailController" >

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="glidera.main"> <button class="button back-button" ui-sref="glidera.main">
<i class="icon ion-chevron-left"></i> Back <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Preferences</ion-nav-title> <ion-nav-title>Preferences</ion-nav-title>
@ -275,4 +275,3 @@
</ul> </ul>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesHistory" ng-init="index.updatingTxHistory ? null : csvHistory()"> <ion-content ng-controller="preferencesHistory" ng-init="index.updatingTxHistory ? null : csvHistory()">

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesInformation" ng-init="init()"> <ion-content ng-controller="preferencesInformation" ng-init="init()">

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesLanguageController" ng-init="init()" > <ion-content ng-controller="preferencesLanguageController" ng-init="init()" >

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesLogs" ng-init="init()" > <ion-content ng-controller="preferencesLogs" ng-init="init()" >

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesUnitController" ng-init="init()" > <ion-content ng-controller="preferencesUnitController" ng-init="init()" >

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="glidera.main"> <button class="button back-button" ui-sref="glidera.main">
<i class="icon ion-chevron-left"></i> Back <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Sell</ion-nav-title> <ion-nav-title>Sell</ion-nav-title>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.add"> <button class="button back-button" ui-sref="tabs.add">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>{{'Create new wallet' | translate}}</ion-nav-title> <ion-nav-title>{{'Create new wallet' | translate}}</ion-nav-title>
@ -10,13 +10,9 @@
<ion-content ng-controller="createController as create" ng-init="create.setTotalCopayers(1)"> <ion-content ng-controller="createController as create" ng-init="create.setTotalCopayers(1)">
<div class="padding assertive" ng-show="create.error">
{{create.error|translate}}
</div>
<form name="setupForm" ng-submit="create.create(setupForm)" novalidate> <form name="setupForm" ng-submit="create.create(setupForm)" novalidate>
<div class="list"> <div class="card list">
<label ng-hide="create.hideWalletName" class="item item-input item-stacked-label"> <label ng-hide="create.hideWalletName" class="item item-input item-stacked-label">
<span class="input-label" translate>Wallet name</span> <span class="input-label" translate>Wallet name</span>
<input type="text" <input type="text"

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.add"> <button class="button back-button" ui-sref="tabs.add">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>{{'Create new wallet' | translate}}</ion-nav-title> <ion-nav-title>{{'Create new wallet' | translate}}</ion-nav-title>
@ -10,13 +10,9 @@
<ion-content ng-controller="createController as create" ng-init="create.setTotalCopayers(3)"> <ion-content ng-controller="createController as create" ng-init="create.setTotalCopayers(3)">
<div class="padding assertive" ng-show="create.error">
{{create.error|translate}}
</div>
<form name="setupForm" ng-submit="create.create(setupForm)" novalidate> <form name="setupForm" ng-submit="create.create(setupForm)" novalidate>
<div class="list"> <div class="card list">
<label ng-hide="create.hideWalletName" class="item item-input item-stacked-label"> <label ng-hide="create.hideWalletName" class="item item-input item-stacked-label">
<span class="input-label" translate>Wallet name</span> <span class="input-label" translate>Wallet name</span>
<input type="text" <input type="text"

View file

@ -1,10 +1,10 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Export Wallet' | translate}}</ion-nav-title> <ion-nav-title>{{'Export Wallet' | translate}}</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.preferences.preferencesAdvanced"> <button class="button back-button" ui-sref="tabs.preferences.preferencesAdvanced">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,10 +1,10 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Export Wallet' | translate}}</ion-nav-title> <ion-nav-title>{{'Export Wallet' | translate}}</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.preferences.preferencesAdvanced"> <button class="button back-button" ui-sref="tabs.preferences.preferencesAdvanced">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,27 +1,22 @@
<ion-view id="tab-home"> <ion-view id="tab-home">
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Home' | translate}}</ion-nav-title> <ion-nav-title>{{'Home' | translate}}</ion-nav-title>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="padding" ng-controller="tabHomeController" ng-init="updateAllWallets(); nextStep()"> <ion-content class="padding" ng-controller="tabHomeController" ng-init="updateAllWallets(); nextStep()">
<div class="card"> <div class="list card" ng-hide="!notifications[0]">
<div class="item item-divider item-icon-right" translate> <a class="item item-icon-right item-heading" ui-sref="activity" translate>
Recent Activity Recent Activity
<i class="icon ion-ios-arrow-right" ui-sref="activity"></i> <i class="icon ion-ios-arrow-right nav-item-arrow-right"></i>
</div> </a>
<div 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>
<div translate>Updating activity. Please stand by</div> <div translate>Updating activity. Please stand by</div>
</div> </span>
<div ng-if="!fetchingNotifications"> <a ng-if="!fetchingNotifications" class="item" ng-repeat="x in notifications" ng-click="x.action()">
<a class="item" ng-repeat="x in notifications" ng-click="x.action()"> <span ng-include="'views/includes/walletActivity.html'"></span>
<span ng-include="'views/includes/walletActivity.html'"></span> </a>
</a>
<div class="item" ng-show="!notifications[0]">
<span translate>Nothing to show here.</span>
</div>
</div>
</div> </div>
<div class="list card" ng-hide="!wallets[0]"> <div class="list card" ng-hide="!wallets[0]">

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable" ng-controller="backController"> <ion-nav-bar class="bar-royal" ng-controller="backController">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ng-click="importGoBack()"> <button class="button back-button" ng-click="importGoBack()">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>{{'Import wallet' | translate}}</ion-nav-title> <ion-nav-title>{{'Import wallet' | translate}}</ion-nav-title>
@ -10,13 +10,9 @@
<ion-content ng-controller="importController" ng-init="type='file'"> <ion-content ng-controller="importController" ng-init="type='file'">
<div class="padding assertive" ng-show="error">
{{error|translate}}
</div>
<form name="importForm" ng-submit="importBlob(importForm)" novalidate> <form name="importForm" ng-submit="importBlob(importForm)" novalidate>
<div class="list"> <div class="list card">
<label class="item item-input item-stacked-label no-border" ng-show="!isSafari && !isCordova"> <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 class="input-label" translate>Choose a backup file from your computer</div>
@ -36,9 +32,9 @@
<label class="item item-input item-stacked-label"> <label class="item item-input item-stacked-label">
<span class="input-label" translate>Password</span> <span class="input-label" translate>Password</span>
<input type="password" <input type="password"
placeholder="{{'Your password'|translate}}" placeholder="{{'Your password'|translate}}"
name="password" name="password"
ng-model="password"> ng-model="password">
</label> </label>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable"> <ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
@ -56,9 +52,7 @@
</div> </div>
</div> </div>
<button type="submit" <button type="submit" class="button button-block button-positive" ng-disabled="importForm.$invalid || !password " translate>
class="button round expand black"
ng-disabled="importForm.$invalid || !password " translate>
Import backup Import backup
</button> </button>
</form> </form>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable" ng-controller="backController"> <ion-nav-bar class="bar-royal" ng-controller="backController">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ng-click="importGoBack()"> <button class="button back-button" ng-click="importGoBack()">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>{{'Import wallet' | translate}}</ion-nav-title> <ion-nav-title>{{'Import wallet' | translate}}</ion-nav-title>
@ -10,10 +10,6 @@
<ion-content ng-controller="importController" ng-init="type='hwWallet'"> <ion-content ng-controller="importController" ng-init="type='hwWallet'">
<div class="padding assertive" ng-show="error">
{{error|translate}}
</div>
<form name="importForm3" ng-submit="importHW(importForm3)" novalidate> <form name="importForm3" ng-submit="importHW(importForm3)" novalidate>
<div class="card" ng-show="!seedOptions[0]"> <div class="card" ng-show="!seedOptions[0]">
@ -23,7 +19,7 @@
</div> </div>
<div ng-show="seedOptions[0]"> <div ng-show="seedOptions[0]">
<div class="list"> <div class="card list">
<label class="item item-input item-select"> <label class="item item-input item-select">
<div class="input-label" translate> <div class="input-label" translate>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable" ng-controller="backController"> <ion-nav-bar class="bar-royal" ng-controller="backController">
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" ng-click="importGoBack()"> <button class="button back-button" ng-click="importGoBack()">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
<ion-nav-title>Import wallet</ion-nav-title> <ion-nav-title>Import wallet</ion-nav-title>
@ -10,26 +10,20 @@
<ion-content ng-controller="importController" ng-init="type='12'"> <ion-content ng-controller="importController" ng-init="type='12'">
<div ng-show="importErr || error" class="padding assertive" ng-click="importErr = error = null"> <div ng-show="importErr" class="padding assertive" ng-click="importErr = null">
<div ng-show="importErr"> <div translate>Could not access the wallet at the server. Please check:</div>
<div translate>Could not access the wallet at the server. Please check:</div> <ul>
<ul> <li translate>The password of the recovery phrase (if set)</li>
<li translate>The password of the recovery phrase (if set)</li> <li translate>The derivation path</li>
<li translate>The derivation path</li> <li translate>The wallet service URL</li>
<li translate>The wallet service URL</li> </ul>
</ul> <div translate>
<div translate> NOTE: To import a wallet from a 3rd party software, please go to Add Wallet &gt; Create Wallet, and specify the Recovery Phrase there.
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>
<div ng-show="error">
{{error|translate}}
</div> </div>
</div> </div>
<form name="importForm12" ng-submit="importMnemonic(importForm12)" novalidate> <form name="importForm12" ng-submit="importMnemonic(importForm12)" novalidate>
<div class="list"> <div class="list card">
<div class="row"> <div class="row">
<div class="col col-90"> <div class="col col-90">
@ -83,8 +77,8 @@
</div> </div>
<button type="submit" <button type="submit"
class="button button-block button-positive" class="button button-block button-positive"
ng-disabled="importForm12.$invalid" translate>Import</button> ng-disabled="importForm12.$invalid" translate>Import</button>
</form> </form>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,5 +1,5 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Receive' | translate}}</ion-nav-title> <ion-nav-title>{{'Receive' | translate}}</ion-nav-title>
</ion-nav-bar> </ion-nav-bar>
@ -11,10 +11,6 @@
</div> </div>
</div> </div>
<div class="padding assertive" ng-show="error">
{{error|translate}}
</div>
<div class="list card padding text-center" ng-if="!wallets[0]"> <div class="list card padding text-center" ng-if="!wallets[0]">
<span translate>No Wallet</span> <span translate>No Wallet</span>
</div> </div>

View file

@ -1,5 +1,5 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Scan' | translate}}</ion-nav-title> <ion-nav-title>{{'Scan' | translate}}</ion-nav-title>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,5 +1,5 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Send' | translate}}</ion-nav-title> <ion-nav-title>{{'Send' | translate}}</ion-nav-title>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,5 +1,5 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Global Settings' | translate}}</ion-nav-title> <ion-nav-title>{{'Global Settings' | translate}}</ion-nav-title>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,7 +1,7 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>

View file

@ -1,8 +1,8 @@
<ion-view> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Translators' | translate}}</ion-nav-title> <ion-nav-title>{{'Translators' | translate}}</ion-nav-title>
<ion-nav-back-button> <ion-nav-back-button>
{{'Back' | translate}} <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content>

View file

@ -1,10 +1,13 @@
<ion-view> <ion-view id="walletDetails">
<ion-nav-bar class="bar-stable"> <ion-header-bar ng-style="{'background-color': walletDetailsColor}">
<ion-nav-title>{{wallet.name}}</ion-nav-title> <button class="button back-button" ng-click="$ionicGoBack()">
<ion-nav-back-button> <i class="icon ion-ios-arrow-thin-left"></i>
{{'Back' | translate}} </button>
</ion-nav-back-button> <h1 class="title">{{walletDetailsName}}</h1>
</ion-nav-bar> <button class="button search-button">
<i class="icon ion-ios-search-strong"></i>
</button>
</ion-header-bar>
<ion-content ng-controller="walletDetailsController" ng-init="init()" delegate-handle="my-handle"> <ion-content ng-controller="walletDetailsController" ng-init="init()" delegate-handle="my-handle">
<div ng-show="!wallet" translate> <div ng-show="!wallet" translate>
@ -39,7 +42,7 @@
<div ng-click='updateAll()' ng-show="!updateStatusError && wallet.walletScanStatus != 'error' && !wallet.balanceHidden" on-hold="hideToggle()"> <div ng-click='updateAll()' ng-show="!updateStatusError && wallet.walletScanStatus != 'error' && !wallet.balanceHidden" on-hold="hideToggle()">
<strong class="size-36">{{status.totalBalanceStr}}</strong> <strong class="size-36">{{status.totalBalanceStr}}</strong>
<div class="size-14" ng-if="status.totalBalanceAlternative">{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</div> <div class="size-14 amount-alternative" ng-if="status.totalBalanceAlternative">{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</div>
<div class="size-14" ng-if="status.pendingAmount"> <div class="size-14" ng-if="status.pendingAmount">
<span translate>Pending Confirmation</span>: {{status.pendingAmountStr}} <span translate>Pending Confirmation</span>: {{status.pendingAmountStr}}
</div> </div>

View file

@ -83,7 +83,6 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
this.getBuyPrice = function(token, price) { this.getBuyPrice = function(token, price) {
var self = this; var self = this;
this.error = null;
if (!price || (price && !price.qty && !price.fiat)) { if (!price || (price && !price.qty && !price.fiat)) {
this.buyPrice = null; this.buyPrice = null;
return; return;

View file

@ -1,24 +1,10 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, txStatus, gettext, txFormatService, ongoingProcess, $ionicModal) { angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, txStatus, gettext, txFormatService, ongoingProcess, $ionicModal, popupService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Confirm')); $ionicNavBarDelegate.title(gettextCatalog.getString('Confirm'));
var cachedTxp = {}; var cachedTxp = {};
var isChromeApp = platformInfo.isChromeApp; var isChromeApp = platformInfo.isChromeApp;
// An alert dialog
var showAlert = function(title, msg, cb) {
var message = msg.message ? msg.message : msg;
$log.warn(title + ": " + message);
var alertPopup = $ionicPopup.alert({
title: title,
template: message
});
if (!cb) cb = function() {};
alertPopup.then(cb);
};
$scope.showDescriptionPopup = function() { $scope.showDescriptionPopup = function() {
var commentPopup = $ionicPopup.show({ var commentPopup = $ionicPopup.show({
templateUrl: "views/includes/note.html", templateUrl: "views/includes/note.html",
@ -52,7 +38,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
if (!wallet) return cb(); if (!wallet) return cb();
if (isChromeApp) { if (isChromeApp) {
showAlert(gettext('Payment Protocol not supported on Chrome App')); popupService.showAlert(gettextCatalog.getString('Payment Protocol not supported on Chrome App'));
return cb(true); return cb(true);
} }
@ -69,15 +55,15 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$log.warn('Could not fetch payment request:', err); $log.warn('Could not fetch payment request:', err);
var msg = err.toString(); var msg = err.toString();
if (msg.match('HTTP')) { if (msg.match('HTTP')) {
msg = gettext('Could not fetch payment information'); msg = gettextCatalog.getString('Could not fetch payment information');
} }
showAlert(msg); popupService.showAlert(msg);
return cb(true); return cb(true);
} }
if (!paypro.verified) { if (!paypro.verified) {
$log.warn('Failed to verify payment protocol signatures'); $log.warn('Failed to verify payment protocol signatures');
showAlert(gettext('Payment Protocol Invalid')); popupService.showAlert(gettextCatalog.getString('Payment Protocol Invalid'));
return cb(true); return cb(true);
} }
@ -189,7 +175,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}; };
var setSendError = function(msg) { var setSendError = function(msg) {
showAlert(gettext('Error at confirm:'), msg); popupService.showAlert(gettextCatalog.getString('Error at confirm:'), msg);
}; };
function apply(txp) { function apply(txp) {
@ -212,13 +198,13 @@ angular.module('copayApp.controllers').controller('confirmController', function(
if (description && !wallet.credentials.sharedEncryptingKey) { if (description && !wallet.credentials.sharedEncryptingKey) {
var msg = 'Could not add message to imported wallet without shared encrypting key'; var msg = 'Could not add message to imported wallet without shared encrypting key';
$log.warn(msg); $log.warn(msg);
return setSendError(gettext(msg)); return setSendError(msg);
} }
if (toAmount > Number.MAX_SAFE_INTEGER) { if (toAmount > Number.MAX_SAFE_INTEGER) {
var msg = 'Amount too big'; var msg = 'Amount too big';
$log.warn(msg); $log.warn(msg);
return setSendError(gettext(msg)); return setSendError(msg);
}; };
outputs.push({ outputs.push({
@ -263,13 +249,11 @@ angular.module('copayApp.controllers').controller('confirmController', function(
var wallet = $scope.wallet; var wallet = $scope.wallet;
var txp = $scope.txp; var txp = $scope.txp;
if (!wallet) { if (!wallet) {
return setSendError(gettext('No wallet selected')); return setSendError(gettextCatalog.getString('No wallet selected'));
return;
}; };
if (!txp) { if (!txp) {
return setSendError(gettext('No transaction')); return setSendError(gettextCatalog.getString('No transaction'));
return;
}; };
if (!wallet.canSign() && !wallet.isPrivKeyExternal()) { if (!wallet.canSign() && !wallet.isPrivKeyExternal()) {

View file

@ -45,7 +45,7 @@ angular.module('copayApp.controllers').controller('copayersController',
profileService.deleteWalletClient(wallet, function(err) { profileService.deleteWalletClient(wallet, function(err) {
ongoingProcess.set('deletingWallet', false); ongoingProcess.set('deletingWallet', false);
if (err) { if (err) {
$scope.error = err.message || err; popupService.showAlert(gettextCatalog.getString('Error'), err.message || err);
} else { } else {
$state.transitionTo('tabs.home'); $state.transitionTo('tabs.home');
} }

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('createController', angular.module('copayApp.controllers').controller('createController',
function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, profileService, configService, gettext, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, storageService) { function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, profileService, configService, gettext, gettextCatalog, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, storageService, popupService) {
var isChromeApp = platformInfo.isChromeApp; var isChromeApp = platformInfo.isChromeApp;
var isCordova = platformInfo.isCordova; var isCordova = platformInfo.isCordova;
@ -92,7 +92,7 @@ angular.module('copayApp.controllers').controller('createController',
this.create = function(form) { this.create = function(form) {
if (form && form.$invalid) { if (form && form.$invalid) {
this.error = gettext('Please enter the required fields'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Please enter the required fields'));
return; return;
} }
@ -119,7 +119,7 @@ angular.module('copayApp.controllers').controller('createController',
var pathData = derivationPathHelper.parse($scope.derivationPath); var pathData = derivationPathHelper.parse($scope.derivationPath);
if (!pathData) { if (!pathData) {
this.error = gettext('Invalid derivation path'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Invalid derivation path'));
return; return;
} }
@ -132,14 +132,14 @@ angular.module('copayApp.controllers').controller('createController',
} }
if (setSeed && !opts.mnemonic && !opts.extendedPrivateKey) { if (setSeed && !opts.mnemonic && !opts.extendedPrivateKey) {
this.error = gettext('Please enter the wallet recovery phrase'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Please enter the wallet recovery phrase'));
return; return;
} }
if (self.seedSourceId == 'ledger' || self.seedSourceId == 'trezor') { if (self.seedSourceId == 'ledger' || self.seedSourceId == 'trezor') {
var account = $scope.account; var account = $scope.account;
if (!account || account < 1) { if (!account || account < 1) {
this.error = gettext('Invalid account number'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Invalid account number'));
return; return;
} }
@ -154,8 +154,7 @@ angular.module('copayApp.controllers').controller('createController',
src.getInfoForNewWallet(opts.n > 1, account, function(err, lopts) { src.getInfoForNewWallet(opts.n > 1, account, function(err, lopts) {
ongoingProcess.set('connecting' + self.seedSourceId, false); ongoingProcess.set('connecting' + self.seedSourceId, false);
if (err) { if (err) {
self.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
$scope.$apply();
return; return;
} }
opts = lodash.assign(lopts, opts); opts = lodash.assign(lopts, opts);
@ -174,10 +173,7 @@ angular.module('copayApp.controllers').controller('createController',
ongoingProcess.set('creatingWallet', false); ongoingProcess.set('creatingWallet', false);
if (err) { if (err) {
$log.warn(err); $log.warn(err);
self.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
$timeout(function() {
$rootScope.$apply();
});
return; return;
} }

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('exportController', angular.module('copayApp.controllers').controller('exportController',
function($rootScope, $scope, $timeout, $log, lodash, backupService, walletService, storageService, profileService, platformInfo, gettext, gettextCatalog, $state, $stateParams) { function($rootScope, $scope, $timeout, $log, lodash, backupService, walletService, storageService, profileService, platformInfo, gettext, gettextCatalog, $state, $stateParams, popupService) {
var prevState; var prevState;
var isWP = platformInfo.isWP; var isWP = platformInfo.isWP;
var isAndroid = platformInfo.isAndroid; var isAndroid = platformInfo.isAndroid;
@ -10,7 +10,6 @@ angular.module('copayApp.controllers').controller('exportController',
$scope.isEncrypted = wallet.isPrivKeyEncrypted(); $scope.isEncrypted = wallet.isPrivKeyEncrypted();
$scope.isCordova = platformInfo.isCordova; $scope.isCordova = platformInfo.isCordova;
$scope.isSafari = platformInfo.isSafari; $scope.isSafari = platformInfo.isSafari;
$scope.error = null;
$scope.init = function() { $scope.init = function() {
$scope.supported = true; $scope.supported = true;
@ -51,7 +50,7 @@ angular.module('copayApp.controllers').controller('exportController',
$scope.downloadWalletBackup = function() { $scope.downloadWalletBackup = function() {
$scope.getAddressbook(function(err, localAddressBook) { $scope.getAddressbook(function(err, localAddressBook) {
if (err) { if (err) {
$scope.error = true; popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Failed to export'));
return; return;
} }
var opts = { var opts = {
@ -61,7 +60,7 @@ angular.module('copayApp.controllers').controller('exportController',
backupService.walletDownload($scope.password, opts, function(err) { backupService.walletDownload($scope.password, opts, function(err) {
if (err) { if (err) {
$scope.error = true; popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Failed to export'));
return; return;
} }
$state.go('tabs.home'); $state.go('tabs.home');
@ -87,7 +86,7 @@ angular.module('copayApp.controllers').controller('exportController',
$scope.getBackup = function(cb) { $scope.getBackup = function(cb) {
$scope.getAddressbook(function(err, localAddressBook) { $scope.getAddressbook(function(err, localAddressBook) {
if (err) { if (err) {
$scope.error = true; popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Failed to export'));
return cb(null); return cb(null);
} }
var opts = { var opts = {
@ -97,9 +96,7 @@ angular.module('copayApp.controllers').controller('exportController',
var ew = backupService.walletExport($scope.password, opts); var ew = backupService.walletExport($scope.password, opts);
if (!ew) { if (!ew) {
$scope.error = true; popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Failed to export'));
} else {
$scope.error = false;
} }
return cb(ew); return cb(ew);
}); });

View file

@ -1,7 +1,7 @@
'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) { function($scope, $rootScope, $timeout, $log, $state, $stateParams, $ionicHistory, profileService, configService, sjcl, gettext, 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;
@ -36,14 +36,12 @@ 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;
$scope.error = null;
var parsedCode = code.split('|'); var parsedCode = code.split('|');
if (parsedCode.length != 5) { if (parsedCode.length != 5) {
/// Trying to import a malformed wallet export QR code /// Trying to import a malformed wallet export QR code
$scope.error = gettext('Incorrect code format'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Incorrect code format'));
return; return;
} }
@ -56,7 +54,7 @@ angular.module('copayApp.controllers').controller('importController',
}; };
if (info.type == 1 && info.hasPassphrase) if (info.type == 1 && info.hasPassphrase)
$scope.error = gettext('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.derivationPath = info.derivationPath;
$scope.testnetEnabled = info.network == 'testnet' ? true : false; $scope.testnetEnabled = info.network == 'testnet' ? true : false;
@ -69,7 +67,6 @@ angular.module('copayApp.controllers').controller('importController',
$scope.setType = function(type) { $scope.setType = function(type) {
$scope.type = type; $scope.type = type;
$scope.error = null;
$timeout(function() { $timeout(function() {
$rootScope.$apply(); $rootScope.$apply();
}, 1); }, 1);
@ -80,12 +77,12 @@ angular.module('copayApp.controllers').controller('importController',
try { try {
str2 = sjcl.decrypt($scope.password, str); str2 = sjcl.decrypt($scope.password, str);
} catch (e) { } catch (e) {
err = gettext('Could not decrypt file, check your password'); err = gettextCatalog.getString('Could not decrypt file, check your password');
$log.warn(e); $log.warn(e);
}; };
if (err) { if (err) {
$scope.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
$timeout(function() { $timeout(function() {
$rootScope.$apply(); $rootScope.$apply();
}); });
@ -100,22 +97,11 @@ angular.module('copayApp.controllers').controller('importController',
profileService.importWallet(str2, opts, function(err, client) { profileService.importWallet(str2, opts, function(err, client) {
ongoingProcess.set('importingWallet', false); ongoingProcess.set('importingWallet', false);
if (err) { if (err) {
$scope.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
return; return;
} }
finish(client);
walletService.updateRemotePreferences(client, {}, function() {
$log.debug('Remote preferences saved for:' + client.credentials.walletId)
});
profileService.setBackupFlag(client.credentials.walletId);
if ($stateParams.fromOnboarding) {
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
}
$state.go('tabs.home');
}); });
}, 100); }, 100);
}; };
@ -129,25 +115,13 @@ angular.module('copayApp.controllers').controller('importController',
if (err instanceof errors.NOT_AUTHORIZED) { if (err instanceof errors.NOT_AUTHORIZED) {
$scope.importErr = true; $scope.importErr = true;
} else { } else {
$scope.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
} }
return $timeout(function() { return $timeout(function() {
$scope.$apply(); $scope.$apply();
}); });
} }
finish(client);
walletService.updateRemotePreferences(client, {}, function() {
$log.debug('Remote preferences saved for:' + client.credentials.walletId)
});
profileService.setBackupFlag(client.credentials.walletId);
if ($stateParams.fromOnboarding) {
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
}
$state.go('tabs.home');
}); });
}, 100); }, 100);
}; };
@ -168,11 +142,12 @@ angular.module('copayApp.controllers').controller('importController',
} }
profileService.setBackupFlag(walletId); profileService.setBackupFlag(walletId);
if ($stateParams.fromOnboarding) { if ($stateParams.fromOnboarding) {
profileService.setDisclaimerAccepted(function(err) { profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err); if (err) $log.error(err);
}); });
} }
$state.go('tabs.home'); $state.go('tabs.home');
}); });
}, 100); }, 100);
@ -190,24 +165,13 @@ angular.module('copayApp.controllers').controller('importController',
if (err instanceof errors.NOT_AUTHORIZED) { if (err instanceof errors.NOT_AUTHORIZED) {
$scope.importErr = true; $scope.importErr = true;
} else { } else {
$scope.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
} }
return $timeout(function() { return $timeout(function() {
$scope.$apply(); $scope.$apply();
}); });
} }
finish(client);
walletService.updateRemotePreferences(client, {}, function() {
$log.debug('Remote preferences saved for:' + client.credentials.walletId)
});
profileService.setBackupFlag(client.credentials.walletId);
if ($stateParams.fromOnboarding) {
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
}
$state.go('tabs.home');
}); });
}, 100); }, 100);
}; };
@ -232,10 +196,7 @@ angular.module('copayApp.controllers').controller('importController',
$scope.importBlob = function(form) { $scope.importBlob = function(form) {
if (form.$invalid) { if (form.$invalid) {
$scope.error = gettext('There is an error in the form'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('There is an error in the form'));
$timeout(function() {
$scope.$apply();
});
return; return;
} }
@ -244,11 +205,7 @@ angular.module('copayApp.controllers').controller('importController',
var password = form.password.$modelValue; var password = form.password.$modelValue;
if (!backupFile && !backupText) { if (!backupFile && !backupText) {
$scope.error = gettext('Please, select your backup file'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Please, select your backup file'));
$timeout(function() {
$scope.$apply();
});
return; return;
} }
@ -263,10 +220,7 @@ angular.module('copayApp.controllers').controller('importController',
$scope.importMnemonic = function(form) { $scope.importMnemonic = function(form) {
if (form.$invalid) { if (form.$invalid) {
$scope.error = gettext('There is an error in the form'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('There is an error in the form'));
$timeout(function() {
$scope.$apply();
});
return; return;
} }
@ -276,7 +230,7 @@ angular.module('copayApp.controllers').controller('importController',
var pathData = derivationPathHelper.parse($scope.derivationPath); var pathData = derivationPathHelper.parse($scope.derivationPath);
if (!pathData) { if (!pathData) {
$scope.error = gettext('Invalid derivation path'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Invalid derivation path'));
return; return;
} }
opts.account = pathData.account; opts.account = pathData.account;
@ -284,10 +238,9 @@ angular.module('copayApp.controllers').controller('importController',
opts.derivationStrategy = pathData.derivationStrategy; opts.derivationStrategy = pathData.derivationStrategy;
var words = form.words.$modelValue || null; var words = form.words.$modelValue || null;
$scope.error = null;
if (!words) { if (!words) {
$scope.error = gettext('Please enter the recovery phrase'); popupService.showAlert(gettextCatalog.getString('Please enter the recovery phrase'));
} else if (words.indexOf('xprv') == 0 || words.indexOf('tprv') == 0) { } else if (words.indexOf('xprv') == 0 || words.indexOf('tprv') == 0) {
return _importExtendedPrivateKey(words, opts); return _importExtendedPrivateKey(words, opts);
} else if (words.indexOf('xpub') == 0 || words.indexOf('tpuv') == 0) { } else if (words.indexOf('xpub') == 0 || words.indexOf('tpuv') == 0) {
@ -296,17 +249,11 @@ angular.module('copayApp.controllers').controller('importController',
var wordList = words.split(/[\u3000\s]+/); var wordList = words.split(/[\u3000\s]+/);
if ((wordList.length % 3) != 0) { if ((wordList.length % 3) != 0) {
$scope.error = gettext('Wrong number of recovery words:') + wordList.length; popupService.showAlert(gettextCatalog.getString('Wrong number of recovery words:') + wordList.length);
return;
} }
} }
if ($scope.error) {
$timeout(function() {
$scope.$apply();
});
return;
}
var passphrase = form.passphrase.$modelValue; var passphrase = form.passphrase.$modelValue;
opts.passphrase = form.passphrase.$modelValue || null; opts.passphrase = form.passphrase.$modelValue || null;
@ -317,8 +264,7 @@ angular.module('copayApp.controllers').controller('importController',
trezor.getInfoForNewWallet(isMultisig, account, function(err, lopts) { trezor.getInfoForNewWallet(isMultisig, account, function(err, lopts) {
ongoingProcess.clear(); ongoingProcess.clear();
if (err) { if (err) {
$scope.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
$scope.$apply();
return; return;
} }
@ -330,37 +276,19 @@ angular.module('copayApp.controllers').controller('importController',
profileService.importExtendedPublicKey(lopts, function(err, wallet) { profileService.importExtendedPublicKey(lopts, function(err, wallet) {
ongoingProcess.set('importingWallet', false); ongoingProcess.set('importingWallet', false);
if (err) { if (err) {
$scope.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
return $timeout(function() { return;
$scope.$apply();
});
} }
finish(wallet);
walletService.updateRemotePreferences(wallet, {}, function() {
$log.debug('Remote preferences saved for:' + wallet.walletId)
});
profileService.setBackupFlag(wallet.walletId);
if ($stateParams.fromOnboarding) {
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
}
$state.go('tabs.home');
}); });
}, 100); }, 100);
}; };
$scope.importHW = function(form) { $scope.importHW = function(form) {
if (form.$invalid || $scope.account < 0) { if (form.$invalid || $scope.account < 0) {
$scope.error = gettext('There is an error in the form'); popupService.showAlert(gettextCatalog.getString('There is an error in the form'));
$timeout(function() {
$scope.$apply();
});
return; return;
} }
$scope.error = '';
$scope.importErr = false; $scope.importErr = false;
var account = +$scope.account; var account = +$scope.account;
@ -400,8 +328,7 @@ angular.module('copayApp.controllers').controller('importController',
ledger.getInfoForNewWallet(true, account, function(err, lopts) { ledger.getInfoForNewWallet(true, account, function(err, lopts) {
ongoingProcess.clear(); ongoingProcess.clear();
if (err) { if (err) {
$scope.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
$scope.$apply();
return; return;
} }
@ -413,28 +340,30 @@ angular.module('copayApp.controllers').controller('importController',
profileService.importExtendedPublicKey(lopts, function(err, wallet) { profileService.importExtendedPublicKey(lopts, function(err, wallet) {
ongoingProcess.set('importingWallet', false); ongoingProcess.set('importingWallet', false);
if (err) { if (err) {
$scope.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
return $timeout(function() { return;
$scope.$apply();
});
} }
finish(wallet);
walletService.updateRemotePreferences(wallet, {}, function() {
$log.debug('Remote preferences saved for:' + wallet.walletId)
});
profileService.setBackupFlag(wallet.walletId);
if ($stateParams.fromOnboarding) {
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
}
$state.go('tabs.home');
}); });
}, 100); }, 100);
}; };
var finish = function(wallet) {
walletService.updateRemotePreferences(wallet, {}, function() {
$log.debug('Remote preferences saved for:' + wallet.credentials.walletId)
});
profileService.setBackupFlag(wallet.credentials.walletId);
if ($stateParams.fromOnboarding) {
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
}
$state.go('tabs.home');
};
updateSeedSourceSelect(); updateSeedSourceSelect();
$scope.setSeedSource('new'); $scope.setSeedSource();
if ($stateParams.code) $scope.processWalletInfo($stateParams.code);
}); });

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('joinController', angular.module('copayApp.controllers').controller('joinController',
function($scope, $rootScope, $timeout, $state, profileService, configService, storageService, applicationService, gettext, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams) { function($scope, $rootScope, $timeout, $state, profileService, configService, storageService, applicationService, gettext, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService) {
var isChromeApp = platformInfo.isChromeApp; var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel; var isDevel = platformInfo.isDevel;
@ -14,7 +14,6 @@ angular.module('copayApp.controllers').controller('joinController',
this.onQrCodeScanned = function(data) { this.onQrCodeScanned = function(data) {
console.log('[join.js.16:data:]',data); //TODO
$scope.secret = data; $scope.secret = data;
if ($scope.joinForm) { if ($scope.joinForm) {
$scope.joinForm.secret.$setViewValue(data); $scope.joinForm.secret.$setViewValue(data);
@ -64,7 +63,7 @@ console.log('[join.js.16:data:]',data); //TODO
this.join = function(form) { this.join = function(form) {
if (form && form.$invalid) { if (form && form.$invalid) {
self.error = gettext('Please enter the required fields'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Please enter the required fields'));
return; return;
} }
@ -86,7 +85,7 @@ console.log('[join.js.16:data:]',data); //TODO
var pathData = derivationPathHelper.parse($scope.derivationPath); var pathData = derivationPathHelper.parse($scope.derivationPath);
if (!pathData) { if (!pathData) {
this.error = gettext('Invalid derivation path'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Invalid derivation path'));
return; return;
} }
opts.account = pathData.account; opts.account = pathData.account;
@ -100,15 +99,14 @@ console.log('[join.js.16:data:]',data); //TODO
if (setSeed && !opts.mnemonic && !opts.extendedPrivateKey) { if (setSeed && !opts.mnemonic && !opts.extendedPrivateKey) {
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Please enter the wallet recovery phrase'));
this.error = gettext('Please enter the wallet recovery phrase');
return; return;
} }
if (self.seedSourceId == 'ledger' || self.seedSourceId == 'trezor') { if (self.seedSourceId == 'ledger' || self.seedSourceId == 'trezor') {
var account = $scope.account; var account = $scope.account;
if (!account || account < 1) { if (!account || account < 1) {
this.error = gettext('Invalid account number'); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Invalid account number'));
return; return;
} }
@ -122,8 +120,7 @@ console.log('[join.js.16:data:]',data); //TODO
src.getInfoForNewWallet(true, account, function(err, lopts) { src.getInfoForNewWallet(true, account, function(err, lopts) {
ongoingProcess.set('connecting' + self.seedSourceId, false); ongoingProcess.set('connecting' + self.seedSourceId, false);
if (err) { if (err) {
self.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
$scope.$apply();
return; return;
} }
opts = lodash.assign(lopts, opts); opts = lodash.assign(lopts, opts);
@ -141,8 +138,7 @@ console.log('[join.js.16:data:]',data); //TODO
profileService.joinWallet(opts, function(err, client) { profileService.joinWallet(opts, function(err, client) {
ongoingProcess.set('joiningWallet', false); ongoingProcess.set('joiningWallet', false);
if (err) { if (err) {
self.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
$rootScope.$apply();
return; return;
} }

View file

@ -1,22 +1,9 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('addressbookModalController', function($scope, $log, $state, $timeout, $ionicPopup, addressbookService, lodash) { angular.module('copayApp.controllers').controller('addressbookModalController', function($scope, $log, $state, $timeout, $ionicPopup, addressbookService, lodash, popupService) {
var contacts; var contacts;
// An alert dialog
var showAlert = function(title, msg, cb) {
$log.warn(title + ": " + msg);
var alertPopup = $ionicPopup.alert({
title: title,
template: msg
});
if (!cb) cb = function() {};
alertPopup.then(cb);
};
$scope.initAddressbook = function() { $scope.initAddressbook = function() {
addressbookService.list(function(err, ab) { addressbookService.list(function(err, ab) {
if (err) $log.error(err); if (err) $log.error(err);
@ -94,7 +81,7 @@ angular.module('copayApp.controllers').controller('addressbookModalController',
$timeout(function() { $timeout(function() {
addressbookService.add(addressbook, function(err, ab) { addressbookService.add(addressbook, function(err, ab) {
if (err) { if (err) {
showAlert(err); popupService.showAlert(err);
return; return;
} }
$scope.initAddressbook(); $scope.initAddressbook();
@ -108,7 +95,7 @@ angular.module('copayApp.controllers').controller('addressbookModalController',
$timeout(function() { $timeout(function() {
addressbookService.remove(addr, function(err, ab) { addressbookService.remove(addr, function(err, ab) {
if (err) { if (err) {
showAlert(err); popupService.showAlert(err);
return; return;
} }
$scope.initAddressbook(); $scope.initAddressbook();

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('txpDetailsController', function($scope, $rootScope, $timeout, $interval, $ionicModal, ongoingProcess, platformInfo, txStatus, $ionicScrollDelegate, txFormatService, fingerprintService, bwcError, gettextCatalog, lodash, walletService) { angular.module('copayApp.controllers').controller('txpDetailsController', function($scope, $rootScope, $timeout, $interval, $ionicModal, ongoingProcess, platformInfo, txStatus, $ionicScrollDelegate, txFormatService, fingerprintService, bwcError, gettextCatalog, lodash, walletService, popupService) {
var self = $scope.self; var self = $scope.self;
var tx = $scope.tx; var tx = $scope.tx;
var copayers = $scope.copayers; var copayers = $scope.copayers;
@ -25,13 +25,11 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
} }
var setSendError = function(msg) { var setSendError = function(msg) {
$scope.error = msg || gettextCatalog.getString('Could not send payment'); var error = msg || gettextCatalog.getString('Could not send payment');
popupService.showAlert(gettextCatalog.getString('Error'), error);
} }
$scope.sign = function() { $scope.sign = function() {
$scope.error = null;
$scope.loading = true; $scope.loading = true;
walletService.publishAndSign($scope.wallet, $scope.tx, function(err, txp) { walletService.publishAndSign($scope.wallet, $scope.tx, function(err, txp) {
$scope.$emit('UpdateTx'); $scope.$emit('UpdateTx');
@ -42,18 +40,14 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
function setError(err, prefix) { function setError(err, prefix) {
$scope.loading = false; $scope.loading = false;
$scope.error = bwcError.msg(err, prefix); popupService.showAlert(gettextCatalog.getString('Error'), bwcError.msg(err, prefix));
$timeout(function() {
$scope.$digest();
}, 10);
}; };
$scope.reject = function(txp) { $scope.reject = function(txp) {
$scope.loading = true; $scope.loading = true;
$scope.error = null;
walletService.reject($scope.wallet, $scope.tx, function(err, txpr) { walletService.reject($scope.wallet, $scope.tx, function(err, txpr) {
if (err) if (err)
return setError(err, gettextCatalog.getString('Could not reject payment')); return setError(err, gettextCatalog.getString('Could not reject payment'));
$scope.close(txpr); $scope.close(txpr);
@ -64,7 +58,6 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
$scope.remove = function() { $scope.remove = function() {
$scope.loading = true; $scope.loading = true;
$scope.error = null;
$timeout(function() { $timeout(function() {
ongoingProcess.set('removeTx', true); ongoingProcess.set('removeTx', true);
@ -84,7 +77,6 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
$scope.broadcast = function(txp) { $scope.broadcast = function(txp) {
$scope.loading = true; $scope.loading = true;
$scope.error = null;
$timeout(function() { $timeout(function() {
ongoingProcess.set('broadcastTx', true); ongoingProcess.set('broadcastTx', true);
@ -185,7 +177,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
if (txp) { if (txp) {
var type = txStatus.notify(txp); var type = txStatus.notify(txp);
$scope.openStatusModal(type, txp, function() {}); $scope.openStatusModal(type, txp, function() {});
} }
$scope.cancel(); $scope.cancel();
}; };

View file

@ -2,6 +2,13 @@
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) {
$state.go('onboarding.import.phrase', {
fromOnboarding: true,
code: code
});
};
$scope.createProfile = function() { $scope.createProfile = function() {
$log.debug('Creating profile'); $log.debug('Creating profile');
profileService.createProfile(function(err) { profileService.createProfile(function(err) {

View file

@ -69,10 +69,12 @@ angular.module('copayApp.controllers').controller('preferencesController',
$scope.touchIdChange = function() { $scope.touchIdChange = function() {
var newStatus = $scope.touchIdEnabled; var newStatus = $scope.touchIdEnabled;
walletService.setTouchId(wallet, newStatus, function(err) { walletService.setTouchId(wallet, !!newStatus, function(err) {
if (err) { if (err) {
$log.warn(err);
$scope.touchIdEnabled = !newStatus; $scope.touchIdEnabled = !newStatus;
$timeout(function() {
$scope.$apply();
}, 1);
return; return;
} }
$log.debug('Touch Id status changed: ' + newStatus); $log.debug('Touch Id status changed: ' + newStatus);

View file

@ -3,7 +3,6 @@
angular.module('copayApp.controllers').controller('preferencesBwsUrlController', angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
function($scope, $log, $stateParams, $ionicNavBarDelegate, configService, applicationService, profileService, storageService) { function($scope, $log, $stateParams, $ionicNavBarDelegate, configService, applicationService, profileService, storageService) {
$ionicNavBarDelegate.title('Wallet Service URL'); $ionicNavBarDelegate.title('Wallet Service URL');
$scope.error = null;
$scope.success = null; $scope.success = null;
var wallet = profileService.getWallet($stateParams.walletId); var wallet = profileService.getWallet($stateParams.walletId);

View file

@ -1,12 +1,11 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController', angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
function($scope, $ionicPopup, $stateParams, $ionicNavBarDelegate, gettextCatalog, lodash, profileService, $state, ongoingProcess) { function($scope, $ionicPopup, $stateParams, $ionicNavBarDelegate, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Delete Wallet')); $ionicNavBarDelegate.title(gettextCatalog.getString('Delete Wallet'));
var wallet = profileService.getWallet($stateParams.walletId); var wallet = profileService.getWallet($stateParams.walletId);
$scope.alias = lodash.isEqual(wallet.name, wallet.credentials.walletName) ? null : wallet.name + ' '; $scope.alias = lodash.isEqual(wallet.name, wallet.credentials.walletName) ? null : wallet.name + ' ';
$scope.walletName = '[' + wallet.credentials.walletName + ']'; $scope.walletName = '[' + wallet.credentials.walletName + ']';
$scope.error = null;
$scope.showDeletePopup = function() { $scope.showDeletePopup = function() {
var popup = $ionicPopup.show({ var popup = $ionicPopup.show({
@ -36,7 +35,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
profileService.deleteWalletClient(wallet, function(err) { profileService.deleteWalletClient(wallet, function(err) {
ongoingProcess.set('deletingWallet', false); ongoingProcess.set('deletingWallet', false);
if (err) { if (err) {
$scope.error = err.message || err; popupService.showAlert(gettextCatalog.getString('Error'), err.message || err);
} else { } else {
$state.go('tabs.home'); $state.go('tabs.home');
} }

View file

@ -58,7 +58,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
profileService.getNotifications({ profileService.getNotifications({
limit: 3 limit: 3
}, function(err, n) { }, function(err, n) {
console.log('[tab-home.js.57]', n); //TODO
if (err) { if (err) {
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
return; return;

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, platformInfo, walletService, profileService, configService, lodash, gettextCatalog) { angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
$scope.isCordova = platformInfo.isCordova; $scope.isCordova = platformInfo.isCordova;
@ -33,7 +33,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
if ($scope.generatingAddress) return; if ($scope.generatingAddress) return;
var wallet = wallet || $scope.wallet; var wallet = wallet || $scope.wallet;
$scope.error = null;
$scope.addr = null; $scope.addr = null;
$scope.generatingAddress = true; $scope.generatingAddress = true;
@ -41,7 +40,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
walletService.getAddress(wallet, forceNew, function(err, addr) { walletService.getAddress(wallet, forceNew, function(err, addr) {
$scope.generatingAddress = false; $scope.generatingAddress = false;
if (err) { if (err) {
$scope.error = err; popupService.showAlert(gettextCatalog.getString('Error'), err);
} else { } else {
if (addr) if (addr)
$scope.addr = addr; $scope.addr = addr;

View file

@ -1,21 +1,27 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('tabsController', function($log, $scope, $ionicModal, incomingData) { angular.module('copayApp.controllers').controller('tabsController', function($log, $scope, $stateParams, $ionicModal, $timeout, incomingData) {
$scope.onScan = function(data) { $scope.onScan = function(data) {
console.log('[tabsController.js.6:data:]',data); //TODO if (!incomingData.redir(data)) {
if (!incomingData.redir(data)) { $ionicPopup.alert({
$ionicPopup.alert({ title: 'Invalid data',
title: 'Invalid data', });
});
}
} }
}
$scope.setScanFn = function(scanFn) { $scope.setScanFn = function(scanFn) {
$scope.scan = function() { $scope.scan = function() {
$log.debug('Scanning...'); $log.debug('Scanning...');
scanFn(); scanFn();
};
}; };
}); };
$scope.importInit = function() {
$scope.fromOnboarding = $stateParams.fromOnboarding;
$timeout(function() {
$scope.$apply();
}, 1);
}
});

View file

@ -194,6 +194,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
return $state.go('wallet.copayers'); return $state.go('wallet.copayers');
}; };
/* Set color for header bar */
$rootScope.walletDetailsColor = wallet.color;
$rootScope.walletDetailsName = wallet.name;
$scope.wallet = wallet; $scope.wallet = wallet;
$scope.requiresMultipleSignatures = wallet.credentials.m > 1; $scope.requiresMultipleSignatures = wallet.credentials.m > 1;
$scope.newTx = false; $scope.newTx = false;

View file

@ -270,12 +270,15 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}) })
.state('tabs.import', { .state('tabs.import', {
url: '/import/:fromOnboarding', url: '/import/:fromOnboarding',
// abstract: true, // abstract: true,
views: { views: {
'tab-home': { 'tab-home': {
templateUrl: 'views/import.html' templateUrl: 'views/import.html'
}, },
} },
params: {
code: null
},
}) })
.state('tabs.import.phrase', { .state('tabs.import.phrase', {
url: '/tab-import-phrase', url: '/tab-import-phrase',
@ -628,6 +631,42 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
} }
} }
}) })
.state('onboarding.import', {
url: '/import/:fromOnboarding',
abstract: true,
views: {
'onboarding': {
templateUrl: 'views/import.html'
},
},
params: {
code: 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,11 +1,17 @@
'use strict'; 'use strict';
angular.module('copayApp.services').factory('glideraService', function($http, $log, platformInfo, storageService, configService, $rootScope) { angular.module('copayApp.services').factory('glideraService', function($http, $log, $window, platformInfo, storageService, configService, $rootScope) {
var root = {}; var root = {};
var credentials = {}; var credentials = {};
var isCordova = platformInfo.isCordova; var isCordova = platformInfo.isCordova;
var _setCredentials = function() { var _setCredentials = function() {
if (!$window.externalServices || !$window.externalServices.glidera) {
return;
}
var glidera = $window.externalServices.glidera;
/* /*
* Development: 'testnet' * Development: 'testnet'
* Production: 'livenet' * Production: 'livenet'
@ -13,26 +19,26 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
credentials.NETWORK = 'livenet'; credentials.NETWORK = 'livenet';
if (credentials.NETWORK == 'testnet') { if (credentials.NETWORK == 'testnet') {
credentials.HOST = 'https://sandbox.glidera.io'; credentials.HOST = glidera.sandbox.host;
if (isCordova) { if (isCordova) {
credentials.REDIRECT_URI = 'copay://glidera'; credentials.REDIRECT_URI = glidera.sandbox.mobile.redirect_uri;
credentials.CLIENT_ID = '6163427a2f37d1b2022ececd6d6c9cdd'; credentials.CLIENT_ID = glidera.sandbox.mobile.client_id;
credentials.CLIENT_SECRET = '599cc3af26108c6fece8ab17c3f35867'; credentials.CLIENT_SECRET = glidera.sandbox.mobile.client_secret;
} else { } else {
credentials.REDIRECT_URI = 'urn:ietf:wg:oauth:2.0:oob'; credentials.REDIRECT_URI = glidera.sandbox.desktop.redirect_uri;
credentials.CLIENT_ID = 'c402f4a753755456e8c384fb65b7be1d'; credentials.CLIENT_ID = glidera.sandbox.desktop.client_id;
credentials.CLIENT_SECRET = '3ce826198e3618d0b8ed341ab91fe4e5'; credentials.CLIENT_SECRET = glidera.sandbox.desktop.client_secret;
} }
} else { } else {
credentials.HOST = 'https://glidera.io'; credentials.HOST = glidera.production.host;
if (isCordova) { if (isCordova) {
credentials.REDIRECT_URI = 'copay://glidera'; credentials.REDIRECT_URI = glidera.production.mobile.redirect_uri;
credentials.CLIENT_ID = '9c8023f0ac0128235b7b27a6f2610c83'; credentials.CLIENT_ID = glidera.production.mobile.client_id;
credentials.CLIENT_SECRET = '30431511407b47f25a83bffd72881d55'; credentials.CLIENT_SECRET = glidera.production.mobile.client_secret;
} else { } else {
credentials.REDIRECT_URI = 'urn:ietf:wg:oauth:2.0:oob'; credentials.REDIRECT_URI = glidera.production.desktop.redirect_uri;
credentials.CLIENT_ID = '8a9e8a9cf155db430c1ea6c7889afed1'; credentials.CLIENT_ID = glidera.production.desktop.client_id;
credentials.CLIENT_SECRET = '24ddec578f38d5488bfe13601933c05f'; credentials.CLIENT_SECRET = glidera.production.desktop.client_secret;
} }
}; };
}; };

View file

@ -822,25 +822,29 @@ angular.module('copayApp.services')
}; };
}); });
// condense
var finale = [],
prev;
var finale = shown; // GROUPING DISABLED!
lodash.each(shown, function(x) { // var finale = [],
if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) { // prev;
prev.types.push(x.type); //
prev.data = lodash.assign(prev.data, x.data); //
prev.txid = prev.txid || x.txid; // // Item grouping... DISABLED.
prev.amountStr = prev.amountStr || x.amountStr; //
prev.creatorName = prev.creatorName || x.creatorName; // // REMOVE (if we want 1-to-1 notification) ????
} else { // lodash.each(shown, function(x) {
finale.push(x); // if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) {
prev = x; // prev.types.push(x.type);
} // prev.data = lodash.assign(prev.data, x.data);
}); // prev.txid = prev.txid || x.txid;
// prev.amountStr = prev.amountStr || x.amountStr;
// messages... // prev.creatorName = prev.creatorName || x.creatorName;
// } else {
// finale.push(x);
// prev = x;
// }
// });
//
var u = bwcService.getUtils(); var u = bwcService.getUtils();
lodash.each(finale, function(x) { lodash.each(finale, function(x) {

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.services').factory('walletService', function($log, $timeout, lodash, trezor, ledger, storageService, configService, rateService, uxLanguage, $filter, gettextCatalog, bwcError, $ionicPopup, fingerprintService, ongoingProcess, gettext, $rootScope, txStatus, txFormatService, $ionicModal, $state, bwcService, bitcore) { angular.module('copayApp.services').factory('walletService', function($log, $timeout, lodash, trezor, ledger, storageService, configService, rateService, uxLanguage, $filter, gettextCatalog, bwcError, $ionicPopup, fingerprintService, ongoingProcess, gettext, $rootScope, txStatus, txFormatService, $ionicModal, $state, bwcService, bitcore, popupService) {
// `wallet` is a decorated version of client. // `wallet` is a decorated version of client.
var root = {}; var root = {};
@ -81,12 +81,11 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
wallet.notAuthorized = true; wallet.notAuthorized = true;
$state.go('tabs.home'); $state.go('tabs.home');
} else if (err instanceof errors.NOT_FOUND) { } else if (err instanceof errors.NOT_FOUND) {
root.showErrorPopup(gettext('Could not access Wallet Service: Not found')); popupService.showAlert(gettextCatalog.getString('Could not access Wallet Service: Not found'));
} else { } else {
var msg = "" var msg = ""
$rootScope.$emit('Local/ClientError', (err.error ? err.error : err)); $rootScope.$emit('Local/ClientError', (err.error ? err.error : err));
var msg = bwcError.msg(err, gettext('Error at Wallet Service')); popupService.showAlert(bwcError.msg(err, gettextCatalog.getString('Error at Wallet Service')));
root.showErrorPopup(msg);
} }
}; };
root.handleError = lodash.debounce(_handleError, 1000); root.handleError = lodash.debounce(_handleError, 1000);
@ -664,20 +663,6 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
}); });
}; };
root.showErrorPopup = function(msg, cb) {
$log.warn('Showing err popup:' + msg);
// An alert dialog
var alertPopup = $ionicPopup.alert({
title: title,
template: msg
});
if (!cb) cb = function() {};
alertPopup.then(cb);
};
// walletHome // walletHome
root.recreate = function(wallet, cb) { root.recreate = function(wallet, cb) {
ongoingProcess.set('recreating', true); ongoingProcess.set('recreating', true);
@ -1010,10 +995,17 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
}; };
root.setTouchId = function(wallet, enabled, cb) { root.setTouchId = function(wallet, enabled, cb) {
var opts = {
touchIdFor: {}
};
opts.touchIdFor[wallet.id] = enabled;
fingerprintService.check(wallet, function(err) { fingerprintService.check(wallet, function(err) {
if (err) return cb(err); { if (err) {
$log.debug(err); opts.touchIdFor[wallet.id] = !enabled;
return; $log.debug('Error with fingerprint:' + err);
return cb(err);
} }
configService.set(opts, cb); configService.set(opts, cb);
}); });

View file

@ -25,7 +25,6 @@
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.3); box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.3);
} }
} }
.overlay{ .overlay{
position: absolute; position: absolute;
top:0; top:0;
@ -34,4 +33,27 @@
height: 100%; height: 100%;
background: rgba(0,0,0,.4); background: rgba(0,0,0,.4);
z-index: 4; z-index: 4;
} }
.back-button {
border: 0;
.icon:before {
color: #fff;
font-size: 30px !important;
font-weight: bold;
margin-left: 5px;
}
}
.search-button {
.icon:before {
color: #fff;
font-size: 30px !important;
margin-left: 5px;
}
}
.button-block {
width: 90% !important;
margin-left: auto;
margin-right: auto;
}

9
src/sass/ionic.scss Normal file
View file

@ -0,0 +1,9 @@
/* Set ionic variables */
$font-family-sans-serif: "Roboto", sans-serif;
$font-family-light-sans-serif: "Roboto-Light", sans-serif-light;
$royal: #1e3186;
$base-background-color: #f5f5f5;
@import "../../bower_components/ionic/scss/ionic";

View file

@ -339,20 +339,6 @@ ul.wallet-selection.wallets {
padding-right: 10%; padding-right: 10%;
} }
.amount {
width: 100%;
text-align: center;
padding: 1.5rem 1rem 1.5rem 1rem;
color: #fff;
height: 150px;
margin-bottom: 25px;
}
.alternative-amount {
height: 25px;
text-align: center;
}
.wallet-info { .wallet-info {
position: absolute; position: absolute;
top: inherit; top: inherit;
@ -1003,8 +989,11 @@ input[type=number] {
} }
} }
@import "ionic";
@import "common";
@import 'mixins/mixins'; @import 'mixins/mixins';
@import 'views/onboarding/onboarding'; @import "views/add";
@import "views/common";
@import "views/tab-home"; @import "views/tab-home";
@import "views/includes/walletActivity"; @import "views/walletDetails";
@import 'views/onboarding/onboarding';
@import "views/includes/walletActivity";

13
src/sass/views/add.scss Normal file
View file

@ -0,0 +1,13 @@
#view-add {
.item {
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
&:first-child {
margin-top: 25px;
}
}
}

View file

@ -5,6 +5,7 @@
background-size: contain; background-size: contain;
background-repeat-y: no-repeat; background-repeat-y: no-repeat;
#shopping-24 { #shopping-24 {
content: url("../img/onboarding-welcome-shopping24.png");
position: absolute; position: absolute;
top: 2%; top: 2%;
right: 5%; right: 5%;

View file

@ -19,4 +19,8 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: -5px -6px; background-position: -5px -6px;
} }
a.item {
color: #444;
}
} }

View file

@ -0,0 +1,24 @@
#walletDetails {
.bar-header {
border: 0;
.title, .button {
color: #fff;
}
.button {
background-color: transparent;
}
}
.amount {
width: 100%;
text-align: center;
padding: 2.5rem 1rem 1.5rem 1rem;
color: #fff;
height: 150px;
margin-bottom: 25px;
&-alternative {
line-height: 48px;
}
}
}

30
util/buildExternalServices.js Executable file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env node
'use strict';
var fs = require('fs');
var file;
try {
file = fs.readFileSync('./externalServices.json', 'utf8');
} catch(err) {
return;
}
var externalServices = JSON.parse(file);
if (externalServices.coinbase &&
externalServices.coinbase.production.client_id)
console.log('Coinbase Production Enabled');
if (externalServices.coinbase &&
externalServices.coinbase.sandbox.client_id)
console.log('Coinbase Sandbox Enabled');
if (externalServices.glidera &&
(externalServices.glidera.production.mobile.client_id || externalServices.glidera.production.desktop.client_id))
console.log('Glidera Production Enabled');
if (externalServices.glidera &&
(externalServices.glidera.sandbox.mobile.client_id || externalServices.glidera.sandbox.desktop.client_id))
console.log('Glidera Sandbox Enabled');
var content = 'window.externalServices=' + JSON.stringify(externalServices) + ';';
fs.writeFileSync("./src/js/externalServices.js", content);

View file

@ -1,20 +0,0 @@
#!/usr/bin/env node
'use strict';
var fs = require('fs');
var file;
try {
file = fs.readFileSync('./coinbase.json', 'utf8');
} catch(err) {
return;
}
var json = JSON.parse(file);
console.log('Coinbase Client ID: ' + json.client_id);
var content = 'window.coinbase_client_id="' + json.client_id + '";';
content = content + '\nwindow.coinbase_client_secret="' + json.client_secret + '";';
fs.writeFileSync("./src/js/coinbase.js", content);

View file

@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Version=0.7.0 Version=0.8.0
Name=BitPay Name=BitPay
Comment=The BitPay Bitcoin Wallet Comment=The BitPay Bitcoin Wallet
Exec=bitpay Exec=bitpay

View file

@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "bitpay" #define MyAppName "bitpay"
#define MyAppVersion "0.7.0" #define MyAppVersion "0.8.0"
#define MyAppPublisher "BitPay" #define MyAppPublisher "BitPay"
#define MyAppURL "https://bitpay.com" #define MyAppURL "https://bitpay.com"
#define MyAppExeName "*NAMECASENOSPACE.exe" #define MyAppExeName "*NAMECASENOSPACE.exe"