From a562bb053cd49ddc529ce10ed2c19a68fb2b7ff7 Mon Sep 17 00:00:00 2001 From: Johan Kwarnmark Date: Fri, 6 Aug 2021 11:43:32 +0200 Subject: [PATCH] sda-3192 option+command+3 use bff-daily --- src/app/version-handler.ts | 6 +++--- src/app/window-handler.ts | 12 ++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/app/version-handler.ts b/src/app/version-handler.ts index c8cab8ba..be002e5c 100644 --- a/src/app/version-handler.ts +++ b/src/app/version-handler.ts @@ -182,9 +182,9 @@ class VersionHandler { /* Get SFE version */ let urlSfeVersion: string; - if (mainUrl?.includes('/client-bff/')) { - urlSfeVersion = mainUrl?.includes('/client-bff/daily/') - ? `${protocol}//${hostname}/client-bff/daily/version.json` + if (mainUrl?.includes('bff')) { + urlSfeVersion = mainUrl?.includes('/daily/') + ? `${protocol}//${hostname}/bff-daily/daily/version.json` : `${protocol}//${hostname}/client-bff/version.json`; this.versionInfo.sfeClientType = '2.0'; } else { diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 359e7621..f8b75389 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -948,10 +948,8 @@ export class WindowHandler { this.aboutAppWindow.webContents.once('did-finish-load', async () => { let client = ''; if (this.url && this.url.startsWith('https://corporate.symphony.com')) { - const manaPath = 'client-bff'; - const daily = 'daily'; - client = this.url.includes(manaPath) - ? this.url.includes(daily) + client = this.url.includes('bff') + ? this.url.includes('daily') ? 'Symphony 2.0 - Daily' : 'Symphony 2.0' : 'Symphony Classic'; @@ -1960,8 +1958,6 @@ export class WindowHandler { this.url = this.globalConfig.url; } const parsedUrl = parse(this.url); - const manaPath = 'client-bff'; - const manaChannel = 'daily'; const csrfToken = await this.mainWindow.webContents.executeJavaScript( `localStorage.getItem('x-km-csrf-token')`, ); @@ -1970,10 +1966,10 @@ export class WindowHandler { this.url = this.startUrl + `?x-km-csrf-token=${csrfToken}`; break; case ClientSwitchType.CLIENT_2_0: - this.url = `https://${parsedUrl.hostname}/${manaPath}/index.html?x-km-csrf-token=${csrfToken}`; + this.url = `https://${parsedUrl.hostname}/client-bff/index.html?x-km-csrf-token=${csrfToken}`; break; case ClientSwitchType.CLIENT_2_0_DAILY: - this.url = `https://${parsedUrl.hostname}/${manaPath}/${manaChannel}/index.html?x-km-csrf-token=${csrfToken}`; + this.url = `https://${parsedUrl.hostname}/bff-daily/daily/index.html?x-km-csrf-token=${csrfToken}`; break; default: this.url = this.globalConfig.url + `?x-km-csrf-token=${csrfToken}`;