mirror of
https://github.com/zadam/trilium.git
synced 2024-11-11 09:46:25 +08: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
9 changed files with 20 additions and 7 deletions
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");
|
||||
}
|
||||
|
||||
if (note.type === 'code') {
|
||||
extraClasses.push("code");
|
||||
}
|
||||
|
||||
return extraClasses.join(" ");
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ const protected_session = (function() {
|
|||
const dialogEl = $("#protected-session-password-dialog");
|
||||
const passwordFormEl = $("#protected-session-password-form");
|
||||
const passwordEl = $("#protected-session-password");
|
||||
const noteDetailWrapperEl = $("#note-detail-wrapper");
|
||||
|
||||
let protectedSessionDeferred = null;
|
||||
let lastProtectedSessionOperationDate = null;
|
||||
|
@ -24,6 +25,8 @@ const protected_session = (function() {
|
|||
if (requireProtectedSession && !isProtectedSessionAvailable()) {
|
||||
protectedSessionDeferred = dfd;
|
||||
|
||||
noteDetailWrapperEl.hide();
|
||||
|
||||
dialogEl.dialog({
|
||||
modal: modal,
|
||||
width: 400,
|
||||
|
@ -63,6 +66,8 @@ const protected_session = (function() {
|
|||
if (protectedSessionDeferred !== null) {
|
||||
ensureDialogIsClosed(dialogEl, passwordEl);
|
||||
|
||||
noteDetailWrapperEl.show();
|
||||
|
||||
protectedSessionDeferred.resolve();
|
||||
|
||||
protectedSessionDeferred = null;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
overflow: auto;
|
||||
}
|
||||
|
||||
#note-detail-wrapper.protected {
|
||||
#note-detail-wrapper.protected, #note-detail-wrapper.protected .CodeMirror {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
@ -56,14 +56,18 @@ span.fancytree-node.fancytree-folder > span.fancytree-icon {
|
|||
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-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-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 {
|
||||
|
|
|
@ -15,7 +15,8 @@ router.get('/', auth.checkApiAuth, wrap(async (req, res, next) => {
|
|||
SELECT
|
||||
notes_tree.*,
|
||||
notes.note_title,
|
||||
notes.is_protected
|
||||
notes.is_protected,
|
||||
notes.type
|
||||
FROM
|
||||
notes_tree
|
||||
JOIN
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
const sql = require('./sql');
|
||||
const sync_table = require('./sync_table');
|
||||
const data_encryption = require('./data_encryption');
|
||||
|
||||
async function validateParentChild(res, parentNoteId, childNoteId, noteTreeId = null) {
|
||||
const existing = await getExistingNoteTree(parentNoteId, childNoteId);
|
||||
|
|
Loading…
Reference in a new issue