mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 01:05:49 +01:00
options UI for selecting support code note MIME types
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
const attributesService = require('../../services/attributes');
|
||||
const log = require('../../services/log');
|
||||
|
||||
async function get() {
|
||||
const notes = await attributesService.getNotesWithLabel('codeMimeTypes');
|
||||
let merged = [];
|
||||
|
||||
for (const note of notes) {
|
||||
try {
|
||||
merged = merged.concat(await note.getJsonContent());
|
||||
}
|
||||
catch (e) {
|
||||
log.error(`Cannot merge mime types from note=${note.noteId}: ${e.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
get
|
||||
};
|
||||
@@ -28,7 +28,8 @@ const ALLOWED_OPTIONS = [
|
||||
'attributesWidget',
|
||||
'linkMapWidget',
|
||||
'noteRevisionsWidget',
|
||||
'whatLinksHereWidget'
|
||||
'whatLinksHereWidget',
|
||||
'codeNotesMimeTypes'
|
||||
];
|
||||
|
||||
async function getOptions() {
|
||||
|
||||
Reference in New Issue
Block a user