A platform for community discussion. Free, open, simple.
DEV: Add 'multiple' class to login-buttons when there are multiple btns (#28649)
Mark VanLandingham3e320ce225a4
diff --git a/app/assets/javascripts/discourse/app/components/login-buttons.js b/app/assets/javascripts/discourse/app/components/login-buttons.jsindex cd4ad997cba..f395f62b9d7 100644--- a/app/assets/javascripts/discourse/app/components/login-buttons.js+++ b/app/assets/javascripts/discourse/app/components/login-buttons.js@@ -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;+ }+@discourseComputedbuttons() {return findAll();