mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 05:46:10 +01:00
hoisting notes WIP
This commit is contained in:
25
src/public/javascripts/services/hoisted_note.js
Normal file
25
src/public/javascripts/services/hoisted_note.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import optionsInit from './options_init.js';
|
||||
import server from "./server.js";
|
||||
|
||||
let hoistedNoteId;
|
||||
|
||||
optionsInit.optionsReady.then(options => {
|
||||
hoistedNoteId = options['hoistedNoteId'];
|
||||
});
|
||||
|
||||
async function getHoistedNoteId() {
|
||||
await optionsInit.optionsReady;
|
||||
|
||||
return hoistedNoteId;
|
||||
}
|
||||
|
||||
async function setHoistedNoteId(noteId) {
|
||||
hoistedNoteId = noteId;
|
||||
|
||||
await server.put('options/hoistedNoteId/' + noteId);
|
||||
}
|
||||
|
||||
export default {
|
||||
getHoistedNoteId,
|
||||
setHoistedNoteId
|
||||
}
|
||||
Reference in New Issue
Block a user