MM-46445_Add a way to bypass Desktop App onboarding to buildConfig
(#2232)
This commit is contained in:
@@ -108,6 +108,13 @@ commands:
|
|||||||
type: string
|
type: string
|
||||||
default: "./linux/"
|
default: "./linux/"
|
||||||
steps:
|
steps:
|
||||||
|
- when:
|
||||||
|
condition: << pipeline.parameters.run_nightly >>
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Patch buildConfig file for run nightly
|
||||||
|
command: |
|
||||||
|
sed -i "" "s/skipOnboardingScreens:[[:blank:]]*false/skipOnboardingScreens: true/" ./src/common/config/buildConfig.ts;
|
||||||
- run:
|
- run:
|
||||||
name: npn run
|
name: npn run
|
||||||
command: npm run package:<< parameters.os >>
|
command: npm run package:<< parameters.os >>
|
||||||
|
@@ -37,6 +37,7 @@ const buildConfig: BuildConfig = {
|
|||||||
'mailto',
|
'mailto',
|
||||||
'tel',
|
'tel',
|
||||||
],
|
],
|
||||||
|
skipOnboardingScreens: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default buildConfig;
|
export default buildConfig;
|
||||||
|
@@ -43,6 +43,7 @@ const defaultPreferences: ConfigV3 = {
|
|||||||
lastActiveTeam: 0,
|
lastActiveTeam: 0,
|
||||||
downloadLocation: getDefaultDownloadLocation(),
|
downloadLocation: getDefaultDownloadLocation(),
|
||||||
startInFullscreen: false,
|
startInFullscreen: false,
|
||||||
|
skipOnboardingScreens: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default defaultPreferences;
|
export default defaultPreferences;
|
||||||
|
@@ -332,6 +332,10 @@ export class Config extends EventEmitter {
|
|||||||
return this.combinedData?.appLanguage;
|
return this.combinedData?.appLanguage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get skipOnboardingScreens() {
|
||||||
|
return this.combinedData?.skipOnboardingScreens ?? defaultPreferences.skipOnboardingScreens;
|
||||||
|
}
|
||||||
|
|
||||||
// initialization/processing methods
|
// initialization/processing methods
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -150,6 +150,7 @@ describe('main/Validator', () => {
|
|||||||
],
|
],
|
||||||
trayIconTheme: 'use_system',
|
trayIconTheme: 'use_system',
|
||||||
useSpellChecker: true,
|
useSpellChecker: true,
|
||||||
|
skipOnboardingScreens: false,
|
||||||
version: 3,
|
version: 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -132,6 +132,7 @@ const configDataSchemaV3 = Joi.object<ConfigV3>({
|
|||||||
alwaysClose: Joi.boolean(),
|
alwaysClose: Joi.boolean(),
|
||||||
logLevel: Joi.string().default('info'),
|
logLevel: Joi.string().default('info'),
|
||||||
appLanguage: Joi.string().allow(''),
|
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'};
|
// eg. data['community.mattermost.com'] = { data: 'certificate data', issuerName: 'COMODO RSA Domain Validation Secure Server CA'};
|
||||||
|
@@ -86,7 +86,7 @@ export function handleOpenTab(event: IpcMainEvent, serverName: string, tabName:
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function handleMainWindowIsShown() {
|
export function handleMainWindowIsShown() {
|
||||||
const showWelcomeScreen = !Config.teams.length;
|
const showWelcomeScreen = !Config.skipOnboardingScreens && !Config.teams.length;
|
||||||
const mainWindow = WindowManager.getMainWindow();
|
const mainWindow = WindowManager.getMainWindow();
|
||||||
|
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
|
@@ -46,6 +46,7 @@ export type ConfigV3 = {
|
|||||||
alwaysClose?: boolean;
|
alwaysClose?: boolean;
|
||||||
logLevel?: string;
|
logLevel?: string;
|
||||||
appLanguage?: string;
|
appLanguage?: string;
|
||||||
|
skipOnboardingScreens: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ConfigV2 = {
|
export type ConfigV2 = {
|
||||||
@@ -106,6 +107,7 @@ export type BuildConfig = {
|
|||||||
enableAutoUpdater: boolean;
|
enableAutoUpdater: boolean;
|
||||||
managedResources: string[];
|
managedResources: string[];
|
||||||
allowedProtocols: string[];
|
allowedProtocols: string[];
|
||||||
|
skipOnboardingScreens: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RegistryConfig = {
|
export type RegistryConfig = {
|
||||||
|
Reference in New Issue
Block a user