Skip to content

Commit

Permalink
Updated plugin API to version v1.8.2 (registerSettings)
Browse files Browse the repository at this point in the history
  • Loading branch information
benji300 committed Aug 10, 2021
1 parent 47ca1cd commit a528320
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 113 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- None

## [1.1.0] - 2021-08-10

### Changed

- Updated plugin API to version v1.8.2 (`registerSettings`) to support app version v2.2.4 or newer

## [1.0.0] - 2021-03-28

- Initial Release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Quick Move is a plugin to extend the UX of [Joplin's](https://joplinapp.org/) de

It provides a collection of [commands](#commands) to quickly move notes to other notebooks without user interaction.

> :warning: **CAUTION** - Requires Joplin **v1.7.10** or newer
> :warning: **CAUTION** - Requires Joplin **v1.8.2** or newer
## Features

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "joplin-plugin-quick-move",
"version": "1.0.0",
"version": "1.1.0",
"description": "Collection of commands to quickly move notes to other notebooks.",
"author": "Benji300",
"homepage": "https://github.com/benji300/joplin-quick-move",
Expand Down
4 changes: 2 additions & 2 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"manifest_version": 1,
"id": "joplin.plugin.benji.quick-move",
"app_min_version": "1.7.10",
"version": "1.0.0",
"app_min_version": "1.8.2",
"version": "1.1.0",
"name": "Quick Move",
"description": "Collection of commands to quickly move notes to other notebooks.",
"author": "Benji300",
Expand Down
215 changes: 107 additions & 108 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,121 +160,120 @@ export class Settings {
async register() {
const folderSelection: any = await this.getFoldersToSelect();

// settings section
// register settings in own section
await joplin.settings.registerSection('qm.settings', {
label: 'Quick Move',
iconName: 'fas fa-shipping-fast',
description: 'The notebook selection lists are only updated at startup. To display new or renamed notebooks, Joplin must be restarted.'
});

// private settings
// none

// general settings
await joplin.settings.registerSetting('keepMovedNoteSelected', {
value: this._keepMovedNoteSelected,
type: SettingItemType.Bool,
section: 'qm.settings',
public: true,
label: 'Keep moved note selected',
description: 'If the selected note is moved via one of the quick move actions, it is still selected afterwards. ' +
'Otherwise, the next note within the current notebook is selected. ' +
'If several notes have been moved, the last one remains selected.'
});
await joplin.settings.registerSetting('quickMove1', {
value: this._quickMove1,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
label: 'Notebook for quick move action 1',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove1".',
options: folderSelection
});
await joplin.settings.registerSetting('quickMove2', {
value: this._quickMove2,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
label: 'Notebook for quick move action 2',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove2".',
options: folderSelection
});
await joplin.settings.registerSetting('quickMove3', {
value: this._quickMove3,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
label: 'Notebook for quick move action 3',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove3".',
options: folderSelection
});
await joplin.settings.registerSetting('quickMove4', {
value: this._quickMove4,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
label: 'Notebook for quick move action 4',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove4".',
options: folderSelection
});
await joplin.settings.registerSetting('quickMove5', {
value: this._quickMove5,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
label: 'Notebook for quick move action 5',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove5".',
options: folderSelection
});
await joplin.settings.registerSetting('quickMove6', {
value: this._quickMove6,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
label: 'Notebook for quick move action 6',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove6".',
options: folderSelection
});
await joplin.settings.registerSetting('quickMove7', {
value: this._quickMove7,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
label: 'Notebook for quick move action 7',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove7".',
options: folderSelection
});
await joplin.settings.registerSetting('quickMove8', {
value: this._quickMove8,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
label: 'Notebook for quick move action 8',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove8".',
options: folderSelection
});
await joplin.settings.registerSetting('quickMove9', {
value: this._quickMove8,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
label: 'Notebook for quick move action 9',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove9".',
options: folderSelection
await joplin.settings.registerSettings({
// private settings
// none
// general settings
keepMovedNoteSelected: {
value: this._keepMovedNoteSelected,
type: SettingItemType.Bool,
section: 'qm.settings',
public: true,
label: 'Keep moved note selected',
description: 'If the selected note is moved via one of the quick move actions, it is still selected afterwards. ' +
'Otherwise, the next note within the current notebook is selected. ' +
'If several notes have been moved, the last one remains selected.'
},
quickMove1: {
value: this._quickMove1,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
options: folderSelection,
label: 'Notebook for quick move action 1',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove1".'
},
quickMove2: {
value: this._quickMove2,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
options: folderSelection,
label: 'Notebook for quick move action 2',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove2".'
},
quickMove3: {
value: this._quickMove3,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
options: folderSelection,
label: 'Notebook for quick move action 3',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove3".'
},
quickMove4: {
value: this._quickMove4,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
options: folderSelection,
label: 'Notebook for quick move action 4',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove4".'
},
quickMove5: {
value: this._quickMove5,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
options: folderSelection,
label: 'Notebook for quick move action 5',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove5".'
},
quickMove6: {
value: this._quickMove6,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
options: folderSelection,
label: 'Notebook for quick move action 6',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove6".'
},
quickMove7: {
value: this._quickMove7,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
options: folderSelection,
label: 'Notebook for quick move action 7',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove7".'
},
quickMove8: {
value: this._quickMove8,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
options: folderSelection,
label: 'Notebook for quick move action 8',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove8".'
},
quickMove9: {
value: this._quickMove9,
type: SettingItemType.String,
section: 'qm.settings',
isEnum: true,
public: true,
options: folderSelection,
label: 'Notebook for quick move action 9',
description: 'Select notebook to which the selected note(s) can be moved directly without interaction. Assign keyboard shortcut to command "quickMove9".'
}
// advanced settings
// none
});

// advanced settings
// none

// initially read settings
await this.read();
}
Expand Down

0 comments on commit a528320

Please sign in to comment.