fix: SDA-2056: fix welcome screen button (#1011)

* SDA-2056: fix welcome screen button

- set url valid to true when setting welcome screen url from user config

Signed-off-by: Vishwas Shashidhar <vishwas.shashidhar@symphony.com>

* SDA-2056: trim url
This commit is contained in:
Vishwas Shashidhar 2020-06-03 10:51:32 +05:30 committed by GitHub
parent a711e8d98d
commit 21f15bb1a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -479,7 +479,7 @@ export class WindowHandler {
this.mainWindow.webContents.send('welcome', {
url: userConfigUrl || this.startUrl,
message: '',
urlValid: false,
urlValid: !!userConfigUrl,
sso: false,
});
}

View File

@ -100,7 +100,7 @@ export default class Welcome extends React.Component<{}, IState> {
* @param _event
*/
public updatePodUrl(_event): void {
const url = _event.target.value;
const url = _event.target.value.trim();
const match = url.match(/(https?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)/g) != null;
if (url === 'https://[POD].symphony.com' || !match) {
this.updateState(_event, {