mirror of
https://github.com/zadam/trilium.git
synced 2024-09-30 04:25:58 +08:00
25 lines
488 B
JavaScript
25 lines
488 B
JavaScript
|
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
|
||
|
}
|