Merge pull request #1824 from cmgustavo/ux/import-open-profile

Ux/import open profile
This commit is contained in:
Matias Alejo Garcia 2014-11-17 08:41:23 -03:00
commit b49d6b9c01
3 changed files with 43 additions and 54 deletions

View file

@ -40,9 +40,10 @@ angular.module('copayApp.services')
} else {
scope.error = 'Unknown error when connecting Insight Server';
}
$rootScope.starting = false;
$timeout(function() {
$rootScope.$digest()
}, 1);
}, 1);
return;
}
var walletOptions = {
@ -57,6 +58,10 @@ angular.module('copayApp.services')
if (err || !wallet) {
copay.logger.debug(err);
scope.error = 'Could not create default wallet';
$rootScope.starting = false;
$timeout(function() {
$rootScope.$digest()
}, 1);
return;
}
controllerUtils.bindProfile(scope, iden, wallet.id);
@ -82,9 +87,10 @@ angular.module('copayApp.services')
} else {
scope.error = 'Unknown error';
}
$rootScope.starting = false;
$timeout(function() {
$rootScope.$digest()
}, 1);
}, 1);
} else {
var firstWallet = iden.getLastFocusedWallet();
controllerUtils.bindProfile(scope, iden, firstWallet);

View file

@ -50,12 +50,10 @@
{{'Passwords must match'|translate}}
</p>
</div>
<div class="text-right">
<button translate type="submit" class="button primary radius expand m0"
ng-disabled="profileForm.$invalid || loading">
Create
</button>
</div>
<button translate type="submit" class="button primary radius expand m0"
ng-disabled="profileForm.$invalid || loading">
Create
</button>
</form>
<div class="box-setup-footer">
<div class="left">

View file

@ -6,31 +6,29 @@
</div>
<div ng-show="!loading">
<div class="large-4 large-centered medium-6 medium-centered columns">
<div class="logo-setup">
<img src="img/logo-negative-beta.svg" alt="Copay" width="146" height="59">
<div ng-include="'views/includes/version.html'"></div>
</div>
<div class="box-setup">
<h1><span translate>Import Profile<span></h1>
<div class="large-4 large-centered medium-6 medium-centered columns">
<div class="logo-setup">
<img src="img/logo-negative-beta.svg" alt="Copay" width="146" height="59">
<div ng-include="'views/includes/version.html'"></div>
</div>
<div class="box-setup">
<h1 translate>Import Profile</h1>
<form name="importProfileForm" ng-submit="import(importProfileForm)" novalidate>
<p class="text-warning size-12"
ng-show="error">
<i class="fi-x"></i>
{{error|translate}}
</p>
<div ng-show="!is_iOS">
<legend for="backupFile" class="m10b">
<span translate>Choose backup file</span>
</legend>
<input type="file" class="form-control"
placeholder="{{'Select a backup file'|translate}}" name="backupFile" ng-model="backupFile" ng-file-select>
</div>
<p class="text-warning size-12"
ng-show="error">
<i class="fi-x"></i>
{{error|translate}}
</p>
<div ng-show="is_iOS">
<div ng-show="!is_iOS">
<legend for="backupFile" class="m10b">
<span translate>Choose backup file</span>
</legend>
<input type="file" class="form-control"
placeholder="{{'Select a backup file'|translate}}" name="backupFile" ng-model="backupFile" ng-file-select>
</div>
<div ng-show="is_iOS">
<label for="backupText" class="m10b">
<span translate>Paste backup plain text code</span> <i class="fi-clipboard"></i>
</label>
@ -38,38 +36,25 @@
name="backupText"
ng-model="backupText"
rows="5"></textarea>
</div>
<label for="password" class="m10b"><span translate>Password</span> <small translate>Required</small></label>
<input type="password" class="form-control"
placeholder="{{'Your wallet password'|translate}}" name="password" ng-model="password" required>
<div class="text-right m20t">
<a class="back-button text-white m20r" href="#!/">&laquo; <span translate>Back</span></a>
<button translate type="submit" class="button primary m0" ng-disabled="importForm.$invalid">
Import backup
</button>
</div>
<input type="password" class="form-control"
placeholder="{{'Your wallet password'|translate}}" name="password" ng-model="password" required>
<button translate type="submit"
class="button primary radius expand m0"
ng-disabled="importProfileForm.$invalid || loading">
Import backup
</button>
</form>
<div class="box-setup-footer">
<div class="right m10t">
<div class="box-setup-footer">
<a class="text-gray" href="#!/">
<i class="fi-arrow"></i>
<i class="fi-arrow-left"></i>
<span translate>Back</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>