From 7382a5edab07c2ad328a2a391b51f47c5a8cdabf Mon Sep 17 00:00:00 2001 From: NguyenTranHoangSym Date: Tue, 28 Mar 2023 10:53:51 +0700 Subject: [PATCH] SDA-4113: Add url from CMD --- src/app/window-handler.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 695d1f8f..e9e74ec8 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -550,20 +550,17 @@ export class WindowHandler { if (this.mainWebContents && !this.mainWebContents.isDestroyed()) { // Load welcome screen if (this.shouldShowWelcomeScreen && !this.didShowWelcomeScreen) { - const userConfigUrl = - this.userConfig.url && - this.userConfig.url.indexOf('/login/sso/initsso') > -1 - ? this.userConfig.url.slice( - 0, - this.userConfig.url.indexOf('/login/sso/initsso'), - ) - : this.userConfig.url; + const defaultUrl = 'my.symphony.com'; + const podUrl = this.userConfig.url + ? this.userConfig.url + : !this.globalConfig.url.includes(defaultUrl) && + this.globalConfig.url; this.mainWebContents.send('page-load-welcome', { locale: i18n.getLocale(), resources: i18n.loadedResources, }); this.mainWebContents.send('welcome', { - url: userConfigUrl, + url: podUrl, message: '', urlValid: !!userConfigUrl, isPodConfigured: this.isPodConfigured && !!userConfigUrl,