Skip to content

Build your personal knowledge base with Trilium Notes

small fixes

zadama15f8d7e115a
diff --git a/src/services/consistency_checks.js b/src/services/consistency_checks.js
index 738a93d304..63c068383f 100644
--- a/src/services/consistency_checks.js
+++ b/src/services/consistency_checks.js
@@ -410,7 +410,7 @@ class ConsistencyChecks {
noteRevision.isErased = true;
noteRevision.save();
- logFix(`Note revision ${noteRevisionId} content was set to empty string since it was null even though it is not erased`);
+ logFix(`Note revision ${noteRevisionId} content was set to erased since it was null even though it was not erased`);
} else {
logError(`Note revision ${noteRevisionId} content is null even though it is not erased`);
}
diff --git a/src/services/utils.js b/src/services/utils.js
index 843b45c48d..d7320b237b 100644
--- a/src/services/utils.js
+++ b/src/services/utils.js
@@ -65,14 +65,16 @@ function prepareSqlForLike(prefix, str, suffix) {
return `'${prefix}${value}${suffix}' ESCAPE '\\'`;
}
-function stopWatch(what, func) {
+function stopWatch(what, func, timeLimit = 0) {
const start = Date.now();
const ret = func();
const tookMs = Date.now() - start;
- log.info(`${what} took ${tookMs}ms`);
+ if (tookMs >= timeLimit) {
+ log.info(`${what} took ${tookMs}ms`);
+ }
return ret;
}
diff --git a/src/views/dialogs/import.ejs b/src/views/dialogs/import.ejs
index 10eaed8f98..0466e58768 100644
--- a/src/views/dialogs/import.ejs
+++ b/src/views/dialogs/import.ejs
@@ -21,21 +21,21 @@
<strong>Options:</strong>
<div class="checkbox">
- <label data-toggle="tooltip" title="Trilium <code>.zip</code>, <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.">
+ <label data-toggle="tooltip" title="Trilium <code>.zip</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-checkbox" value="1" type="checkbox" checked>
<span>Safe import</span>
</label>
</div>
<div class="checkbox">
- <label data-toggle="tooltip" title="If this is checked then Trilium will read <code>.zip</code>, <code>.tar</code>, <code>.enex</code> and <code>.opml</code> files and create notes from files insides those archives. If unchecked, then Trilium will attach the archives themselves to the note.">
+ <label data-toggle="tooltip" title="If this is checked then Trilium will read <code>.zip</code>, <code>.enex</code> and <code>.opml</code> files and create notes from files insides those archives. If unchecked, then Trilium will attach the archives themselves to the note.">
<input id="explode-archives-checkbox" value="1" type="checkbox" checked>
- <span>Read contents of <code>.zip</code>, <code>.tar</code>, <code>.enex</code> and <code>.opml</code> archives.</span>
+ <span>Read contents of <code>.zip</code>, <code>.enex</code> and <code>.opml</code> archives.</span>
</label>
</div>
<div class="checkbox">
- <label data-toggle="tooltip" title="<p>If you check this option, Trilium will attempt to shrink the imported images by scaling and optimization which may affect the perceived image quality. If unchecked, images will be imported without changes.</p><p>This doesn't apply to <code>.zip</code>, <code>.tar</code> imports with metadata since it is assumed these files are already optimized.</p>">
+ <label data-toggle="tooltip" title="<p>If you check this option, Trilium will attempt to shrink the imported images by scaling and optimization which may affect the perceived image quality. If unchecked, images will be imported without changes.</p><p>This doesn't apply to <code>.zip</code> imports with metadata since it is assumed these files are already optimized.</p>">
<input id="shrink-images-checkbox" value="1" type="checkbox" checked> <span>Shrink images</span>
</label>
</div>