Skip to content

Commit

Permalink
Merge master into encryption branch
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Dec 15, 2017
1 parent 5bc72e2 commit d9c1e30
Show file tree
Hide file tree
Showing 19 changed files with 121 additions and 96 deletions.
17 changes: 11 additions & 6 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,17 @@ From `/ElectronClient` you can also run `run.sh` to run the app for testing.

# Building the Mobile application

From `/ReactNativeClient`, run `npm install`, then `react-native run-ios` or `react-native run-android`.
First you need to to setup React Native to build projects with native code. For this, follow the instructions on the [Get Started](https://facebook.github.io/react-native/docs/getting-started.html) tutorial, in the "Building Projects with Native Code" tab.

Then, from `/ReactNativeClient`, run `npm install`, then `react-native run-ios` or `react-native run-android`.

# Building the Terminal application

From `/CliClient`:
- Run `npm install`
- Then `build.sh`
- Copy the translations to the build directory: `rsync --delete -aP ../ReactNativeClient/locales/ build/locales/`
- Run `run.sh` to start the application for testing.
```
cd CliClient
npm install
./build.sh
rsync --delete -aP ../ReactNativeClient/locales/ build/locales/
```

Run `run.sh` to start the application for testing.
4 changes: 1 addition & 3 deletions CliClient/app/command-help.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.'));
Expand Down
2 changes: 1 addition & 1 deletion CliClient/app/command-rmbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Command extends BaseCommand {

const folder = await app().loadItem(BaseModel.TYPE_FOLDER, pattern);
if (!folder) throw new Error(_('Cannot find "%s".', pattern));
const ok = force ? true : await this.prompt(_('Delete notebook "%s"?', folder.title), { booleanAnswerDefault: 'n' });
const ok = force ? true : await this.prompt(_('Delete notebook? All notes within this notebook will also be deleted.'), { booleanAnswerDefault: 'n' });
if (!ok) return;

await Folder.delete(folder.id);
Expand Down
10 changes: 9 additions & 1 deletion CliClient/app/gui/NoteWidget.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const Note = require('lib/models/Note.js');
const TextWidget = require('tkwidgets/TextWidget.js');
const { _ } = require('lib/locale.js');

class NoteWidget extends TextWidget {

Expand Down Expand Up @@ -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 : '';
Expand Down
Loading

0 comments on commit d9c1e30

Please sign in to comment.