mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
new code icons, protected note icon in note tree is now styled using CSS filter drop shadow
This commit is contained in:
parent
b2ff97ccf2
commit
5981b9bc7b
BIN
public/images/icons/code-folder.png
Normal file
BIN
public/images/icons/code-folder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 339 B |
BIN
public/images/icons/code.png
Normal file
BIN
public/images/icons/code.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 245 B |
Binary file not shown.
Before Width: | Height: | Size: 314 B |
Binary file not shown.
Before Width: | Height: | Size: 342 B |
@ -150,6 +150,10 @@ const noteTree = (function() {
|
|||||||
extraClasses.push("multiple-parents");
|
extraClasses.push("multiple-parents");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (note.type === 'code') {
|
||||||
|
extraClasses.push("code");
|
||||||
|
}
|
||||||
|
|
||||||
return extraClasses.join(" ");
|
return extraClasses.join(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ const protected_session = (function() {
|
|||||||
const dialogEl = $("#protected-session-password-dialog");
|
const dialogEl = $("#protected-session-password-dialog");
|
||||||
const passwordFormEl = $("#protected-session-password-form");
|
const passwordFormEl = $("#protected-session-password-form");
|
||||||
const passwordEl = $("#protected-session-password");
|
const passwordEl = $("#protected-session-password");
|
||||||
|
const noteDetailWrapperEl = $("#note-detail-wrapper");
|
||||||
|
|
||||||
let protectedSessionDeferred = null;
|
let protectedSessionDeferred = null;
|
||||||
let lastProtectedSessionOperationDate = null;
|
let lastProtectedSessionOperationDate = null;
|
||||||
@ -24,6 +25,8 @@ const protected_session = (function() {
|
|||||||
if (requireProtectedSession && !isProtectedSessionAvailable()) {
|
if (requireProtectedSession && !isProtectedSessionAvailable()) {
|
||||||
protectedSessionDeferred = dfd;
|
protectedSessionDeferred = dfd;
|
||||||
|
|
||||||
|
noteDetailWrapperEl.hide();
|
||||||
|
|
||||||
dialogEl.dialog({
|
dialogEl.dialog({
|
||||||
modal: modal,
|
modal: modal,
|
||||||
width: 400,
|
width: 400,
|
||||||
@ -63,6 +66,8 @@ const protected_session = (function() {
|
|||||||
if (protectedSessionDeferred !== null) {
|
if (protectedSessionDeferred !== null) {
|
||||||
ensureDialogIsClosed(dialogEl, passwordEl);
|
ensureDialogIsClosed(dialogEl, passwordEl);
|
||||||
|
|
||||||
|
noteDetailWrapperEl.show();
|
||||||
|
|
||||||
protectedSessionDeferred.resolve();
|
protectedSessionDeferred.resolve();
|
||||||
|
|
||||||
protectedSessionDeferred = null;
|
protectedSessionDeferred = null;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#note-detail-wrapper.protected {
|
#note-detail-wrapper.protected, #note-detail-wrapper.protected .CodeMirror {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,14 +56,18 @@ span.fancytree-node.fancytree-folder > span.fancytree-icon {
|
|||||||
background-image: url("../images/icons/folder.png");
|
background-image: url("../images/icons/folder.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
span.fancytree-node.protected > span.fancytree-icon {
|
span.fancytree-node.code > span.fancytree-icon {
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-image: url("../images/icons/file-shaded.png");
|
background-image: url("../images/icons/code.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
span.fancytree-node.protected.fancytree-folder > span.fancytree-icon {
|
span.fancytree-node.fancytree-folder.code > span.fancytree-icon {
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-image: url("../images/icons/folder-shaded.png");
|
background-image: url("../images/icons/code-folder.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
span.fancytree-node.protected > span.fancytree-icon {
|
||||||
|
filter: drop-shadow(2px 2px 2px black);
|
||||||
}
|
}
|
||||||
|
|
||||||
span.fancytree-node.multiple-parents .fancytree-title {
|
span.fancytree-node.multiple-parents .fancytree-title {
|
||||||
|
@ -15,7 +15,8 @@ router.get('/', auth.checkApiAuth, wrap(async (req, res, next) => {
|
|||||||
SELECT
|
SELECT
|
||||||
notes_tree.*,
|
notes_tree.*,
|
||||||
notes.note_title,
|
notes.note_title,
|
||||||
notes.is_protected
|
notes.is_protected,
|
||||||
|
notes.type
|
||||||
FROM
|
FROM
|
||||||
notes_tree
|
notes_tree
|
||||||
JOIN
|
JOIN
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
const sql = require('./sql');
|
const sql = require('./sql');
|
||||||
const sync_table = require('./sync_table');
|
const sync_table = require('./sync_table');
|
||||||
const data_encryption = require('./data_encryption');
|
|
||||||
|
|
||||||
async function validateParentChild(res, parentNoteId, childNoteId, noteTreeId = null) {
|
async function validateParentChild(res, parentNoteId, childNoteId, noteTreeId = null) {
|
||||||
const existing = await getExistingNoteTree(parentNoteId, childNoteId);
|
const existing = await getExistingNoteTree(parentNoteId, childNoteId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user