Add strings to translate and minor ux details

This commit is contained in:
Gustavo Maximiliano Cortez 2015-10-02 15:11:35 -03:00
commit 07b6a2d4d5
2 changed files with 32 additions and 31 deletions

View file

@ -5,54 +5,57 @@
</div>
<div class="content p20v" ng-controller="paperWalletController as paperWallet">
<div class="row">
<div class="large-12 medium-12 columns">
<div class="onGoingProcess" ng-show="paperWallet.scanning">
<div class="onGoingProcess-content" ng-style="{'background-color':index.backgroundColor}">
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<span translate>Scanning wallet funds...</span>
</div>
<div class="onGoingProcess" ng-show="paperWallet.scanning">
<div class="onGoingProcess-content" ng-style="{'background-color':index.backgroundColor}">
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<div class="text-warning size-14 m20b" ng-show="paperWallet.error">
<span translate>Scanning wallet funds...</span>
</div>
</div>
<div class="row">
<div class="large-12 medium-12 columns">
<div class="box-notification text-warning" ng-show="paperWallet.error">
<i class="fi-alert size-12"></i>
<span translate>{{paperWallet.error}}</span>
<span>{{paperWallet.error|translate}}</span>
</div>
<div ng-show="!paperWallet.balance" class="input">
<label for="privateKey"><span>Paper Wallet Private Key</span></label>
<input type="text" placeholder="Paste your paper wallet private key here" ng-model="privateKey" id="privateKey">
<input type="text" placeholder="{{'Paste your paper wallet private key here'|translate}}" ng-model="privateKey" id="privateKey">
<div class="qr-scanner-input">
<qr-scanner on-scan="paperWallet.onQrCodeScanned(data)"></qr-scanner>
</div>
<label for="passphrase">
<span>Passphrase (if you have one): </span>
<span translate>Passphrase (if you have one):</span>
</label>
<input id="passphrase" type="password" name="passphrase" placeholder="Passphrase" ng-model="passphrase">
</div>
<p ng-show="paperWallet.message" translate class="size-14 text-gray">{{paperWallet.message}}</p>
<div ng-show="paperWallet.balance">
<label for="totalBalance">
<h2 translate>Funds founds: {{paperWallet.balance}} BTC</h2>
</label>
</div>
<input id="passphrase" type="password" name="passphrase" placeholder="{{'Passphrase'|translate}}" ng-model="passphrase">
<p ng-show="paperWallet.message" translate class="size-14 text-gray">{{paperWallet.message}}</p>
</div>
</div>
</div>
<div class="row">
<div class="large-12 medium-12 columns" ng-show="paperWallet.balance">
<div class="text-center m20b">
<h4 class="text-bold" translate>Funds founds</h4>
<div class="size-24">
{{paperWallet.balance}} BTC
</div>
</div>
<button
ng-style="{'background-color':index.backgroundColor}"
class="button black round expand"
ng-click="paperWallet.transaction()"
translate>sweep wallet
</button>
<span>Funds will be transfered to the wallet: {{index.alias || index.walletName}} </span>
<div class="m10t text-center">
<div class="size-12 text-gray" translate>Funds will be transfered to</div>
<b>{{index.alias || index.walletName}}</b>
</div>
</div>
<div class="large-12 medium-12 columns" ng-show="!paperWallet.balance" >
<button

View file

@ -1,5 +1,5 @@
angular.module('copayApp.controllers').controller('paperWalletController',
function($scope, $http, $timeout, $rootScope, profileService, go, addressService, isCordova, gettext) {
function($scope, $http, $timeout, profileService, go, addressService) {
self = this;
var fc = profileService.focusedClient;
var rawTx;
@ -12,7 +12,6 @@ angular.module('copayApp.controllers').controller('paperWalletController',
self.createTx = function(privateKey, passphrase) {
self.error = null;
self.scanning = true;
$timeout(function() {
self.getRawTx(privateKey, passphrase, function(err, rawtx, utxos) {
self.scanning = false;
@ -27,7 +26,6 @@ angular.module('copayApp.controllers').controller('paperWalletController',
$timeout(function() {
$scope.$apply();
}, 1);
});
}, 100);
};