Skip to content

Build your personal knowledge base with Trilium Notes

new import options in the dialog, tooltips

zadamfb5df33ee767
diff --git a/src/public/javascripts/desktop.js b/src/public/javascripts/desktop.js
index 12df3f593e..8eee127b36 100644
--- a/src/public/javascripts/desktop.js
+++ b/src/public/javascripts/desktop.js
@@ -134,6 +134,10 @@ $("#export-note-button").click(function () {
exportDialog.showDialog('single');
});
+$('[data-toggle="tooltip"]').tooltip({
+ html: true
+});
+
macInit.init();
searchNotesService.init(); // should be in front of treeService since that one manipulates address bar hash
diff --git a/src/public/stylesheets/desktop.css b/src/public/stylesheets/desktop.css
index c51341606e..a16e8c9ee1 100644
--- a/src/public/stylesheets/desktop.css
+++ b/src/public/stylesheets/desktop.css
@@ -108,4 +108,8 @@ body {
#note-info-table td, #note-info-table th {
padding: 15px;
+}
+
+[data-toggle="tooltip"] {
+ text-decoration: dotted underline;
}
\ No newline at end of file
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index d6705dd89a..580d579f21 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -679,6 +679,7 @@ table.promoted-attributes-in-tooltip td, table.promoted-attributes-in-tooltip th
/* height needs to stay small because tooltip has problem when it can't fit to either top or bottom of the cursor */
max-height: 300px;
overflow: hidden;
+ font-size: var(--main-font-size);
color: var(--main-text-color);
border: 1px solid var(--main-border-color);
border-radius: 5px;
diff --git a/src/views/dialogs/import.ejs b/src/views/dialogs/import.ejs
index ca9e19c93d..c8476ab328 100644
--- a/src/views/dialogs/import.ejs
+++ b/src/views/dialogs/import.ejs
@@ -18,17 +18,35 @@
<input type="file" id="import-file-upload-input" class="form-control-file" multiple />
- <p>Content of the file will be imported as child note(s) into <strong class="note-title"></strong>. Import file must be of supported type and have correct extension - one of <code>.html</code>, <code>.md</code>, <code>.tar</code>, <code>.enex</code>.</p>
+ <p>Content of the file will be imported as child note(s) into <strong class="note-title"></strong>.
</div>
<div class="form-group">
+ <strong>Options:</strong>
+
+ <div class="checkbox">
+ <label data-toggle="tooltip" title="Trilium <code>.tar</code> export files can contain executable scripts which may contain harmful behavior. Safe import will deactivate automatic execution of all imported scripts. Uncheck &quot;Safe import&quot; only if the imported tar archive is supposed to contain executable scripts and you completely trust the contents of the import file.">
+ <input id="safe-import" value="1" type="checkbox" checked>
+ Safe import
+ </label>
+ </div>
+
+ <div class="checkbox">
+ <label data-toggle="tooltip" title="<p>If you check this option, Trilium will attempt to optimize the imported images for size which may affect the perceived image quality. If unchecked, images will be imported without changes.</p><p>This doesn't apply to <code>.tar</code> imports with metadata since it is assumed these files are already optimized.</p>">
+ <input id="optimize-images" value="1" type="checkbox" checked> Optimize images
+ </label>
+ </div>
+
<div class="checkbox">
<label>
- <input id="safe-import" value="1" type="checkbox" checked> <strong>Safe import</strong>
+ <input id="text-imported-as-text" value="1" type="checkbox" checked> Import HTML, Markdown and TXT as text notes if it's unclear from metadata
</label>
+ </div>
- <br/>
- Trilium <code>.tar</code> export files can contain executable scripts which may contain harmful behavior. Safe import will deactivate automatic execution of all imported scripts. Uncheck "Safe import" only if the imported tar archive is supposed to contain executable scripts and you completely trust the contents of the import file.
+ <div class="checkbox">
+ <label>
+ <input id="code-imported-as-code" value="1" type="checkbox" checked> Import recognized code files (e.g. <code>.json</code>) as code notes if it's unclear from metadata
+ </label>
</div>
</div>
</div>