You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-05 15:22:09 +03:00
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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user