Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c91b0459e | |||
| af21dd4463 | |||
| 1ea0d283de | |||
| 6e3d8472e1 | |||
| 2a9f36a027 | |||
| cf3726289c | |||
| c8e4a5c9e7 | |||
| a3951f1cce | |||
| 7c77ae758b |
+1
-1
@@ -74,7 +74,7 @@ async function createMainWindow() {
|
||||
const parsedUrl = url.parse(targetUrl);
|
||||
|
||||
// we still need to allow internal redirects from setup and migration pages
|
||||
if (parsedUrl.hostname !== 'localhost' || parsedUrl.hostname !== '127.0.0.1' || (parsedUrl.path && parsedUrl.path !== '/')) {
|
||||
if (!['localhost', '127.0.0.1'].includes(parsedUrl.hostname) || (parsedUrl.path && parsedUrl.path !== '/')) {
|
||||
ev.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
Generated
+4
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "trilium",
|
||||
"version": "0.33.2-beta",
|
||||
"version": "0.33.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -2820,9 +2820,9 @@
|
||||
"integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q=="
|
||||
},
|
||||
"electron": {
|
||||
"version": "6.0.0-beta.10",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.10.tgz",
|
||||
"integrity": "sha512-eKDUv5ZZGjFE2ccBQzBpY6j3oT1NvnHGLcSoGXp6vCWkx+ZYjPyujwG3gW61FK7iL5FMKyg9IlhCOsIy4HEruw==",
|
||||
"version": "6.0.0-beta.11",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.11.tgz",
|
||||
"integrity": "sha512-B6zh9c5pJ0BKKNkOEbF6vKXnBCWgtvY8LaUYDNeR9ttnPP0CCm0oovIoqP9/nN5gL8rlCoCgKWsjmiHu0jg7mA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "^10.12.18",
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
"name": "trilium",
|
||||
"productName": "Trilium Notes",
|
||||
"description": "Trilium Notes",
|
||||
"version": "0.33.3",
|
||||
"version": "0.33.5",
|
||||
"license": "AGPL-3.0-only",
|
||||
"main": "electron.js",
|
||||
"bin": {
|
||||
@@ -75,7 +75,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"devtron": "1.4.0",
|
||||
"electron": "6.0.0-beta.10",
|
||||
"electron": "6.0.0-beta.11",
|
||||
"electron-builder": "20.44.2",
|
||||
"electron-compile": "6.4.4",
|
||||
"electron-installer-debian": "2.0.0",
|
||||
|
||||
@@ -102,7 +102,7 @@ async function deleteNodes(nodes) {
|
||||
next = nodes[0].getPrevSibling();
|
||||
}
|
||||
|
||||
if (!next && !hoistedNoteService.isTopLevelNode(nodes[0])) {
|
||||
if (!next && !await hoistedNoteService.isTopLevelNode(nodes[0])) {
|
||||
next = nodes[0].getParent();
|
||||
}
|
||||
|
||||
|
||||
@@ -88,10 +88,13 @@ setTimeout(() => {
|
||||
console.log("Lost connection to server");
|
||||
}
|
||||
|
||||
ws.send(JSON.stringify({
|
||||
type: 'ping',
|
||||
lastSyncId: lastSyncId
|
||||
}));
|
||||
try {
|
||||
ws.send(JSON.stringify({
|
||||
type: 'ping',
|
||||
lastSyncId: lastSyncId
|
||||
}));
|
||||
}
|
||||
catch (e) {} // if the connection is closed then this produces a lot of messages
|
||||
}, 1000);
|
||||
}, 0);
|
||||
|
||||
|
||||
@@ -405,7 +405,7 @@ tabRow.addListener('tabRemove', async ({ detail }) => {
|
||||
|
||||
if (tabContextToDelete) {
|
||||
// sometimes there are orphan autocompletes after closing the tab
|
||||
tabContextToDelete.$tabContent.find('.aa-input').autocomplete('close');
|
||||
tabContextToDelete.closeAutocomplete();
|
||||
|
||||
await tabContextToDelete.saveNoteIfChanged();
|
||||
tabContextToDelete.$tabContent.remove();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import utils from "./utils.js";
|
||||
import noteDetailService from "./note_detail.js";
|
||||
import infoService from "./info.js";
|
||||
import server from "./server.js";
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ class NoteDetailText {
|
||||
constructor(ctx) {
|
||||
this.ctx = ctx;
|
||||
this.$component = ctx.$tabContent.find('.note-detail-text');
|
||||
this.$editorEl = this.$component.find('.note-detail-text-editor');
|
||||
this.textEditor = null;
|
||||
|
||||
this.$component.on("dblclick", "img", e => {
|
||||
@@ -39,7 +40,7 @@ class NoteDetailText {
|
||||
// textEditor might have been initialized during previous await so checking again
|
||||
// looks like double initialization can freeze CKEditor pretty badly
|
||||
if (!this.textEditor) {
|
||||
this.textEditor = await BalloonEditor.create(this.$component[0], {
|
||||
this.textEditor = await BalloonEditor.create(this.$editorEl[0], {
|
||||
placeholder: "Type the content of your note here ..."
|
||||
});
|
||||
|
||||
|
||||
@@ -109,6 +109,8 @@ class TabContext {
|
||||
|
||||
this.setTitleBar();
|
||||
|
||||
this.closeAutocomplete(); // esp. on windows autocomplete is not getting closed automatically
|
||||
|
||||
setTimeout(async () => {
|
||||
// we include the note into recent list only if the user stayed on the note at least 5 seconds
|
||||
if (notePath && notePath === this.notePath) {
|
||||
@@ -334,6 +336,12 @@ class TabContext {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closeAutocomplete() {
|
||||
if (utils.isDesktop()) {
|
||||
this.$tabContent.find('.aa-input').autocomplete('close');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default TabContext;
|
||||
@@ -630,7 +630,8 @@ async function createNote(node, parentNoteId, target, extraOptions = {}) {
|
||||
extraClasses: await treeBuilder.getExtraClasses(noteEntity),
|
||||
icon: await treeBuilder.getIcon(noteEntity),
|
||||
folder: extraOptions.type === 'search',
|
||||
lazy: true
|
||||
lazy: true,
|
||||
key: utils.randomString(12) // this should prevent some "duplicate key" errors
|
||||
};
|
||||
|
||||
if (target === 'after') {
|
||||
|
||||
@@ -83,7 +83,8 @@ async function prepareNode(branch) {
|
||||
icon: await getIcon(note),
|
||||
refKey: note.noteId,
|
||||
expanded: branch.isExpanded || hoistedNoteId === note.noteId,
|
||||
lazy: true
|
||||
lazy: true,
|
||||
key: utils.randomString(12) // this should prevent some "duplicate key" errors
|
||||
};
|
||||
|
||||
if (note.hasChildren() || note.type === 'search') {
|
||||
|
||||
@@ -135,13 +135,16 @@ ul.fancytree-container {
|
||||
.note-detail-text h6 { font-size: 1.1em; }
|
||||
|
||||
.note-detail-text {
|
||||
overflow: auto;
|
||||
font-family: var(--detail-text-font-family);
|
||||
}
|
||||
|
||||
.note-detail-text-editor {
|
||||
padding-top: 10px;
|
||||
border: 0 !important;
|
||||
box-shadow: none !important;
|
||||
/* This is because with empty content height of editor is 0 and it's impossible to click into it */
|
||||
min-height: 200px;
|
||||
padding-top: 10px;
|
||||
overflow: auto;
|
||||
font-family: var(--detail-text-font-family);
|
||||
}
|
||||
|
||||
.note-detail-text p:first-child, .note-detail-text::before {
|
||||
|
||||
@@ -1 +1 @@
|
||||
module.exports = { buildDate:"2019-06-24T20:47:50+02:00", buildRevision: "1b831f94a98dbbb7184048f329ea89175841dec2" };
|
||||
module.exports = { buildDate:"2019-06-30T21:47:04+02:00", buildRevision: "af21dd4463afdb901a27a075228a4bdf4cd5ecb5" };
|
||||
|
||||
+3
-3
@@ -72,7 +72,7 @@
|
||||
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
||||
}
|
||||
</script>
|
||||
|
||||
<link href="libraries/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
</body>
|
||||
|
||||
<link href="libraries/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
</body>
|
||||
</html>
|
||||
@@ -49,7 +49,9 @@
|
||||
</div>
|
||||
|
||||
<div class="note-detail-component-wrapper">
|
||||
<div class="note-detail-text note-detail-component" tabindex="10000"></div>
|
||||
<div class="note-detail-text note-detail-component" tabindex="10000">
|
||||
<div class="note-detail-text-editor"></div>
|
||||
</div>
|
||||
|
||||
<div class="note-detail-code note-detail-component"></div>
|
||||
|
||||
|
||||
+3
-1
@@ -11,7 +11,9 @@
|
||||
<table class="note-detail-promoted-attributes"></table>
|
||||
|
||||
<div class="note-detail-component-wrapper">
|
||||
<div class="note-detail-text note-detail-component" tabindex="10000"></div>
|
||||
<div class="note-detail-text note-detail-component" tabindex="10000">
|
||||
<div class="note-detail-text-editor"></div>
|
||||
</div>
|
||||
|
||||
<div class="note-detail-code note-detail-component"></div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user