info text improved. see #156

This commit is contained in:
mic 2025-06-17 23:30:05 +02:00
parent 76c1e2f5be
commit 82de5f0f37
3 changed files with 11 additions and 7 deletions

View file

@ -1564,12 +1564,16 @@
"message": "Manage Data Placeholders", "message": "Manage Data Placeholders",
"description": "" "description": ""
}, },
"customDataPH_manageDataPH_info_default_3": {
"message": "You can also use the default data placeholders with autocomplete, just like when writing custom prompts.",
"description": ""
},
"customDataPH_manageDataPH_info_default": { "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.", "message": "On this page, it is possible to define custom data placeholders to be used in your custom prompts.",
"description": "" "description": ""
}, },
"customDataPH_manageDataPH_info_default_2": { "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.", "message": "You can import your custom data placeholders. Existing data placeholders with the same ID will be overwritten. Placeholders with new IDs will be added.",
"description": "" "description": ""
}, },
"customDataPH_ExportAll": { "customDataPH_ExportAll": {

View file

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

View file

@ -176,7 +176,7 @@ document.addEventListener('DOMContentLoaded', async () => {
}); });
function importCustomDataPHs() { function importCustomDataPHs() {
if(confirm(browser.i18n.getMessage("importCustomDataPH_confirmText") + '\n' + browser.i18n.getMessage("customDataPH_manageDataPH_info_default") + '\n' + browser.i18n.getMessage("customPrompts_managePrompts_info_default_3"))) { if(confirm(browser.i18n.getMessage("importCustomDataPH_confirmText") + '\n' + browser.i18n.getMessage("customDataPH_manageDataPH_info_default_2") + '\n' + browser.i18n.getMessage("customPrompts_managePrompts_info_default_3"))) {
//ask the user to choose a JSON file, and then read it, check if the serialized JSON is valid as generated from importCustomDataPHs(), and if so, add it to the list //ask the user to choose a JSON file, and then read it, check if the serialized JSON is valid as generated from importCustomDataPHs(), and if so, add it to the list
const input = document.createElement('input'); const input = document.createElement('input');
input.type = 'file'; input.type = 'file';