mirror of
https://github.com/discourse/discourse.git
synced 2025-03-24 04:06:39 +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 { findAll } from "discourse/models/login-method";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
@classNameBindings("hidden")
|
@classNameBindings("hidden", "multiple")
|
||||||
export default class LoginButtons extends Component {
|
export default class LoginButtons extends Component {
|
||||||
elementId = "login-buttons";
|
elementId = "login-buttons";
|
||||||
|
|
||||||
@ -17,6 +17,11 @@ export default class LoginButtons extends Component {
|
|||||||
return buttonsCount === 0 && !showLoginWithEmailLink && !showPasskeysButton;
|
return buttonsCount === 0 && !showLoginWithEmailLink && !showPasskeysButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@discourseComputed("buttons.length")
|
||||||
|
multiple(buttonsCount) {
|
||||||
|
return buttonsCount > 1;
|
||||||
|
}
|
||||||
|
|
||||||
@discourseComputed
|
@discourseComputed
|
||||||
buttons() {
|
buttons() {
|
||||||
return findAll();
|
return findAll();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user