pull/21833/head
Michael Telatynski 2020-11-25 10:39:44 +00:00
parent 1b1c482f9c
commit c4084196d1
5 changed files with 7 additions and 24 deletions

View File

@ -20,7 +20,6 @@ import {MatrixClient} from "matrix-js-sdk/src/client";
import * as sdk from '../../../index';
import { _t, _td } from '../../../languageHandler';
import SdkConfig from '../../../SdkConfig';
import { messageForResourceLimitError } from '../../../utils/ErrorUtils';
import AutoDiscoveryUtils, {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils";
import classNames from "classnames";

View File

@ -30,7 +30,6 @@ import PassphraseField from "./PassphraseField";
import CountlyAnalytics from "../../../CountlyAnalytics";
import Field from '../elements/Field';
import RegistrationEmailPromptDialog from '../dialogs/RegistrationEmailPromptDialog';
import QuestionDialog from '../dialogs/QuestionDialog';
enum RegistrationField {
Email = "field_email",

View File

@ -189,7 +189,7 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
{_t("Use your preferred Matrix homeserver if you have one, or host your own.")}
</p>
<AccessibleButton kind="primary" onClick={this.onSubmit}>
<AccessibleButton className="mx_ServerPickerDialog_continue" kind="primary" onClick={this.onSubmit}>
{_t("Continue")}
</AccessibleButton>

View File

@ -2324,9 +2324,6 @@
"Add an email to be able to reset your password.": "Add an email to be able to reset your password.",
"Use email or phone to optionally be discoverable by existing contacts.": "Use email or phone to optionally be discoverable by existing contacts.",
"Use email to optionally be discoverable by existing contacts.": "Use email to optionally be discoverable by existing contacts.",
"Enter your custom homeserver URL <a>What does this mean?</a>": "Enter your custom homeserver URL <a>What does this mean?</a>",
"Homeserver URL": "Homeserver URL",
"Other servers": "Other servers",
"Sign in with SSO": "Sign in with SSO",
"Couldn't load page": "Couldn't load page",
"You must <a>register</a> to use this functionality": "You must <a>register</a> to use this functionality",
@ -2515,8 +2512,6 @@
"Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.",
"This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.",
"That username already exists, please try another.": "That username already exists, please try another.",
"Host account on": "Host account on",
"Decide where your account is hosted": "Decide where your account is hosted",
"Continue with": "Continue with",
"Or": "Or",
"Already have an account? <a>Sign in here</a>": "Already have an account? <a>Sign in here</a>",
@ -2526,6 +2521,8 @@
"You can now close this window or <a>log in</a> to your new account.": "You can now close this window or <a>log in</a> to your new account.",
"Registration Successful": "Registration Successful",
"Create account": "Create account",
"Host account on": "Host account on",
"Decide where your account is hosted": "Decide where your account is hosted",
"Use Recovery Key or Passphrase": "Use Recovery Key or Passphrase",
"Use Recovery Key": "Use Recovery Key",
"Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.": "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.",

View File

@ -22,24 +22,12 @@ module.exports = async function signup(session, username, password, homeserver)
await session.goto(session.url('/#/register'));
// change the homeserver by clicking the advanced section
if (homeserver) {
const advancedButton = await session.query('.mx_ServerTypeSelector_type_Advanced');
await advancedButton.click();
const changeButton = await session.query('.mx_ServerPicker_change');
await changeButton.click();
// depending on what HS is configured as the default, the advanced registration
// goes the HS/IS entry directly (for matrix.org) or takes you to the user/pass entry (not matrix.org).
// To work with both, we look for the "Change" link in the user/pass entry but don't fail when we can't find it
// As this link should be visible immediately, and to not slow down the case where it isn't present,
// pick a lower timeout of 5000ms
try {
const changeHsField = await session.query('.mx_AuthBody_editServerDetails', 5000);
if (changeHsField) {
await changeHsField.click();
}
} catch (err) {}
const hsInputField = await session.query('#mx_ServerConfig_hsUrl');
const hsInputField = await session.query('.mx_ServerPickerDialog_otherHomeserver');
await session.replaceInputText(hsInputField, homeserver);
const nextButton = await session.query('.mx_Login_submit');
const nextButton = await session.query('.mx_ServerPickerDialog_continue');
// accept homeserver
await nextButton.click();
}