Merge pull request #4376 from JDonadio/fix/ui-ios

Fix IOs white page
This commit is contained in:
Gustavo Maximiliano Cortez 2016-06-14 12:28:15 -03:00 committed by GitHub
commit e5c97c3dd3
6 changed files with 15 additions and 48 deletions

View file

@ -4,20 +4,16 @@
ng-init="titleSection='Create new wallet'; goBackToState = 'add'; noColor = true">
</div>
<ion-content overflow-scroll="true" class="content p20b" ng-controller="createController as create" ng-init="create.setTotalCopayers(1)">
<div class="content p20b" ng-controller="createController as create" ng-init="create.setTotalCopayers(1)">
<div class="create-tab small-only-text-center" ng-hide="create.hideTabs">
<div class="row">
<div class="tab-container small-6 medium-3 large-2" ng-class="{'selected': totalCopayers == 1}">
<a href
ng-click="create.setTotalCopayers(1)" translate>Personal Wallet</a>
</div>
<div class="tab-container small-6 medium-3 large-2" ng-class="{'selected': totalCopayers != 1}">
<a href
ng-click="create.setTotalCopayers(3)" translate>Shared Wallet</a>
</div>
<div class="tab-container small-6 medium-3 large-2" ng-class="{'selected': totalCopayers == 1}">
<a href ng-click="create.setTotalCopayers(1)" translate>Personal Wallet</a>
</div>
<div class="tab-container small-6 medium-3 large-2" ng-class="{'selected': totalCopayers != 1}">
<a href ng-click="create.setTotalCopayers(3)" translate>Shared Wallet</a>
</div>
</div>
</div>
@ -166,5 +162,5 @@
</div> <!-- large-12 columns -->
</div> <!-- row -->
</form>
</ion-content>
</div>
<div class="extra-margin-bottom"></div>

View file

@ -4,7 +4,7 @@
ng-init="titleSection='Import wallet'; goBackToState = 'add'; noColor = true">
</div>
<ion-content overflow-scroll="true" class="content p20b" ng-controller="importController as import" ng-init="type='12'">
<div class="content p20b" ng-controller="importController as import" ng-init="type='12'">
<div class="create-tab pr small-only-text-center" ng-hide="create.hideTabs">
<div class="row">
<div class="tab-container small-4 medium-4 large-4" ng-class="{'selected': type =='12'}">
@ -216,6 +216,6 @@
</form>
</div>
</div>
</ion-content>
</div>
<div class="extra-margin-bottom"></div>

View file

@ -5,7 +5,7 @@
</div>
<ion-content overflow-scroll="true" class="content p20v" ng-controller="joinController as join">
<div class="content p20v" ng-controller="joinController as join">
<form name="joinForm" ng-submit="join.join(joinForm)" novalidate>
<div class="box-notification m20b" ng-show="join.error">
<span class="text-warning">
@ -126,6 +126,5 @@
</div> <!-- large-12 columns -->
</div> <!-- row -->
</form>
</ion-content>
</div>
<div class="extra-margin-bottom"></div>

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('createController',
function($scope, $ionicScrollDelegate, $rootScope, $timeout, $log, lodash, go, profileService, configService, gettext, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess) {
function($scope, $rootScope, $timeout, $log, lodash, go, profileService, configService, gettext, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess) {
var isChromeApp = platformInfo.isChromeApp;
var isCordova = platformInfo.isCordova;
@ -89,7 +89,6 @@ angular.module('copayApp.controllers').controller('createController',
this.create = function(form) {
if (form && form.$invalid) {
this.error = gettext('Please enter the required fields');
$ionicScrollDelegate.scrollTop();
return;
}
@ -117,7 +116,6 @@ angular.module('copayApp.controllers').controller('createController',
var pathData = derivationPathHelper.parse($scope.derivationPath);
if (!pathData) {
this.error = gettext('Invalid derivation path');
$ionicScrollDelegate.scrollTop();
return;
}
@ -131,7 +129,6 @@ angular.module('copayApp.controllers').controller('createController',
if (setSeed && !opts.mnemonic && !opts.extendedPrivateKey) {
this.error = gettext('Please enter the wallet recovery phrase');
$ionicScrollDelegate.scrollTop();
return;
}
@ -139,7 +136,6 @@ angular.module('copayApp.controllers').controller('createController',
var account = $scope.account;
if (!account || account < 1) {
this.error = gettext('Invalid account number');
$ionicScrollDelegate.scrollTop();
return;
}
@ -155,7 +151,6 @@ angular.module('copayApp.controllers').controller('createController',
ongoingProcess.set('connecting' + self.seedSourceId, false);
if (err) {
self.error = err;
$ionicScrollDelegate.scrollTop();
$scope.$apply();
return;
}
@ -176,7 +171,6 @@ angular.module('copayApp.controllers').controller('createController',
if (err) {
$log.warn(err);
self.error = err;
$ionicScrollDelegate.scrollTop();
$timeout(function() {
$rootScope.$apply();
});

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('importController',
function($scope, $rootScope, $ionicScrollDelegate, $timeout, $log, profileService, configService, notification, go, sjcl, gettext, lodash, ledger, trezor, derivationPathHelper, platformInfo, bwsError, bwcService, ongoingProcess) {
function($scope, $rootScope, $timeout, $log, profileService, configService, notification, go, sjcl, gettext, lodash, ledger, trezor, derivationPathHelper, platformInfo, bwsError, bwcService, ongoingProcess) {
var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel;
@ -53,7 +53,6 @@ angular.module('copayApp.controllers').controller('importController',
if (err) {
self.error = err;
$ionicScrollDelegate.scrollTop();
$timeout(function() {
$rootScope.$apply();
});
@ -69,7 +68,6 @@ angular.module('copayApp.controllers').controller('importController',
ongoingProcess.set('importingWallet', false);
if (err) {
self.error = err;
$ionicScrollDelegate.scrollTop();
} else {
$rootScope.$emit('Local/WalletImported', walletId);
notification.success(gettext('Success'), gettext('Your wallet has been imported correctly'));
@ -90,7 +88,6 @@ angular.module('copayApp.controllers').controller('importController',
} else {
self.error = err;
}
$ionicScrollDelegate.scrollTop();
return $timeout(function() {
$scope.$apply();
});
@ -116,7 +113,6 @@ angular.module('copayApp.controllers').controller('importController',
} else {
self.error = err;
}
$ionicScrollDelegate.scrollTop();
return $timeout(function() {
$scope.$apply();
});
@ -143,7 +139,6 @@ angular.module('copayApp.controllers').controller('importController',
this.importBlob = function(form) {
if (form.$invalid) {
this.error = gettext('There is an error in the form');
$ionicScrollDelegate.scrollTop();
$timeout(function() {
$scope.$apply();
});
@ -156,7 +151,6 @@ angular.module('copayApp.controllers').controller('importController',
if (!backupFile && !backupText) {
this.error = gettext('Please, select your backup file');
$ionicScrollDelegate.scrollTop();
$timeout(function() {
$scope.$apply();
});
@ -176,7 +170,6 @@ angular.module('copayApp.controllers').controller('importController',
this.importMnemonic = function(form) {
if (form.$invalid) {
this.error = gettext('There is an error in the form');
$ionicScrollDelegate.scrollTop();
$timeout(function() {
$scope.$apply();
});
@ -191,7 +184,6 @@ angular.module('copayApp.controllers').controller('importController',
var pathData = derivationPathHelper.parse($scope.derivationPath);
if (!pathData) {
this.error = gettext('Invalid derivation path');
$ionicScrollDelegate.scrollTop();
return;
}
opts.account = pathData.account;
@ -203,7 +195,6 @@ angular.module('copayApp.controllers').controller('importController',
if (!words) {
this.error = gettext('Please enter the recovery phrase');
$ionicScrollDelegate.scrollTop();
} else if (words.indexOf('xprv') == 0 || words.indexOf('tprv') == 0) {
return _importExtendedPrivateKey(words, opts);
} else {
@ -211,7 +202,6 @@ angular.module('copayApp.controllers').controller('importController',
if ((wordList.length % 3) != 0) {
this.error = gettext('Wrong number of recovery words:') + wordList.length;
$ionicScrollDelegate.scrollTop();
}
}
@ -234,7 +224,6 @@ angular.module('copayApp.controllers').controller('importController',
ongoingProcess.clear();
if (err) {
self.error = err;
$ionicScrollDelegate.scrollTop();
$scope.$apply();
return;
}
@ -248,7 +237,6 @@ angular.module('copayApp.controllers').controller('importController',
ongoingProcess.set('importingWallet', false);
if (err) {
self.error = err;
$ionicScrollDelegate.scrollTop();
return $timeout(function() {
$scope.$apply();
});
@ -263,7 +251,6 @@ angular.module('copayApp.controllers').controller('importController',
this.importHW = function(form) {
if (form.$invalid || $scope.account < 0) {
this.error = gettext('There is an error in the form');
$ionicScrollDelegate.scrollTop();
$timeout(function() {
$scope.$apply();
});
@ -277,7 +264,6 @@ angular.module('copayApp.controllers').controller('importController',
if (self.seedSourceId == 'trezor') {
if (account < 1) {
this.error = gettext('Invalid account number');
$ionicScrollDelegate.scrollTop();
return;
}
account = account - 1;
@ -313,7 +299,6 @@ angular.module('copayApp.controllers').controller('importController',
ongoingProcess.clear();
if (err) {
self.error = err;
$ionicScrollDelegate.scrollTop();
$scope.$apply();
return;
}
@ -327,7 +312,6 @@ angular.module('copayApp.controllers').controller('importController',
ongoingProcess.set('importingWallet', false);
if (err) {
self.error = err;
$ionicScrollDelegate.scrollTop();
return $timeout(function() {
$scope.$apply();
});

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('joinController',
function($scope, $rootScope, $timeout, $ionicScrollDelegate, go, notification, profileService, configService, storageService, applicationService, $modal, gettext, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess) {
function($scope, $rootScope, $timeout, go, notification, profileService, configService, storageService, applicationService, $modal, gettext, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess) {
var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel;
@ -55,7 +55,6 @@ angular.module('copayApp.controllers').controller('joinController',
this.join = function(form) {
if (form && form.$invalid) {
self.error = gettext('Please enter the required fields');
$ionicScrollDelegate.scrollTop();
return;
}
@ -78,7 +77,6 @@ angular.module('copayApp.controllers').controller('joinController',
var pathData = derivationPathHelper.parse($scope.derivationPath);
if (!pathData) {
this.error = gettext('Invalid derivation path');
$ionicScrollDelegate.scrollTop();
return;
}
opts.account = pathData.account;
@ -92,7 +90,6 @@ angular.module('copayApp.controllers').controller('joinController',
if (setSeed && !opts.mnemonic && !opts.extendedPrivateKey) {
this.error = gettext('Please enter the wallet recovery phrase');
$ionicScrollDelegate.scrollTop();
return;
}
@ -100,7 +97,6 @@ angular.module('copayApp.controllers').controller('joinController',
var account = $scope.account;
if (!account || account < 1) {
this.error = gettext('Invalid account number');
$ionicScrollDelegate.scrollTop();
return;
}
@ -115,7 +111,6 @@ angular.module('copayApp.controllers').controller('joinController',
ongoingProcess.set('connecting' + self.seedSourceId, false);
if (err) {
self.error = err;
$ionicScrollDelegate.scrollTop();
$scope.$apply();
return;
}
@ -135,7 +130,6 @@ angular.module('copayApp.controllers').controller('joinController',
if (err) {
ongoingProcess.set('joiningWallet', false);
self.error = err;
$ionicScrollDelegate.scrollTop();
$rootScope.$apply();
return;
}