Fix: hide unsupported login elements (#11185)
* hide unsupported login elements * Update src/components/structures/auth/Login.tsx Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --------- Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
2034cce235
commit
ce332d0f8b
3 changed files with 43 additions and 13 deletions
|
@ -392,19 +392,17 @@ export default class LoginComponent extends React.PureComponent<IProps, IState>
|
|||
// look for a flow where we understand all of the steps.
|
||||
const supportedFlows = flows.filter(this.isSupportedFlow);
|
||||
|
||||
if (supportedFlows.length > 0) {
|
||||
this.setState({
|
||||
flows: supportedFlows,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// we got to the end of the list without finding a suitable flow.
|
||||
this.setState({
|
||||
errorText: _t(
|
||||
"This homeserver doesn't offer any login flows which are supported by this client.",
|
||||
),
|
||||
flows: supportedFlows,
|
||||
});
|
||||
|
||||
if (supportedFlows.length === 0) {
|
||||
this.setState({
|
||||
errorText: _t(
|
||||
"This homeserver doesn't offer any login flows that are supported by this client.",
|
||||
),
|
||||
});
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
this.setState({
|
||||
|
|
|
@ -3569,7 +3569,7 @@
|
|||
"General failure": "General failure",
|
||||
"This homeserver does not support login using email address.": "This homeserver does not support login using email address.",
|
||||
"Failed to perform homeserver discovery": "Failed to perform homeserver discovery",
|
||||
"This homeserver doesn't offer any login flows which are supported by this client.": "This homeserver doesn't offer any login flows which are supported by this client.",
|
||||
"This homeserver doesn't offer any login flows that are supported by this client.": "This homeserver doesn't offer any login flows that are supported by this client.",
|
||||
"Syncing…": "Syncing…",
|
||||
"Signing In…": "Signing In…",
|
||||
"If you've joined lots of rooms, this might take a while": "If you've joined lots of rooms, this might take a while",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue