Merge pull request #156 from cmgustavo/ref/design-40

Views caching
This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-22 11:57:52 -03:00 committed by GitHub
commit a8ed208ba7
76 changed files with 564 additions and 484 deletions

View File

@ -1,11 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>Recent Activity</ion-nav-title>
<ion-nav-title>
{{'Recent Activity'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content class="padding" ng-controller="activityController" ng-init="init()">
<ion-content class="padding">
<div ng-if="fetchingNotifications" class="updatingHistory">
<div class="text-center">

View File

@ -12,7 +12,7 @@
</ion-nav-buttons>
</ion-nav-bar>
<ion-content ng-init="initAddressbook()">
<ion-content>
<div class="bar bar-header item-input-inset" ng-show="!isEmptyList">
<label class="item-input-wrapper">

View File

@ -5,13 +5,13 @@
<ion-nav-title>Amazon.com Gift Cards</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="amazonController as amazon" ng-init="amazon.init()">
<ion-content>
<div class="box-notification warning" ng-show="network == 'testnet'">
Sandbox version. Only for testing purpose
</div>
<div class="m20t text-center" ng-click="amazon.updatePendingGiftCards()">
<div class="m20t text-center" ng-click="updatePendingGiftCards()">
<img src="img/GCs-logo-cllb.png" alt="Amazon.com Gift Card" width="200">
<div class="size-11 m10t"><b>Only</b> redeemable on www.amazon.com (USA website)</div>
</div>
@ -42,7 +42,7 @@
Your cards
</div>
<div ng-repeat="(id, item) in giftCards | orderObjectBy:'date':true track by $index"
ng-click="amazon.openCardModal(item)"
ng-click="openCardModal(item)"
class="item item-avatar">
<img src="img/a-smile_color_btn.png" alt="{{id}}" width="40">
<h2 ng-if="item.claimCode">

View File

@ -1,10 +1,13 @@
<ion-view id="view-amount">
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Enter Amount'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content scroll="false" class="amount" ng-controller="amountController" ng-init="init()">
<ion-content scroll="false">
<div>
<div class="item item-no-bottom-border" translate>Recipient</div>

View File

@ -1,4 +1,4 @@
<ion-view id="wallet-backup-phrase" title="{{viewTitle}}" ng-controller="backupController" ng-init="init()">
<ion-view id="wallet-backup-phrase" title="{{viewTitle}}">
<ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary">
<button class="button button-back button-clear" ng-click="backupGoBack()">

View File

@ -5,7 +5,7 @@
<ion-nav-title>Buy</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="buyAmazonController as buy" ng-init="buy.init()">
<ion-content>
<div ng-show="!buy.giftCard">

View File

@ -5,7 +5,7 @@
<ion-nav-title>Buy</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="buyGlideraController as buy" ng-init="init()">
<ion-content>
<div class="box-notification warning" ng-show="network == 'testnet'">
Testnet wallets only work with Glidera Sandbox Accounts

View File

@ -1,4 +1,4 @@
<ion-view id="view-confirm" ng-controller="confirmController" ng-init="init()">
<ion-view id="view-confirm">
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Confirm'|translate}}

View File

@ -5,7 +5,7 @@
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="exportController" ng-init="file = true; init();">
<ion-content ng-init="file = true">
<div class="row text-center">
<div class="col" ng-click="file = true" ng-style="file && {'border-bottom': '2px solid'}">
<span class="" translate>File/Text</span>

View File

@ -5,7 +5,7 @@
<ion-nav-title>Glidera</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="glideraController as glidera" ng-init="init()">
<ion-content>
<div class="box-notification error" ng-show="!network">
Glidera is disabled for this application

View File

@ -5,7 +5,7 @@
<ion-nav-title>Glidera</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="glideraUriController" ng-init="checkCode()">
<ion-content>
<div class="box-notification warning" ng-show="network == 'testnet'">
Testnet wallets only work with Glidera Sandbox Accounts

View File

@ -5,7 +5,7 @@
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="paperWalletController" ng-init="init()">
<ion-content>
<div class="row" ng-show="needsBackup">
<div class="columns">
<h4></h4>

View File

@ -1,9 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Wallet Preferences'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesController" ng-init="init()">
<ion-content>
<div class="list">
<div class="item item-divider"></div>
<a class="item item-icon-right" ui-sref="tabs.preferences.preferencesAlias">

View File

@ -3,7 +3,7 @@
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesAbout">
<ion-content>
<div class="list">
<div class="item item-divider" translate>
Release information

View File

@ -4,7 +4,7 @@
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesAdvancedController">
<ion-content>
<div class="list">
<div class="item item-divider">
</div>

View File

@ -1,9 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Alias'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesAliasController" >
<ion-content>
<form name="aliasForm" ng-submit="save(aliasForm)" novalidate>
<div class="card list">
<label class="item item-input item-stacked-label">

View File

@ -1,9 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Alternative Currency'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesAltCurrencyController" ng-init="init()" >
<ion-content>
<ion-radio ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency"
ng-click="save(altCurrency)">{{altCurrency.name}}
</ion-radio>

View File

@ -1,9 +1,10 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>Wallet Service URL</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesBwsUrlController">
<ion-content>
<div class="card list">
<label class="item item-input item-stacked-label no-border">

View File

@ -1,9 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Alias'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesColorController" >
<ion-content>
<ion-radio ng-repeat="c in colorList" ng-value="c" ng-model="currentColor" ng-click="save(c)">
<span ng-style="{'color': c}">&block;</span>
</ion-radio>

View File

@ -1,9 +1,10 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Delete Wallet' | translate}}</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesDeleteWalletController" >
<ion-content>
<div class="card">
<h1 class="text-center" translate>Warning!</h2>
<div class="assertive padding" translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div>

View File

@ -1,9 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Delete recovery phrase'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesDeleteWordsController" >
<ion-content>
<div ng-show="!deleted">
<div ng-show="error">
{{error|translate}}

View File

@ -1,9 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Email Notifications'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesEmailController" >
<ion-content>
<form name="emailForm" ng-submit="save(emailForm)" novalidate>
<div class="card list">
<label class="item item-input item-stacked-label">

View File

@ -1,10 +1,13 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Bitcoin Network Fee Policy'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesFeeController" ng-init="init()">
<ion-content>
<ion-radio ng-repeat="fee in feeLevels.livenet" ng-value="fee.level" ng-model="currentFeeLevel" ng-click="save(fee)">
{{feeOpts[fee.level]|translate}}
</ion-radio>

View File

@ -5,7 +5,7 @@
<ion-nav-title>Preferences</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="preferencesGlideraController" ng-init="init()">
<ion-content>
<ul class="list">
<div ng-if="token">

View File

@ -1,9 +1,10 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Transaction History' | translate}}</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesHistory" ng-init="csvHistory()">
<ion-content>
<div class="item item-divider"></div>
<div class="item" ng-show="csvReady && !isCordova" ng-csv="csvContent" csv-header="csvHeader" filename="Copay-{{wallet.name}}.csv">
<span translate>Export to file</span>

View File

@ -1,9 +1,10 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Wallet Information' | translate}}</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesInformation" ng-init="init()">
<ion-content>
<div class="list">
<div class="item item-divider"></div>
<div class="item" ng-click="saveBlack()">

View File

@ -1,9 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Language'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesLanguageController" ng-init="init()" >
<ion-content>
<ion-radio ng-repeat="lang in availableLanguages" ng-value="lang.isoCode" ng-model="currentLanguage"
ng-click="save(lang.isoCode)">{{lang.name}}
</ion-radio>

View File

@ -1,9 +1,18 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Session Log' | translate}}</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesLogs" ng-init="init()">
<ion-content>
<button class="button button-block button-positive" copy-to-clipboard="prepare()">
<i class="icon ion-clipboard"></i>
<span translate>Copy to clipboard</span>
</button>
<button class="button button-block button-positive" ng-show="isCordova" ng-click="sendLogs()">
<i class="icon ion-ios-email-outline"></i>
<span translate>Send by email</span>
</button>
<div class="card">
<div class="item item-text-wrap">
<ul>
@ -15,13 +24,5 @@
</ul>
</div>
</div>
<button class="button button-block button-positive" copy-to-clipboard="prepare()">
<i class="icon ion-clipboard"></i>
<span translate>Copy to clipboard</span>
</button>
<button class="button button-block button-positive" ng-show="isCordova" ng-click="sendLogs()">
<i class="icon ion-ios-email-outline"></i>
<span translate>Send by email</span>
</button>
</ion-content>
</ion-view>

View File

@ -1,9 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Unit'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesUnitController" ng-init="init()" >
<ion-content>
<ion-radio ng-repeat="unit in unitList" ng-value="unit.code" ng-model="currentUnit"
ng-click="save(unit)">{{unit.shortName}}
</ion-radio>

View File

@ -7,14 +7,23 @@
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content class="padding" ng-controller="proposalsController" ng-init="init()">
<ion-content class="padding">
<div class="list card">
<div ng-if="fetchingProposals" class="updatingHistory">
<div class="text-center">
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
<div translate>Updating pending proposals. Please stand by</div>
</div>
</div>
<div class="list card" ng-show="txps[0] && !fetchingProposals">
<a ng-repeat="tx in txps" class="item" ng-click="openTxpModal(tx)">
<span ng-include="'views/includes/txp.html'"></span>
</a>
</div>
<div class="item" ng-show="!txps[0]">
<div class="list card" ng-show="!txps[0] && !fetchingProposals">
<div class="item">
<span translate>No pending proposals</span>
</div>
</div>

View File

@ -5,7 +5,7 @@
<ion-nav-title>Sell</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="sellGlideraController as sell" ng-init="init()">
<ion-content>
<div class="box-notification warning" ng-show="network == 'testnet'">
Testnet wallets only work with Glidera Sandbox Accounts

View File

@ -3,7 +3,7 @@
<ion-nav-title>{{'Home' | translate}}</ion-nav-title>
</ion-nav-bar>
<ion-content class="padding" ng-controller="tabHomeController" ng-init="updateAllWallets(); nextStep()">
<ion-content class="padding">
<div class="list card homeTip" ng-show="homeTip">
<div class="item item-icon-right item-heading">
<a ng-click="hideHomeTip()"><i class="icon ion-ios-close-empty close-home-tip"></i></a>

View File

@ -1,4 +1,4 @@
<ion-view id="tab-receive" ng-controller="tabReceiveController" ng-init="init()">
<ion-view id="tab-receive">
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Receive' | translate}}</ion-nav-title>
<ion-nav-buttons side="secondary">
@ -10,8 +10,11 @@
<ion-content>
<article id="address">
<div class="row">
<div class="m15t text-center col col-60 center-block" copy-to-clipboard="addr">
<qrcode size="220" data="bitcoin:{{addr}}"></qrcode>
<div class="m15t text-center col center-block" copy-to-clipboard="addr">
<qrcode ng-if="addr" size="220" data="bitcoin:{{addr}}"></qrcode>
<div ng-if="!addr" style="height:220px; width:220px; margin:auto; background: white; padding-top: 20%;">
...
</div>
<div ng-if="wallet.needsBackup" class="assertive m10t" translate>
Before receiving funds, you must backup your wallet. If this device is lost, it is impossible to access your funds without a backup.
</div>
@ -25,7 +28,7 @@
</div>
</div>
<div class="col" ng-class="{'center-block col-50': !isCordova || !addr}">
<div class="item item-icon-left" ng-click="setAddress(null, true)">
<div class="item item-icon-left" ng-click="setAddress(true)">
<i class="icon ion-ios-loop"></i>
<span translate>Next Address</span>
</div>
@ -46,11 +49,7 @@
<span translate>No Wallet</span>
</div>
<div class="list" ng-if="wallets[0]">
<!-- <div class="item item-icon-left" ng-click="setAddress(null, true)">
<i class="icon ion-ios-loop"></i>
<span translate>Next Address</span>
</div> -->
<wallets ng-if="wallets[0]" wallets="wallets"></wallets>
<wallets wallets="wallets"></wallets>
</div>
</article>
</ion-content>

View File

@ -1,12 +0,0 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Scan' | translate}}</ion-nav-title>
</ion-nav-bar>
<ion-content class="padding" ng-controller="tabScanController" ng-init="init()">
<canvas id="qr-canvas" width="200" height="150"></canvas>
<video id="qrcode-scanner-video" width="300" height="225"></video>
</ion-content>
</ion-view>

View File

@ -3,7 +3,7 @@
<ion-nav-title>{{'Send' | translate}}</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="tabSendController" ng-init="init()">
<ion-content>
<div>
<div class="item item-heading" translate>Recipient</div>
<label class="item item-input bitcoin-address">

View File

@ -3,7 +3,7 @@
<ion-nav-title>{{'Global Settings' | translate}}</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="tabSettingsController" ng-init="init()">
<ion-content>
<div class="list">
<div class="item item-divider"></div>
<a class="item item-icon-left item-icon-right" ui-sref="tabs.addressbook">
@ -53,7 +53,7 @@
<div ng-show="usePushNotifications && PNEnabledByUser">
<div class="item item-divider" translate>Notifications</div>
<ion-toggle ng-model="pushNotifications" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
<ion-toggle ng-model="pushNotifications.value" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
<span class="toggle-label" translate>Enable push notifications</span>
</ion-toggle>
@ -67,7 +67,7 @@
<div class="item item-divider" translate>Exchanges</div>
<ion-toggle ng-show="!isWP" ng-model="glideraEnabled" toggle-class="toggle-balanced" ng-change="glideraChange()">
<ion-toggle ng-show="!isWP" ng-model="glideraEnabled.value" toggle-class="toggle-balanced" ng-change="glideraChange()">
<span class="toggle-label" translate>Enable Glidera Service</span>
</ion-toggle>
@ -80,20 +80,20 @@
<div class="item item-divider" translate>Others</div>
<ion-toggle ng-model="spendUnconfirmed" toggle-class="toggle-balanced" ng-change="spendUnconfirmedChange()">
<ion-toggle ng-model="spendUnconfirmed.value" toggle-class="toggle-balanced" ng-change="spendUnconfirmedChange()">
<span class="toggle-label" translate>Use Unconfirmed Funds</span>
</ion-toggle>
<div class="item item-divider" translate>Wallets Preferences</div>
<a class="item item-icon-left item-icon-right" href
ui-sref="tabs.preferences.main({'walletId': item.id})"
ui-sref="tabs.preferences({'walletId': item.id})"
ng-repeat="item in wallets track by $index">
<i class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i>
{{item.name || item.id}}
<span ng-show="item.n > 1" class="text-light">
{{item.m}}-of-{{item.n}}
</span>
<span class="badge badge-assertive" ng-show="!item.isComplete()" translate>
<span class="right text-light assertive" ng-show="!item.isComplete()" translate>
Incomplete
</span>
<i class="icon nav-item-arrow-right"></i>

View File

@ -1,10 +1,11 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Terms Of Use' | translate}}</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content class="padding" ng-controller="termOfUseController">
<ion-content class="padding">
<div class="card">
<div class="item item-text-wrap" ng-include="'views/includes/terms.html'"></div>
</div>

View File

@ -4,7 +4,7 @@
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="translatorsController">
<ion-content>
<div class="list">
<div class="item item-divider" translate>
Translation Credits

View File

@ -1,4 +1,4 @@
<ion-view id="walletDetails" ng-controller="walletDetailsController" ng-init="init()">
<ion-view id="walletDetails">
<ion-nav-bar ng-style="{'background-color': walletDetailsColor}">
<ion-nav-title>{{walletDetailsName}}</ion-nav-title>
<ion-nav-back-button>

View File

@ -3,12 +3,12 @@
angular.module('copayApp.controllers').controller('activityController',
function($timeout, $scope, $log, $ionicModal, lodash, txpModalService, profileService, walletService, ongoingProcess, popupService, gettextCatalog) {
$scope.openTxpModal = txpModalService.open;
$scope.fetchingNotifications = true;
$scope.init = function() {
$scope.fetchingNotifications = true;
$scope.$on("$ionicView.enter", function(event, data){
profileService.getNotifications(50, function(err, n) {
if (err) {
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
$log.error(err);
return;
}
$scope.fetchingNotifications = false;
@ -22,7 +22,7 @@ angular.module('copayApp.controllers').controller('activityController',
});
});
});
};
});
$scope.openNotificationModal = function(n) {
if (n.txid) {
@ -33,8 +33,16 @@ angular.module('copayApp.controllers').controller('activityController',
});
if (txp) txpModalService.open(txp);
else {
$log.warn('No txp found');
return popupService.showAlert(null, gettextCatalog.getString('Transaction not found'));
ongoingProcess.set('loadingTxInfo', true);
walletService.getTxp(n.wallet, n.txpId, function(err, txp) {
var _txp = txp;
ongoingProcess.set('loadingTxInfo', false);
if (err) {
$log.warn('No txp found');
return popupService.showAlert(null, gettextCatalog.getString('Transaction not found'));
}
txpModalService.open(_txp);
});
}
}
};
@ -56,18 +64,18 @@ angular.module('copayApp.controllers').controller('activityController',
return popupService.showAlert(null, gettextCatalog.getString('Transaction not found'));
}
walletService.getTxNote(wallet, n.txid, function(err, note) {
if (err) $log.debug(gettextCatalog.getString('Could not fetch transaction note'));
$scope.wallet = wallet;
$scope.btx = lodash.cloneDeep(tx);
$ionicModal.fromTemplateUrl('views/modals/tx-details.html', {
scope: $scope
}).then(function(modal) {
$scope.txDetailsModal = modal;
$scope.txDetailsModal.show();
});
$scope.wallet = wallet;
$scope.btx = lodash.cloneDeep(tx);
walletService.getTxNote(wallet, n.txid, function(err, note) {
if (err) $log.debug('Could not fetch transaction note');
$scope.btx.note = note;
$ionicModal.fromTemplateUrl('views/modals/tx-details.html', {
scope: $scope
}).then(function(modal) {
$scope.txDetailsModal = modal;
$scope.txDetailsModal.show();
});
});
});
};

View File

@ -4,7 +4,7 @@ angular.module('copayApp.controllers').controller('addressbookListController', f
var contacts;
$scope.initAddressbook = function() {
var initAddressbook = function() {
addressbookService.list(function(err, ab) {
if (err) $log.error(err);
@ -47,10 +47,14 @@ angular.module('copayApp.controllers').controller('addressbookListController', f
popupService.showAlert(err);
return;
}
$scope.initAddressbook();
initAddressbook();
$scope.$digest();
});
}, 100);
};
$scope.$on("$ionicView.beforeEnter", function(event, data){
initAddressbook();
});
});

View File

@ -7,8 +7,7 @@ angular.module('copayApp.controllers').controller('amazonController',
externalLinkService.open(url, target);
};
this.init = function() {
var self = this;
var initAmazon = function() {
$scope.network = amazonService.getEnvironment();
amazonService.getPendingGiftCards(function(err, gcds) {
if (err) {
@ -20,11 +19,10 @@ angular.module('copayApp.controllers').controller('amazonController',
$scope.$digest();
});
});
this.updatePendingGiftCards();
}
$scope.updatePendingGiftCards();
};
this.updatePendingGiftCards = lodash.debounce(function() {
var self = this;
$scope.updatePendingGiftCards = lodash.debounce(function() {
amazonService.getPendingGiftCards(function(err, gcds) {
lodash.forEach(gcds, function(dataFromStorage) {
@ -69,8 +67,7 @@ angular.module('copayApp.controllers').controller('amazonController',
}, 1000);
this.openCardModal = function(card) {
var self = this;
$scope.openCardModal = function(card) {
$scope.card = card;
$ionicModal.fromTemplateUrl('views/modals/amazon-card-details.html', {
@ -81,7 +78,11 @@ angular.module('copayApp.controllers').controller('amazonController',
});
$scope.$on('UpdateAmazonList', function(event) {
self.init();
initAmazon();
});
};
$scope.$on("$ionicView.enter", function(event, data){
initAmazon();
});
});

View File

@ -1,7 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('amountController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Enter Amount'));
angular.module('copayApp.controllers').controller('amountController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService) {
var unitToSatoshi;
var satToUnit;
@ -11,7 +10,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
var SMALL_FONT_SIZE_LIMIT = 13;
var LENGTH_EXPRESSION_LIMIT = 19;
$scope.init = function() {
$scope.$on("$ionicView.enter", function(event, data){
if (!$stateParams.toAddress) {
$log.error('Bad params at amount')
@ -73,7 +72,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
$timeout(function() {
$ionicScrollDelegate.resize();
}, 100);
};
});
$scope.toggleAlternative = function() {
$scope.showAlternativeAmount = !$scope.showAlternativeAmount;

View File

@ -16,25 +16,6 @@ angular.module('copayApp.controllers').controller('backupController',
return false;
};
$scope.init = function() {
$scope.deleted = isDeletedSeed();
if ($scope.deleted) {
$log.debug('no mnemonics');
return;
}
walletService.getKeys(wallet, function(err, k) {
if (err || !k) {
$log.error('Could not get keys: ', err);
$state.go('wallet.preferences');
return;
}
$scope.credentialsEncrypted = false;
keys = k;
$scope.initFlow();
});
};
var shuffledWords = function(words) {
var sort = lodash.sortBy(words);
@ -222,4 +203,23 @@ angular.module('copayApp.controllers').controller('backupController',
});
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.deleted = isDeletedSeed();
if ($scope.deleted) {
$log.debug('no mnemonics');
return;
}
walletService.getKeys(wallet, function(err, k) {
if (err || !k) {
$log.error('Could not get keys: ', err);
$state.go('wallet.preferences');
return;
}
$scope.credentialsEncrypted = false;
keys = k;
$scope.initFlow();
});
});
});

View File

@ -19,14 +19,6 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
externalLinkService.open(url, target);
};
this.init = function() {
var network = amazonService.getEnvironment();
$scope.wallets = profileService.getWallets({
network: network,
onlyComplete: true
});
};
this.confirm = function() {
var message = gettextCatalog.getString('Amazon.com Gift Card purchase for ${{amount}} USD', {amount: $scope.fiat});
var ok = gettextCatalog.getString('Buy');
@ -216,4 +208,12 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
});
};
$scope.$on("$ionicView.enter", function(event, data){
var network = amazonService.getEnvironment();
$scope.wallets = profileService.getWallets({
network: network,
onlyComplete: true
});
});
});

View File

@ -17,36 +17,6 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
$log.debug('Wallet changed: ' + w.name);
});
$scope.init = function(accessToken) {
$scope.network = glideraService.getEnvironment();
$scope.token = accessToken;
$scope.permissions = null;
$scope.email = null;
$scope.personalInfo = null;
$scope.txs = null;
$scope.status = null;
$scope.limits = null;
ongoingProcess.set('connectingGlidera', true);
glideraService.init($scope.token, function(err, glidera) {
ongoingProcess.set('connectingGlidera');
if (err || !glidera) {
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
return;
}
$scope.token = glidera.token;
$scope.permissions = glidera.permissions;
$scope.update({fullUpdate: true});
});
$scope.wallets = profileService.getWallets({
network: $scope.network,
n: 1,
onlyComplete: true
});
};
$scope.update = function(opts) {
if (!$scope.token || !$scope.permissions) return;
$log.debug('Updating Glidera Account...');
@ -145,4 +115,34 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
}, 100);
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.network = glideraService.getEnvironment();
$scope.token = accessToken;
$scope.permissions = null;
$scope.email = null;
$scope.personalInfo = null;
$scope.txs = null;
$scope.status = null;
$scope.limits = null;
ongoingProcess.set('connectingGlidera', true);
glideraService.init($scope.token, function(err, glidera) {
ongoingProcess.set('connectingGlidera');
if (err || !glidera) {
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
return;
}
$scope.token = glidera.token;
$scope.permissions = glidera.permissions;
$scope.update({fullUpdate: true});
});
$scope.wallets = profileService.getWallets({
network: $scope.network,
n: 1,
onlyComplete: true
});
});
});

View File

@ -4,7 +4,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
var cachedTxp = {};
var isChromeApp = platformInfo.isChromeApp;
$scope.init = function() {
var initConfirm = function() {
if ($stateParams.paypro) {
return setFromPayPro($stateParams.paypro, function(err) {
if (err && !isChromeApp) {
@ -145,7 +145,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$stateParams.paypro = null;
$scope._paypro = paypro;
return $scope.init();
return initConfirm();
});
};
@ -307,4 +307,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.cancel = function() {
$state.go('tabs.send');
};
$scope.$on("$ionicView.enter", function(event, data){
initConfirm();
});
});

View File

@ -4,7 +4,7 @@ angular.module('copayApp.controllers').controller('exportController',
function($scope, $timeout, $log, $ionicHistory, backupService, walletService, storageService, profileService, platformInfo, gettextCatalog, $state, $stateParams, popupService) {
var wallet = profileService.getWallet($stateParams.walletId);
$scope.init = function() {
var init = function() {
$scope.formData = {};
$scope.isEncrypted = wallet.isPrivKeyEncrypted();
$scope.isCordova = platformInfo.isCordova;
@ -158,4 +158,8 @@ angular.module('copayApp.controllers').controller('exportController',
});
};
$scope.$on("$ionicView.enter", function(event, data){
init();
});
});

View File

@ -7,7 +7,7 @@ angular.module('copayApp.controllers').controller('glideraController',
externalLinkService.open(url, target);
};
$scope.init = function(accessToken) {
var initGlidera = function(accessToken) {
$scope.network = glideraService.getEnvironment();
$scope.token = null;
@ -78,7 +78,7 @@ angular.module('copayApp.controllers').controller('glideraController',
popupService.showAlert(gettextCatalog.getString('Error'), err);
} else if (data && data.access_token) {
storageService.setGlideraToken($scope.network, data.access_token, function() {
$scope.init(data.access_token);
initGlidera(data.access_token);
$timeout(function() {
$scope.$apply();
}, 100);
@ -113,4 +113,8 @@ angular.module('copayApp.controllers').controller('glideraController',
});
};
$scope.$on("$ionicView.enter", function(event, data){
initGlidera();
});
});

View File

@ -23,7 +23,7 @@ angular.module('copayApp.controllers').controller('glideraUriController',
}, 100);
};
$scope.checkCode = function() {
$scope.$on("$ionicView.enter", function(event, data){
if ($stateParams.url) {
var match = $stateParams.url.match(/code=(.+)/);
if (match && match[1]) {
@ -32,5 +32,5 @@ angular.module('copayApp.controllers').controller('glideraUriController',
}
}
$log.error('Bad state: ' + JSON.stringify($stateParams));
}
});
});

View File

@ -1,24 +1,5 @@
angular.module('copayApp.controllers').controller('paperWalletController',
function($scope, $timeout, $log, $ionicModal, $ionicHistory, popupService, gettextCatalog, platformInfo, configService, profileService, $state, bitcore, ongoingProcess, txFormatService, $stateParams, walletService) {
var wallet = profileService.getWallet($stateParams.walletId);
var rawTx;
$scope.init = function() {
$scope.wallet = wallet;
$scope.isCordova = platformInfo.isCordova;
$scope.needsBackup = wallet.needsBackup;
$scope.walletAlias = wallet.name;
$scope.walletName = wallet.credentials.walletName;
$scope.formData = {};
$scope.formData.inputData = null;
$scope.scannedKey = null;
$scope.balance = null;
$scope.balanceSat = null;
$scope.scanned = false;
$timeout(function() {
$scope.$apply();
}, 10);
};
$scope.onQrCodeScanned = function(data) {
$scope.formData.inputData = data;
@ -138,4 +119,22 @@ angular.module('copayApp.controllers').controller('paperWalletController',
$scope.txStatusModal.show();
});
};
$scope.$on("$ionicView.enter", function(event, data){
var wallet = profileService.getWallet($stateParams.walletId);
$scope.wallet = wallet;
$scope.isCordova = platformInfo.isCordova;
$scope.needsBackup = wallet.needsBackup;
$scope.walletAlias = wallet.name;
$scope.walletName = wallet.credentials.walletName;
$scope.formData = {};
$scope.formData.inputData = null;
$scope.scannedKey = null;
$scope.balance = null;
$scope.balanceSat = null;
$scope.scanned = false;
$timeout(function() {
$scope.$apply();
}, 10);
});
});

View File

@ -1,33 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesController',
function($scope, $rootScope, $timeout, $log, $stateParams, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, profileService, fingerprintService, walletService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Wallet Preferences'));
function($scope, $rootScope, $timeout, $log, $stateParams, $ionicHistory, gettextCatalog, configService, profileService, fingerprintService, walletService) {
var wallet = profileService.getWallet($stateParams.walletId);
var walletId = wallet.credentials.walletId;
$scope.wallet = wallet;
$scope.init = function() {
$scope.externalSource = null;
if (!wallet)
return $ionicHistory.goBack();
var config = configService.getSync();
$scope.encryptEnabled = walletService.isEncrypted(wallet);
if (wallet.isPrivKeyExternal)
$scope.externalSource = wallet.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor';
$scope.touchIdAvailable = fingerprintService.isAvailable();
$scope.touchIdEnabled = config.touchIdFor ? config.touchIdFor[walletId] : null;
$scope.deleted = false;
if (wallet.credentials && !wallet.credentials.mnemonicEncrypted && !wallet.credentials.mnemonic) {
$scope.deleted = true;
}
};
$scope.encryptChange = function() {
if (!wallet) return;
var val = $scope.encryptEnabled;
@ -77,4 +55,25 @@ angular.module('copayApp.controllers').controller('preferencesController',
$log.debug('Touch Id status changed: ' + newStatus);
});
};
$scope.$on("$ionicView.beforeEnter", function(event, data){
$scope.externalSource = null;
if (!wallet)
return $ionicHistory.goBack();
var config = configService.getSync();
$scope.encryptEnabled = walletService.isEncrypted(wallet);
if (wallet.isPrivKeyExternal)
$scope.externalSource = wallet.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor';
$scope.touchIdAvailable = fingerprintService.isAvailable();
$scope.touchIdEnabled = config.touchIdFor ? config.touchIdFor[walletId] : null;
$scope.deleted = false;
if (wallet.credentials && !wallet.credentials.mnemonicEncrypted && !wallet.credentials.mnemonic) {
$scope.deleted = true;
}
});
});

View File

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

View File

@ -1,8 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesAliasController',
function($scope, $timeout, $stateParams, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, profileService, walletService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Alias'));
function($scope, $timeout, $stateParams, $ionicHistory, gettextCatalog, configService, profileService, walletService) {
var wallet = profileService.getWallet($stateParams.walletId);
$scope.wallet = wallet;
var walletId = wallet.credentials.walletId;

View File

@ -1,26 +1,22 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesAltCurrencyController',
function($scope, $log, $timeout, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, configService, rateService, lodash, profileService, walletService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Alternative Currency'));
function($scope, $log, $timeout, $ionicHistory, gettextCatalog, configService, rateService, lodash, profileService, walletService) {
var next = 10;
var completeAlternativeList;
$scope.init = function() {
var config = configService.getSync();
$scope.currentCurrency = config.wallet.settings.alternativeIsoCode;
$scope.listComplete = false;
var config = configService.getSync();
$scope.currentCurrency = config.wallet.settings.alternativeIsoCode;
$scope.listComplete = false;
rateService.whenAvailable(function() {
completeAlternativeList = rateService.listAlternatives();
lodash.remove(completeAlternativeList, function(c) {
return c.isoCode == 'BTC';
});
$scope.altCurrencyList = completeAlternativeList.slice(0, next);
rateService.whenAvailable(function() {
completeAlternativeList = rateService.listAlternatives();
lodash.remove(completeAlternativeList, function(c) {
return c.isoCode == 'BTC';
});
};
$scope.altCurrencyList = completeAlternativeList.slice(0, next);
});
$scope.loadMore = function() {
$timeout(function() {

View File

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

View File

@ -1,7 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesColorController', function($scope, $log, $stateParams, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, profileService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Color'));
angular.module('copayApp.controllers').controller('preferencesColorController', function($scope, $log, $stateParams, $ionicHistory, gettextCatalog, configService, profileService) {
$scope.colorList = [
'#DD4B39',
'#F38F12',

View File

@ -1,8 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
function($scope, $stateParams, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Delete'));
function($scope, $stateParams, $ionicHistory, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService) {
var wallet = profileService.getWallet($stateParams.walletId);
$scope.alias = lodash.isEqual(wallet.name, wallet.credentials.walletName) ? null : wallet.name + ' ';
$scope.walletName = '[' + wallet.credentials.walletName + ']';

View File

@ -1,7 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', function($scope, $ionicHistory, $stateParams, $ionicNavBarDelegate, gettextCatalog, confirmDialog, lodash, profileService, gettext) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Delete recovery phrase'));
angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', function($scope, $ionicHistory, $stateParams, gettextCatalog, confirmDialog, lodash, profileService, gettext) {
var wallet = profileService.getWallet($stateParams.walletId);
var msg = gettext('Are you sure you want to delete the recovery phrase?');
var successMsg = gettext('Recovery phrase deleted');

View File

@ -1,7 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesEmailController', function($scope, $ionicHistory, $stateParams, $ionicNavBarDelegate, gettextCatalog, profileService, walletService, configService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Email Notifications'));
angular.module('copayApp.controllers').controller('preferencesEmailController', function($scope, $ionicHistory, $stateParams, gettextCatalog, profileService, walletService, configService) {
var wallet = profileService.getWallet($stateParams.walletId);
var walletId = wallet.credentials.walletId;

View File

@ -1,18 +1,13 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesFeeController', function($scope, $timeout, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, feeService, ongoingProcess) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Bitcoin Network Fee Policy'));
angular.module('copayApp.controllers').controller('preferencesFeeController', function($scope, $timeout, $ionicHistory, gettextCatalog, configService, feeService, ongoingProcess) {
$scope.init = function() {
ongoingProcess.set('gettingFeeLevels', true);
feeService.getFeeLevels(function(levels) {
ongoingProcess.set('gettingFeeLevels', false);
$scope.feeOpts = feeService.feeOpts;
$scope.currentFeeLevel = feeService.getCurrentFeeLevel();
$scope.feeLevels = levels;
$scope.$apply();
});
}
ongoingProcess.set('gettingFeeLevels', true);
feeService.getFeeLevels(function(levels) {
ongoingProcess.set('gettingFeeLevels', false);
$scope.feeLevels = levels;
$scope.$apply();
});
$scope.save = function(newFee) {
var opts = {
@ -32,4 +27,9 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu
}, 100);
});
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.feeOpts = feeService.feeOpts;
$scope.currentFeeLevel = feeService.getCurrentFeeLevel();
});
});

View File

@ -3,32 +3,6 @@
angular.module('copayApp.controllers').controller('preferencesGlideraController',
function($scope, $log, $timeout, $state, ongoingProcess, glideraService, popupService, gettextCatalog) {
$scope.init = function(accessToken) {
$scope.network = glideraService.getEnvironment();
$scope.token = accessToken;
$scope.permissions = null;
$scope.email = null;
$scope.personalInfo = null;
$scope.txs = null;
$scope.status = null;
$scope.limits = null;
ongoingProcess.set('connectingGlidera', true);
glideraService.init($scope.token, function(err, glidera) {
ongoingProcess.set('connectingGlidera');
if (err || !glidera) {
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
return;
}
$scope.token = glidera.token;
$scope.permissions = glidera.permissions;
$scope.update({
fullUpdate: true
});
});
};
$scope.update = function(opts) {
if (!$scope.token || !$scope.permissions) return;
$log.debug('Updating Glidera Account...');
@ -75,4 +49,30 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
});
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.network = glideraService.getEnvironment();
$scope.token = accessToken;
$scope.permissions = null;
$scope.email = null;
$scope.personalInfo = null;
$scope.txs = null;
$scope.status = null;
$scope.limits = null;
ongoingProcess.set('connectingGlidera', true);
glideraService.init($scope.token, function(err, glidera) {
ongoingProcess.set('connectingGlidera');
if (err || !glidera) {
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
return;
}
$scope.token = glidera.token;
$scope.permissions = glidera.permissions;
$scope.update({
fullUpdate: true
});
});
});
});

View File

@ -1,8 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesHistory',
function($scope, $log, $stateParams, $timeout, $state, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, storageService, platformInfo, profileService, lodash) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Transaction History'));
function($scope, $log, $stateParams, $timeout, $state, $ionicHistory, gettextCatalog, storageService, platformInfo, profileService, lodash) {
$scope.wallet = profileService.getWallet($stateParams.walletId);
$scope.csvReady = false;
$scope.isCordova = platformInfo.isCordova;
@ -131,4 +130,8 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
}, 100);
});
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.csvHistory();
});
});

View File

@ -1,8 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesInformation',
function($scope, $log, $timeout, $ionicNavBarDelegate, $ionicHistory, platformInfo, gettextCatalog, lodash, profileService, configService, $stateParams, walletService, $state) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Wallet Information'));
function($scope, $log, $timeout, $ionicHistory, platformInfo, gettextCatalog, lodash, profileService, configService, $stateParams, walletService, $state) {
var base = 'xpub';
var wallet = profileService.getWallet($stateParams.walletId);
var walletId = wallet.id;
@ -12,45 +11,6 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
$scope.isCordova = platformInfo.isCordova;
config.colorFor = config.colorFor || {};
$scope.init = function() {
var c = wallet.credentials;
var basePath = c.getBaseAddressDerivationPath();
$scope.wallet = wallet;
$scope.walletName = c.walletName;
$scope.walletId = c.walletId;
$scope.network = c.network;
$scope.addressType = c.addressType || 'P2SH';
$scope.derivationStrategy = c.derivationStrategy || 'BIP45';
$scope.basePath = basePath;
$scope.M = c.m;
$scope.N = c.n;
$scope.pubKeys = lodash.pluck(c.publicKeyRing, 'xPubKey');
$scope.addrs = null;
wallet.getMainAddresses({
doNotVerify: true
}, function(err, addrs) {
if (err) {
$log.warn(err);
return;
};
var last10 = [],
i = 0,
e = addrs.pop();
while (i++ < 10 && e) {
e.path = base + e.path.substring(1);
last10.push(e);
e = addrs.pop();
}
$scope.addrs = last10;
$timeout(function() {
$scope.$apply();
});
});
};
$scope.sendAddrs = function() {
function formatDate(ts) {
var dateObj = new Date(ts * 1000);
@ -121,6 +81,43 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
$state.go('tabs.home');
};
$scope.$on("$ionicView.enter", function(event, data){
var c = wallet.credentials;
var basePath = c.getBaseAddressDerivationPath();
$scope.wallet = wallet;
$scope.walletName = c.walletName;
$scope.walletId = c.walletId;
$scope.network = c.network;
$scope.addressType = c.addressType || 'P2SH';
$scope.derivationStrategy = c.derivationStrategy || 'BIP45';
$scope.basePath = basePath;
$scope.M = c.m;
$scope.N = c.n;
$scope.pubKeys = lodash.pluck(c.publicKeyRing, 'xPubKey');
$scope.addrs = null;
wallet.getMainAddresses({
doNotVerify: true
}, function(err, addrs) {
if (err) {
$log.warn(err);
return;
};
var last10 = [],
i = 0,
e = addrs.pop();
while (i++ < 10 && e) {
e.path = base + e.path.substring(1);
last10.push(e);
e = addrs.pop();
}
$scope.addrs = last10;
$timeout(function() {
$scope.$apply();
});
});
});
});

View File

@ -1,18 +1,14 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesLanguageController',
function($scope, $log, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, configService, profileService, uxLanguage, walletService, externalLinkService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Language'));
function($scope, $log, $ionicHistory, gettextCatalog, configService, profileService, uxLanguage, walletService, externalLinkService) {
$scope.availableLanguages = uxLanguage.getLanguages();
$scope.openExternalLink = function(url, target) {
externalLinkService.open(url, target);
};
$scope.init = function() {
$scope.availableLanguages = uxLanguage.getLanguages();
$scope.currentLanguage = uxLanguage.getCurrentLanguage();
}
$scope.save = function(newLang) {
var opts = {
wallet: {
@ -33,4 +29,8 @@ angular.module('copayApp.controllers').controller('preferencesLanguageController
});
});
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.currentLanguage = uxLanguage.getCurrentLanguage();
});
});

View File

@ -1,12 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesLogs',
function($scope, historicLog, $ionicNavBarDelegate, gettextCatalog) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Session Log'));
$scope.init = function() {
$scope.logs = historicLog.get();
}
function($scope, historicLog, gettextCatalog) {
$scope.prepare = function() {
var log = 'Copay Session Logs\n Be careful, this could contain sensitive private data\n\n';
@ -32,4 +27,8 @@ angular.module('copayApp.controllers').controller('preferencesLogs',
function() {}
);
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.logs = historicLog.get();
});
});

View File

@ -1,13 +1,8 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesUnitController', function($scope, $log, configService, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, walletService, profileService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Unit'));
$scope.init = function() {
var config = configService.getSync();
$scope.currentUnit = config.wallet.settings.unitCode;
}
angular.module('copayApp.controllers').controller('preferencesUnitController', function($scope, $log, configService, $ionicHistory, gettextCatalog, walletService, profileService) {
var config = configService.getSync();
$scope.unitList = [{
name: 'bits (1,000,000 bits = 1BTC)',
shortName: 'bits',
@ -43,4 +38,8 @@ angular.module('copayApp.controllers').controller('preferencesUnitController', f
});
});
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.currentUnit = config.wallet.settings.unitCode;
});
});

View File

@ -3,13 +3,14 @@
angular.module('copayApp.controllers').controller('proposalsController',
function($timeout, $scope, profileService, $log, txpModalService) {
var self = this;
$scope.fetchingProposals = true;
$scope.init = function() {
$scope.$on("$ionicView.enter", function(event, data){
profileService.getTxps(50, function(err, txps) {
$scope.fetchingProposals = false;
if (err) {
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
$log.error(err);
return;
}
$scope.txps = txps;
@ -17,7 +18,7 @@ angular.module('copayApp.controllers').controller('proposalsController',
$scope.$apply();
}, 1);
});
}
});
$scope.openTxpModal = txpModalService.open;
});

View File

@ -18,36 +18,6 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
$log.debug('Wallet changed: ' + w.name);
});
$scope.init = function(accessToken) {
$scope.network = glideraService.getEnvironment();
$scope.token = accessToken;
$scope.permissions = null;
$scope.email = null;
$scope.personalInfo = null;
$scope.txs = null;
$scope.status = null;
$scope.limits = null;
ongoingProcess.set('connectingGlidera', true);
glideraService.init($scope.token, function(err, glidera) {
ongoingProcess.set('connectingGlidera');
if (err || !glidera) {
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
return;
}
$scope.token = glidera.token;
$scope.permissions = glidera.permissions;
$scope.update({fullUpdate: true});
});
$scope.wallets = profileService.getWallets({
network: $scope.network,
n: 1,
onlyComplete: true
});
};
$scope.update = function(opts) {
if (!$scope.token || !$scope.permissions) return;
$log.debug('Updating Glidera Account...');
@ -217,4 +187,34 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
});
});
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.network = glideraService.getEnvironment();
$scope.token = accessToken;
$scope.permissions = null;
$scope.email = null;
$scope.personalInfo = null;
$scope.txs = null;
$scope.status = null;
$scope.limits = null;
ongoingProcess.set('connectingGlidera', true);
glideraService.init($scope.token, function(err, glidera) {
ongoingProcess.set('connectingGlidera');
if (err || !glidera) {
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
return;
}
$scope.token = glidera.token;
$scope.permissions = glidera.permissions;
$scope.update({fullUpdate: true});
});
$scope.wallets = profileService.getWallets({
network: $scope.network,
n: 1,
onlyComplete: true
});
});
});

View File

@ -8,14 +8,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.openTxpModal = txpModalService.open;
$scope.version = $window.version;
$scope.name = $window.appConfig.nameCase;
$scope.homeTip = $stateParams.fromOnboarding;
configService.whenAvailable(function() {
var config = configService.getSync();
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
$scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp;
$scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp;
});
$scope.openNotificationModal = function(n) {
wallet = profileService.getWallet(n.walletId);
@ -115,7 +108,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
lodash.each($scope.wallets, function(wallet) {
walletService.getStatus(wallet, {}, function(err, status) {
if (err) {
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
$log.error(err);
} else {
wallet.status = status;
}
@ -172,7 +165,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.hideHomeTip = function() {
$scope.homeTip = null;
$state.transitionTo($state.current, null, {
reload: false,
reload: true,
inherit: false,
notify: false
});
@ -204,4 +197,15 @@ angular.module('copayApp.controllers').controller('tabHomeController',
x();
});
});
$scope.$on("$ionicView.enter", function(event, data){
configService.whenAvailable(function() {
var config = configService.getSync();
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
$scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp;
$scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp;
});
$scope.nextStep();
$scope.updateAllWallets();
});
});

View File

@ -3,15 +3,11 @@
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, $ionicModal, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
$scope.isCordova = platformInfo.isCordova;
$scope.isNW = platformInfo.isNW;
$scope.init = function() {
$scope.wallets = profileService.getWallets({
onlyComplete: true
});
$scope.isNW = platformInfo.isNW;
$scope.isCordova = platformInfo.isCordova;
if (!$scope.isCordova) $scope.checkTips();
}
$scope.wallets = profileService.getWallets({
onlyComplete: true
});
$scope.checkTips = function(force) {
storageService.getReceiveTipsAccepted(function(err, accepted) {
@ -36,7 +32,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
}
$scope.wallet = wallet;
$log.debug('Wallet changed: ' + wallet.name);
$scope.setAddress(wallet);
$scope.setAddress();
});
$scope.shareAddress = function(addr) {
@ -46,25 +42,24 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
}
};
$scope.setAddress = function(wallet, forceNew) {
$scope.setAddress = function(forceNew) {
if ($scope.generatingAddress) return;
var wallet = wallet || $scope.wallet;
$scope.addr = null;
$scope.generatingAddress = true;
$timeout(function() {
walletService.getAddress(wallet, forceNew, function(err, addr) {
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
$scope.generatingAddress = false;
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err);
} else {
if (addr)
$scope.addr = addr;
if (err || lodash.isEmpty(addr)) {
popupService.showAlert(gettextCatalog.getString('Error'), err || gettextCatalog.getString('Address is empty'));
return;
}
$scope.addr = addr;
$scope.$apply();
});
}, 1);
};
if (!$scope.isCordova) $scope.checkTips();
});

View File

@ -4,7 +4,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
var originalList;
$scope.init = function() {
var updateList = function() {
originalList = [];
var wallets = profileService.getWallets({
@ -83,8 +83,8 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
});
};
$scope.$on('modal.hidden', function() {
$scope.init();
$scope.$on("$ionicView.enter", function(event, data){
updateList();
});
});

View File

@ -2,7 +2,7 @@
angular.module('copayApp.controllers').controller('tabSettingsController', function($scope, $rootScope, $log, $window, lodash, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService) {
$scope.init = function() {
var updateConfig = function() {
var config = configService.getSync();
var isCordova = platformInfo.isCordova;
@ -28,10 +28,10 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
$scope.$digest();
});
}
$scope.spendUnconfirmed = config.wallet.spendUnconfirmed;
$scope.glideraEnabled = config.glidera.enabled;
$scope.spendUnconfirmed = {value : config.wallet.spendUnconfirmed};
$scope.glideraEnabled = {value: config.glidera.enabled};
$scope.coinbaseEnabled = config.coinbase.enabled;
$scope.pushNotifications = config.pushNotifications.enabled;
$scope.pushNotifications = {value: config.pushNotifications.enabled};
$scope.otherWallets = lodash.filter(profileService.getWallets(self.network), function(w) {
return w.id != self.walletId;
});
@ -44,12 +44,12 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
}, function(err) {
$log.debug(err);
});
}
};
$scope.spendUnconfirmedChange = function() {
var opts = {
wallet: {
spendUnconfirmed: $scope.spendUnconfirmed
spendUnconfirmed: $scope.spendUnconfirmed.value
}
};
configService.set(opts, function(err) {
@ -60,7 +60,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
$scope.pushNotificationsChange = function() {
var opts = {
pushNotifications: {
enabled: $scope.pushNotifications
enabled: $scope.pushNotifications.value
}
};
configService.set(opts, function(err) {
@ -75,7 +75,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
$scope.glideraChange = function() {
var opts = {
glidera: {
enabled: $scope.glideraEnabled
enabled: $scope.glideraEnabled.value
}
};
configService.set(opts, function(err) {
@ -94,4 +94,8 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
});
};
$scope.$on("$ionicView.enter", function(event, data){
updateConfig();
});
});

View File

@ -1,8 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('termOfUseController',
function($scope, $window, uxLanguage, $ionicNavBarDelegate, gettextCatalog, externalLinkService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Terms Of Use'));
function($scope, $window, uxLanguage, gettextCatalog, externalLinkService) {
$scope.lang = uxLanguage.currentLanguage;
$scope.disclaimerUrl = $window.appConfig.disclaimerUrl;

View File

@ -15,49 +15,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
externalLinkService.open(url, target);
};
$scope.init = function() {
currentTxHistoryPage = 0;
$scope.completeTxHistory = [];
wallet = profileService.getWallet($stateParams.walletId);
/* Set color for header bar */
$rootScope.walletDetailsColor = wallet.color;
$rootScope.walletDetailsName = wallet.name;
$scope.wallet = wallet;
$scope.requiresMultipleSignatures = wallet.credentials.m > 1;
$scope.newTx = false;
$ionicNavBarDelegate.title(wallet.name);
$scope.updateAll(function() {
if ($stateParams.txid) {
var tx = lodash.find($scope.completeTxHistory, {
txid: $stateParams.txid
});
if (tx) {
$scope.openTxModal(tx);
} else {
$ionicPopup.alert({
title: gettext('TX not available'),
});
}
} else if ($stateParams.txpId) {
var txp = lodash.find($scope.txps, {
id: $stateParams.txpId
});
if (txp) {
$scope.openTxpModal(txp);
} else {
$ionicPopup.alert({
title: gettext('Proposal not longer available'),
});
}
}
});
}
var setPendingTxps = function(txps) {
/* Uncomment to test multiple outputs */
@ -232,11 +189,54 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.updateAll = function(cb)  {
$scope.updateStatus(false);
$scope.updateTxHistory(cb);
}
};
$scope.hideToggle = function() {
profileService.toggleHideBalanceFlag(wallet.credentials.walletId, function(err) {
if (err) $log.error(err);
});
}
};
$scope.$on("$ionicView.beforeEnter", function(event, data){
currentTxHistoryPage = 0;
$scope.completeTxHistory = [];
wallet = profileService.getWallet($stateParams.walletId);
/* Set color for header bar */
$rootScope.walletDetailsColor = wallet.color;
$rootScope.walletDetailsName = wallet.name;
$scope.wallet = wallet;
$scope.requiresMultipleSignatures = wallet.credentials.m > 1;
$scope.newTx = false;
$ionicNavBarDelegate.title(wallet.name);
$scope.updateAll(function() {
if ($stateParams.txid) {
var tx = lodash.find($scope.completeTxHistory, {
txid: $stateParams.txid
});
if (tx) {
$scope.openTxModal(tx);
} else {
$ionicPopup.alert({
title: gettext('TX not available'),
});
}
} else if ($stateParams.txpId) {
var txp = lodash.find($scope.txps, {
id: $stateParams.txpId
});
if (txp) {
$scope.openTxpModal(txp);
} else {
$ionicPopup.alert({
title: gettext('Proposal not longer available'),
});
}
}
});
});
});

View File

@ -17,7 +17,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
$urlRouterProvider.otherwise('/starting');
// NO CACHE
$ionicConfigProvider.views.maxCache(0);
//$ionicConfigProvider.views.maxCache(0);
// TABS BOTTOM
$ionicConfigProvider.tabs.position('bottom');
@ -136,6 +136,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
})
.state('uriglidera', {
url: '/uri-glidera/:url',
controller: 'glideraUriController',
templateUrl: 'views/glideraUri.html'
})
.state('uricoinbase', {
@ -153,6 +154,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/details/{walletId}/{fromOnboarding}',
views: {
'tab-home': {
controller: 'walletDetailsController',
templateUrl: 'views/walletDetails.html'
}
},
@ -165,6 +167,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/activity',
views: {
'tab-home': {
controller: 'activityController',
templateUrl: 'views/activity.html',
}
}
@ -173,6 +176,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/proposals',
views: {
'tab-home': {
controller: 'proposalsController',
templateUrl: 'views/proposals.html',
}
}
@ -193,6 +197,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/home/:fromOnboarding',
views: {
'tab-home': {
controller: 'tabHomeController',
templateUrl: 'views/tab-home.html',
}
}
@ -201,6 +206,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/receive',
views: {
'tab-receive': {
controller: 'tabReceiveController',
templateUrl: 'views/tab-receive.html',
}
}
@ -209,6 +215,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/send',
views: {
'tab-send': {
controller: 'tabSendController',
templateUrl: 'views/tab-send.html',
}
}
@ -217,6 +224,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/settings',
views: {
'tab-settings': {
controller: 'tabSettingsController',
templateUrl: 'views/tab-settings.html',
}
}
@ -232,6 +240,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/amount/:toAddress/:toName/:toEmail',
views: {
'tab-send@tabs': {
controller: 'amountController',
templateUrl: 'views/amount.html'
}
}
@ -240,6 +249,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/confirm/:toAddress/:toName/:toAmount/:toEmail/:description/:paypro',
views: {
'tab-send@tabs': {
controller: 'confirmController',
templateUrl: 'views/confirm.html'
}
}
@ -311,6 +321,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/language',
views: {
'tab-settings@tabs': {
controller: 'preferencesLanguageController',
templateUrl: 'views/preferencesLanguage.html'
}
}
@ -319,6 +330,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/unit',
views: {
'tab-settings@tabs': {
controller: 'preferencesUnitController',
templateUrl: 'views/preferencesUnit.html'
}
}
@ -327,6 +339,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/fee',
views: {
'tab-settings@tabs': {
controller: 'preferencesFeeController',
templateUrl: 'views/preferencesFee.html'
}
}
@ -335,6 +348,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/altCurrency',
views: {
'tab-settings@tabs': {
controller: 'preferencesAltCurrencyController',
templateUrl: 'views/preferencesAltCurrency.html'
}
}
@ -343,6 +357,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/about',
views: {
'tab-settings@tabs': {
controller: 'preferencesAbout',
templateUrl: 'views/preferencesAbout.html'
}
}
@ -351,6 +366,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/logs',
views: {
'tab-settings@tabs': {
controller: 'preferencesLogs',
templateUrl: 'views/preferencesLogs.html'
}
}
@ -359,6 +375,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/termsOfUse',
views: {
'tab-settings@tabs': {
controller: 'termOfUseController',
templateUrl: 'views/termsOfUse.html',
}
}
@ -367,6 +384,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/translators',
views: {
'tab-settings@tabs': {
controller: 'translatorsController',
templateUrl: 'views/translators.html'
}
}
@ -378,19 +396,11 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*
*/
.state('tabs.preferences', {
.state('tabs.preferences', {
url: '/preferences/:walletId',
abstract: true,
views: {
'tab-settings@tabs': {
template: '<ion-nav-view name="preferences"></ion-nav-view>'
},
}
})
.state('tabs.preferences.main', {
url: '/main',
views: {
'preferences': {
controller: 'preferencesController',
templateUrl: 'views/preferences.html'
}
}
@ -398,7 +408,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.preferencesAlias', {
url: '/preferencesAlias',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'preferencesAliasController',
templateUrl: 'views/preferencesAlias.html'
}
}
@ -406,7 +417,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.preferencesColor', {
url: '/preferencesColor',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'preferencesColorController',
templateUrl: 'views/preferencesColor.html'
}
}
@ -414,7 +426,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.preferencesEmail', {
url: '/preferencesEmail',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'preferencesEmailController',
templateUrl: 'views/preferencesEmail.html'
}
}
@ -422,7 +435,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.backup', {
url: '/backup',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'backupController',
templateUrl: 'views/backup.html'
}
}
@ -430,7 +444,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.preferencesAdvanced', {
url: '/preferencesAdvanced',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'preferencesAdvancedController',
templateUrl: 'views/preferencesAdvanced.html'
}
}
@ -438,7 +453,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.information', {
url: '/information',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'preferencesInformation',
templateUrl: 'views/preferencesInformation.html'
}
}
@ -446,7 +462,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.export', {
url: '/export',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'exportController',
templateUrl: 'views/export.html'
}
}
@ -454,7 +471,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.preferencesBwsUrl', {
url: '/preferencesBwsUrl',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'preferencesBwsUrlController',
templateUrl: 'views/preferencesBwsUrl.html'
}
}
@ -462,7 +480,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.preferencesHistory', {
url: '/preferencesHistory',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'preferencesHistory',
templateUrl: 'views/preferencesHistory.html'
}
}
@ -470,7 +489,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.deleteWords', {
url: '/deleteWords',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'preferencesDeleteWordsController',
templateUrl: 'views/preferencesDeleteWords.html'
}
}
@ -478,7 +498,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.delete', {
url: '/delete',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'preferencesDeleteWalletController',
templateUrl: 'views/preferencesDeleteWallet.html'
}
}
@ -486,7 +507,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.preferences.paperWallet', {
url: '/paperWallet',
views: {
'preferences': {
'tab-settings@tabs': {
controller: 'paperWalletController',
templateUrl: 'views/paperWallet.html'
}
}
@ -665,6 +687,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/glidera',
views: {
'tab-home@tabs': {
controller: 'glideraController',
controllerAs: 'glidera',
templateUrl: 'views/glidera.html'
}
}
@ -673,6 +697,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/buy',
views: {
'tab-home@tabs': {
controller: 'buyGlideraController',
controllerAs: 'buy',
templateUrl: 'views/buyGlidera.html'
}
}
@ -681,6 +707,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/sell',
views: {
'tab-home@tabs': {
controller: 'sellGlideraController',
controllerAs: 'sell',
templateUrl: 'views/sellGlidera.html'
}
}
@ -689,6 +717,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/preferences',
views: {
'tab-home@tabs': {
controller: 'preferencesGlideraController',
templateUrl: 'views/preferencesGlidera.html'
}
}
@ -738,6 +767,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/amazon',
views: {
'tab-home@tabs': {
controller: 'amazonController',
templateUrl: 'views/amazon.html'
}
}
@ -746,6 +776,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/buy',
views: {
'tab-home@tabs': {
controller: 'buyAmazonController',
controllerAs: 'buy',
templateUrl: 'views/buyAmazon.html'
}
}