mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
display icon for non-supported note types in content renderer
This commit is contained in:
parent
bf6106f4dc
commit
64aed9b462
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"version": "0.60.0-beta",
|
"version": "0.60.1-beta",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"version": "0.60.0-beta",
|
"version": "0.60.1-beta",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -157,9 +157,6 @@ async function getRenderedContent(note, options = {}) {
|
|||||||
$renderedContent.append($("<div>").text("Error parsing content. Please check console.error() for more details."));
|
$renderedContent.append($("<div>").text("Error parsing content. Please check console.error() for more details."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type === 'book') {
|
|
||||||
// nothing, book doesn't have its own content
|
|
||||||
}
|
|
||||||
else if (!options.tooltip && type === 'protectedSession') {
|
else if (!options.tooltip && type === 'protectedSession') {
|
||||||
const $button = $(`<button class="btn btn-sm"><span class="bx bx-log-in"></span> Enter protected session</button>`)
|
const $button = $(`<button class="btn btn-sm"><span class="bx bx-log-in"></span> Enter protected session</button>`)
|
||||||
.on('click', protectedSessionService.enterProtectedSession);
|
.on('click', protectedSessionService.enterProtectedSession);
|
||||||
@ -172,7 +169,12 @@ async function getRenderedContent(note, options = {}) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$renderedContent.append($("<p><em>Content of this note cannot be displayed in the book format</em></p>"));
|
$renderedContent.append(
|
||||||
|
$("<div>")
|
||||||
|
.css("text-align", "center")
|
||||||
|
.css("font-size", "500%")
|
||||||
|
.append($("<span>").addClass(note.getIcon()))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$renderedContent.addClass(note.getCssClass());
|
$renderedContent.addClass(note.getCssClass());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user