Skip to content

Commit

Permalink
SDA-4507 - Force welcome screen in user config url is not configured …
Browse files Browse the repository at this point in the history
…correctly
  • Loading branch information
KiranNiranjan committed Mar 25, 2024
1 parent c015fc2 commit c2c4202
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/app/window-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ export class WindowHandler {
(this.globalConfig.url.includes(this.defaultUrl) &&
config.isFirstTimeLaunch()) ||
!!this.config.enableBrowserLogin;
// Force welcome screen if pod url is not configured correctly
if (
!!this.userConfig.url &&
this.userConfig.url.includes(this.defaultUrl)
) {
this.shouldShowWelcomeScreen = true;
}

this.windowOpts = {
...this.getWindowOpts(
Expand Down Expand Up @@ -596,11 +603,13 @@ export class WindowHandler {
if (this.mainWebContents && !this.mainWebContents.isDestroyed()) {
// Load welcome screen
if (this.shouldShowWelcomeScreen && !this.didShowWelcomeScreen) {
const podUrl = this.userConfig.url
? this.userConfig.url
: !this.globalConfig.url.includes(this.defaultUrl)
? this.globalConfig.url
: undefined;
const podUrl =
this.userConfig.url &&
!this.userConfig.url.includes(this.defaultUrl)
? this.userConfig.url
: !this.globalConfig.url.includes(this.defaultUrl)
? this.globalConfig.url
: undefined;
this.mainWebContents.send('page-load-welcome', {
locale: i18n.getLocale(),
resources: i18n.loadedResources,
Expand Down

0 comments on commit c2c4202

Please sign in to comment.