mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 16:56:34 +01:00
chore(frontend-docs): fix warnings & update
This commit is contained in:
@@ -245,8 +245,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
*/
|
||||
this.runOnBackend = async (func, params = []) => {
|
||||
if (func?.constructor.name === "AsyncFunction" || func?.startsWith?.("async ")) {
|
||||
toastService.showError("You're passing an async function to api.runOnBackend() which will likely not work as you intended. "
|
||||
+ "Either make the function synchronous (by removing 'async' keyword), or use api.runAsyncOnBackendWithManualTransactionHandling()");
|
||||
toastService.showError(t("frontend_script_api.async_warning"));
|
||||
}
|
||||
|
||||
return await this.__runOnBackendInner(func, params, true);
|
||||
@@ -268,8 +267,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
*/
|
||||
this.runAsyncOnBackendWithManualTransactionHandling = async (func, params = []) => {
|
||||
if (func?.constructor.name === "Function" || func?.startsWith?.("function")) {
|
||||
toastService.showError("You're passing a synchronous function to api.runAsyncOnBackendWithManualTransactionHandling(), " +
|
||||
"while you should likely use api.runOnBackend() instead.");
|
||||
toastService.showError(t("frontend_script_api.sync_warning"));
|
||||
}
|
||||
|
||||
return await this.__runOnBackendInner(func, params, false);
|
||||
@@ -277,7 +275,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
|
||||
/**
|
||||
* This is a powerful search method - you can search by attributes and their values, e.g.:
|
||||
* "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
|
||||
* "#dateModified =* MONTH AND #log". See full documentation for all options at: https://triliumnext.github.io/Docs/Wiki/search.html
|
||||
*
|
||||
* @method
|
||||
* @param {string} searchString
|
||||
@@ -289,7 +287,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
|
||||
/**
|
||||
* This is a powerful search method - you can search by attributes and their values, e.g.:
|
||||
* "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
|
||||
* "#dateModified =* MONTH AND #log". See full documentation for all options at: https://triliumnext.github.io/Docs/Wiki/search.html
|
||||
*
|
||||
* @method
|
||||
* @param {string} searchString
|
||||
@@ -586,7 +584,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
this.getYearNote = dateNotesService.getYearNote;
|
||||
|
||||
/**
|
||||
* Hoist note in the current tab. See https://github.com/zadam/trilium/wiki/Note-hoisting
|
||||
* Hoist note in the current tab. See https://triliumnext.github.io/Docs/Wiki/note-hoisting.html
|
||||
*
|
||||
* @method
|
||||
* @param {string} noteId - set hoisted note. 'root' will effectively unhoist
|
||||
@@ -700,7 +698,7 @@ export default FrontendScriptApi;
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.3</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
Reference in New Issue
Block a user