[MM-23909] better error message if url is empty (#4821)
This commit is contained in:
parent
7647367bcf
commit
b6fbcf2e7c
2 changed files with 14 additions and 0 deletions
|
|
@ -206,6 +206,19 @@ export default class SelectServer extends PureComponent {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!this.state.url || this.state.url.trim() === '') {
|
||||
this.setState({
|
||||
error: {
|
||||
intl: {
|
||||
id: t('mobile.server_url.empty'),
|
||||
defaultMessage: 'Please enter a valid server URL',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isValidUrl(this.sanitizeUrl(this.state.url))) {
|
||||
this.setState({
|
||||
error: {
|
||||
|
|
|
|||
|
|
@ -479,6 +479,7 @@
|
|||
"mobile.server_upgrade.dismiss": "Dismiss",
|
||||
"mobile.server_upgrade.learn_more": "Learn More",
|
||||
"mobile.server_upgrade.title": "Server upgrade required",
|
||||
"mobile.server_url.empty": "Please enter a valid server URL",
|
||||
"mobile.server_url.invalid_format": "URL must start with http:// or https://",
|
||||
"mobile.session_expired": "Session Expired: Please log in to continue receiving notifications. Sessions for {siteName} are configured to expire every {daysCount, number} {daysCount, plural, one {day} other {days}}.",
|
||||
"mobile.set_status.away": "Away",
|
||||
|
|
|
|||
Loading…
Reference in a new issue