appCss/appTheme are now loaded as external CSS files instead of inline styles

This commit is contained in:
zadam
2019-01-27 17:01:37 +01:00
parent 840a0b5f64
commit 2c1580ea65
6 changed files with 34 additions and 28 deletions

View File

@@ -44,6 +44,13 @@ async function getNotesWithLabel(name, value) {
WHERE notes.isDeleted = 0 AND attributes.isDeleted = 0 AND attributes.name = ? ${valueCondition} ORDER BY position`, params);
}
async function getNotesWithLabels(names) {
const questionMarks = names.map(() => "?").join(", ");
return await repository.getEntities(`SELECT notes.* FROM notes JOIN attributes USING(noteId)
WHERE notes.isDeleted = 0 AND attributes.isDeleted = 0 AND attributes.name IN (${questionMarks}) ORDER BY position`, names);
}
async function getNoteWithLabel(name, value) {
const notes = await getNotesWithLabel(name, value);
@@ -86,6 +93,7 @@ async function getAttributeNames(type, nameLike) {
module.exports = {
getNotesWithLabel,
getNotesWithLabels,
getNoteWithLabel,
createLabel,
createAttribute,