1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Desktop, CLI: Added option to disable creation of welcome items

This commit is contained in:
Laurent Cozic
2019-05-12 01:10:46 +01:00
parent 9c85bc2cd1
commit 553a26eb63
4 changed files with 15 additions and 1 deletions

View File

@ -112,6 +112,12 @@ class BaseApplication {
continue;
}
if (arg == '--no-welcome') {
matched.welcomeDisabled = true;
argv.splice(0, 1);
continue;
}
if (arg == '--env') {
if (!nextArg) throw new JoplinError(_('Usage: %s', '--env <dev|prod>'), 'flagError');
matched.env = nextArg;
@ -575,6 +581,8 @@ class BaseApplication {
setLocale(Setting.value('locale'));
}
if ('welcomeDisabled' in initArgs) Setting.setValue('welcome.enabled', !initArgs.welcomeDisabled);
if (!Setting.value('api.token')) {
EncryptionService.instance().randomHexString(64).then((token) => {
Setting.setValue('api.token', token);