mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-31 19:27:00 -06:00
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:
parent
a711e8d98d
commit
21f15bb1a3
@ -479,7 +479,7 @@ export class WindowHandler {
|
|||||||
this.mainWindow.webContents.send('welcome', {
|
this.mainWindow.webContents.send('welcome', {
|
||||||
url: userConfigUrl || this.startUrl,
|
url: userConfigUrl || this.startUrl,
|
||||||
message: '',
|
message: '',
|
||||||
urlValid: false,
|
urlValid: !!userConfigUrl,
|
||||||
sso: false,
|
sso: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ export default class Welcome extends React.Component<{}, IState> {
|
|||||||
* @param _event
|
* @param _event
|
||||||
*/
|
*/
|
||||||
public updatePodUrl(_event): void {
|
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;
|
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) {
|
if (url === 'https://[POD].symphony.com' || !match) {
|
||||||
this.updateState(_event, {
|
this.updateState(_event, {
|
||||||
|
Loading…
Reference in New Issue
Block a user