mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
small improvements and fixes
This commit is contained in:
parent
ddf0a89e1f
commit
f60af1f05e
6
package-lock.json
generated
6
package-lock.json
generated
@ -3065,9 +3065,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"electron": {
|
"electron": {
|
||||||
"version": "10.0.0-beta.15",
|
"version": "10.0.0-beta.17",
|
||||||
"resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.15.tgz",
|
"resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.17.tgz",
|
||||||
"integrity": "sha512-dCN2AXyiFjJ1EERrjQA3UT/asUgqw7PfFUZkf3NvImIri8DG4dGpuOEa5GSuggpE7X6hS+FSHqOH6d3MExivWg==",
|
"integrity": "sha512-ImDabQ8RwFq4b15qoZndukJLbel+Kg0vsBqXZ9S41NkoDPRbmHTK/MpIsB8KYApqCceqyOZYANoDYrkbB7QO2g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@electron/get": "^1.0.1",
|
"@electron/get": "^1.0.1",
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "7.0.2",
|
"cross-env": "7.0.2",
|
||||||
"electron": "10.0.0-beta.15",
|
"electron": "10.0.0-beta.17",
|
||||||
"electron-builder": "22.8.0",
|
"electron-builder": "22.8.0",
|
||||||
"electron-packager": "15.0.0",
|
"electron-packager": "15.0.0",
|
||||||
"electron-rebuild": "1.11.0",
|
"electron-rebuild": "1.11.0",
|
||||||
|
@ -23,7 +23,7 @@ app.use(helmet({
|
|||||||
hidePoweredBy: false, // deactivated because electron 4.0 crashes on this right after startup
|
hidePoweredBy: false, // deactivated because electron 4.0 crashes on this right after startup
|
||||||
contentSecurityPolicy: {
|
contentSecurityPolicy: {
|
||||||
directives: {
|
directives: {
|
||||||
defaultSrc: ["*", "'unsafe-inline'"]
|
defaultSrc: ["*", "'unsafe-inline'", "'unsafe-eval'"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
@ -45,7 +45,7 @@ async function mouseEnterHandler() {
|
|||||||
const note = await treeCache.getNote(noteId);
|
const note = await treeCache.getNote(noteId);
|
||||||
const noteComplement = await treeCache.getNoteComplement(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
|
// 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
|
// since the operation to get tooltip content was async, it is possible that
|
||||||
@ -144,4 +144,4 @@ async function renderTooltip(note, noteComplement) {
|
|||||||
export default {
|
export default {
|
||||||
setupGlobalTooltip,
|
setupGlobalTooltip,
|
||||||
setupElementTooltip
|
setupElementTooltip
|
||||||
}
|
}
|
||||||
|
@ -96,4 +96,4 @@ export default {
|
|||||||
throwError,
|
throwError,
|
||||||
showPersistent,
|
showPersistent,
|
||||||
closePersistent
|
closePersistent
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,10 @@ const TPL = `
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-schema td {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="sql-console-area">
|
<div class="sql-console-area">
|
||||||
@ -154,13 +158,13 @@ export default class EditableCodeTypeWidget extends TypeWidget {
|
|||||||
for (const table of TABLE_SCHEMA) {
|
for (const table of TABLE_SCHEMA) {
|
||||||
const $tableLink = $('<button class="btn">').text(table.name);
|
const $tableLink = $('<button class="btn">').text(table.name);
|
||||||
|
|
||||||
const $columns = $("<ul>");
|
const $table = $('<table class="table-schema">');
|
||||||
|
|
||||||
for (const column of table.columns) {
|
for (const column of table.columns) {
|
||||||
$columns.append(
|
$table.append(
|
||||||
$("<li>")
|
$("<tr>")
|
||||||
.append($("<span>").text(column.name))
|
.append($("<td>").text(column.name))
|
||||||
.append($("<span>").text(column.type))
|
.append($("<td>").text(column.type))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +175,8 @@ export default class EditableCodeTypeWidget extends TypeWidget {
|
|||||||
html: true,
|
html: true,
|
||||||
placement: 'bottom',
|
placement: 'bottom',
|
||||||
boundary: 'window',
|
boundary: 'window',
|
||||||
title: $columns[0].outerHTML
|
title: $table[0].outerHTML,
|
||||||
|
sanitize: false
|
||||||
})
|
})
|
||||||
.on('click', () => this.codeEditor.setValue("SELECT * FROM " + table.name + " LIMIT 100"));
|
.on('click', () => this.codeEditor.setValue("SELECT * FROM " + table.name + " LIMIT 100"));
|
||||||
}
|
}
|
||||||
|
@ -131,6 +131,7 @@ span.fancytree-node.muted { opacity: 0.6; }
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
color: var(--main-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-action.disabled {
|
.icon-action.disabled {
|
||||||
@ -386,14 +387,17 @@ table.promoted-attributes-in-tooltip td, table.promoted-attributes-in-tooltip th
|
|||||||
|
|
||||||
.tooltip-inner {
|
.tooltip-inner {
|
||||||
background-color: var(--tooltip-background-color) !important;
|
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: 1px solid var(--main-border-color);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
color: var(--main-text-color) !important;
|
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 {
|
.tooltip-inner img {
|
||||||
|
@ -162,7 +162,7 @@ class Note {
|
|||||||
return this.flatTextCache;
|
return this.flatTextCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.flatTextCache = '';
|
this.flatTextCache = this.noteId + ' ';
|
||||||
|
|
||||||
for (const branch of this.parentBranches) {
|
for (const branch of this.parentBranches) {
|
||||||
if (branch.prefix) {
|
if (branch.prefix) {
|
||||||
|
@ -64,7 +64,7 @@ async function setupSyncFromSyncServer(syncServerHost, syncProxy, username, pass
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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 options
|
// response is expected to contain documentId and documentSecret options
|
||||||
const resp = await request.exec({
|
const resp = await request.exec({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user