SDA-4494 - Force welcome screen in user config url is not configured correctly (#2107)

This commit is contained in:
Kiran Niranjan 2024-03-12 10:50:22 +05:30 committed by GitHub
parent 542ead3638
commit 3942361010
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -287,6 +287,9 @@ export class WindowHandler {
(this.globalConfig.url.includes(this.defaultUrl) && (this.globalConfig.url.includes(this.defaultUrl) &&
config.isFirstTimeLaunch()) || config.isFirstTimeLaunch()) ||
!!this.config.enableBrowserLogin; !!this.config.enableBrowserLogin;
// Force welcome screen if pod url is not configured correctly
this.shouldShowWelcomeScreen =
!!this.userConfig.url && this.userConfig.url.includes(this.defaultUrl);
this.windowOpts = { this.windowOpts = {
...this.getWindowOpts( ...this.getWindowOpts(
@ -596,11 +599,13 @@ export class WindowHandler {
if (this.mainWebContents && !this.mainWebContents.isDestroyed()) { if (this.mainWebContents && !this.mainWebContents.isDestroyed()) {
// Load welcome screen // Load welcome screen
if (this.shouldShowWelcomeScreen && !this.didShowWelcomeScreen) { if (this.shouldShowWelcomeScreen && !this.didShowWelcomeScreen) {
const podUrl = this.userConfig.url const podUrl =
? this.userConfig.url this.userConfig.url &&
: !this.globalConfig.url.includes(this.defaultUrl) !this.userConfig.url.includes(this.defaultUrl)
? this.globalConfig.url ? this.userConfig.url
: undefined; : !this.globalConfig.url.includes(this.defaultUrl)
? this.globalConfig.url
: undefined;
this.mainWebContents.send('page-load-welcome', { this.mainWebContents.send('page-load-welcome', {
locale: i18n.getLocale(), locale: i18n.getLocale(),
resources: i18n.loadedResources, resources: i18n.loadedResources,