mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	Merge branch 'beta'
# Conflicts: # docs/backend_api/BAttachment.html # docs/backend_api/BNote.html # docs/backend_api/becca_entities_bnote.js.html # docs/frontend_api/FAttribute.html # docs/frontend_api/FBranch.html # docs/frontend_api/FNote.html # docs/frontend_api/FrontendScriptApi.html # docs/frontend_api/entities_fattachment.js.html # docs/frontend_api/entities_fattribute.js.html # docs/frontend_api/entities_fblob.js.html # docs/frontend_api/entities_fbranch.js.html # docs/frontend_api/entities_fnote.js.html # docs/frontend_api/global.html # docs/frontend_api/index.html # docs/frontend_api/services_frontend_script_api.js.html # package-lock.json
This commit is contained in:
		| @@ -14,6 +14,7 @@ import NoteContextAwareWidget from "../widgets/note_context_aware_widget.js"; | ||||
| import BasicWidget from "../widgets/basic_widget.js"; | ||||
| import SpacedUpdate from "./spaced_update.js"; | ||||
| import shortcutService from "./shortcuts.js"; | ||||
| import dialogService from "./dialog.js"; | ||||
|  | ||||
|  | ||||
| /** | ||||
| @@ -288,7 +289,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain | ||||
|     this.parseDate = utils.parseDate; | ||||
|  | ||||
|     /** | ||||
|      * Show an info message to the user. | ||||
|      * Show an info toast message to the user. | ||||
|      * | ||||
|      * @method | ||||
|      * @param {string} message | ||||
| @@ -296,13 +297,43 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain | ||||
|     this.showMessage = toastService.showMessage; | ||||
|  | ||||
|     /** | ||||
|      * Show an error message to the user. | ||||
|      * Show an error toast message to the user. | ||||
|      * | ||||
|      * @method | ||||
|      * @param {string} message | ||||
|      */ | ||||
|     this.showError = toastService.showError; | ||||
|  | ||||
|     /** | ||||
|      * Show an info dialog to the user. | ||||
|      * | ||||
|      * @method | ||||
|      * @param {string} message | ||||
|      * @returns {Promise} | ||||
|      */ | ||||
|     this.showInfoDialog = dialogService.info; | ||||
|  | ||||
|     /** | ||||
|      * Show confirm dialog to the user. | ||||
|      * | ||||
|      * @method | ||||
|      * @param {string} message | ||||
|      * @returns {Promise<boolean>} promise resolving to true if the user confirmed | ||||
|      */ | ||||
|     this.showConfirmDialog = dialogService.confirm; | ||||
|  | ||||
|     /** | ||||
|      * Show prompt dialog to the user. | ||||
|      * | ||||
|      * @method | ||||
|      * @param {object} props | ||||
|      * @param {string} props.title | ||||
|      * @param {string} props.message | ||||
|      * @param {string} props.defaultValue | ||||
|      * @returns {Promise<string>} promise resolving to the answer provided by the user | ||||
|      */ | ||||
|     this.showPromptDialog = dialogService.prompt; | ||||
|  | ||||
|     /** | ||||
|      * Trigger command. This is a very low-level API which should be avoided if possible. | ||||
|      * | ||||
|   | ||||
		Reference in New Issue
	
	Block a user