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
style/content renderer: add icons to the "download" and "open" buttons
Adorian Doranb082f95d4228
diff --git a/src/public/app/services/content_renderer.ts b/src/public/app/services/content_renderer.tsindex c1ee2a416e..14e42acedc 100644--- a/src/public/app/services/content_renderer.ts+++ b/src/public/app/services/content_renderer.ts@@ -199,8 +199,19 @@ function renderFile(entity: FNote | FAttachment, type: string, $renderedContent:if (entityType === "notes" && "noteId" in entity) {// TODO: we should make this available also for attachments, but there's a problem with "Open externally" support// in attachment list- const $downloadButton = $('<button class="file-download btn btn-primary" type="button">Download</button>');- const $openButton = $('<button class="file-open btn btn-primary" type="button">Open</button>');+ const $downloadButton = $(`+ <button class="file-download btn btn-primary" type="button">+ <span class='bx bx-download' ></span>+ Download+ </button>+ `);++ const $openButton = $(`+ <button class="file-open btn btn-primary" type="button">+ <span class='bx bx-link-external' ></span>+ Open+ </button>+ `);$downloadButton.on("click", () => openService.downloadFileNote(entity.noteId));$openButton.on("click", () => openService.openNoteExternally(entity.noteId, entity.mime));