mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
API changes necessary to port reddit plugin, closes #58
This commit is contained in:
@@ -5,6 +5,8 @@ const noteTree = (function() {
|
||||
const $parentList = $("#parent-list");
|
||||
const $parentListList = $("#parent-list-inner");
|
||||
|
||||
let instanceName = null; // should have better place
|
||||
|
||||
let startNotePath = null;
|
||||
let notesTreeMap = {};
|
||||
|
||||
@@ -648,6 +650,7 @@ const noteTree = (function() {
|
||||
async function loadTree() {
|
||||
const resp = await server.get('tree');
|
||||
startNotePath = resp.start_note_path;
|
||||
instanceName = resp.instanceName;
|
||||
|
||||
if (document.location.hash) {
|
||||
startNotePath = getNotePathFromAddress();
|
||||
@@ -823,6 +826,10 @@ const noteTree = (function() {
|
||||
return !!childToParents[noteId];
|
||||
}
|
||||
|
||||
function getInstanceName() {
|
||||
return instanceName;
|
||||
}
|
||||
|
||||
$(document).bind('keydown', 'ctrl+o', e => {
|
||||
const node = getCurrentNode();
|
||||
const parentNoteId = node.data.parentNoteId;
|
||||
@@ -897,6 +904,7 @@ const noteTree = (function() {
|
||||
setParentChildRelation,
|
||||
getSelectedNodes,
|
||||
sortAlphabetically,
|
||||
noteExists
|
||||
noteExists,
|
||||
getInstanceName
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user