Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
small improvements and fixes
zadamf60af1f05eb2
diff --git a/package-lock.json b/package-lock.jsonindex 1009a15ebe..c580ba417d 100644--- a/package-lock.json+++ b/package-lock.json@@ -3065,9 +3065,9 @@}},"electron": {- "version": "10.0.0-beta.15",- "resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.15.tgz",- "integrity": "sha512-dCN2AXyiFjJ1EERrjQA3UT/asUgqw7PfFUZkf3NvImIri8DG4dGpuOEa5GSuggpE7X6hS+FSHqOH6d3MExivWg==",+ "version": "10.0.0-beta.17",+ "resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.17.tgz",+ "integrity": "sha512-ImDabQ8RwFq4b15qoZndukJLbel+Kg0vsBqXZ9S41NkoDPRbmHTK/MpIsB8KYApqCceqyOZYANoDYrkbB7QO2g==","dev": true,"requires": {"@electron/get": "^1.0.1",diff --git a/package.json b/package.jsonindex d047f90193..4f2f85ea00 100644--- a/package.json+++ b/package.json@@ -76,7 +76,7 @@},"devDependencies": {"cross-env": "7.0.2",- "electron": "10.0.0-beta.15",+ "electron": "10.0.0-beta.17","electron-builder": "22.8.0","electron-packager": "15.0.0","electron-rebuild": "1.11.0",diff --git a/src/app.js b/src/app.jsindex 4c3dfc028b..a99571f1e4 100644--- a/src/app.js+++ b/src/app.js@@ -23,7 +23,7 @@ app.use(helmet({hidePoweredBy: false, // deactivated because electron 4.0 crashes on this right after startupcontentSecurityPolicy: {directives: {- defaultSrc: ["*", "'unsafe-inline'"]+ defaultSrc: ["*", "'unsafe-inline'", "'unsafe-eval'"]}}}));diff --git a/src/public/app/services/note_tooltip.js b/src/public/app/services/note_tooltip.jsindex d9c6cbd090..d9e6bd14f6 100644--- a/src/public/app/services/note_tooltip.js+++ b/src/public/app/services/note_tooltip.js@@ -45,7 +45,7 @@ async function mouseEnterHandler() {const note = await treeCache.getNote(noteId);const noteComplement = await treeCache.getNoteComplement(noteId);- const html = await renderTooltip(note, noteComplement);+ const html = '<div class="note-tooltip-content">' + await renderTooltip(note, noteComplement) + '</div>';// we need to check if we're still hovering over the element// since the operation to get tooltip content was async, it is possible that@@ -144,4 +144,4 @@ async function renderTooltip(note, noteComplement) {export default {setupGlobalTooltip,setupElementTooltip-}\ No newline at end of file+}diff --git a/src/public/app/services/toast.js b/src/public/app/services/toast.jsindex a64ee88dc5..02e2595ca7 100644--- a/src/public/app/services/toast.js+++ b/src/public/app/services/toast.js@@ -96,4 +96,4 @@ export default {throwError,showPersistent,closePersistent-}\ No newline at end of file+}diff --git a/src/public/app/widgets/type_widgets/editable_code.js b/src/public/app/widgets/type_widgets/editable_code.jsindex 88d20f5355..22d160a54e 100644--- a/src/public/app/widgets/type_widgets/editable_code.js+++ b/src/public/app/widgets/type_widgets/editable_code.js@@ -44,6 +44,10 @@ const TPL = `overflow: auto;min-height: 0;}++ .table-schema td {+ padding: 5px;+ }</style><div class="sql-console-area">@@ -154,13 +158,13 @@ export default class EditableCodeTypeWidget extends TypeWidget {for (const table of TABLE_SCHEMA) {const $tableLink = $('<button class="btn">').text(table.name);- const $columns = $("<ul>");+ const $table = $('<table class="table-schema">');for (const column of table.columns) {- $columns.append(- $("<li>")- .append($("<span>").text(column.name))- .append($("<span>").text(column.type))+ $table.append(+ $("<tr>")+ .append($("<td>").text(column.name))+ .append($("<td>").text(column.type)));}@@ -171,7 +175,8 @@ export default class EditableCodeTypeWidget extends TypeWidget {html: true,placement: 'bottom',boundary: 'window',- title: $columns[0].outerHTML+ title: $table[0].outerHTML,+ sanitize: false}).on('click', () => this.codeEditor.setValue("SELECT * FROM " + table.name + " LIMIT 100"));}diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.cssindex 29ba77557e..93c6b46391 100644--- a/src/public/stylesheets/style.css+++ b/src/public/stylesheets/style.css@@ -131,6 +131,7 @@ span.fancytree-node.muted { opacity: 0.6; }padding: 5px;cursor: pointer;font-size: 1.5em;+ color: var(--main-text-color);}.icon-action.disabled {@@ -386,14 +387,17 @@ table.promoted-attributes-in-tooltip td, table.promoted-attributes-in-tooltip th.tooltip-inner {background-color: var(--tooltip-background-color) !important;- max-width: 500px;- /* height needs to stay small because tooltip has problem when it can't fit to either top or bottom of the cursor */- max-height: 300px;- overflow: hidden;border: 1px solid var(--main-border-color);border-radius: 5px;text-align: left;color: var(--main-text-color) !important;+ max-width: 500px;+}++.note-tooltip-content {+ /* height needs to stay small because tooltip has problem when it can't fit to either top or bottom of the cursor */+ max-height: 300px;+ overflow: hidden;}.tooltip-inner img {diff --git a/src/services/note_cache/entities/note.js b/src/services/note_cache/entities/note.jsindex 8cd578e7b3..71a900e50b 100644--- a/src/services/note_cache/entities/note.js+++ b/src/services/note_cache/entities/note.js@@ -162,7 +162,7 @@ class Note {return this.flatTextCache;}- this.flatTextCache = '';+ this.flatTextCache = this.noteId + ' ';for (const branch of this.parentBranches) {if (branch.prefix) {diff --git a/src/services/setup.js b/src/services/setup.jsindex 086e7d5911..795b6a3349 100644--- a/src/services/setup.js+++ b/src/services/setup.js@@ -64,7 +64,7 @@ async function setupSyncFromSyncServer(syncServerHost, syncProxy, username, pass}try {- log.info("Getting document options FROM entity_changes server.");+ log.info("Getting document options FROM sync server.");// response is expected to contain documentId and documentSecret optionsconst resp = await request.exec({