Merge pull request #6901 from AndrewFerr/guest_register_toggle

pull/21833/head
Germain 2021-10-04 11:43:48 +01:00 committed by GitHub
commit b45cd4f59a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -35,6 +35,8 @@ import InviteReason from "../elements/InviteReason";
import { IOOBData } from "../../../stores/ThreepidInviteStore"; import { IOOBData } from "../../../stores/ThreepidInviteStore";
import Spinner from "../elements/Spinner"; import Spinner from "../elements/Spinner";
import AccessibleButton from "../elements/AccessibleButton"; import AccessibleButton from "../elements/AccessibleButton";
import { UIFeature } from "../../../settings/UIFeature";
import SettingsStore from "../../../settings/SettingsStore";
const MemberEventHtmlReasonField = "io.element.html_reason"; const MemberEventHtmlReasonField = "io.element.html_reason";
@ -339,8 +341,10 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
} }
case MessageCase.NotLoggedIn: { case MessageCase.NotLoggedIn: {
title = _t("Join the conversation with an account"); title = _t("Join the conversation with an account");
primaryActionLabel = _t("Sign Up"); if (SettingsStore.getValue(UIFeature.Registration)) {
primaryActionHandler = this.onRegisterClick; primaryActionLabel = _t("Sign Up");
primaryActionHandler = this.onRegisterClick;
}
secondaryActionLabel = _t("Sign In"); secondaryActionLabel = _t("Sign In");
secondaryActionHandler = this.onLoginClick; secondaryActionHandler = this.onLoginClick;
if (this.props.previewLoading) { if (this.props.previewLoading) {