mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-02 19:36:12 +01:00 
			
		
		
		
	small improvements and fixes
This commit is contained in:
		
							
								
								
									
										6
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -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",
 | 
			
		||||
 
 | 
			
		||||
@@ -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",
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ app.use(helmet({
 | 
			
		||||
    hidePoweredBy: false, // deactivated because electron 4.0 crashes on this right after startup
 | 
			
		||||
    contentSecurityPolicy: {
 | 
			
		||||
        directives: {
 | 
			
		||||
            defaultSrc: ["*", "'unsafe-inline'"]
 | 
			
		||||
            defaultSrc: ["*", "'unsafe-inline'", "'unsafe-eval'"]
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}));
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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"));
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -162,7 +162,7 @@ class Note {
 | 
			
		||||
                return this.flatTextCache;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            this.flatTextCache = '';
 | 
			
		||||
            this.flatTextCache = this.noteId + ' ';
 | 
			
		||||
 | 
			
		||||
            for (const branch of this.parentBranches) {
 | 
			
		||||
                if (branch.prefix) {
 | 
			
		||||
 
 | 
			
		||||
@@ -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 options
 | 
			
		||||
        const resp = await request.exec({
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user