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
feat(popup_editor): integrate with note tooltip
Elian Doraned68dda70bb0
diff --git a/apps/client/src/services/note_tooltip.ts b/apps/client/src/services/note_tooltip.tsindex d83ad3afac..fd8a577b91 100644--- a/apps/client/src/services/note_tooltip.ts+++ b/apps/client/src/services/note_tooltip.ts@@ -168,7 +168,10 @@ async function renderTooltip(note: FNote | null) {if (isContentEmpty) {classes.push("note-no-content");}- content = `<h5 class="${classes.join(" ")}"><a href="#${note.noteId}" data-no-context-menu="true">${noteTitleWithPathAsSuffix.prop("outerHTML")}</a></h5>`;+ content = `\+ <h5 class="${classes.join(" ")}">+ <a href="#${note.noteId}" data-no-context-menu="true">${noteTitleWithPathAsSuffix.prop("outerHTML")}</a>+ </h5>`;}content = `${content}<div class="note-tooltip-attributes">${$renderedAttributes[0].outerHTML}</div>`;@@ -176,6 +179,7 @@ async function renderTooltip(note: FNote | null) {content += $renderedContent[0].outerHTML;}+ content += `<a class="open-popup-button" title="${t("note_tooltip.quick-edit")}" href="#${note.noteId}?popup"><span class="bx bx-edit" /></a>`;return content;}diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.cssindex 54b9f074e5..60e4856f75 100644--- a/apps/client/src/stylesheets/style.css+++ b/apps/client/src/stylesheets/style.css@@ -771,6 +771,14 @@ table.promoted-attributes-in-tooltip th {font-size: small;}+.note-tooltip-content .open-popup-button {+ position: absolute;+ right: 15px;+ bottom: 8px;+ font-size: 1.2em;+ color: inherit;+}+.note-tooltip-attributes {display: -webkit-box;-webkit-box-orient: vertical;diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 6d0c0a3db6..4c78d6d298 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1854,7 +1854,8 @@"full-text-search": "Full text search"},"note_tooltip": {- "note-has-been-deleted": "Note has been deleted."+ "note-has-been-deleted": "Note has been deleted.",+ "quick-edit": "Quick edit"},"geo-map": {"create-child-note-title": "Create a new child note and add it to the map",