mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-25 02:10:32 -06:00
SDA-4482 Auto-update should check value defined in user config (#2098)
This commit is contained in:
parent
db0d878747
commit
2ad44b0ef4
@ -298,6 +298,10 @@ export class AppMenu {
|
|||||||
*/
|
*/
|
||||||
private buildAboutMenu(): Electron.MenuItemConstructorOptions {
|
private buildAboutMenu(): Electron.MenuItemConstructorOptions {
|
||||||
logger.info(`app-menu: building about menu`);
|
logger.info(`app-menu: building about menu`);
|
||||||
|
const isCorp =
|
||||||
|
(windowHandler.url &&
|
||||||
|
windowHandler.url.startsWith('https://corporate.symphony.com')) ||
|
||||||
|
false;
|
||||||
return {
|
return {
|
||||||
id: menuSections.about,
|
id: menuSections.about,
|
||||||
label: app.getName(),
|
label: app.getName(),
|
||||||
@ -320,7 +324,9 @@ export class AppMenu {
|
|||||||
isMac &&
|
isMac &&
|
||||||
!!(
|
!!(
|
||||||
(isAutoUpdateEnabled || forceAutoUpdate) &&
|
(isAutoUpdateEnabled || forceAutoUpdate) &&
|
||||||
(betaAutoUpdateChannelEnabled || latestAutoUpdateChannelEnabled)
|
(betaAutoUpdateChannelEnabled ||
|
||||||
|
latestAutoUpdateChannelEnabled ||
|
||||||
|
isCorp)
|
||||||
) &&
|
) &&
|
||||||
!!windowHandler.isMana,
|
!!windowHandler.isMana,
|
||||||
label: i18n.t('Check for updates')(),
|
label: i18n.t('Check for updates')(),
|
||||||
@ -725,7 +731,9 @@ export class AppMenu {
|
|||||||
isWindowsOS &&
|
isWindowsOS &&
|
||||||
!!(
|
!!(
|
||||||
(isAutoUpdateEnabled || forceAutoUpdate) &&
|
(isAutoUpdateEnabled || forceAutoUpdate) &&
|
||||||
(betaAutoUpdateChannelEnabled || latestAutoUpdateChannelEnabled)
|
(betaAutoUpdateChannelEnabled ||
|
||||||
|
latestAutoUpdateChannelEnabled ||
|
||||||
|
isCorp)
|
||||||
) &&
|
) &&
|
||||||
!!windowHandler.isMana,
|
!!windowHandler.isMana,
|
||||||
label: i18n.t('Check for updates')(),
|
label: i18n.t('Check for updates')(),
|
||||||
|
@ -255,6 +255,16 @@ export class AutoUpdate {
|
|||||||
this.finalAutoUpdateChannel = autoUpdateChannel;
|
this.finalAutoUpdateChannel = autoUpdateChannel;
|
||||||
this.installVariant = installVariant;
|
this.installVariant = installVariant;
|
||||||
|
|
||||||
|
const isCorp =
|
||||||
|
(windowHandler?.url &&
|
||||||
|
windowHandler.url.startsWith('https://corporate.symphony.com')) ||
|
||||||
|
false;
|
||||||
|
|
||||||
|
// Corp should keep the ability to get auto-update channel from user config as top prio
|
||||||
|
if (isCorp && this.finalAutoUpdateChannel !== UpdateChannel.LATEST) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const pmp = config.getFilteredCloudConfigFields([
|
const pmp = config.getFilteredCloudConfigFields([
|
||||||
'sdaInstallerMsiUrlEnabledVisible',
|
'sdaInstallerMsiUrlEnabledVisible',
|
||||||
'sdaInstallerMsiUrlBetaEnabledVisible',
|
'sdaInstallerMsiUrlBetaEnabledVisible',
|
||||||
|
@ -1348,6 +1348,7 @@ export const loadBrowserViews = async (
|
|||||||
}, 50);
|
}, 50);
|
||||||
|
|
||||||
const onMaximizeHandler = () => {
|
const onMaximizeHandler = () => {
|
||||||
|
logger.info('window-change: maximizing');
|
||||||
if (!mainView || !viewExists(mainView)) {
|
if (!mainView || !viewExists(mainView)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1361,6 +1362,11 @@ export const loadBrowserViews = async (
|
|||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
logger.info(
|
||||||
|
'window-change: maximizing with bounds ',
|
||||||
|
currentScreenBounds.width,
|
||||||
|
currentScreenBounds.height,
|
||||||
|
);
|
||||||
mainView.setBounds({
|
mainView.setBounds({
|
||||||
width: currentScreenBounds.width,
|
width: currentScreenBounds.width,
|
||||||
height: currentScreenBounds.height - TITLE_BAR_HEIGHT,
|
height: currentScreenBounds.height - TITLE_BAR_HEIGHT,
|
||||||
|
Loading…
Reference in New Issue
Block a user