Skip to content

Build your personal knowledge base with Trilium Notes

fixes after merge

zadam5114f3f782ee
diff --git a/src/public/javascripts/entities/note_short.js b/src/public/javascripts/entities/note_short.js
index 913cf13b51..8424e797b2 100644
--- a/src/public/javascripts/entities/note_short.js
+++ b/src/public/javascripts/entities/note_short.js
@@ -45,7 +45,7 @@ class NoteShort {
/** @param {int} */
this.contentLength = row.contentLength;
/** @param {boolean} */
- this.isProtected = row.isProtected;
+ this.isProtected = !!row.isProtected;
/** @param {string} one of 'text', 'code', 'file' or 'render' */
this.type = row.type;
/** @param {string} content-type, e.g. "application/json" */
diff --git a/src/public/javascripts/widgets/note_detail.js b/src/public/javascripts/widgets/note_detail.js
index 0d4a093fb7..98c6b46afc 100644
--- a/src/public/javascripts/widgets/note_detail.js
+++ b/src/public/javascripts/widgets/note_detail.js
@@ -214,6 +214,7 @@ export default class NoteDetailWidget extends TabAwareWidget {
"libraries/ckeditor/ckeditor-content.css",
"libraries/bootstrap/css/bootstrap.min.css",
"stylesheets/print.css",
+ "stylesheets/relation_map.css",
"stylesheets/themes.css",
"stylesheets/detail.css"
],
diff --git a/src/public/javascripts/widgets/type_widgets/file.js b/src/public/javascripts/widgets/type_widgets/file.js
index 99c8c7ef2c..45da692fbb 100644
--- a/src/public/javascripts/widgets/type_widgets/file.js
+++ b/src/public/javascripts/widgets/type_widgets/file.js
@@ -5,25 +5,6 @@ import TypeWidget from "./type_widget.js";
const TPL = `
<div class="note-detail-file note-detail-printable">
- <style>
- .note-detail-file {
- padding: 10px;
- }
-
- .file-table th, .file-table td {
- padding: 10px;
- font-size: larger;
- }
-
- .file-preview-content {
- background-color: var(--accented-background-color);
- padding: 15px;
- max-height: 300px;
- overflow: auto;
- margin: 10px;
- }
- </style>
-
<table class="file-table">
<tr>
<th nowrap>Note ID:</th>
diff --git a/src/public/javascripts/widgets/type_widgets/image.js b/src/public/javascripts/widgets/type_widgets/image.js
index c5a87c84f2..d6c7c31d29 100644
--- a/src/public/javascripts/widgets/type_widgets/image.js
+++ b/src/public/javascripts/widgets/type_widgets/image.js
@@ -5,17 +5,7 @@ import TypeWidget from "./type_widget.js";
const TPL = `
<div class="note-detail-image note-detail-printable">
- <style>
- .note-detail-image {
- text-align: center;
- }
-
- .note-detail-image-view {
- max-width: 100%;
- }
- </style>
-
- <div style="display: flex; justify-content: space-evenly; margin: 10px;">
+ <div class="no-print" style="display: flex; justify-content: space-evenly; margin: 10px;">
<button class="image-download btn btn-sm btn-primary" type="button">Download</button>
<button class="image-copy-to-clipboard btn btn-sm btn-primary" type="button">Copy to clipboard</button>
diff --git a/src/public/javascripts/widgets/type_widgets/relation_map.js b/src/public/javascripts/widgets/type_widgets/relation_map.js
index 65cdcbf3d3..dcec47e2ca 100644
--- a/src/public/javascripts/widgets/type_widgets/relation_map.js
+++ b/src/public/javascripts/widgets/type_widgets/relation_map.js
@@ -64,7 +64,7 @@ const linkOverlays = [
const TPL = `
<div class="note-detail-relation-map note-detail-printable">
- <button class="relation-map-create-child-note btn btn-sm floating-button" type="button"
+ <button class="relation-map-create-child-note btn btn-sm floating-button no-print" type="button"
title="Create new child note and add it into this relation map">
<span class="bx bx-folder-plus"></span>
@@ -72,11 +72,11 @@ const TPL = `
</button>
<button type="button"
- class="relation-map-reset-pan-zoom btn icon-button floating-button bx bx-crop"
+ class="relation-map-reset-pan-zoom btn icon-button floating-button bx bx-crop no-print"
title="Reset pan & zoom to initial coordinates and magnification"
style="right: 70px;"></button>
- <div class="btn-group floating-button" style="right: 10px;">
+ <div class="btn-group floating-button no-print" style="right: 10px;">
<button type="button"
class="relation-map-zoom-in btn icon-button bx bx-zoom-in"
title="Zoom In"></button>
diff --git a/src/public/stylesheets/detail.css b/src/public/stylesheets/detail.css
index 92a5918c95..faa58219c4 100644
--- a/src/public/stylesheets/detail.css
+++ b/src/public/stylesheets/detail.css
@@ -72,4 +72,21 @@
.note-detail-image-view {
max-width: 100%;
+}
+
+.note-detail-file {
+ padding: 10px;
+}
+
+.file-table th, .file-table td {
+ padding: 10px;
+ font-size: larger;
+}
+
+.file-preview-content {
+ background-color: var(--accented-background-color);
+ padding: 15px;
+ max-height: 300px;
+ overflow: auto;
+ margin: 10px;
}
\ No newline at end of file
diff --git a/src/public/stylesheets/relation_map.css b/src/public/stylesheets/relation_map.css
index 75f0fb118e..c5a0d6ab0c 100644
--- a/src/public/stylesheets/relation_map.css
+++ b/src/public/stylesheets/relation_map.css
@@ -2,6 +2,7 @@
height: 100%;
overflow: hidden !important;
padding-top: 10px;
+ position: relative;
}
.relation-map-wrapper {