You've already forked joplin
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user