mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 17:31:36 -06:00
Merge pull request #1249 from johankwarnmarksymphony/sda-3192
fix: sda-3192 option+command+3 use bff-daily
This commit is contained in:
commit
9af4cd164f
@ -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 {
|
||||
|
@ -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}`;
|
||||
|
Loading…
Reference in New Issue
Block a user