diff --git a/CliClient/app/command-help.js b/CliClient/app/command-help.js index a8fe5c9573..78afe7c1e9 100644 --- a/CliClient/app/command-help.js +++ b/CliClient/app/command-help.js @@ -65,12 +65,10 @@ class Command extends BaseCommand { } else { const commandNames = this.allCommands().map((a) => a.name()); - this.stdout(_('Type `help [command]` for more information about a command.')); + this.stdout(_('Type `help [command]` for more information about a command; or type `help all` for the complete usage information.')); this.stdout(''); this.stdout(_('The possible commands are:')); this.stdout(''); - this.stdout(_('Type `help all` for the complete help of all the commands.')); - this.stdout(''); this.stdout(commandNames.join(', ')); this.stdout(''); this.stdout(_('In any command, a note or notebook can be refered to by title or ID, or using the shortcuts `$n` or `$b` for, respectively, the currently selected note or notebook. `$c` can be used to refer to the currently selected item.')); diff --git a/CliClient/app/gui/NoteWidget.js b/CliClient/app/gui/NoteWidget.js index eb565457f5..991f1dd32f 100644 --- a/CliClient/app/gui/NoteWidget.js +++ b/CliClient/app/gui/NoteWidget.js @@ -1,5 +1,6 @@ const Note = require('lib/models/note.js').Note; const TextWidget = require('tkwidgets/TextWidget.js'); +const { _ } = require('lib/locale.js'); class NoteWidget extends TextWidget { @@ -32,8 +33,15 @@ class NoteWidget extends TextWidget { this.reloadNote(); } + welcomeText() { + return _('Welcome to Joplin!\n\nType `:help shortcuts` for the list of keyboard shortcuts, or just `:help` for usage information.\n\nFor example, to create a notebook press `mb`; to create a note press `mn`.'); + } + reloadNote() { - if (this.noteId_) { + if (!this.noteId_ && !this.notes.length) { + this.text = this.welcomeText(); + this.scrollTop = 0; + } else if (this.noteId_) { this.doAsync('loadNote', async () => { this.note_ = await Note.load(this.noteId_); this.text = this.note_ ? this.note_.title + "\n\n" + this.note_.body : '';