mirror of
https://github.com/discourse/discourse.git
synced 2025-03-22 16:45:32 +08:00
DEV: Add 'multiple' class to login-buttons when there are multiple btns (#28649)
This commit is contained in:
parent
06fdd9af1f
commit
3e320ce225
@ -4,7 +4,7 @@ import { isWebauthnSupported } from "discourse/lib/webauthn";
|
||||
import { findAll } from "discourse/models/login-method";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
@classNameBindings("hidden")
|
||||
@classNameBindings("hidden", "multiple")
|
||||
export default class LoginButtons extends Component {
|
||||
elementId = "login-buttons";
|
||||
|
||||
@ -17,6 +17,11 @@ export default class LoginButtons extends Component {
|
||||
return buttonsCount === 0 && !showLoginWithEmailLink && !showPasskeysButton;
|
||||
}
|
||||
|
||||
@discourseComputed("buttons.length")
|
||||
multiple(buttonsCount) {
|
||||
return buttonsCount > 1;
|
||||
}
|
||||
|
||||
@discourseComputed
|
||||
buttons() {
|
||||
return findAll();
|
||||
|
Loading…
x
Reference in New Issue
Block a user