mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #5469 from matiu/feat/refresh-walletDetails
Feat/refresh wallet details
This commit is contained in:
commit
0ffb696442
|
@ -95,17 +95,6 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.frequentlyUsedChange = function() {
|
||||
var opts = {
|
||||
frequentlyUsed: {
|
||||
enabled: $scope.frequentlyUsedEnabled.value
|
||||
}
|
||||
};
|
||||
configService.set(opts, function(err) {
|
||||
if (err) $log.debug(err);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
updateConfig();
|
||||
});
|
||||
|
|
|
@ -352,12 +352,12 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
|
||||
listeners = [
|
||||
$rootScope.$on('bwsEvent', function(e, walletId) {
|
||||
if (walletId == $scope.wallet.id)
|
||||
updateStatus();
|
||||
if (walletId == $scope.wallet.id && e.type!='NewAddress')
|
||||
$scope.updateAll();
|
||||
}),
|
||||
$rootScope.$on('Local/TxAction', function(e, walletId) {
|
||||
if (walletId == $scope.wallet.id)
|
||||
updateStatus();
|
||||
$scope.updateAll();
|
||||
}),
|
||||
];
|
||||
});
|
||||
|
|
|
@ -61,14 +61,9 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
enabled: true
|
||||
},
|
||||
|
||||
//Experimental Features
|
||||
|
||||
recentTransactions: {
|
||||
enabled: false //disabled by default
|
||||
},
|
||||
|
||||
frequentlyUsed: {
|
||||
enabled: true
|
||||
enabled: true,
|
||||
},
|
||||
|
||||
rates: {
|
||||
|
@ -214,9 +209,6 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
if (!configCache.recentTransactions) {
|
||||
configCache.recentTransactions = defaultConfig.recentTransactions;
|
||||
}
|
||||
if (!configCache.frequentlyUsed) {
|
||||
configCache.frequentlyUsed = defaultConfig.frequentlyUsed;
|
||||
}
|
||||
if (!configCache.pushNotifications) {
|
||||
configCache.pushNotifications = defaultConfig.pushNotifications;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
padding: 15px;
|
||||
background-color: #fff;
|
||||
color: $mid-gray;
|
||||
font-size:0.9em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,6 +218,7 @@
|
|||
bottom: 5px;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
width:95%;
|
||||
}
|
||||
|
||||
.wallet-not-backed-up-warning {
|
||||
|
@ -234,3 +235,15 @@
|
|||
a.item {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.recent svg {
|
||||
margin-left:5px;
|
||||
width:0.7em;
|
||||
height:0.7em;
|
||||
stroke: #eee;
|
||||
}
|
||||
|
||||
.updatingHistory {
|
||||
color: #445;
|
||||
font-size:0.9em;
|
||||
}
|
||||
|
|
|
@ -37,13 +37,6 @@
|
|||
If enabled, wallets will also try to spend unconfirmed funds. This option may cause transaction delays.
|
||||
</div>
|
||||
|
||||
<div class="item item-divider" translate>Experimental Features</div>
|
||||
<div class="settings-explanation">
|
||||
<div class="settings-description" translate>
|
||||
These features aren't quite ready for primetime. They may change, stop working, or disappear at any time.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-toggle class="has-comment" ng-show="!isWP" ng-model="recentTransactionsEnabled.value" toggle-class="toggle-balanced" ng-change="recentTransactionsChange()">
|
||||
<span class="toggle-label" translate>Recent Transaction Card</span>
|
||||
</ion-toggle>
|
||||
|
@ -51,22 +44,6 @@
|
|||
If enabled, the Recent Transactions card - a list of transactions occuring across all wallets - will appear in the Home tab.
|
||||
</div>
|
||||
|
||||
<ion-toggle class="has-comment" ng-model="global.developmentUtilitiesEnabled.value" toggle-class="toggle-balanced" ng-change="toggledDevelopmentUtils()">
|
||||
<span class="toggle-label" translate>Development Utilities</span>
|
||||
</ion-toggle>
|
||||
<div class="comment" translate>
|
||||
These features make it easier to test complex functionality on all devices. They may be unstable.
|
||||
</div>
|
||||
|
||||
<!-- disable frequently used for this release -->
|
||||
|
||||
<!-- <ion-toggle ng-show="!isWP" ng-model="frequentlyUsedEnabled.value" toggle-class="toggle-balanced" ng-change="frequentlyUsedChange()">
|
||||
<span class="toggle-label" translate>Frequently Used Card</span>
|
||||
</ion-toggle>
|
||||
<div ng-style="{'padding':'15px', 'background-color': '#fff', 'color': 'rgba(74, 74, 74, 0.8)'}">
|
||||
<span transaction>If enabled, the Frequently Used card - a list of the most commonly chosen recipients - will appear in the Send tab.</span>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
|
||||
<ion-spinner class="spinner-dark recent right" icon="crescent" ng-show="updatingStatus || (updatingTxHistory && updatingTxHistoryProgress<=5)" ></ion-spinner>
|
||||
|
||||
<div>
|
||||
<span ng-show="wallet.status.wallet.singleAddress" class="size-12"><span translate>Auditable</span></span>
|
||||
<img style="height:0.6em; margin-right: 1px;" ng-show="wallet.network != 'livenet'" src="img/icon-testnet-white.svg">
|
||||
<img style="height:0.6em; margin-right: 1px;" ng-show="!wallet.canSign() && !wallet.isPrivKeyExternal()" src="img/icon-read-only-white.svg">
|
||||
|
@ -12,5 +15,4 @@
|
|||
|
||||
<!-- <img style="height:1em" ng-show="wallet.preferences.email" src="img/icon-email.svg"> -->
|
||||
<img style="height:0.6em; margin-right: 1px;" ng-show="wallet.usingCustomBWS" src="img/icon-bws-white.svg">
|
||||
|
||||
<img style="height:0.6em" ng-show="updatingTxHistory" src="img/icon-sync-white.svg">
|
||||
</div>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
<div ng-show="updateStatusError">
|
||||
<span class="size-12 db m10">{{updateStatusError}}</span>
|
||||
<a class="button button-outline button-light button-small" ng-click='update()' translate>Tap to retry</a>
|
||||
<a class="button button-outline button-light button-small" ng-click='updateAll(true)' translate>Tap to retry</a>
|
||||
</div>
|
||||
|
||||
<div ng-show="walletNotRegistered">
|
||||
|
@ -36,14 +36,9 @@
|
|||
<a class="button button-outline button-light button-small" ng-click='recreate()' translate>Recreate</a>
|
||||
</div>
|
||||
|
||||
<div ng-show="wallet.walletScanStatus == 'error'" ng-click='retryScan()'>
|
||||
<span translate>Scan status finished with error</span>
|
||||
<br><span translate>Tap to retry</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
ng-click='updateAll(true)'
|
||||
ng-show="!updateStatusError && wallet.walletScanStatus != 'error' && !wallet.balanceHidden"
|
||||
ng-show="!updateStatusError && !wallet.balanceHidden"
|
||||
on-hold="hideToggle()"
|
||||
ng-style="{'transform': amountScale}"
|
||||
ng-class="{amount__balance: amountIsCollapsible}">
|
||||
|
@ -59,7 +54,7 @@
|
|||
|
||||
<div ng-style="{'transform': amountScale}"
|
||||
class="amount__balance"
|
||||
ng-show="!updateStatusError && wallet.walletScanStatus != 'error' && wallet.balanceHidden"
|
||||
ng-show="!updateStatusError && wallet.balanceHidden"
|
||||
on-hold="hideToggle()">
|
||||
<strong class="size-24" translate>[Balance Hidden]</strong>
|
||||
<div ng-style="{opacity: altAmountOpacity}" class="size-14 amount-alternative" translate>
|
||||
|
@ -194,28 +189,36 @@
|
|||
<!-- Transactions -->
|
||||
|
||||
<div class="oh pr m20t text-gray size-12 text-center"
|
||||
ng-show="!txHistory[0] && !updatingTxHistory && !txHistoryError && !updateStatusError" translate>
|
||||
ng-show="!txHistory[0] && !updatingTxHistory && !updateTxHistoryError && !updateStatusError" translate>
|
||||
No transactions yet
|
||||
</div>
|
||||
|
||||
|
||||
<div class="oh pr m20t text-gray size-12 text-center"
|
||||
ng-show="!txHistory[0] && !updatingTxHistory && updateTxHistoryError" translate>
|
||||
Could not update transaction history
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-show="updatingTxHistory && updatingTxHistoryProgress>5" class="updatingHistory">
|
||||
<div class="row" >
|
||||
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
|
||||
<ion-spinner class="spinner-dark" icon="crescent"></ion-spinner>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<div class="col" translate>Updating transaction history. Please stand by.</div>
|
||||
</div>
|
||||
<div class="row" ng-show="updatingTxHistoryProgress>0" >
|
||||
<div class="col" translate>{{updatingTxHistoryProgress}} transactions downloaded</div>
|
||||
<div class="col">
|
||||
<span translate>Updating transaction history. Please stand by.</span><br>
|
||||
<span translate>{{updatingTxHistoryProgress}} transactions downloaded</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wallet-details__list" ng-show="txHistory[0]">
|
||||
<div ng-repeat="btx in txHistory track by $index" ng-click="openTxModal(btx)">
|
||||
<div class="wallet-details__group-label" ng-if="isFirstInGroup($index)">
|
||||
<span ng-if="isDateInCurrentMonth(getDate(btx.time))" translate>
|
||||
Recent
|
||||
<span ng-if="isDateInCurrentMonth(getDate(btx.time))">
|
||||
<span translate>Recent</span>
|
||||
</span>
|
||||
|
||||
<span ng-if="!isDateInCurrentMonth(getDate(btx.time))">
|
||||
{{getDate(btx.time) | amDateFormat:'MMMM'}}
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue