mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Apply suggestions from code review
Co-Authored-By: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
c96dd9715a
commit
aec622d5d0
@ -75,20 +75,14 @@ export async function startAnyRegistrationFlow(options) {
|
||||
description: _t("Use your account or create a new one to continue."),
|
||||
button: _t("Create Account"),
|
||||
extraButtons: [
|
||||
<button key="start_login"
|
||||
onClick={() => {
|
||||
<button key="start_login" onClick={() => {
|
||||
modal.close();
|
||||
dis.dispatch({action: 'start_login',
|
||||
screenAfterLogin: options.screen_after});
|
||||
}
|
||||
}>
|
||||
{ _t('Sign In') }
|
||||
</button>,
|
||||
dis.dispatch({action: 'start_login', screenAfterLogin: options.screen_after});
|
||||
}}>{ _t('Sign In') }</button>,
|
||||
],
|
||||
onFinished: (proceed) => {
|
||||
if (proceed) {
|
||||
dis.dispatch({action: 'start_registration',
|
||||
screenAfterLogin: options.screen_after});
|
||||
dis.dispatch({action: 'start_registration', screenAfterLogin: options.screen_after});
|
||||
} else if (options.go_home_on_cancel) {
|
||||
dis.dispatch({action: 'view_home_page'});
|
||||
} else if (options.go_welcome_on_cancel) {
|
||||
|
@ -481,8 +481,7 @@ export default createReactClass({
|
||||
group_id: groupId,
|
||||
},
|
||||
});
|
||||
dis.dispatch({action: 'require_registration',
|
||||
screen_after: {screen: `group/${groupId}`}});
|
||||
dis.dispatch({action: 'require_registration', screen_after: {screen: `group/${groupId}`}});
|
||||
willDoOnboarding = true;
|
||||
}
|
||||
if (stateKey === GroupStore.STATE_KEY.Summary) {
|
||||
@ -727,8 +726,7 @@ export default createReactClass({
|
||||
|
||||
_onJoinClick: async function() {
|
||||
if (this._matrixClient.isGuest()) {
|
||||
dis.dispatch({action: 'require_registration',
|
||||
screen_after: {screen: `group/${this.props.groupId}`}});
|
||||
dis.dispatch({action: 'require_registration', screen_after: {screen: `group/${this.props.groupId}`}});
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1008,11 +1008,10 @@ export default createReactClass({
|
||||
// needs to be reset so that they can revisit /user/.. // (and trigger
|
||||
// `_chatCreateOrReuse` again)
|
||||
go_welcome_on_cancel: true,
|
||||
screen_after: {screen: `user/${this.props.config.welcomeUserId}`,
|
||||
params: {
|
||||
action: 'chat',
|
||||
},
|
||||
},
|
||||
screen_after: {
|
||||
screen: `user/${this.props.config.welcomeUserId}`,
|
||||
params: { action: 'chat' },
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user