mirror of https://github.com/BTCPrivate/copay.git
fix auto-focus and isMobile variable
This commit is contained in:
parent
2af28f0f1d
commit
ec99639323
|
@ -1,11 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, notification, pluginManager, identityService, pinService) {
|
||||
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, notification, pluginManager, identityService, pinService, isMobile) {
|
||||
|
||||
var _credentials, _firstpin;
|
||||
|
||||
$scope.init = function() {
|
||||
identityService.goWalletHome();
|
||||
$scope.isMobile = isMobile.any();
|
||||
|
||||
pinService.makePinInput($scope, 'newpin', function(newValue) {
|
||||
_firstpin = newValue;
|
||||
|
@ -88,7 +89,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
} else {
|
||||
$scope.error = null;
|
||||
// mobile
|
||||
if (isMobile.any()) {
|
||||
if ($scope.isMobile) {
|
||||
_credentials = {
|
||||
email: form.email.$modelValue,
|
||||
password: form.password.$modelValue,
|
||||
|
|
|
@ -6,6 +6,8 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
|||
var _credentials, _firstpin;
|
||||
|
||||
$scope.init = function() {
|
||||
$scope.isMobile = isMobile.any();
|
||||
|
||||
// This is only for backwards compat, insight api should link to #!/confirmed directly
|
||||
if (getParam('confirmed')) {
|
||||
var hashIndex = window.location.href.indexOf('/?');
|
||||
|
@ -158,7 +160,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
|||
$scope.confirmedEmail = false;
|
||||
|
||||
// mobile
|
||||
if (isMobile.any() && !$rootScope.hasPin) {
|
||||
if ($scope.isMobile && !$rootScope.hasPin) {
|
||||
$scope.done();
|
||||
_credentials = {
|
||||
email: email,
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<div class="panel">
|
||||
<label><span translate>Wallet name</span>
|
||||
<div class="input">
|
||||
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" ng-model="walletName" auto-focus>
|
||||
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" ng-model="walletName">
|
||||
<i class="icon-wallet"></i>
|
||||
</div>
|
||||
</label>
|
||||
|
|
|
@ -46,7 +46,8 @@
|
|||
!profileForm.email.$pristine"><i class="fi-check"></i></span>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="email" ng-model="email" class="form-control fi-email" name="email" placeholder="Email" required auto-focus>
|
||||
<input type="email" ng-model="email" class="form-control fi-email" name="email" placeholder="Email"
|
||||
show-focus="!isMobile" required>
|
||||
<i class="icon-email"></i>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue