mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 12:03:35 +08:00
Add spinners to login and signup forms
This commit is contained in:
parent
25caec0e62
commit
17f23adb78
|
@ -31,6 +31,9 @@ Discourse.LoginController = Discourse.Controller.extend(Discourse.ModalFunctiona
|
|||
return this.get('loggingIn') || this.blank('loginName') || this.blank('loginPassword');
|
||||
}.property('loginName', 'loginPassword', 'loggingIn'),
|
||||
|
||||
showSignupLink: function() {
|
||||
return !Discourse.SiteSettings.invite_only && !this.get('loggingIn');
|
||||
}.property('loggingIn'),
|
||||
|
||||
actions: {
|
||||
login: function() {
|
||||
|
|
|
@ -68,5 +68,8 @@
|
|||
|
||||
<div class="modal-footer">
|
||||
<button class='btn btn-large btn-primary' {{bindAttr disabled="submitDisabled"}} {{action createAccount}}>{{i18n create_account.title}}</button>
|
||||
{{#if formSubmitted}}
|
||||
<i class='fa fa-spinner fa-spin'></i>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/unless}}
|
|
@ -51,11 +51,15 @@
|
|||
<i class="fa fa-unlock"></i> {{loginButtonText}}
|
||||
</button>
|
||||
|
||||
{{#unless Discourse.SiteSettings.invite_only}}
|
||||
{{#if showSignupLink}}
|
||||
{{i18n create_account.invite}}
|
||||
<a id="new-account-link" {{action showCreateAccount}}>
|
||||
{{i18n create_account.action}}
|
||||
</a>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
{{#if loggingIn}}
|
||||
<i class='fa fa-spinner fa-spin'></i>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
Discourse.LoginView = Discourse.ModalBodyView.extend({
|
||||
templateName: 'modal/login',
|
||||
title: I18n.t('login.title'),
|
||||
classNames: ['login-modal'],
|
||||
|
||||
|
||||
mouseMove: function(e) {
|
||||
|
|
|
@ -19,6 +19,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
.login-modal {
|
||||
.fa-spinner {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
// Create account
|
||||
|
||||
#new-account-link {
|
||||
|
@ -46,4 +52,8 @@
|
|||
color: #888;
|
||||
}
|
||||
}
|
||||
|
||||
.fa-spinner {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user