transaction history options in preferences advanced
This commit is contained in:
parent
ce71258934
commit
00e0076a90
7 changed files with 62 additions and 32 deletions
|
|
@ -30,6 +30,11 @@
|
|||
<div>Wallet Service URL</div>
|
||||
</li>
|
||||
|
||||
<li ng-click="$root.go('preferencesHistory')">
|
||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||
<div translate>Transaction History</div>
|
||||
</li>
|
||||
|
||||
<li ng-click="$root.go('delete')">
|
||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||
<div translate>Delete Wallet</div>
|
||||
|
|
|
|||
21
public/views/preferencesHistory.html
Normal file
21
public/views/preferencesHistory.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<div
|
||||
class="topbar-container"
|
||||
ng-include="'views/includes/topbar.html'"
|
||||
ng-init="titleSection='Transaction history'; goBackToState = 'preferencesAdvanced'">
|
||||
</div>
|
||||
<div class="content preferences" ng-controller="preferencesHistory as history">
|
||||
<h4></h4>
|
||||
<ul class="no-bullet m0 size-14">
|
||||
<li class="line-b p20 oh">
|
||||
<button class="black round small expand" ng-style="{'background-color':index.backgroundColor}" ng-click="history.clearTransactionHistory();">
|
||||
<span translate>Clear history</span>
|
||||
</button>
|
||||
</li>
|
||||
<li class="line-b p20 oh" ng-show="!index.isCordova">
|
||||
<button class="black round small expand" id="export_file" type="file" nwsaveas="Copay-{{index.alias || index.walletName}}.csv" accept=".csv" ng-style="{'background-color':index.backgroundColor}" ng-click="index.csvHistory();">
|
||||
<i class="fi-page-export-csv"></i>
|
||||
<span >CSV</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -146,14 +146,6 @@
|
|||
</div>
|
||||
</ul>
|
||||
|
||||
<ul class="no-bullet m0 size-14">
|
||||
<h4 class="title m0" translate>Transaction history</h4>
|
||||
<li class="line-b p20 oh">
|
||||
<button class="black round small expand" ng-style="{'background-color':index.backgroundColor}" ng-click="info.clearTransactionHistory();">
|
||||
<span translate>Clear history</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4></h4>
|
||||
|
||||
|
|
|
|||
|
|
@ -496,19 +496,11 @@
|
|||
</div>
|
||||
|
||||
<div class="row m20t">
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button type="submit" class="button black round expand" ng-show="index.historyShowShowAll" ng-click="index.showAllHistory()" ng-style="{'background-color':index.backgroundColor}" translate>
|
||||
<button type="submit" class="outline round small expand m0" ng-show="index.historyShowShowAll" ng-click="index.showAllHistory()" ng-style="{'background-color':index.backgroundColor}" translate>
|
||||
<i class="icon-arrow-down4 ng-scope"></i>
|
||||
Show all
|
||||
</button>
|
||||
</div>
|
||||
<div class="large-6 medium-6 small-6 columns" ng-show="!index.isCordova">
|
||||
<input id="export_file" type="file" nwsaveas="Copay-{{index.alias || index.walletName}}.csv" accept=".csv" style="display:none">
|
||||
<a class="button outline dark-gray round" ng-click="index.csvHistory();">
|
||||
<i class="fi-page-export-csv"></i>
|
||||
<span translate>CSV</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="extra-margin-bottom"></div>
|
||||
</div> <!-- END History -->
|
||||
|
|
|
|||
21
src/js/controllers/preferencesHistory.js
Normal file
21
src/js/controllers/preferencesHistory.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||
function($scope, $log, $timeout, storageService, go, profileService) {
|
||||
var fc = profileService.focusedClient;
|
||||
var c = fc.credentials;
|
||||
|
||||
this.clearTransactionHistory = function() {
|
||||
storageService.removeTxHistory(c.walletId, function(err) {
|
||||
if (err) {
|
||||
$log.error(err);
|
||||
return;
|
||||
}
|
||||
$scope.$emit('Local/ClearHistory');
|
||||
|
||||
$timeout(function() {
|
||||
go.walletHome();
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -7,7 +7,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
|||
var c = fc.credentials;
|
||||
|
||||
this.init = function() {
|
||||
var basePath = c.getBaseAddressDerivationPath();
|
||||
var basePath = c.getBaseAddressDerivationPath();
|
||||
|
||||
$scope.walletName = c.walletName;
|
||||
$scope.walletId = c.walletId;
|
||||
|
|
@ -94,17 +94,4 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
|||
}, 100);
|
||||
};
|
||||
|
||||
this.clearTransactionHistory = function() {
|
||||
storageService.removeTxHistory(c.walletId, function(err) {
|
||||
if (err) {
|
||||
$log.error(err);
|
||||
return;
|
||||
}
|
||||
$scope.$emit('Local/ClearHistory');
|
||||
|
||||
$timeout(function() {
|
||||
go.walletHome();
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -342,6 +342,18 @@ angular
|
|||
|
||||
}
|
||||
})
|
||||
.state('preferencesHistory', {
|
||||
url: '/preferencesHistory',
|
||||
templateUrl: 'views/preferencesHistory.html',
|
||||
walletShouldBeComplete: true,
|
||||
needProfile: true,
|
||||
views: {
|
||||
'main': {
|
||||
templateUrl: 'views/preferencesHistory.html'
|
||||
},
|
||||
|
||||
}
|
||||
})
|
||||
.state('deleteWords', {
|
||||
url: '/deleteWords',
|
||||
templateUrl: 'views/preferencesDeleteWords.html',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue