mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
frontend API addition to protect current note
This commit is contained in:
parent
6704b755d8
commit
66c639d5e3
@ -7,6 +7,7 @@ import treeCache from './tree_cache.js';
|
|||||||
import noteDetailService from './note_detail.js';
|
import noteDetailService from './note_detail.js';
|
||||||
import noteTypeService from './note_type.js';
|
import noteTypeService from './note_type.js';
|
||||||
import noteTooltipService from './note_tooltip.js';
|
import noteTooltipService from './note_tooltip.js';
|
||||||
|
import protectedSessionService from'./protected_session.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the main frontend API interface for scripts. It's published in the local "api" object.
|
* This is the main frontend API interface for scripts. It's published in the local "api" object.
|
||||||
@ -244,7 +245,12 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
|
|||||||
* @method
|
* @method
|
||||||
* @param {object} $el - jquery object on which to setup the tooltip
|
* @param {object} $el - jquery object on which to setup the tooltip
|
||||||
*/
|
*/
|
||||||
this.setupElementTooltip = noteTooltipService.setupElementTooltip
|
this.setupElementTooltip = noteTooltipService.setupElementTooltip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
*/
|
||||||
|
this.protectCurrentNote = protectedSessionService.protectNoteAndSendToServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default FrontendScriptApi;
|
export default FrontendScriptApi;
|
@ -184,5 +184,6 @@ export default {
|
|||||||
protectSubtree,
|
protectSubtree,
|
||||||
ensureDialogIsClosed,
|
ensureDialogIsClosed,
|
||||||
enterProtectedSession,
|
enterProtectedSession,
|
||||||
leaveProtectedSession
|
leaveProtectedSession,
|
||||||
|
protectNoteAndSendToServer
|
||||||
};
|
};
|
@ -153,7 +153,8 @@ async function createNote(parentNoteId, title, content = "", extraOptions = {})
|
|||||||
noteId: note.noteId,
|
noteId: note.noteId,
|
||||||
type: attr.type,
|
type: attr.type,
|
||||||
name: attr.name,
|
name: attr.name,
|
||||||
value: attr.value
|
value: attr.value,
|
||||||
|
isInheritable: !!attr.isInheritable
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user