feat(popup_editor): integrate with note tooltip

This commit is contained in:
Elian Doran 2025-07-10 18:57:13 +03:00
parent 892ab02f06
commit ed68dda70b
No known key found for this signature in database
3 changed files with 15 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;

View file

@ -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",