Move wallet-info to settings. Fix removing last wallet
This commit is contained in:
parent
c0f59adced
commit
5b1463af60
8 changed files with 171 additions and 204 deletions
|
|
@ -49,6 +49,32 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- end of row -->
|
||||
<div class="row">
|
||||
<div class="large-12 columns size-12">
|
||||
<button class="warning" ng-show="!confirmDelete" ng-click="confirmDelete=!confirmDelete">
|
||||
<i class="fi-trash"></i> Cancel
|
||||
</button>
|
||||
<div ng-show="confirmDelete">
|
||||
<h2>Are you sure you want to cancel and delete this wallet</h2>
|
||||
<div class="row">
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="gray" ng-disabled="loading"
|
||||
ng-click="confirmDelete=!confirmDelete">No</button>
|
||||
</div>
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="warning" ng-disabled="loading" ng-click="deleteWallet()">
|
||||
<span ng-show="!loading">
|
||||
<i class="fi-trash"></i> Yes
|
||||
</span>
|
||||
<span ng-show="loading">
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="extra-margin-bottom"></div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
<div class="text-center" ng-init="isComplete = item.isComplete(); networkName = item.getNetworkName()">
|
||||
<div ng-show="!confirmDelete">
|
||||
<h1>{{item.name || item.id }}</h1>
|
||||
<h3>
|
||||
{{item.requiredCopayers}} of {{item.totalCopayers}} - {{networkName}}
|
||||
, {{isComplete ? 'Complete' : 'Waiting for copayers...'}}
|
||||
</h3>
|
||||
<div class="m10b" ng-if="isComplete">
|
||||
<b>{{item.balanceInfo.totalBalance || 0}} {{item.settings.unitName}}</b>
|
||||
</div>
|
||||
<div class="m20b">
|
||||
Approximate size: {{item.kb}} kB
|
||||
<span ng-if="item.usage">({{item.usage}}%) </span>
|
||||
</div>
|
||||
|
||||
<div class="box-notification" ng-show="error">
|
||||
<div class="box-icon error">
|
||||
<i class="fi-x size-24"></i>
|
||||
</div>
|
||||
<span class="text-warning size-14">
|
||||
{{error|translate}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="!backupWalletPlainText && !error">
|
||||
<div class="large-6 medium-6 small-12 columns">
|
||||
<button class="primary expand" ng-click="downloadWalletBackup()" ng-disabled="loading"
|
||||
ng-show="!isSafari && !isCordova"><i class="fi-download"></i> Download backup</button>
|
||||
<button class="primary expand" ng-click="viewWalletBackup()" ng-disabled="loading"
|
||||
ng-show="isSafari || isCordova"><i class="fi-eye"></i> View Backup</button>
|
||||
</div>
|
||||
<div class="large-6 medium-6 small-12 columns">
|
||||
<button class="warning expand" ng-click="confirmDelete=!confirmDelete">
|
||||
<i class="fi-trash"></i> Delete
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="backupWalletPlainText">
|
||||
<h3>Copy backup in a safe place</h3>
|
||||
<div class="input">
|
||||
<textarea class="show-for-large-up" readonly rows="7">{{backupWalletPlainText}}</textarea>
|
||||
<textarea class="hide-for-large-up" rows="12">{{backupWalletPlainText}}</textarea>
|
||||
<i class="icon-compose"></i>
|
||||
</div>
|
||||
<div translate class="m10t size-12 text-gray text-right">
|
||||
Copy this text as it is in a safe place (notepad or email)
|
||||
</div>
|
||||
</div>
|
||||
<a class="close-reveal-modal" ng-click="close()"><i class="fi-x size-18"></i></a>
|
||||
</div>
|
||||
<div class="row" ng-show="confirmDelete">
|
||||
<h1>Are you sure you want to delete the wallet
|
||||
<strong>{{(item.name || item.id)}}</strong>
|
||||
</h1>
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="gray" ng-disabled="loading"
|
||||
ng-click="confirmDelete=!confirmDelete">Cancel</button>
|
||||
</div>
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="warning" ng-disabled="loading" ng-click="deleteWallet()">
|
||||
<span ng-show="!loading">
|
||||
<i class="fi-trash"></i> Delete
|
||||
</span>
|
||||
<span ng-show="loading">
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -22,6 +22,77 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="text-center" ng-init="isComplete = wallet.isComplete(); networkName = wallet.getNetworkName()">
|
||||
<div ng-show="!confirmDelete">
|
||||
<h1>{{wallet.name || wallet.id }}</h1>
|
||||
<h3>
|
||||
{{wallet.requiredCopayers}} of {{wallet.totalCopayers}} - {{networkName}}
|
||||
, {{isComplete ? 'Complete' : 'Waiting for copayers...'}}
|
||||
</h3>
|
||||
<div class="m10b" ng-if="isComplete">
|
||||
<b>{{wallet.balanceInfo.totalBalance || 0}} {{wallet.settings.unitName}}</b>
|
||||
</div>
|
||||
<div class="m20b">
|
||||
Approximate size: {{wallet.kb}} kB
|
||||
<span ng-if="wallet.usage">({{wallet.usage}}%) </span>
|
||||
</div>
|
||||
|
||||
<div class="box-notification" ng-show="error">
|
||||
<div class="box-icon error">
|
||||
<i class="fi-x size-24"></i>
|
||||
</div>
|
||||
<span class="text-warning size-14">
|
||||
{{error|translate}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="!backupWalletPlainText && !error">
|
||||
<div class="large-6 medium-6 small-12 columns">
|
||||
<button class="primary expand" ng-click="downloadWalletBackup()" ng-disabled="loading"
|
||||
ng-show="!isSafari && !isCordova"><i class="fi-download"></i> Download backup</button>
|
||||
<button class="primary expand" ng-click="viewWalletBackup()" ng-disabled="loading"
|
||||
ng-show="isSafari || isCordova"><i class="fi-eye"></i> View Backup</button>
|
||||
</div>
|
||||
<div class="large-6 medium-6 small-12 columns">
|
||||
<button class="warning expand" ng-click="confirmDelete=!confirmDelete">
|
||||
<i class="fi-trash"></i> Delete
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="backupWalletPlainText">
|
||||
<h3>Copy backup in a safe place</h3>
|
||||
<div class="input">
|
||||
<textarea class="show-for-large-up" readonly rows="7">{{backupWalletPlainText}}</textarea>
|
||||
<textarea class="hide-for-large-up" rows="12">{{backupWalletPlainText}}</textarea>
|
||||
<i class="icon-compose"></i>
|
||||
</div>
|
||||
<div translate class="m10t size-12 text-gray text-right">
|
||||
Copy this text as it is in a safe place (notepad or email)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" ng-show="confirmDelete">
|
||||
<h1>Are you sure you want to delete the wallet
|
||||
<strong>{{(wallet.name || wallet.id)}}</strong>
|
||||
</h1>
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="gray" ng-disabled="loading"
|
||||
ng-click="confirmDelete=!confirmDelete">Cancel</button>
|
||||
</div>
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="warning" ng-disabled="loading" ng-click="deleteWallet()">
|
||||
<span ng-show="!loading">
|
||||
<i class="fi-trash"></i> Delete
|
||||
</span>
|
||||
<span ng-show="loading">
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m20b row">
|
||||
<div class="large-12 columns">
|
||||
|
|
|
|||
|
|
@ -35,68 +35,13 @@
|
|||
|
||||
<div class="line-dashed-h m20b"></div>
|
||||
|
||||
<div class="row" ng-init="setWallets()">
|
||||
<div class="row size-12 m20b">
|
||||
<div class="large-12 columns">
|
||||
<h2>Manage wallets</h2>
|
||||
|
||||
<div class="box-notification" ng-show="success">
|
||||
<div class="box-icon success">
|
||||
<i class="fi-check size-24"></i>
|
||||
</div>
|
||||
<span class="text-success size-14">
|
||||
{{success|translate}}
|
||||
</span>
|
||||
<a href ng-click="success=false" class="close-notification success">×</a>
|
||||
<div ng-if="perItem">
|
||||
Your current server usage quotas are: <b>{{perItem}}kB</b> per wallet and up to <b>{{nrWallets}}</b> wallets.
|
||||
</div>
|
||||
|
||||
<table class="manage-wallets">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th class="hide-for-small-only">Status</th>
|
||||
<th class="hide-for-small-only">Balance</th>
|
||||
<th class="hide-for-small-only">Approx Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
data-ng-repeat="item in wallets | orderBy:'name'"
|
||||
ng-init="isComplete = item.isComplete(); networkName = item.getNetworkName()"
|
||||
ng-click="showWalletInfo(item)">
|
||||
<td>
|
||||
<span ng-show="loading == item.id"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
|
||||
<span ng-show="loading != item.id">
|
||||
{{item.name || item.id }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{item.requiredCopayers}} of {{item.totalCopayers}} - {{networkName}}</td>
|
||||
<td class="hide-for-small-only">
|
||||
{{isComplete ? 'Complete' : 'Waiting for copayers...'}}
|
||||
</td>
|
||||
<td class="hide-for-small-only">
|
||||
<span ng-if="!isComplete">-</span>
|
||||
<span ng-if="isComplete">
|
||||
{{item.balanceInfo.totalBalance || 0}} {{item.settings.unitName}}
|
||||
</span>
|
||||
</td>
|
||||
<td class="hide-for-small-only">
|
||||
<span>
|
||||
{{item.kb}} kB
|
||||
<span ng-if="item.usage">({{item.usage}}%) </span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="size-12">
|
||||
<div ng-if="perItem">
|
||||
Your current server usage quotas are: <b>{{perItem}}kB</b> per wallet and up to <b>{{nrWallets}}</b> wallets.
|
||||
</div>
|
||||
<div ng-if="$root.needsEmailConfirmation" class="m10t">
|
||||
<i class="fi-alert"></i> Confirm your email address to increase storage usage limits.
|
||||
</div>
|
||||
<div ng-if="$root.needsEmailConfirmation" class="m10t">
|
||||
<i class="fi-alert"></i> Confirm your email address to increase storage usage limits.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue