mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
basic support for custom widgets
This commit is contained in:
@@ -29,8 +29,8 @@ async function run(req) {
|
||||
return { executionResult: result };
|
||||
}
|
||||
|
||||
async function getStartupBundles() {
|
||||
const notes = await attributeService.getNotesWithLabel("run", "frontendStartup");
|
||||
async function getBundlesWithLabel(label, value) {
|
||||
const notes = await attributeService.getNotesWithLabel(label, value);
|
||||
|
||||
const bundles = [];
|
||||
|
||||
@@ -45,6 +45,14 @@ async function getStartupBundles() {
|
||||
return bundles;
|
||||
}
|
||||
|
||||
async function getStartupBundles() {
|
||||
return await getBundlesWithLabel("run", "frontendStartup");
|
||||
}
|
||||
|
||||
async function getWidgetBundles() {
|
||||
return await getBundlesWithLabel("widget");
|
||||
}
|
||||
|
||||
async function getRelationBundles(req) {
|
||||
const noteId = req.params.noteId;
|
||||
const note = await repository.getNote(noteId);
|
||||
@@ -84,6 +92,7 @@ module.exports = {
|
||||
exec,
|
||||
run,
|
||||
getStartupBundles,
|
||||
getWidgetBundles,
|
||||
getRelationBundles,
|
||||
getBundle
|
||||
};
|
||||
Reference in New Issue
Block a user