Remove 'try the app' link from login
Fixes https://github.com/vector-im/riot-web/issues/8384 This will be re-addressed in https://github.com/vector-im/riot-web/issues/9388 or similar. Because the implementation is undefined, the dead code is being removed instead of just left dead.
This commit is contained in:
parent
6a8b98eb71
commit
650185e578
3 changed files with 0 additions and 45 deletions
|
@ -2032,7 +2032,6 @@ export default React.createClass({
|
||||||
fallbackHsUrl={this.getFallbackHsUrl()}
|
fallbackHsUrl={this.getFallbackHsUrl()}
|
||||||
defaultDeviceDisplayName={this.props.defaultDeviceDisplayName}
|
defaultDeviceDisplayName={this.props.defaultDeviceDisplayName}
|
||||||
onForgotPasswordClick={this.onForgotPasswordClick}
|
onForgotPasswordClick={this.onForgotPasswordClick}
|
||||||
enableGuest={this.props.enableGuest}
|
|
||||||
onServerConfigChange={this.onServerConfigChange}
|
onServerConfigChange={this.onServerConfigChange}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -54,8 +54,6 @@ module.exports = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
onLoggedIn: PropTypes.func.isRequired,
|
onLoggedIn: PropTypes.func.isRequired,
|
||||||
|
|
||||||
enableGuest: PropTypes.bool,
|
|
||||||
|
|
||||||
// The default server name to use when the user hasn't specified
|
// The default server name to use when the user hasn't specified
|
||||||
// one. If set, `defaultHsUrl` and `defaultHsUrl` were derived for this
|
// one. If set, `defaultHsUrl` and `defaultHsUrl` were derived for this
|
||||||
// via `.well-known` discovery. The server name is used instead of the
|
// via `.well-known` discovery. The server name is used instead of the
|
||||||
|
@ -225,37 +223,6 @@ module.exports = React.createClass({
|
||||||
}).done();
|
}).done();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onLoginAsGuestClick: function(ev) {
|
|
||||||
ev.preventDefault();
|
|
||||||
ev.stopPropagation();
|
|
||||||
|
|
||||||
const self = this;
|
|
||||||
self.setState({
|
|
||||||
busy: true,
|
|
||||||
errorText: null,
|
|
||||||
loginIncorrect: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
this._loginLogic.loginAsGuest().then(function(data) {
|
|
||||||
self.props.onLoggedIn(data);
|
|
||||||
}, function(error) {
|
|
||||||
let errorText;
|
|
||||||
if (error.httpStatus === 403) {
|
|
||||||
errorText = _t("Guest access is disabled on this homeserver.");
|
|
||||||
} else {
|
|
||||||
errorText = self._errorTextFromError(error);
|
|
||||||
}
|
|
||||||
self.setState({
|
|
||||||
errorText: errorText,
|
|
||||||
loginIncorrect: false,
|
|
||||||
});
|
|
||||||
}).finally(function() {
|
|
||||||
self.setState({
|
|
||||||
busy: false,
|
|
||||||
});
|
|
||||||
}).done();
|
|
||||||
},
|
|
||||||
|
|
||||||
onUsernameChanged: function(username) {
|
onUsernameChanged: function(username) {
|
||||||
this.setState({ username: username });
|
this.setState({ username: username });
|
||||||
},
|
},
|
||||||
|
@ -627,14 +594,6 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
const errorText = this.props.defaultServerDiscoveryError || this.state.discoveryError || this.state.errorText;
|
const errorText = this.props.defaultServerDiscoveryError || this.state.discoveryError || this.state.errorText;
|
||||||
|
|
||||||
let loginAsGuestJsx;
|
|
||||||
if (this.props.enableGuest) {
|
|
||||||
loginAsGuestJsx =
|
|
||||||
<a className="mx_AuthBody_changeFlow" onClick={this._onLoginAsGuestClick} href="#">
|
|
||||||
{ _t('Try the app first') }
|
|
||||||
</a>;
|
|
||||||
}
|
|
||||||
|
|
||||||
let errorTextSection;
|
let errorTextSection;
|
||||||
if (errorText) {
|
if (errorText) {
|
||||||
errorTextSection = (
|
errorTextSection = (
|
||||||
|
@ -658,7 +617,6 @@ module.exports = React.createClass({
|
||||||
<a className="mx_AuthBody_changeFlow" onClick={this.onRegisterClick} href="#">
|
<a className="mx_AuthBody_changeFlow" onClick={this.onRegisterClick} href="#">
|
||||||
{ _t('Create account') }
|
{ _t('Create account') }
|
||||||
</a>
|
</a>
|
||||||
{ loginAsGuestJsx }
|
|
||||||
</AuthBody>
|
</AuthBody>
|
||||||
</AuthPage>
|
</AuthPage>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1478,7 +1478,6 @@
|
||||||
"Please <a>contact your service administrator</a> to continue using this service.": "Please <a>contact your service administrator</a> to continue using this service.",
|
"Please <a>contact your service administrator</a> to continue using this service.": "Please <a>contact your service administrator</a> to continue using this service.",
|
||||||
"Incorrect username and/or password.": "Incorrect username and/or password.",
|
"Incorrect username and/or password.": "Incorrect username and/or password.",
|
||||||
"Please note you are logging into the %(hs)s server, not matrix.org.": "Please note you are logging into the %(hs)s server, not matrix.org.",
|
"Please note you are logging into the %(hs)s server, not matrix.org.": "Please note you are logging into the %(hs)s server, not matrix.org.",
|
||||||
"Guest access is disabled on this homeserver.": "Guest access is disabled on this homeserver.",
|
|
||||||
"Failed to perform homeserver discovery": "Failed to perform homeserver discovery",
|
"Failed to perform homeserver discovery": "Failed to perform homeserver discovery",
|
||||||
"The phone number entered looks invalid": "The phone number entered looks invalid",
|
"The phone number entered looks invalid": "The phone number entered looks invalid",
|
||||||
"Unknown failure discovering homeserver": "Unknown failure discovering homeserver",
|
"Unknown failure discovering homeserver": "Unknown failure discovering homeserver",
|
||||||
|
@ -1487,7 +1486,6 @@
|
||||||
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.",
|
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.",
|
||||||
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.",
|
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.",
|
||||||
"Sign in with single sign-on": "Sign in with single sign-on",
|
"Sign in with single sign-on": "Sign in with single sign-on",
|
||||||
"Try the app first": "Try the app first",
|
|
||||||
"Create account": "Create account",
|
"Create account": "Create account",
|
||||||
"Failed to fetch avatar URL": "Failed to fetch avatar URL",
|
"Failed to fetch avatar URL": "Failed to fetch avatar URL",
|
||||||
"Set a display name:": "Set a display name:",
|
"Set a display name:": "Set a display name:",
|
||||||
|
|
Loading…
Reference in a new issue