feat: Handle private.coffee server registration error

Adds a specific link for registration when an error occurs on
the "private.coffee" server, guiding users to a dedicated page
for account creation.

Improves user experience by providing a tailored response
to server-specific conditions.
This commit is contained in:
Kumi 2024-11-30 20:00:27 +01:00
parent 2b4ce627b8
commit 012d0e675b
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -640,7 +640,11 @@ export default class Registration extends React.Component<IProps, IState> {
let errorText;
const err = this.state.errorText;
if (err) {
errorText = <div className="mx_Login_error">{err}</div>;
if (this.state.matrixClient.baseUrl == "https://matrix.private.coffee") {
errorText = <a href="https://register.matrix.private.coffee">Click here to register an account</a>;
} else {
errorText = <div className="mx_Login_error">{err}</div>;
}
}
let serverDeadSection;