mirror of
https://github.com/Foltik/Shimapan
synced 2025-01-05 15:58:03 -05:00
Update button shake for registering
This commit is contained in:
parent
695696965c
commit
d3de95c5dc
@ -11,7 +11,7 @@ angular.module('LoginComp', ['AuthSvc']).component('loginComponent', {
|
||||
$scope.error = true;
|
||||
$timeout(function() {
|
||||
$scope.error = false;
|
||||
},820);
|
||||
}, 820);
|
||||
});
|
||||
};
|
||||
}]
|
||||
|
@ -2,12 +2,17 @@ var angular = require('angular');
|
||||
|
||||
angular.module('RegisterComp', ['AuthSvc']).component('registerComponent', {
|
||||
templateUrl: '/views/shimapan/register-form.html',
|
||||
controller: ['$scope', 'AuthService', function ($scope, AuthService) {
|
||||
controller: ['$scope', '$timeout', 'AuthService', function ($scope, $timeout, AuthService) {
|
||||
$scope.register = function () {
|
||||
AuthService.register({
|
||||
username: $scope.username,
|
||||
password: $scope.password,
|
||||
invite: $scope.invite
|
||||
}).catch(function() {
|
||||
$scope.error = true;
|
||||
$timeout(function() {
|
||||
$scope.error = false
|
||||
}, 820);
|
||||
});
|
||||
};
|
||||
}]
|
||||
|
@ -4,7 +4,7 @@
|
||||
<form ng-submit="login()">
|
||||
<input id="username" placeholder="Username" class="form-control" type="text" ng-model="username"/>
|
||||
<input id="password" placeholder="Password" class="form-control" type="password" ng-model="password"/>
|
||||
<button type="submit" class="btn" ng-class="{shake: error, noshake: !error}">Submit</button>
|
||||
<button type="submit" class="btn" ng-class="{shake: error}">Submit</button>
|
||||
</form>
|
||||
</fieldset>
|
||||
</div>
|
@ -5,7 +5,7 @@
|
||||
<input id="username" placeholder="Username" class="form-control" type="text" ng-model="username"/>
|
||||
<input id="password" placeholder="Password" class="form-control" type="password" ng-model="password"/>
|
||||
<input id="invite" placeholder="Invite Code" class="form-control" type="text" ng-model="invite"/>
|
||||
<button type="submit" class="btn">Submit</button>
|
||||
<button type="submit" class="btn" ng-class="{shake: error}">Submit</button>
|
||||
</form>
|
||||
</fieldset>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user