fix import

This commit is contained in:
Matias Alejo Garcia 2015-08-24 17:09:59 -03:00
commit 1ab9d8507f
6 changed files with 205 additions and 37 deletions

View file

@ -36,7 +36,7 @@
</div>
</div>
<div class="row" ng-show="show" >
<div class="row enable_text_select" ng-show="show" >
<span class="m10" ng-repeat="word in wordsC.mywords">
{{word}}
</span>

View file

@ -123,6 +123,7 @@
type="text"
placeholder="{{'BIP32 master extended private key'|translate}}"
name="privateKey" ng-model="privateKey">
</label>
</div>
</div>

View file

@ -23,17 +23,17 @@
<div class="tab-container small-4 medium-4 large-4">
<a href
ng-class="{'selected': type =='12'}"
ng-click="create.setTotalCopayers(1)" translate>12 Words Backup</a>
ng-click="import.setType('12')" translate>12 Words Backup</a>
</div>
<div class="tab-container small-4 medium-4 large-4">
<a href
ng-class="{'selected': type=='file'}"
ng-click="create.setTotalCopayers(3)" translate>File/Text Backup</a>
ng-click="import.setType('file')" translate>File/Text Backup</a>
</div>
<div class="tab-container small-4 medium-4 large-4">
<a href
ng-class="{'selected': type=='qr'}"
ng-click="create.setTotalCopayers(3)" translate>QR Code</a>
ng-click="import.setType('qr')" translate>QR Code</a>
</div>
</div>
@ -42,10 +42,55 @@
<div class="row">
<div class="row" ng-show="type == '12' ">
<div class="large-12 columns">
<form name="importForm" ng-submit="import.import(importForm)" novalidate>
<form name="importForm12" ng-submit="import.importMnemonic(importForm12)" novalidate>
<div class="box-notification" ng-show="import.error">
<span class="text-warning size-14">
{{import.error|translate}}
</span>
</div>
<div >
<label for="words">
<span translate>Type the 12 backup words here</span>:
</label>
<textarea class="form-control" name="words" ng-model="import.words" rows="5"></textarea>
</div>
<div class="m10t oh" ng-init="hideAdv=true">
<a class="button outline light-gray expand tiny" ng-click="hideAdv=!hideAdv">
<i class="fi-widget m3r"></i>
<span translate ng-hide="!hideAdv">Show advanced options</span>
<span translate ng-hide="hideAdv">Hide advanced options</span>
<i ng-if="hideAdv" class="icon-arrow-down4"></i>
<i ng-if="!hideAdv" class="icon-arrow-up4"></i>
</a>
</div>
<div ng-hide="hideAdv" class="row">
<div class="large-12 columns">
<label for="passphrase" class="line-b oh"><span translate>Passphrase</span> <small translate>Mnemonics could required a passphrase to be imported</small>
<div class="input">
<input type="password" class="form-control" placeholder="{{'Your backup passhrase'|translate}}"
name="passphrase" ng-model="import.passphrase">
</div>
</label>
</div>
</div>
<button translate type="submit" class="button round expand black"
ng-disabled="importForm12.$invalid || import.loading">
Import
</button>
</form>
</div>
</div>
<div class="row" ng-show="type == 'file' ">
<div class="large-12 columns">
<form name="importForm" ng-submit="import.importBlob(importForm)" novalidate>
<div class="box-notification" ng-show="import.error">
<span class="text-warning size-14">
{{import.error|translate}}
@ -88,6 +133,14 @@
</div>
</div>
<div class="row" ng-show="type == 'qr'">
<div class="large-12 columns">
TODO
</div>
</div>
</div>
<div class="extra-margin-bottom"></div>