Merge pull request #3596 from cmgustavo/bug/normalize-preferences-items

Normalize items preferences
This commit is contained in:
Gustavo Maximiliano Cortez 2015-12-04 13:36:03 -03:00
commit 909c010921
5 changed files with 58 additions and 81 deletions

View File

@ -7,21 +7,16 @@
<div class="content preferences" ng-controller="preferencesDeleteWalletController as preferences">
<h4></h4>
<div class="text-center text-gray">
<span translate>Wallet</span>: {{index.walletName}}
<span ng-show="index.alias">({{index.alias}})</span>
</div>
<h4 class="text-warning text-center m0" translate>Warning!</h4>
<div class="box-notification" ng-show="preferences.error" >
<span class="text-warning size-14">
{{preferences.error|translate}}
</span>
</div>
<div class="columns text-center">
<p translate class="size-14 text-gray">Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</p>
<button class="button round expand warning" ng-click="preferences.deleteWallet()" translate>
Delete wallet
</button>
<div class="text-center text-gray m20t size-12">
<div class="text-warning size-18 m10b" translate>Warning!</div>
<div class="m20b" translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div>
</div>
<ul class="no-bullet m0">
<li ng-click="preferences.deleteWallet()">
<div class="right" ng-style="{'color':index.backgroundColor}">
{{index.walletName}} <span ng-show="index.alias">({{index.alias}})</span>
</div>
<div translate>Delete wallet</div>
</li>
</ul>
</div>

View File

@ -7,47 +7,29 @@
<div class="content preferences" ng-controller="preferencesDeleteWordsController as preferences">
<h4></h4>
<div class="text-center text-gray">
<span translate>Wallet</span>: {{index.walletName}}
<span ng-show="index.alias">({{index.alias}})</span>
<div ng-show="!preferences.deleted">
<div class="text-center text-gray m20t size-12">
<div class="box-notification text-warning" ng-show="preferences.error" >
{{preferences.error|translate}}
</div>
<div class="text-warning size-18 m10b" translate>Warning!</div>
<div class="m20b" ng-show="!index.needsBackup" translate>Once you have copied your wallet seed down, it is recommended to delete it from this device.</div>
<div class="m20b" ng-show="index.needsBackup" translate>Need to do backup</div>
</div>
<ul class="no-bullet m0" ng-show="!index.needsBackup">
<li ng-click="preferences.delete()">
<div class="right" ng-style="{'color':index.backgroundColor}">
{{index.walletName}} <span ng-show="index.alias">({{index.alias}})</span>
</div>
<div translate>Delete words</div>
</li>
</ul>
</div>
<h4 class="text-warning text-center m0" translate>Warning!</h4>
<div class="box-notification" ng-show="preferences.error" >
<span class="text-warning size-14">
{{preferences.error|translate}}
</span>
</div>
<div class="columns text-center">
<p class="size-14 text-gray" ng-show="!index.needsBackup" >
<span translate>
Once you have copied your wallet seed down, it is recommended to delete it from this device.
</span>
</p>
<p class="size-14 text-gray" ng-show="index.needsBackup" >
<span translate>
Need to do backup
</span>
</p>
<button class="button round expand warning" ng-disabled="index.needsBackup" ng-click="preferences.delete()">
<i class="fi-trash"></i>
<span translate>
DELETE WORDS
</span>
</button>
<div class="row m20t" ng-show="preferences.deleted">
<div class="columns size-14 text-gray text-center" translate>
Wallet seed not available. You can still export it from Advanced &gt; Export.
</div>
</div>
</div>

View File

@ -6,11 +6,12 @@
<div class="content preferences" ng-controller="preferencesHistory as history">
<h4></h4>
<ul class="no-bullet m0">
<li ng-show="!index.isCordova" id="export_file" type="file" nwsaveas="Copay-{{index.alias || index.walletName}}.csv" accept=".csv" ng-click="index.csvHistory();">
<span translate>Export to file</span>
<li ng-style="{'color':index.backgroundColor}" ng-show="!index.isCordova" id="export_file" type="file"
nwsaveas="Copay-{{index.alias || index.walletName}}.csv" accept=".csv" ng-click="index.csvHistory();" translate>
Export to file
</li>
<li ng-click="history.clearTransactionHistory();">
<span translate>Clear cache</span>
<li ng-style="{'color':index.backgroundColor}" ng-click="history.clearTransactionHistory();" translate>
Clear cache
</li>
</ul>
</div>

View File

@ -102,35 +102,31 @@
</li>
</ul>
<ul class="no-bullet m0 size-14" ng-show="addrs">
<h4 class="title m0" translate>Last Wallet Addresses</h4>
<li ng-repeat="a in addrs" class="oh">
<div ng-show="addrs">
<h4 class="title m0" translate>Last Wallet Addresses</h4>
<ul class="no-bullet m0">
<li ng-repeat="a in addrs" class="oh">
<div class="enable_text_select ellipsis">
{{a.address}}
</div>
<div class="text-gray size-12 right enable_text_select">
{{a.path}} &middot; {{a.createdOn *1000 | amDateFormat:'MMMM Do YYYY, h:mm a' }}
</div>
</li>
<li class="line-b p10 text-centered text-gray size-12">
<span translate>Only Main (not change) addresses are shown. The addresses on this list were not verified locally at this time.</span>
</li>
</li>
</ul>
<div class="text-centered text-gray size-12 m10" translate>
Only Main (not change) addresses are shown. The addresses on this list were not verified locally at this time.
</div>
<li class="line-b p20" >
<button class="black round small expand" ng-style="{'background-color':index.backgroundColor}" ng-click="index.retryScan(); $root.go('walletHome'); ">
<span translate>Scan addresses for funds</span>
</button>
<button ng-show="index.isCordova" class="black round small expand"
ng-style="{'background-color':index.backgroundColor}"
ng-click="info.sendAddrs()"
ng-disabled="info.loading">
<i class="fi-mail"></i>
<span translate>Send addresses by email</span>
</button>
</li>
</ul>
<ul class="no-bullet m0">
<li ng-style="{'color':index.backgroundColor}" ng-click="index.retryScan(); $root.go('walletHome')" translate>
Scan addresses for funds
</li>
<li ng-style="{'color':index.backgroundColor}" ng-show="index.isCordova" ng-click="info.sendAddrs()" translate>
Send addresses by email
</li>
</ul>
</div>
<ul class="no-bullet m0 size-14" ng-show="index.balanceByAddress">
<div ng-if="index.balanceByAddress[0]">

View File

@ -7,6 +7,9 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWordsControl
var msg = gettext('Are you sure you want to delete the backup words?');
var successMsg = gettext('Backup words deleted');
if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic)
self.deleted = true;
self.delete = function() {
confirmDialog.show(msg,
function(ok) {