added a button to open the custom prompts tab and improved the descriptions

This commit is contained in:
mic 2025-06-16 21:34:04 +02:00
parent 9a4657a377
commit 94603d10c8
3 changed files with 12 additions and 3 deletions

View file

@ -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": ""
},

View file

@ -9,9 +9,10 @@
<body>
<div>
<h1 class="page_title">__MSG_customDataPH_manageDataPH__</h1>
<p>__MSG_customDataPH_manageDataPH_info_default__<br>
<p>__MSG_customDataPH_manageDataPH_info_default_2__<br>
__MSG_customPrompts_managePrompts_info_default_3__
<br>__MSG_prefs_OptionText_btnManagePrompts_infoline__ <a href="https://micz.it/thunderbird-addon-thunderai/data-placeholders/">__MSG_more_info_string__</a></p>
<br>__MSG_customDataPH_manageDataPH_info_default__ <a href="https://micz.it/thunderbird-addon-thunderai/data-placeholders/">__MSG_more_info_string__</a>
<br><button id="btnManagePrompts">__MSG_prefs_OptionText_btnManagePrompts__</button></p>
</div>
<div id="import_export">
<button id="btnExportAll">__MSG_customDataPH_ExportAll__</button><br>

View file

@ -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