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,8 +640,12 @@ export default class Registration extends React.Component<IProps, IState> {
let errorText; let errorText;
const err = this.state.errorText; const err = this.state.errorText;
if (err) { if (err) {
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>; errorText = <div className="mx_Login_error">{err}</div>;
} }
}
let serverDeadSection; let serverDeadSection;
if (!this.state.serverIsAlive) { if (!this.state.serverIsAlive) {