[MM-46533] Remove buildConfig item and add webpack flags for onboarding screens and GPU acceleration (#2241)
* [MM-46533] Remove buildConfig item and add webpack flags for onboarding screens and GPU acceleration * REVERT ME * Use contexts instead * Revert "REVERT ME" This reverts commit 1e75779623f1c5eb2ce3a64e0c39cd4a8cf7ada7.
This commit is contained in:
@@ -37,7 +37,6 @@ const buildConfig: BuildConfig = {
|
||||
'mailto',
|
||||
'tel',
|
||||
],
|
||||
skipOnboardingScreens: false,
|
||||
};
|
||||
|
||||
export default buildConfig;
|
||||
|
@@ -43,7 +43,6 @@ const defaultPreferences: ConfigV3 = {
|
||||
lastActiveTeam: 0,
|
||||
downloadLocation: getDefaultDownloadLocation(),
|
||||
startInFullscreen: false,
|
||||
skipOnboardingScreens: false,
|
||||
};
|
||||
|
||||
export default defaultPreferences;
|
||||
|
@@ -332,10 +332,6 @@ export class Config extends EventEmitter {
|
||||
return this.combinedData?.appLanguage;
|
||||
}
|
||||
|
||||
get skipOnboardingScreens() {
|
||||
return this.combinedData?.skipOnboardingScreens ?? defaultPreferences.skipOnboardingScreens;
|
||||
}
|
||||
|
||||
// initialization/processing methods
|
||||
|
||||
/**
|
||||
|
@@ -150,7 +150,6 @@ describe('main/Validator', () => {
|
||||
],
|
||||
trayIconTheme: 'use_system',
|
||||
useSpellChecker: true,
|
||||
skipOnboardingScreens: false,
|
||||
version: 3,
|
||||
};
|
||||
|
||||
|
@@ -132,7 +132,6 @@ const configDataSchemaV3 = Joi.object<ConfigV3>({
|
||||
alwaysClose: Joi.boolean(),
|
||||
logLevel: Joi.string().default('info'),
|
||||
appLanguage: Joi.string().allow(''),
|
||||
skipOnboardingScreens: Joi.boolean().default(false),
|
||||
});
|
||||
|
||||
// eg. data['community.mattermost.com'] = { data: 'certificate data', issuerName: 'COMODO RSA Domain Validation Secure Server CA'};
|
||||
|
@@ -161,7 +161,10 @@ async function initializeConfig() {
|
||||
handleConfigUpdate(configData);
|
||||
|
||||
// can only call this before the app is ready
|
||||
if (Config.enableHardwareAcceleration === false) {
|
||||
// eslint-disable-next-line no-undef
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (Config.enableHardwareAcceleration === false || __DISABLE_GPU__) {
|
||||
app.disableHardwareAcceleration();
|
||||
}
|
||||
|
||||
|
@@ -86,7 +86,10 @@ export function handleOpenTab(event: IpcMainEvent, serverName: string, tabName:
|
||||
}
|
||||
|
||||
export function handleMainWindowIsShown() {
|
||||
const showWelcomeScreen = !Config.skipOnboardingScreens && !Config.teams.length;
|
||||
// eslint-disable-next-line no-undef
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
const showWelcomeScreen = !(Boolean(__SKIP_ONBOARDING_SCREENS__) || Config.teams.length);
|
||||
const mainWindow = WindowManager.getMainWindow();
|
||||
|
||||
if (mainWindow) {
|
||||
|
@@ -46,7 +46,6 @@ export type ConfigV3 = {
|
||||
alwaysClose?: boolean;
|
||||
logLevel?: string;
|
||||
appLanguage?: string;
|
||||
skipOnboardingScreens: boolean;
|
||||
}
|
||||
|
||||
export type ConfigV2 = {
|
||||
@@ -107,7 +106,6 @@ export type BuildConfig = {
|
||||
enableAutoUpdater: boolean;
|
||||
managedResources: string[];
|
||||
allowedProtocols: string[];
|
||||
skipOnboardingScreens: boolean;
|
||||
}
|
||||
|
||||
export type RegistryConfig = {
|
||||
|
Reference in New Issue
Block a user