From 94603d10c819c8eefa6bed3f70b1f518fb019e40 Mon Sep 17 00:00:00 2001 From: mic Date: Mon, 16 Jun 2025 21:34:04 +0200 Subject: [PATCH] added a button to open the custom prompts tab and improved the descriptions --- _locales/en/messages.json | 4 ++++ .../mzta-custom-dataplaceholders.html | 5 +++-- .../customdataplaceholders/mzta-custom-dataplaceholders.js | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 00f439b0..b4a4125f 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1565,6 +1565,10 @@ "description": "" }, "customDataPH_manageDataPH_info_default": { + "message": "You can define custom data placeholders to be used in your custom prompts. You can use here also the default data placeholders.", + "description": "" + }, + "customDataPH_manageDataPH_info_default_2": { "message": "You can import and export the custom data placeholders. Existing data placeholders with the same ID will be overwritten. Placeholders with new IDs will be added.", "description": "" }, diff --git a/pages/customdataplaceholders/mzta-custom-dataplaceholders.html b/pages/customdataplaceholders/mzta-custom-dataplaceholders.html index 86a4263d..22873d93 100644 --- a/pages/customdataplaceholders/mzta-custom-dataplaceholders.html +++ b/pages/customdataplaceholders/mzta-custom-dataplaceholders.html @@ -9,9 +9,10 @@

__MSG_customDataPH_manageDataPH__

-

__MSG_customDataPH_manageDataPH_info_default__
+

__MSG_customDataPH_manageDataPH_info_default_2__
__MSG_customPrompts_managePrompts_info_default_3__ -
__MSG_prefs_OptionText_btnManagePrompts_infoline__ __MSG_more_info_string__

+
__MSG_customDataPH_manageDataPH_info_default__ __MSG_more_info_string__ +


diff --git a/pages/customdataplaceholders/mzta-custom-dataplaceholders.js b/pages/customdataplaceholders/mzta-custom-dataplaceholders.js index cfdbf9f4..c2711240 100644 --- a/pages/customdataplaceholders/mzta-custom-dataplaceholders.js +++ b/pages/customdataplaceholders/mzta-custom-dataplaceholders.js @@ -17,7 +17,7 @@ */ import { prefs_default } from "../../options/mzta-options-default.js"; -import { getLocalStorageUsedSpace, sanitizeHtml, isThunderbird128OrGreater } from "../../js/mzta-utils.js"; +import { getLocalStorageUsedSpace, sanitizeHtml, isThunderbird128OrGreater, openTab } from "../../js/mzta-utils.js"; import { taLogger } from "../../js/mzta-logger.js"; import { getPlaceholders, setCustomPlaceholders, getCustomPlaceholders, prepareCustomDataPHsForExport, prepareCustomDataPHsForImport, placeholdersUtils } from "../../js/mzta-placeholders.js"; import { textareaAutocomplete } from "../../js/mzta-placeholders-autocomplete.js"; @@ -220,6 +220,10 @@ document.addEventListener('DOMContentLoaded', async () => { }; } + document.getElementById('btnManagePrompts').addEventListener('click', () => { + openTab('/pages/customprompts/mzta-custom-prompts.html'); + }); + }, { once: true }); //========= handling an item in a row