Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c1922ac9f | |||
| 93f1d46104 | |||
| c5daaf541a | |||
| 12b17b1e9e | |||
| ad46ba7d0f | |||
| 44f592c6cb | |||
| 943b35fb7d | |||
| f1967fd466 | |||
| ce2404b18a |
@@ -15,7 +15,7 @@ Trilium Notes is a hierarchical note taking application with focus on building l
|
||||
* Note [attributes](https://github.com/zadam/trilium/wiki/Attributes) can be used for note organization, querying and advanced [scripting](https://github.com/zadam/trilium/wiki/Scripts)
|
||||
* [Synchronization](https://github.com/zadam/trilium/wiki/Synchronization) with self-hosted sync server
|
||||
* Strong [note encryption](https://github.com/zadam/trilium/wiki/Protected-notes) with per-note granularity
|
||||
* [Relation maps](https://github.com/zadam/trilium/wiki/Relation-map) for visualizing notes and their relations
|
||||
* [Relation maps](https://github.com/zadam/trilium/wiki/Relation-map) and [link maps](https://github.com/zadam/trilium/wiki/Link-map) for visualizing notes and their relations
|
||||
* [Scripting](https://github.com/zadam/trilium/wiki/Scripts) - see [Advanced showcases](https://github.com/zadam/trilium/wiki/Advanced-showcases)
|
||||
* Scales well in both usability and performance upwards of 100 000 notes
|
||||
* Touch optimized [mobile frontend](https://github.com/zadam/trilium/wiki/Mobile-frontend) for smartphones and tablets
|
||||
|
||||
@@ -3235,7 +3235,8 @@ var uniqueId = $.fn.extend( {
|
||||
node.makeVisible({ scrollIntoView: false });
|
||||
} catch (e) {} // #272
|
||||
if (activate === false) {
|
||||
return node.setFocus();
|
||||
node.setFocus();
|
||||
return _getResolvedPromise();
|
||||
}
|
||||
return node.setActive();
|
||||
}
|
||||
|
||||
Generated
+13
-13
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "trilium",
|
||||
"version": "0.32.4",
|
||||
"version": "0.33.0-beta",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -2820,9 +2820,9 @@
|
||||
"integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ=="
|
||||
},
|
||||
"electron": {
|
||||
"version": "6.0.0-beta.7",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.7.tgz",
|
||||
"integrity": "sha512-GYG/uAG8VcZnbhd7zYo5lfkqsQElwdjBxoI+eg9xmKiU13QqtVhoyofZPb1OadVqfkyOTjGm4GlW75KlTNgdyw==",
|
||||
"version": "6.0.0-beta.8",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.8.tgz",
|
||||
"integrity": "sha512-TqgsK90V9Mkal24uw9/fGJiRob9J7WnSjlshDQjtmDYYD4xfDqk6U9+FRg638nst44J22BK8ew3HyaguuVqEWw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "^10.12.18",
|
||||
@@ -5013,9 +5013,9 @@
|
||||
}
|
||||
},
|
||||
"file-type": {
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-11.1.0.tgz",
|
||||
"integrity": "sha512-rM0UO7Qm9K7TWTtA6AShI/t7H5BPjDeGVDaNyg9BjHAj3PysKy7+8C8D137R88jnR3rFJZQB/tFgydl5sN5m7g=="
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-12.0.0.tgz",
|
||||
"integrity": "sha512-VV3aQAyoV/fHl0I9uU3/DGjItgh5nylAoJPHOXkZXHW4nFFrxJnHR2xdVqsqyw/9fqYy80m+tS+Rf77w0FTKqg=="
|
||||
},
|
||||
"filename-regex": {
|
||||
"version": "2.0.1",
|
||||
@@ -8554,9 +8554,9 @@
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -11469,9 +11469,9 @@
|
||||
}
|
||||
},
|
||||
"sqlite3": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.0.8.tgz",
|
||||
"integrity": "sha512-kgwHu4j10KhpCHtx//dejd/tVQot7jc3sw+Sn0vMuKOw0X00Ckyg9VceKgzPyGmmz+zEoYue9tOLriWTvYy0ww==",
|
||||
"version": "4.0.9",
|
||||
"resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.0.9.tgz",
|
||||
"integrity": "sha512-IkvzjmsWQl9BuBiM4xKpl5X8WCR4w0AeJHRdobCdXZ8dT/lNc1XS6WqvY35N6+YzIIgzSBeY5prdFObID9F9tA==",
|
||||
"requires": {
|
||||
"nan": "^2.12.1",
|
||||
"node-pre-gyp": "^0.11.0",
|
||||
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
"name": "trilium",
|
||||
"productName": "Trilium Notes",
|
||||
"description": "Trilium Notes",
|
||||
"version": "0.33.0-beta",
|
||||
"version": "0.33.1-beta",
|
||||
"license": "AGPL-3.0-only",
|
||||
"main": "electron.js",
|
||||
"bin": {
|
||||
@@ -37,7 +37,7 @@
|
||||
"electron-window-state": "5.0.3",
|
||||
"express": "4.17.1",
|
||||
"express-session": "1.16.2",
|
||||
"file-type": "11.1.0",
|
||||
"file-type": "12.0.0",
|
||||
"fs-extra": "8.0.1",
|
||||
"get-port": "5.0.0",
|
||||
"helmet": "3.18.0",
|
||||
@@ -66,7 +66,7 @@
|
||||
"session-file-store": "1.3.0",
|
||||
"simple-node-logger": "18.12.22",
|
||||
"sqlite": "3.0.3",
|
||||
"sqlite3": "4.0.8",
|
||||
"sqlite3": "4.0.9",
|
||||
"tar-stream": "2.1.0",
|
||||
"turndown": "5.0.3",
|
||||
"unescape": "1.0.1",
|
||||
@@ -75,7 +75,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"devtron": "1.4.0",
|
||||
"electron": "6.0.0-beta.7",
|
||||
"electron": "6.0.0-beta.8",
|
||||
"electron-builder": "20.43.0",
|
||||
"electron-compile": "6.4.4",
|
||||
"electron-installer-debian": "2.0.0",
|
||||
|
||||
+3
-3
@@ -90,10 +90,10 @@ app.use((req, res, next) => {
|
||||
app.use((err, req, res, next) => {
|
||||
if (err && err.message && err.message.includes("Invalid package")) {
|
||||
// electron 6 outputs a lot of such errors which do not seem important
|
||||
return;
|
||||
}
|
||||
|
||||
log.info(err);
|
||||
else {
|
||||
log.info(err);
|
||||
}
|
||||
|
||||
res.status(err.status || 500);
|
||||
res.send({
|
||||
|
||||
@@ -3,6 +3,7 @@ import utils from './utils.js';
|
||||
import server from './server.js';
|
||||
import infoService from "./info.js";
|
||||
import treeCache from "./tree_cache.js";
|
||||
import treeUtils from "./tree_utils.js";
|
||||
import hoistedNoteService from "./hoisted_note.js";
|
||||
import noteDetailService from "./note_detail.js";
|
||||
|
||||
@@ -105,9 +106,10 @@ async function deleteNodes(nodes) {
|
||||
next = nodes[0].getParent();
|
||||
}
|
||||
|
||||
let activeNotePath = null;
|
||||
|
||||
if (next) {
|
||||
// activate next element after this one is deleted so we don't lose focus
|
||||
next.setActive();
|
||||
activeNotePath = await treeUtils.getNotePath(next);
|
||||
}
|
||||
|
||||
await treeService.loadTreeCache();
|
||||
@@ -119,7 +121,15 @@ async function deleteNodes(nodes) {
|
||||
}
|
||||
|
||||
for (const parentNoteId of parentNoteIds) {
|
||||
treeService.reloadNote(parentNoteId);
|
||||
await treeService.reloadNote(parentNoteId);
|
||||
}
|
||||
|
||||
// activate after all the reloading
|
||||
if (activeNotePath) {
|
||||
treeService.focusTree();
|
||||
|
||||
const node = await treeService.activateNote(activeNotePath);
|
||||
node.setFocus(true);
|
||||
}
|
||||
|
||||
infoService.showMessage("Note(s) has been deleted.");
|
||||
|
||||
@@ -453,12 +453,6 @@ function initFancyTree(tree) {
|
||||
$tree.on('contextmenu', '.fancytree-node', function(e) {
|
||||
const node = $.ui.fancytree.getNode(e);
|
||||
|
||||
// right click resets selection to just this node
|
||||
// this is important when e.g. you right click on a note while having different note active
|
||||
// and then click on delete - obviously you want to delete only that one right-clicked
|
||||
node.setSelected(true);
|
||||
clearSelectedNodes();
|
||||
|
||||
contextMenuWidget.initContextMenu(e, new TreeContextMenu(node));
|
||||
|
||||
return false; // blocks default browser right click menu
|
||||
@@ -522,17 +516,20 @@ async function collapseTree(node = null) {
|
||||
node.visit(node => node.setExpanded(false));
|
||||
}
|
||||
|
||||
function focusTree() {
|
||||
$tree.find('.fancytree-container').focus();
|
||||
}
|
||||
|
||||
async function scrollToActiveNote() {
|
||||
const activeContext = noteDetailService.getActiveTabContext();
|
||||
|
||||
if (activeContext && activeContext.notePath) {
|
||||
focusTree();
|
||||
|
||||
const node = await expandToNote(activeContext.notePath);
|
||||
|
||||
node.makeVisible({scrollIntoView: true});
|
||||
|
||||
node.setFocus();
|
||||
|
||||
await activateNote(activeContext.notePath);
|
||||
node.setFocus(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -821,5 +818,6 @@ export default {
|
||||
expandToNote,
|
||||
getNodeFromPath,
|
||||
resolveNotePath,
|
||||
getSomeNotePath
|
||||
getSomeNotePath,
|
||||
focusTree
|
||||
};
|
||||
@@ -122,7 +122,13 @@ class TreeContextMenu {
|
||||
clipboard.pasteInto(this.node);
|
||||
}
|
||||
else if (cmd === "delete") {
|
||||
treeChangesService.deleteNodes(treeService.getSelectedNodes(true));
|
||||
let notesToDelete = treeService.getSelectedNodes(true);
|
||||
|
||||
if (notesToDelete.length === 0) {
|
||||
notesToDelete.push(this.node);
|
||||
}
|
||||
|
||||
treeChangesService.deleteNodes(notesToDelete);
|
||||
}
|
||||
else if (cmd === "export") {
|
||||
exportDialog.showDialog("subtree");
|
||||
|
||||
@@ -7,7 +7,13 @@ import clipboard from "./clipboard.js";
|
||||
|
||||
const keyBindings = {
|
||||
"del": node => {
|
||||
treeChangesService.deleteNodes(treeService.getSelectedNodes(true));
|
||||
let notesToDelete = treeService.getSelectedNodes(true);
|
||||
|
||||
if (notesToDelete.length === 0) {
|
||||
notesToDelete.push(node);
|
||||
}
|
||||
|
||||
treeChangesService.deleteNodes(notesToDelete);
|
||||
},
|
||||
"ctrl+up": node => {
|
||||
const beforeNode = node.getPrevSibling();
|
||||
|
||||
@@ -38,7 +38,9 @@ async function getNotePath(node) {
|
||||
node = node.getParent();
|
||||
}
|
||||
|
||||
path.push(node.data.noteId); // root or hoisted noteId
|
||||
if (node) { // null node can happen directly after unhoisting when tree is still hoisted but option has been changed already
|
||||
path.push(node.data.noteId); // root or hoisted noteId
|
||||
}
|
||||
|
||||
return path.reverse().join("/");
|
||||
}
|
||||
|
||||
@@ -190,27 +190,28 @@ span.fancytree-node.fancytree-active-clone:not(.fancytree-active) .fancytree-tit
|
||||
|
||||
span.fancytree-active .fancytree-title {
|
||||
font-weight: bold;
|
||||
border-color: var(--main-background-color) !important; /* invisible border */
|
||||
border-color: var(--main-border-color) !important;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
span.fancytree-focused .fancytree-title, span.fancytree-focused.fancytree-selected .fancytree-title {
|
||||
color: var(--active-item-text-color) !important;
|
||||
background-color: var(--active-item-background-color) !important;
|
||||
border-color: var(--main-background-color) !important; /* invisible border */
|
||||
border-radius: 3px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
span.fancytree-selected .fancytree-title {
|
||||
color: var(--hover-item-text-color) !important;
|
||||
background-color: var(--hover-item-background-color) !important;
|
||||
border-color: var(--main-background-color) !important; /* invisible border */
|
||||
border-radius: 3px;
|
||||
border-radius: 5px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
span.fancytree-node:hover span.fancytree-title {
|
||||
border-color: var(--main-border-color) !important;
|
||||
border-radius: 3px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.ui-autocomplete {
|
||||
|
||||
@@ -1 +1 @@
|
||||
module.exports = { buildDate:"2019-06-12T21:45:05+02:00", buildRevision: "c646019536dbc48f5f3ea1a35e4df844a4a2c8c3" };
|
||||
module.exports = { buildDate:"2019-06-16T11:13:37+02:00", buildRevision: "93f1d461044c7e027a739fad0ebd2582a71edc34" };
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
|
||||
<!-- Include Fancytree skin and library -->
|
||||
<link href="libraries/fancytree/skin-win8/ui.fancytree.css" rel="stylesheet">
|
||||
<script src="libraries/fancytree/jquery.fancytree-all-deps.min.js"></script>
|
||||
<script src="libraries/fancytree/jquery.fancytree-all-deps.js"></script>
|
||||
|
||||
<script src="libraries/jquery.hotkeys.js"></script>
|
||||
<script src="libraries/jquery.fancytree.hotkeys.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user