mirror of
https://github.com/zadam/trilium.git
synced 2025-10-11 16:06:24 +08:00
feat(popup_editor): integrate with note tooltip
This commit is contained in:
parent
892ab02f06
commit
ed68dda70b
3 changed files with 15 additions and 2 deletions
|
@ -168,7 +168,10 @@ async function renderTooltip(note: FNote | null) {
|
||||||
if (isContentEmpty) {
|
if (isContentEmpty) {
|
||||||
classes.push("note-no-content");
|
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>`;
|
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 += $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;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -771,6 +771,14 @@ table.promoted-attributes-in-tooltip th {
|
||||||
font-size: small;
|
font-size: small;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.note-tooltip-content .open-popup-button {
|
||||||
|
position: absolute;
|
||||||
|
right: 15px;
|
||||||
|
bottom: 8px;
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
.note-tooltip-attributes {
|
.note-tooltip-attributes {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
|
|
|
@ -1854,7 +1854,8 @@
|
||||||
"full-text-search": "Full text search"
|
"full-text-search": "Full text search"
|
||||||
},
|
},
|
||||||
"note_tooltip": {
|
"note_tooltip": {
|
||||||
"note-has-been-deleted": "Note has been deleted."
|
"note-has-been-deleted": "Note has been deleted.",
|
||||||
|
"quick-edit": "Quick edit"
|
||||||
},
|
},
|
||||||
"geo-map": {
|
"geo-map": {
|
||||||
"create-child-note-title": "Create a new child note and add it to the map",
|
"create-child-note-title": "Create a new child note and add it to the map",
|
||||||
|
|
Loading…
Add table
Reference in a new issue