WIP passphrase confirm - add passphrase view and separate controllers

This commit is contained in:
Javier 2015-11-18 18:37:42 -03:00
commit 4d94121ec6
11 changed files with 234 additions and 134 deletions

View file

@ -6,17 +6,17 @@
<div class="content preferences" ng-controller="backupController as backup">
<div class="content preferences" ng-controller="exportController as exportC">
<h4></h4>
<div ng-show="!backup.backupWalletPlainText">
<div class="text-warning size-14 m20b" ng-show="backup.error">
<div ng-show="!exportC.backupWalletPlainText">
<div class="text-warning size-14 m20b" ng-show="exportC.error">
<i class="fi-alert size-12"></i>
<span translate> Failed to export </span>
</div>
<div class="row">
<div class="columns">
<div class="text-warning size-14 m20b" ng-show="backup.isEncrypted">
<div class="text-warning size-14 m20b" ng-show="exportC.isEncrypted">
<i class="fi-alert size-12"></i>
<span translate> The private key for this wallet is encrypted. Exporting keep the private key encrypted in the export archive.</span>
@ -31,14 +31,14 @@
<div class="input">
<input type="password" class="form-control"
placeholder="{{'Your export password'|translate}}"
name="password" ng-model="backup.password">
name="password" ng-model="exportC.password">
</div>
<label for="password" translate>Repeat password</label>
<div class="input">
<input type="password" class="form-control"
placeholder="{{'Repeat password'|translate}}"
name="password" ng-model="backup.repeatpassword">
name="password" ng-model="exportC.repeatpassword">
</div>
</div>
</div>
@ -83,25 +83,25 @@
<div class="row">
<div class="columns">
<button class="black round expand m20t" ng-click="backup.downloadWalletBackup()"
ng-disabled="(!backup.password || backup.password != backup.repeatpassword)"
<button class="black round expand m20t" ng-click="exportC.downloadWalletBackup()"
ng-disabled="(!exportC.password || exportC.password != exportC.repeatpassword)"
ng-style="{'background-color':index.backgroundColor}"
ng-show="!index.isSafari && !index.isCordova"><i class="fi-download"></i>
<span translate>Download</span></button>
<button class="black round expand m20t" ng-click="backup.viewWalletBackup()"
ng-disabled="(!backup.password || backup.password != backup.repeatpassword)"
<button class="black round expand m20t" ng-click="exportC.viewWalletBackup()"
ng-disabled="(!exportC.password || exportC.password != exportC.repeatpassword)"
ng-style="{'background-color':index.backgroundColor}"
ng-show="index.isSafari && !index.isCordova"><i class="fi-eye"></i>
<span translate>View</span></button>
<div ng-show="index.isCordova">
<h4 translate>Export options</h4>
<button class="black round expand" ng-disabled="(!backup.password || backup.password != backup.repeatpassword)"
<button class="black round expand" ng-disabled="(!exportC.password || exportC.password != exportC.repeatpassword)"
ng-style="{'background-color':index.backgroundColor}"
ng-click="backup.copyWalletBackup()"><i class="fi-clipboard-pencil"></i>
ng-click="exportC.copyWalletBackup()"><i class="fi-clipboard-pencil"></i>
<span translate>Copy to clipboard</span></button>
<button class="black round expand" ng-disabled="(!backup.password || backup.password != backup.repeatpassword)"
<button class="black round expand" ng-disabled="(!exportC.password || exportC.password != exportC.repeatpassword)"
ng-style="{'background-color':index.backgroundColor}"
ng-click="backup.sendWalletBackup()"><i class="fi-mail"></i>
ng-click="exportC.sendWalletBackup()"><i class="fi-mail"></i>
<span translate>Send by email</span></button>
</div>
</div>
@ -109,11 +109,11 @@
</div>
<div class="row" ng-show="backup.backupWalletPlainText">
<div class="row" ng-show="exportC.backupWalletPlainText">
<div class="large-12 columns">
<h3 translate>Wallet Export</h3>
<div class="input">
<textarea rows="12">{{backup.backupWalletPlainText}}</textarea>
<textarea rows="12">{{exportC.backupWalletPlainText}}</textarea>
</div>
<div class="size-12 text-gray text-right">
<i class="icon-compose"></i>