mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #513 from gabrielbazan7/fix/history
better messages in advanced transaction history options
This commit is contained in:
commit
3ac30e8472
|
@ -28,8 +28,14 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||||
$log.debug('Generating CSV from History');
|
$log.debug('Generating CSV from History');
|
||||||
getHistory(function(err, txs) {
|
getHistory(function(err, txs) {
|
||||||
if (err || lodash.isEmpty(txs)) {
|
if (err || lodash.isEmpty(txs)) {
|
||||||
if (err) $log.warn('Failed to generate CSV:', err);
|
if (err) {
|
||||||
else $log.warn('Failed to generate CSV: no transactions');
|
$log.warn('Failed to generate CSV:', err);
|
||||||
|
$scope.err = err;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$log.warn('Failed to generate CSV: no transactions');
|
||||||
|
$scope.err = 'no transactions';
|
||||||
|
}
|
||||||
if (cb) return cb(err);
|
if (cb) return cb(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<ion-view>
|
<ion-view class="settings">
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-title>{{'Transaction History' | translate}}</ion-nav-title>
|
<ion-nav-title>{{'Transaction History' | translate}}</ion-nav-title>
|
||||||
<ion-nav-back-button>
|
<ion-nav-back-button>
|
||||||
|
@ -6,17 +6,20 @@
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="item item-divider"></div>
|
<div class="item item-divider"></div>
|
||||||
<div class="item" ng-show="csvReady && !isCordova" ng-csv="csvContent" csv-header="csvHeader" filename="Copay-{{wallet.name}}.csv">
|
<a class="item ng-hide" href ng-show="csvReady && !isCordova" ng-csv="csvContent" csv-header="csvHeader" filename="Copay-{{wallet.name}}.csv">
|
||||||
<span translate>Export to file</span>
|
<span translate>Export to file</span>
|
||||||
</div>
|
</a>
|
||||||
<div class="item" ng-show="!csvReady && !isCordova">
|
<a class="item ng-hide" href ng-show="!csvReady && !isCordova">
|
||||||
<span translate>Export to file</span>
|
<span translate>Export to file</span>
|
||||||
<span class="item-note" translate>
|
<span class="item-note ng-hide" ng-show="!err" translate>
|
||||||
preparing...
|
preparing...
|
||||||
</span>
|
</span>
|
||||||
</div>
|
<span class="item-note ng-hide" ng-show="err">
|
||||||
<div class="item assertive" ng-click="clearTransactionHistory()">
|
{{err | translate}}
|
||||||
<span translate>Clear cache</span>
|
</span>
|
||||||
</div>
|
</a>
|
||||||
|
<a class="item" ng-click="clearTransactionHistory()">
|
||||||
|
<span class="assertive" translate>Clear cache</span>
|
||||||
|
</a>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-view>
|
</ion-view>
|
||||||
|
|
Loading…
Reference in New Issue