From 49241ab3182b6f3438252c042ce746fefa1f952c Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 5 Jun 2023 00:12:08 +0200 Subject: [PATCH] merge --- src/public/app/services/content_renderer.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/public/app/services/content_renderer.js b/src/public/app/services/content_renderer.js index d21c9b070..2a61281bc 100644 --- a/src/public/app/services/content_renderer.js +++ b/src/public/app/services/content_renderer.js @@ -53,9 +53,6 @@ async function getRenderedContent(entity, options = {}) { else if (type === 'canvas') { await renderCanvas(entity, $renderedContent); } - else if (type === 'book') { - // nothing, a book doesn't have its own content - } else if (!options.tooltip && type === 'protectedSession') { const $button = $(``) .on('click', protectedSessionService.enterProtectedSession); @@ -67,8 +64,13 @@ async function getRenderedContent(entity, options = {}) { .append($button) ); } - else { - $renderedContent.append($("

Content of this note cannot be displayed

")); + else if (entity instanceof FNote) { + $renderedContent.append( + $("
") + .css("text-align", "center") + .css("font-size", "500%") + .append($("").addClass(entity.getIcon())) + ); } if (entity instanceof FNote) {