Compare commits

...

18 Commits

Author SHA1 Message Date
zadam
70591eadd5 release 0.33.2-beta 2019-06-20 09:39:11 +02:00
zadam
fead3cd7ad fix note export/import/branch prefix to use right-clicked note as opposed to current active 2019-06-20 09:37:18 +02:00
zadam
a7cf3cdf05 fix unloading protected session after the timeout, fixes #571 2019-06-19 22:23:55 +02:00
zadam
5372f71faa hide menu bar 2019-06-19 20:45:19 +02:00
zadam
3b76939f17 distinction between unfocused active and hovered node - unfocused active has dashed border 2019-06-17 22:30:26 +02:00
zadam
c827d38f39 when single note is selected and it's the same that was right clicked for context menu, then we treat it as no-selection action 2019-06-17 22:25:22 +02:00
zadam
1e7586fae4 context menu items are now disabled when there are selected notes and the item does not support actions on multiple items 2019-06-17 20:34:00 +02:00
zadam
ee89111bfb fix clipboard operation for single nodes 2019-06-16 18:07:22 +02:00
zadam
288b3077b2 context menu items are now disabled when there are selected notes and the item does not support actions on multiple items 2019-06-16 12:06:06 +02:00
zadam
5c1922ac9f release 0.33.1-beta 2019-06-16 11:13:37 +02:00
zadam
93f1d46104 fix tree activation/focus after deleting node 2019-06-16 11:12:07 +02:00
zadam
c5daaf541a active note has also border to make it more prominent 2019-06-16 10:53:30 +02:00
zadam
12b17b1e9e fix ctrl+. to switch focus to note tree 2019-06-16 10:41:22 +02:00
zadam
ad46ba7d0f fix fancytree navigation bug before official release, use unminified build in the meantime 2019-06-16 09:44:23 +02:00
zadam
44f592c6cb fix reload 2019-06-16 09:15:37 +02:00
zadam
943b35fb7d fix delete with keyboard and context menu regarding the selection 2019-06-13 22:55:06 +02:00
zadam
f1967fd466 fix unhoisting note 2019-06-13 22:45:55 +02:00
zadam
ce2404b18a add link to link map to README 2019-06-12 22:10:05 +02:00
22 changed files with 189 additions and 187 deletions

View File

@@ -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
@@ -24,7 +24,7 @@ Trilium Notes is a hierarchical note taking application with focus on building l
## Builds
Trilium is provided as either desktop application (Linux, Windows, Mac) or web application hosted on your server (Linux).
Trilium is provided as either desktop application (Linux and Windows) or web application hosted on your server (Linux). Mac OS desktop build is available, but it is [unsupported](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support).
* If you want to use Trilium on the desktop, download binary release for your platform from [latest release](https://github.com/zadam/trilium/releases/latest), unzip the package and run ```trilium``` executable.
* If you want to install Trilium on server, follow [this page](https://github.com/zadam/trilium/wiki/Server-installation).

View File

@@ -58,7 +58,7 @@ async function createMainWindow() {
mainWindowState.manage(win);
win.setMenu(null);
win.setMenuBarVisibility(false);
win.loadURL('http://localhost:' + await port);
win.on('closed', onClosed);

View File

@@ -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();
}

177
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "trilium",
"version": "0.32.4",
"version": "0.33.1-beta",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -589,32 +589,32 @@
"integrity": "sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg=="
},
"app-builder-bin": {
"version": "2.6.6",
"resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-2.6.6.tgz",
"integrity": "sha512-G0Ee6xkbxV+fvM/7xXWIgSDjWAD4E/d/aNbxerq/TVsCyBIau/0VPmrEqBMyZv0NbTwLDW5aF/yHG+0ZEY77kA==",
"version": "2.6.16",
"resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-2.6.16.tgz",
"integrity": "sha512-TSq2/AwXbFI+jK4SPRRASZEpZ32HsrugxuCzHshnZ3Wj5LDVIAMU3EGXfaciXWx7TV047G69RlA4/Y8OiHBn3w==",
"dev": true
},
"app-builder-lib": {
"version": "20.43.0",
"resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-20.43.0.tgz",
"integrity": "sha512-8OhRPGbTFsgBn07mcG1x0FApqsLLQkNMrdl2sBPo/haI/E1QqhN4DU5x7nKbbFwnsG2XvqvBBZwnMV3FXgDi9Q==",
"version": "20.44.2",
"resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-20.44.2.tgz",
"integrity": "sha512-84AEt+k/edrwHwFtaXx8SGAC9ZdMJabx5xf2VGM8L8sFYbBPJppl4G6TieHqpPhDURbPXqL710HKEA/lyiEIRQ==",
"dev": true,
"requires": {
"7zip-bin": "~4.1.0",
"app-builder-bin": "2.6.6",
"app-builder-bin": "2.6.16",
"async-exit-hook": "^2.0.1",
"bluebird-lst": "^1.0.9",
"builder-util": "10.0.2",
"builder-util-runtime": "8.2.4",
"builder-util": "10.1.0",
"builder-util-runtime": "8.2.5",
"chromium-pickle-js": "^0.2.0",
"debug": "^4.1.1",
"ejs": "^2.6.1",
"ejs": "^2.6.2",
"electron-osx-sign": "0.4.11",
"electron-publish": "20.43.0",
"electron-publish": "20.44.2",
"fs-extra-p": "^8.0.2",
"hosted-git-info": "^2.7.1",
"is-ci": "^2.0.0",
"isbinaryfile": "^4.0.0",
"isbinaryfile": "^4.0.1",
"js-yaml": "^3.13.1",
"lazy-val": "^1.0.4",
"minimatch": "^3.0.4",
@@ -623,7 +623,7 @@
"read-config-file": "3.2.2",
"sanitize-filename": "^1.6.1",
"semver": "^6.1.1",
"temp-file": "^3.3.2"
"temp-file": "^3.3.3"
},
"dependencies": {
"ci-info": {
@@ -678,9 +678,9 @@
}
},
"resolve": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz",
"integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==",
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
"integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -1386,16 +1386,16 @@
}
},
"builder-util": {
"version": "10.0.2",
"resolved": "https://registry.npmjs.org/builder-util/-/builder-util-10.0.2.tgz",
"integrity": "sha512-Dt11O/MTdCsaCjAdnkVVcDSSkQEkvPWAs18sNQBc6l6wt5RvzcI4nfgpLxwbUi/DkCpHCltUgIj94TLQXQv1bw==",
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/builder-util/-/builder-util-10.1.0.tgz",
"integrity": "sha512-M+XnPGbVKSssgxgejtcrCPr7BcJfTyZZYf9yJ8r3o3kDJfBcF0ShaxyuOk956PnAUuanRGtfhZb4cD6dx+x1jA==",
"dev": true,
"requires": {
"7zip-bin": "~4.1.0",
"@types/debug": "^4.1.4",
"app-builder-bin": "2.6.6",
"app-builder-bin": "2.6.16",
"bluebird-lst": "^1.0.9",
"builder-util-runtime": "^8.2.4",
"builder-util-runtime": "^8.2.5",
"chalk": "^2.4.2",
"debug": "^4.1.1",
"fs-extra-p": "^8.0.2",
@@ -1403,7 +1403,7 @@
"js-yaml": "^3.13.1",
"source-map-support": "^0.5.12",
"stat-mode": "^0.3.0",
"temp-file": "^3.3.2"
"temp-file": "^3.3.3"
},
"dependencies": {
"ansi-styles": {
@@ -1475,9 +1475,9 @@
}
},
"builder-util-runtime": {
"version": "8.2.4",
"resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.2.4.tgz",
"integrity": "sha512-iwRnmFnGs63+p6uJem2N/d9Q0SKj5c0TP8PTesKnWsWvo1saKKM/0yiT137w+3uz+r/Cmf8VH/8nt75uW8jeUw==",
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.2.5.tgz",
"integrity": "sha512-YILT+YUlxrE3yNB6mDC1tF+Q24mr1LSYdjP5U861jbBeDZfvy1/VPDzW3boMVrDtzYnDnvkYrzLJnoh6TXA75w==",
"dev": true,
"requires": {
"bluebird-lst": "^1.0.9",
@@ -2621,14 +2621,14 @@
}
},
"dmg-builder": {
"version": "6.6.4",
"resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-6.6.4.tgz",
"integrity": "sha512-neJXwnFaJ4wisP++Yyi9H0kEUsvxyY7TBBEK2fu8V8i1VoMQKljY/6Dgf2HktLVHzXSWP71TQwKKWSIWI/3aeQ==",
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-6.7.0.tgz",
"integrity": "sha512-YluV5KM2sbqKZ0SeL+K7Q0E37EAeV64UmdUtnV4CZqe7TYaVa5j2K5zpfoMZyg+sekxAN8utfmrvaLf9V6SNeA==",
"dev": true,
"requires": {
"app-builder-lib": "~20.43.0",
"app-builder-lib": "~20.44.2",
"bluebird-lst": "^1.0.9",
"builder-util": "~10.0.2",
"builder-util": "~10.1.0",
"fs-extra-p": "^8.0.2",
"iconv-lite": "^0.4.24",
"js-yaml": "^3.13.1",
@@ -2815,14 +2815,14 @@
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"ejs": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz",
"integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ=="
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.2.tgz",
"integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q=="
},
"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.9",
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.9.tgz",
"integrity": "sha512-tbBpSamFzD1ayJhF+sUo56e7qD+djdMOPh8B0iA0C10pYbi0HUSEH1EOLtB+UMWU3wkc8QOCMWcgz7wze1w6QQ==",
"dev": true,
"requires": {
"@types/node": "^10.12.18",
@@ -2831,17 +2831,17 @@
}
},
"electron-builder": {
"version": "20.43.0",
"resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-20.43.0.tgz",
"integrity": "sha512-8trMnW3K2BWtPGQJqCWZ5QMwZajMucmzlTCHrzhufQWuQbaPhanmho6tWFm2ftyuYku3T4TB4kD7UCX/YQDGyg==",
"version": "20.44.2",
"resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-20.44.2.tgz",
"integrity": "sha512-4n7s8gfmMuNr3IbVLXo/XzcdaWcOFxu+VeC0FUjl90lU8H8pvuQ/LZS+yD7k0zVw98p4+GvMg0nIwjdF+BbwTA==",
"dev": true,
"requires": {
"app-builder-lib": "20.43.0",
"app-builder-lib": "20.44.2",
"bluebird-lst": "^1.0.9",
"builder-util": "10.0.2",
"builder-util-runtime": "8.2.4",
"builder-util": "10.1.0",
"builder-util-runtime": "8.2.5",
"chalk": "^2.4.2",
"dmg-builder": "6.6.4",
"dmg-builder": "6.7.0",
"fs-extra-p": "^8.0.2",
"is-ci": "^2.0.0",
"lazy-val": "^1.0.4",
@@ -3055,15 +3055,15 @@
"dev": true
},
"package-json": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/package-json/-/package-json-6.3.0.tgz",
"integrity": "sha512-XO7WS3EEXd48vmW633Y97Mh9xuENFiOevI9G+ExfTG/k6xuY9cBd3fxkAoDMSEsNZXasaVJIJ1rD/n7GMf18bA==",
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/package-json/-/package-json-6.4.0.tgz",
"integrity": "sha512-bd1T8OBG7hcvMd9c/udgv6u5v9wISP3Oyl9Cm7Weop8EFwrtcQDnS2sb6zhwqus2WslSr5wSTIPiTTpxxmPm7Q==",
"dev": true,
"requires": {
"got": "^9.6.0",
"registry-auth-token": "^3.4.0",
"registry-url": "^5.0.0",
"semver": "^5.6.0"
"semver": "^6.1.1"
}
},
"prepend-http": {
@@ -3091,12 +3091,6 @@
"rc": "^1.2.8"
}
},
"semver": {
"version": "5.7.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"dev": true
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
@@ -3583,18 +3577,18 @@
}
},
"electron-publish": {
"version": "20.43.0",
"resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-20.43.0.tgz",
"integrity": "sha512-+oaTdbMmh1xceKPZWORYyGkNmxIhu7rkE1qEEn0NeG3KHEAePHg9FZGemR4aV3tQmtOwti2Vj+x8snAUxsnHHQ==",
"version": "20.44.2",
"resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-20.44.2.tgz",
"integrity": "sha512-GRzmMFdVG63zKip2wY+fa5Vmw6bHz1OaGemz3Ebfzm60CfaPOw8o3iWa49JuxYYPobi2BbZrbr76a0flECmAzg==",
"dev": true,
"requires": {
"bluebird-lst": "^1.0.9",
"builder-util": "~10.0.2",
"builder-util-runtime": "^8.2.4",
"builder-util": "~10.1.0",
"builder-util-runtime": "^8.2.5",
"chalk": "^2.4.2",
"fs-extra-p": "^8.0.2",
"lazy-val": "^1.0.4",
"mime": "^2.4.3"
"mime": "^2.4.4"
},
"dependencies": {
"ansi-styles": {
@@ -5013,9 +5007,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 +8548,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=="
}
}
},
@@ -8576,9 +8570,9 @@
"integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q=="
},
"node-abi": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.8.0.tgz",
"integrity": "sha512-1/aa2clS0pue0HjckL62CsbhWWU35HARvBDXcJtYKbYR7LnIutmpxmXbuDMV9kEviD2lP/wACOgWmmwljghHyQ==",
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.9.0.tgz",
"integrity": "sha512-jmEOvv0eanWjhX8dX1pmjb7oJl1U1oR4FOh0b2GnvALwSYoOdU7sj+kLDSAyjo4pfC9aj/IxkloxdLJQhSSQBA==",
"requires": {
"semver": "^5.4.1"
},
@@ -11469,9 +11463,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",
@@ -11917,37 +11911,14 @@
"integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0="
},
"temp-file": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.3.2.tgz",
"integrity": "sha512-FGKccAW0Mux9hC/2bdUIe4bJRv4OyVo4RpVcuplFird1V/YoplIFbnPZjfzbJSf/qNvRZIRB9/4n/RkI0GziuQ==",
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.3.3.tgz",
"integrity": "sha512-ErWJ0vfZwkozaH7dn/5QtYdrGwy6fWID0GG3PEzNb9Vmt6urL4mQ3lKz7NWVi1/kmZsWQzgjTL7/P4mwGx5jqg==",
"dev": true,
"requires": {
"async-exit-hook": "^2.0.1",
"bluebird-lst": "^1.0.6",
"fs-extra-p": "^7.0.0"
},
"dependencies": {
"fs-extra": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
"integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
},
"fs-extra-p": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fs-extra-p/-/fs-extra-p-7.0.1.tgz",
"integrity": "sha512-yhd2OV0HnHt2oitlp+X9hl2ReX4X/7kQeL7/72qzPHTZj5eUPGzAKOvEglU02Fa1OeG2rSy/aKB4WGVaLiF8tw==",
"dev": true,
"requires": {
"bluebird-lst": "^1.0.7",
"fs-extra": "^7.0.1"
}
}
"bluebird-lst": "^1.0.9",
"fs-extra-p": "^8.0.2"
}
},
"tempfile": {
@@ -12877,9 +12848,9 @@
}
},
"ws": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.0.0.tgz",
"integrity": "sha512-cknCal4k0EAOrh1SHHPPWWh4qm93g1IuGGGwBjWkXmCG7LsDtL8w9w+YVfaF+KSVwiHQKDIMsSLBVftKf9d1pg==",
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.0.1.tgz",
"integrity": "sha512-ILHfMbuqLJvnSgYXLgy4kMntroJpe8hT41dOVWM8bxRuw6TK4mgMp9VJUNsZTEc5Bh+Mbs0DJT4M0N+wBG9l9A==",
"requires": {
"async-limiter": "^1.0.0"
}

View File

@@ -2,7 +2,7 @@
"name": "trilium",
"productName": "Trilium Notes",
"description": "Trilium Notes",
"version": "0.33.0-beta",
"version": "0.33.2-beta",
"license": "AGPL-3.0-only",
"main": "electron.js",
"bin": {
@@ -30,14 +30,14 @@
"csurf": "1.10.0",
"dayjs": "1.8.14",
"debug": "4.1.1",
"ejs": "2.6.1",
"ejs": "2.6.2",
"electron-debug": "3.0.0",
"electron-dl": "1.14.0",
"electron-find": "1.0.6",
"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",
@@ -53,7 +53,7 @@
"mime-types": "2.1.24",
"moment": "2.24.0",
"multer": "1.4.1",
"node-abi": "2.8.0",
"node-abi": "2.9.0",
"open": "6.3.0",
"pngjs": "3.4.0",
"rand-token": "0.4.0",
@@ -66,17 +66,17 @@
"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",
"ws": "7.0.0",
"ws": "7.0.1",
"xml2js": "0.4.19"
},
"devDependencies": {
"devtron": "1.4.0",
"electron": "6.0.0-beta.7",
"electron-builder": "20.43.0",
"electron": "6.0.0-beta.9",
"electron-builder": "20.44.2",
"electron-compile": "6.4.4",
"electron-installer-debian": "2.0.0",
"electron-packager": "13.1.1",

View File

@@ -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({

View File

@@ -142,10 +142,10 @@ $noteTabContainer.on("click", ".export-note-button", function () {
return;
}
exportDialog.showDialog('single');
exportDialog.showDialog(treeService.getActiveNode(), 'single');
});
$noteTabContainer.on("click", ".import-files-button", importDialog.showDialog);
$noteTabContainer.on("click", ".import-files-button", () => importDialog.showDialog(treeService.getActiveNode()));
$('[data-toggle="tooltip"]').tooltip({
html: true

View File

@@ -12,21 +12,19 @@ const $noteTitle = $('#branch-prefix-note-title');
let branchId;
async function showDialog() {
async function showDialog(node) {
utils.closeActiveDialog();
glob.activeDialog = $dialog;
$dialog.modal();
const currentNode = treeService.getActiveNode();
branchId = currentNode.data.branchId;
branchId = node.data.branchId;
const branch = await treeCache.getBranch(branchId);
$treePrefixInput.val(branch.prefix);
const noteTitle = await treeUtils.getNoteTitle(currentNode.data.noteId);
const noteTitle = await treeUtils.getNoteTitle(node.data.noteId);
$noteTitle.text(" - " + noteTitle);
}

View File

@@ -1,4 +1,3 @@
import treeService from '../services/tree.js';
import treeUtils from "../services/tree_utils.js";
import utils from "../services/utils.js";
import messagingService from "../services/messaging.js";
@@ -6,7 +5,7 @@ import infoService from "../services/info.js";
const $dialog = $("#export-dialog");
const $form = $("#export-form");
const $noteTitle = $dialog.find(".note-title");
const $noteTitle = $dialog.find(".export-note-title");
const $subtreeFormats = $("#export-subtree-formats");
const $singleFormats = $("#export-single-formats");
const $subtreeType = $("#export-type-subtree");
@@ -17,8 +16,9 @@ const $exportButton = $("#export-button");
const $opmlVersions = $("#opml-versions");
let exportId = '';
let branchId = null;
async function showDialog(defaultType) {
async function showDialog(node, defaultType) {
utils.closeActiveDialog();
// each opening of the dialog resets the exportId so we don't associate it with previous exports anymore
@@ -46,8 +46,9 @@ async function showDialog(defaultType) {
$dialog.modal();
const currentNode = treeService.getActiveNode();
const noteTitle = await treeUtils.getNoteTitle(currentNode.data.noteId);
branchId = node.data.branchId;
const noteTitle = await treeUtils.getNoteTitle(node.data.noteId);
$noteTitle.html(noteTitle);
}
@@ -70,9 +71,7 @@ $form.submit(() => {
const exportVersion = exportFormat === 'opml' ? $dialog.find("input[name='opml-version']:checked").val() : "1.0";
const currentNode = treeService.getActiveNode();
exportBranch(currentNode.data.branchId, exportType, exportFormat, exportVersion);
exportBranch(branchId, exportType, exportFormat, exportVersion);
return false;
});

View File

@@ -19,8 +19,9 @@ const $codeImportedAsCodeCheckbox = $("#code-imported-as-code-checkbox");
const $explodeArchivesCheckbox = $("#explode-archives-checkbox");
let importId;
let importIntoNoteId = null;
async function showDialog() {
async function showDialog(node) {
utils.closeActiveDialog();
// each opening of the dialog resets the importId so we don't associate it with previous imports anymore
@@ -37,19 +38,18 @@ async function showDialog() {
glob.activeDialog = $dialog;
const currentNode = treeService.getActiveNode();
$noteTitle.text(await treeUtils.getNoteTitle(currentNode.data.noteId));
importIntoNoteId = node.data.noteId;
$noteTitle.text(await treeUtils.getNoteTitle(importIntoNoteId));
$dialog.modal();
}
$form.submit(() => {
const currentNode = treeService.getActiveNode();
// disabling so that import is not triggered again.
$importButton.attr("disabled", "disabled");
importIntoNote(currentNode.data.noteId);
importIntoNote(importIntoNoteId);
return false;
});

View File

@@ -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.");

View File

@@ -43,6 +43,7 @@ async function setupProtectedSession(password) {
}
protectedSessionHolder.setProtectedSessionId(response.protectedSessionId);
protectedSessionHolder.touchProtectedSession();
await treeService.reload();

View File

@@ -37,6 +37,8 @@ function isProtectedSessionAvailable() {
function touchProtectedSession() {
if (isProtectedSessionAvailable()) {
lastProtectedSessionOperationDate = new Date();
setProtectedSessionId(utils.getCookie(PROTECTED_SESSION_ID_KEY));
}
}

View File

@@ -303,6 +303,15 @@ function getSelectedNodes(stopOnParents = false) {
return getTree().getSelectedNodes(stopOnParents);
}
function getSelectedOrActiveNodes(node) {
let notes = getSelectedNodes(true);
if (notes.length === 0) {
notes.push(node);
}
return notes;
}
function clearSelectedNodes() {
for (const selectedNode of getSelectedNodes()) {
selectedNode.setSelected(false);
@@ -453,12 +462,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 +525,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);
}
}
@@ -808,6 +814,7 @@ export default {
createNote,
createNoteInto,
getSelectedNodes,
getSelectedOrActiveNodes,
clearSelectedNodes,
sortAlphabetically,
showTree,
@@ -821,5 +828,6 @@ export default {
expandToNote,
getNodeFromPath,
resolveNotePath,
getSomeNotePath
getSomeNotePath,
focusTree
};

View File

@@ -34,45 +34,52 @@ class TreeContextMenu {
const isNotRoot = note.noteId !== 'root';
const isHoisted = note.noteId === await hoistedNoteService.getHoistedNoteId();
// some actions don't support multi-note so they are disabled when notes are selected
// the only exception is when the only selected note is the one that was right-clicked, then
// it's clear what the user meant to do.
const selNodes = treeService.getSelectedNodes();
const noSelectedNotes = selNodes.length === 0
|| (selNodes.length === 1 && selNodes[0] === this.node);
const insertNoteAfterEnabled = isNotRoot && !isHoisted && parentNote.type !== 'search';
const insertChildNoteEnabled = note.type !== 'search';
return [
{ title: "Open in new tab", cmd: "openInTab", uiIcon: "empty" },
{ title: "Open in new tab", cmd: "openInTab", uiIcon: "empty", enabled: noSelectedNotes },
{ title: "Insert note after <kbd>Ctrl+O</kbd>", cmd: "insertNoteAfter", uiIcon: "plus",
items: insertNoteAfterEnabled ? this.getNoteTypeItems("insertNoteAfter") : null,
enabled: insertNoteAfterEnabled },
enabled: insertNoteAfterEnabled && noSelectedNotes },
{ title: "Insert child note <kbd>Ctrl+P</kbd>", cmd: "insertChildNote", uiIcon: "plus",
items: insertChildNoteEnabled ? this.getNoteTypeItems("insertChildNote") : null,
enabled: insertChildNoteEnabled },
enabled: insertChildNoteEnabled && noSelectedNotes },
{ title: "Delete <kbd>Delete</kbd>", cmd: "delete", uiIcon: "trash",
enabled: isNotRoot && !isHoisted && parentNote.type !== 'search' },
{ title: "----" },
isHoisted ? null : { title: "Hoist note <kbd>Ctrl-H</kbd>", cmd: "hoist", uiIcon: "empty" },
isHoisted ? null : { title: "Hoist note <kbd>Ctrl-H</kbd>", cmd: "hoist", uiIcon: "empty", enabled: noSelectedNotes },
!isHoisted || !isNotRoot ? null : { title: "Unhoist note <kbd>Ctrl-H</kbd>", cmd: "unhoist", uiIcon: "arrow-up" },
{ title: "Edit branch prefix <kbd>F2</kbd>", cmd: "editBranchPrefix", uiIcon: "empty",
enabled: isNotRoot && parentNote.type !== 'search'},
enabled: isNotRoot && parentNote.type !== 'search' && noSelectedNotes},
{ title: "----" },
{ title: "Protect subtree", cmd: "protectSubtree", uiIcon: "shield-check" },
{ title: "Unprotect subtree", cmd: "unprotectSubtree", uiIcon: "shield-close" },
{ title: "Protect subtree", cmd: "protectSubtree", uiIcon: "shield-check", enabled: noSelectedNotes },
{ title: "Unprotect subtree", cmd: "unprotectSubtree", uiIcon: "shield-close", enabled: noSelectedNotes },
{ title: "----" },
{ title: "Copy / clone <kbd>Ctrl+C</kbd>", cmd: "copy", uiIcon: "files",
enabled: isNotRoot },
{ title: "Cut <kbd>Ctrl+X</kbd>", cmd: "cut", uiIcon: "scissors",
enabled: isNotRoot },
{ title: "Paste into <kbd>Ctrl+V</kbd>", cmd: "pasteInto", uiIcon: "clipboard",
enabled: !clipboard.isEmpty() && note.type !== 'search' },
enabled: !clipboard.isEmpty() && note.type !== 'search' && noSelectedNotes },
{ title: "Paste after", cmd: "pasteAfter", uiIcon: "clipboard",
enabled: !clipboard.isEmpty() && isNotRoot && parentNote.type !== 'search' },
enabled: !clipboard.isEmpty() && isNotRoot && parentNote.type !== 'search' && noSelectedNotes },
{ title: "----" },
{ title: "Export", cmd: "export", uiIcon: "empty",
enabled: note.type !== 'search' },
enabled: note.type !== 'search' && noSelectedNotes },
{ title: "Import into note", cmd: "importIntoNote", uiIcon: "empty",
enabled: note.type !== 'search' },
enabled: note.type !== 'search' && noSelectedNotes },
{ title: "----" },
{ title: "Collapse subtree <kbd>Alt+-</kbd>", cmd: "collapseSubtree", uiIcon: "align-justify" },
{ title: "Force note sync", cmd: "forceNoteSync", uiIcon: "refresh" },
{ title: "Sort alphabetically <kbd>Alt+S</kbd>", cmd: "sortAlphabetically", uiIcon: "empty" }
{ title: "Collapse subtree <kbd>Alt+-</kbd>", cmd: "collapseSubtree", uiIcon: "align-justify", enabled: noSelectedNotes },
{ title: "Force note sync", cmd: "forceNoteSync", uiIcon: "refresh", enabled: noSelectedNotes },
{ title: "Sort alphabetically <kbd>Alt+S</kbd>", cmd: "sortAlphabetically", uiIcon: "empty", enabled: noSelectedNotes }
].filter(row => row !== null);
}
@@ -110,10 +117,10 @@ class TreeContextMenu {
protectedSessionService.protectSubtree(this.node.data.noteId, false);
}
else if (cmd === "copy") {
clipboard.copy(treeService.getSelectedNodes());
clipboard.copy(treeService.getSelectedOrActiveNodes(this.node));
}
else if (cmd === "cut") {
clipboard.cut(treeService.getSelectedNodes());
clipboard.cut(treeService.getSelectedOrActiveNodes(this.node));
}
else if (cmd === "pasteAfter") {
clipboard.pasteAfter(this.node);
@@ -122,13 +129,13 @@ class TreeContextMenu {
clipboard.pasteInto(this.node);
}
else if (cmd === "delete") {
treeChangesService.deleteNodes(treeService.getSelectedNodes(true));
treeChangesService.deleteNodes(treeService.getSelectedOrActiveNodes(this.node));
}
else if (cmd === "export") {
exportDialog.showDialog("subtree");
exportDialog.showDialog(this.node,"subtree");
}
else if (cmd === "importIntoNote") {
importDialog.showDialog();
importDialog.showDialog(this.node);
}
else if (cmd === "collapseSubtree") {
treeService.collapseTree(this.node);

View File

@@ -7,7 +7,7 @@ import clipboard from "./clipboard.js";
const keyBindings = {
"del": node => {
treeChangesService.deleteNodes(treeService.getSelectedNodes(true));
treeChangesService.deleteNodes(treeService.getSelectedOrActiveNodes(node));
},
"ctrl+up": node => {
const beforeNode = node.getPrevSibling();
@@ -104,13 +104,13 @@ const keyBindings = {
return false;
},
"ctrl+c": () => {
clipboard.copy(treeService.getSelectedNodes());
"ctrl+c": node => {
clipboard.copy(treeService.getSelectedOrActiveNodes(node));
return false;
},
"ctrl+x": () => {
clipboard.cut(treeService.getSelectedNodes());
"ctrl+x": node => {
clipboard.cut(treeService.getSelectedOrActiveNodes(node));
return false;
},

View File

@@ -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("/");
}

View File

@@ -190,27 +190,32 @@ 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-active:not(.fancytree-focused) .fancytree-title {
border-style: dashed !important;
}
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 {

View File

@@ -1 +1 @@
module.exports = { buildDate:"2019-06-12T21:45:05+02:00", buildRevision: "c646019536dbc48f5f3ea1a35e4df844a4a2c8c3" };
module.exports = { buildDate:"2019-06-20T09:39:11+02:00", buildRevision: "fead3cd7ade63620655376dc5e85b4308ec71bde" };

View File

@@ -74,8 +74,6 @@ function getMime(fileName) {
const ext = path.extname(fileName).toLowerCase();
console.log("EXT", ext);
if (ext in EXTENSION_TO_MIME) {
console.log(EXTENSION_TO_MIME[ext]);

View File

@@ -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>

View File

@@ -2,7 +2,7 @@
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Export note</h5>
<h5 class="modal-title">Export note "<span class="export-note-title"></span>"</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>