From 0cde7ede245231ced458a5917fd158a96dd6736b Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 23 Nov 2019 22:56:35 +0100 Subject: [PATCH] updated note menu with current shortcuts --- docs/backend_api/Note.html | 106 ++++++++++ docs/backend_api/entities_note.js.html | 2 +- docs/frontend_api/Branch.html | 2 +- docs/frontend_api/FrontendScriptApi.html | 182 ++++-------------- docs/frontend_api/NoteFull.html | 2 +- docs/frontend_api/NoteShort.html | 120 +++++++++--- docs/frontend_api/entities_attribute.js.html | 2 +- docs/frontend_api/entities_branch.js.html | 2 +- docs/frontend_api/entities_note_full.js.html | 2 +- docs/frontend_api/entities_note_short.js.html | 2 +- docs/frontend_api/global.html | 4 +- docs/frontend_api/index.html | 2 +- .../services_frontend_script_api.js.html | 8 +- src/services/keyboard_actions.js | 12 +- src/views/dialogs/markdown_import.ejs | 2 +- src/views/title.ejs | 13 +- 16 files changed, 259 insertions(+), 204 deletions(-) diff --git a/docs/backend_api/Note.html b/docs/backend_api/Note.html index e9a278742..141ac6303 100644 --- a/docs/backend_api/Note.html +++ b/docs/backend_api/Note.html @@ -611,6 +611,112 @@ +

(async) getAllNotePaths() → {Promise.<Array.<Array.<string>>>}

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - array of notePaths (each represented by array of noteIds constituting the particular note path) +
+ + + +
+
+ Type +
+
+ +Promise.<Array.<Array.<string>>> + + +
+
+ + + + + + + + + + + + +

(async) getAttribute(type, name) → {Promise.<Attribute>}

diff --git a/docs/backend_api/entities_note.js.html b/docs/backend_api/entities_note.js.html index 30c1f1c3c..4f4029bde 100644 --- a/docs/backend_api/entities_note.js.html +++ b/docs/backend_api/entities_note.js.html @@ -729,7 +729,7 @@ class Note extends Entity { WHERE noteId = ? AND isDeleted = 0 AND type = 'relation' AND - name IN ('internal-link', 'image-link', 'relation-map-link')`, [this.noteId]); + name IN ('internalLink', 'imageLink', 'relationMapLink')`, [this.noteId]); } /** diff --git a/docs/frontend_api/Branch.html b/docs/frontend_api/Branch.html index 0b7013743..cc6fc3b03 100644 --- a/docs/frontend_api/Branch.html +++ b/docs/frontend_api/Branch.html @@ -719,7 +719,7 @@
diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.html index 5ce01216e..dc8fc5a64 100644 --- a/docs/frontend_api/FrontendScriptApi.html +++ b/docs/frontend_api/FrontendScriptApi.html @@ -81,7 +81,7 @@
Source:
@@ -223,7 +223,7 @@
Source:
@@ -333,113 +333,7 @@
Source:
- - - - - - - - - - - - - - - - -

keys

- - - - - - - - - - -
Properties:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
- - -KeyboardAction - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
@@ -552,7 +446,7 @@
Source:
@@ -658,7 +552,7 @@
Source:
@@ -768,7 +662,7 @@
Source:
@@ -877,7 +771,7 @@
Source:
@@ -1006,7 +900,7 @@
Source:
@@ -1161,7 +1055,7 @@
Source:
@@ -1316,7 +1210,7 @@
Source:
@@ -1472,7 +1366,7 @@
Source:
@@ -1652,7 +1546,7 @@
Source:
@@ -1785,7 +1679,7 @@
Source:
@@ -1891,7 +1785,7 @@
Source:
@@ -1997,7 +1891,7 @@
Source:
@@ -2156,7 +2050,7 @@
Source:
@@ -2263,7 +2157,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -2418,7 +2312,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -2574,7 +2468,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -2775,7 +2669,7 @@ otherwise (by e.g. createNoteLink())
Source:
@@ -2881,7 +2775,7 @@ otherwise (by e.g. createNoteLink())
Source:
@@ -3036,7 +2930,7 @@ otherwise (by e.g. createNoteLink())
Source:
@@ -3145,7 +3039,7 @@ note.
Source:
@@ -3300,7 +3194,7 @@ note.
Source:
@@ -3433,7 +3327,7 @@ note.
Source:
@@ -3539,7 +3433,7 @@ note.
Source:
@@ -3627,7 +3521,7 @@ note.
Source:
@@ -3733,7 +3627,7 @@ note.
Source:
@@ -3839,7 +3733,7 @@ note.
Source:
@@ -3994,7 +3888,7 @@ note.
Source:
@@ -4155,7 +4049,7 @@ Internally this serializes the anonymous function into string and sends it to ba
Source:
@@ -4315,7 +4209,7 @@ Internally this serializes the anonymous function into string and sends it to ba
Source:
@@ -4471,7 +4365,7 @@ Internally this serializes the anonymous function into string and sends it to ba
Source:
@@ -4626,7 +4520,7 @@ Internally this serializes the anonymous function into string and sends it to ba
Source:
@@ -4777,7 +4671,7 @@ Internally this serializes the anonymous function into string and sends it to ba
Source:
@@ -4914,7 +4808,7 @@ Internally this serializes the anonymous function into string and sends it to ba
Source:
@@ -5051,7 +4945,7 @@ Internally this serializes the anonymous function into string and sends it to ba
Source:
@@ -5097,7 +4991,7 @@ Internally this serializes the anonymous function into string and sends it to ba
diff --git a/docs/frontend_api/NoteFull.html b/docs/frontend_api/NoteFull.html index 113ac1492..890782f59 100644 --- a/docs/frontend_api/NoteFull.html +++ b/docs/frontend_api/NoteFull.html @@ -449,7 +449,7 @@
diff --git a/docs/frontend_api/NoteShort.html b/docs/frontend_api/NoteShort.html index 110e0e051..6e3561286 100644 --- a/docs/frontend_api/NoteShort.html +++ b/docs/frontend_api/NoteShort.html @@ -346,7 +346,7 @@
Source:
@@ -414,7 +414,7 @@
Source:
@@ -548,6 +548,64 @@ +

iconClass

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

isDeleted

@@ -830,7 +888,7 @@
Source:
@@ -898,7 +956,7 @@
Source:
@@ -1162,7 +1220,7 @@
Source:
@@ -1329,7 +1387,7 @@
Source:
@@ -1503,7 +1561,7 @@
Source:
@@ -1609,7 +1667,7 @@
Source:
@@ -1711,7 +1769,7 @@
Source:
@@ -1813,7 +1871,7 @@
Source:
@@ -1915,7 +1973,7 @@
Source:
@@ -2066,7 +2124,7 @@
Source:
@@ -2233,7 +2291,7 @@
Source:
@@ -2400,7 +2458,7 @@
Source:
@@ -2555,7 +2613,7 @@
Source:
@@ -2661,7 +2719,7 @@
Source:
@@ -2763,7 +2821,7 @@
Source:
@@ -2914,7 +2972,7 @@
Source:
@@ -3081,7 +3139,7 @@
Source:
@@ -3248,7 +3306,7 @@
Source:
@@ -3403,7 +3461,7 @@
Source:
@@ -3573,7 +3631,7 @@
Source:
@@ -3724,7 +3782,7 @@
Source:
@@ -3834,7 +3892,7 @@
Source:
@@ -4008,7 +4066,7 @@
Source:
@@ -4114,7 +4172,7 @@
Source:
@@ -4265,7 +4323,7 @@
Source:
@@ -4420,7 +4478,7 @@
Source:
@@ -4531,7 +4589,7 @@ Cache is note instance scoped.
Source:
@@ -4615,7 +4673,7 @@ Cache is note instance scoped.
Source:
@@ -4679,7 +4737,7 @@ Cache is note instance scoped.
diff --git a/docs/frontend_api/entities_attribute.js.html b/docs/frontend_api/entities_attribute.js.html index 2f85b38f8..01956a8e7 100644 --- a/docs/frontend_api/entities_attribute.js.html +++ b/docs/frontend_api/entities_attribute.js.html @@ -71,7 +71,7 @@ export default Attribute;
diff --git a/docs/frontend_api/entities_branch.js.html b/docs/frontend_api/entities_branch.js.html index cc008e83d..bf5d06879 100644 --- a/docs/frontend_api/entities_branch.js.html +++ b/docs/frontend_api/entities_branch.js.html @@ -70,7 +70,7 @@ export default Branch;
diff --git a/docs/frontend_api/entities_note_full.js.html b/docs/frontend_api/entities_note_full.js.html index 9f141a2a7..b66927b7b 100644 --- a/docs/frontend_api/entities_note_full.js.html +++ b/docs/frontend_api/entities_note_full.js.html @@ -68,7 +68,7 @@ export default NoteFull;
diff --git a/docs/frontend_api/entities_note_short.js.html b/docs/frontend_api/entities_note_short.js.html index 736bb9ad0..ed9603318 100644 --- a/docs/frontend_api/entities_note_short.js.html +++ b/docs/frontend_api/entities_note_short.js.html @@ -365,7 +365,7 @@ export default NoteShort;
diff --git a/docs/frontend_api/global.html b/docs/frontend_api/global.html index 043fc4c5f..7f4006e31 100644 --- a/docs/frontend_api/global.html +++ b/docs/frontend_api/global.html @@ -303,7 +303,7 @@
Source:
@@ -333,7 +333,7 @@
diff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.html index cd881639d..310dca343 100644 --- a/docs/frontend_api/index.html +++ b/docs/frontend_api/index.html @@ -50,7 +50,7 @@
diff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.html index d03a54856..e76325720 100644 --- a/docs/frontend_api/services_frontend_script_api.js.html +++ b/docs/frontend_api/services_frontend_script_api.js.html @@ -39,7 +39,6 @@ import dateNotesService from './date_notes.js'; import StandardWidget from '../widgets/standard_widget.js'; import ws from "./ws.js"; import hoistedNoteService from "./hoisted_note.js"; -import KeyboardAction from "./keyboard_action.js"; /** * This is the main frontend API interface for scripts. It's published in the local "api" object. @@ -69,11 +68,6 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte /** @property {StandardWidget} */ this.StandardWidget = StandardWidget; - /** @property {KeyboardAction} */ - this.keys = new KeyboardAction(); - - this.bind = keys.bind; - /** * Activates note in the tree and in the note detail. * @@ -428,7 +422,7 @@ export default FrontendScriptApi;
diff --git a/src/services/keyboard_actions.js b/src/services/keyboard_actions.js index 66c4d682a..a26ca053f 100644 --- a/src/services/keyboard_actions.js +++ b/src/services/keyboard_actions.js @@ -84,6 +84,10 @@ const DEFAULT_KEYBOARD_ACTIONS = [ actionName: "ShowHelp", defaultShortcuts: ["F1"] }, + { + actionName: "PrintActiveNote", + defaultShortcuts: [] + }, { actionName: "CreateNoteAfter", defaultShortcuts: ["CommandOrControl+O"] @@ -262,11 +266,7 @@ const DEFAULT_KEYBOARD_ACTIONS = [ { actionName: "ZoomIn", defaultShortcuts: ["CommandOrControl+="] - }, - { - actionName: "MarkdownToHTML", - defaultShortcuts: ["CommandOrControl+Return"] - }, + } ]; if (process.platform === "darwin") { @@ -312,7 +312,7 @@ async function getKeyboardActions() { } } else { - log.info(`Keyboard action ${actionName} not found.`); + log.info(`Keyboard action ${actionName} found in database, but not in action definition.`); } } } diff --git a/src/views/dialogs/markdown_import.ejs b/src/views/dialogs/markdown_import.ejs index e17559429..61ca96c23 100644 --- a/src/views/dialogs/markdown_import.ejs +++ b/src/views/dialogs/markdown_import.ejs @@ -13,7 +13,7 @@ diff --git a/src/views/title.ejs b/src/views/title.ejs index 9e21d238d..a4e4c2f22 100644 --- a/src/views/title.ejs +++ b/src/views/title.ejs @@ -53,13 +53,16 @@