Merge pull request #1249 from johankwarnmarksymphony/sda-3192

fix: sda-3192 option+command+3 use bff-daily
This commit is contained in:
Johan Kwarnmark 2021-08-06 13:17:47 +02:00 committed by GitHub
commit 9af4cd164f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 11 deletions

View File

@ -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 {

View File

@ -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}`;