Merge pull request #779 from kethinov/issue-438

Improve error messages on add new server dialog
This commit is contained in:
Yuya Ochiai
2018-05-01 23:08:10 +09:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -50,6 +50,8 @@ Release date: TBD
[#707](https://github.com/mattermost/desktop/issues/707) [#707](https://github.com/mattermost/desktop/issues/707)
- Fixed an issue that prevented typing in the form fields on the add server dialog when launched from the tab bar. - Fixed an issue that prevented typing in the form fields on the add server dialog when launched from the tab bar.
[#780](https://github.com/mattermost/desktop/issues/780) [#780](https://github.com/mattermost/desktop/issues/780)
- Fixed an issue that could cause an error message on the add new server dialog to be misleading.
[#438](https://github.com/mattermost/desktop/issues/438)
#### Windows #### Windows
- Fixed `file://` protocol not working. But localhost URL will not continue to work. - Fixed `file://` protocol not working. But localhost URL will not continue to work.

View File

@@ -68,7 +68,17 @@ export default class NewTeamModal extends React.Component {
} }
getError() { getError() {
return this.getTeamNameValidationError() || this.getTeamUrlValidationError(); const nameError = this.getTeamNameValidationError();
const urlError = this.getTeamUrlValidationError();
if (nameError && urlError) {
return 'Name and URL are required.';
} else if (nameError) {
return nameError;
} else if (urlError) {
return urlError;
}
return null;
} }
validateForm() { validateForm() {