added visual confirmation for additional prop. see #277 #168

This commit is contained in:
Mic 2025-04-27 22:20:00 +02:00
parent 373f61eb3b
commit 788513851c
2 changed files with 6 additions and 3 deletions

View file

@ -89,14 +89,14 @@
<label for="chatGPTWebProjectNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_project__:</label> <label for="chatGPTWebProjectNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_project__:</label>
<br> <br>
<input type="text" id="chatGPTWebProjectNew" name="chatGPTWebProjectNew" class="input_new input_additional" tabindex="11"> <input type="text" id="chatGPTWebProjectNew" name="chatGPTWebProjectNew" class="input_new input_additional" tabindex="11">
<br><i class="small_info" id="chatgpt_web_project_info">__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ <b>/g/PROJECT_ID-PROJECT_NAME/project</b> <br><i class="small_info" id="chatGPTWebProjectNew_info">__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ <b>/g/PROJECT_ID-PROJECT_NAME/project</b>
<br>__MSG_prefs_OptionText_chatgpt_web_custom_data_info2__</i> <br>__MSG_prefs_OptionText_chatgpt_web_custom_data_info2__</i>
</td> </td>
<td colspan="2"> <td colspan="2">
<label for="chatGPTWebCustomGPTNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_custom_gpt__:</label> <label for="chatGPTWebCustomGPTNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_custom_gpt__:</label>
<br> <br>
<input type="text" id="chatGPTWebCustomGPTNew" name="chatGPTWebCustomGPTNew" class="input_new input_additional" tabindex="11"> <input type="text" id="chatGPTWebCustomGPTNew" name="chatGPTWebCustomGPTNew" class="input_new input_additional" tabindex="11">
<br><i class="small_info" id="chatgpt_web_custom_gpt_info">__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ <b>/g/CUSTOM_GPT_ID</b> <br><i class="small_info" id="chatGPTWebCustomGPTNew_info">__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ <b>/g/CUSTOM_GPT_ID</b>
<br>__MSG_prefs_OptionText_chatgpt_web_custom_data_info2__</i> <br>__MSG_prefs_OptionText_chatgpt_web_custom_data_info2__</i>
</td> </td>
</tr> </tr>

View file

@ -18,7 +18,7 @@
import { prefs_default } from "../../options/mzta-options-default.js"; import { prefs_default } from "../../options/mzta-options-default.js";
import { getPrompts, setDefaultPromptsProperties, setCustomPrompts, preparePromptsForExport, preparePromptsForImport } from "../../js/mzta-prompts.js"; import { getPrompts, setDefaultPromptsProperties, setCustomPrompts, preparePromptsForExport, preparePromptsForImport } from "../../js/mzta-prompts.js";
import { isThunderbird128OrGreater, getCustomPromptsUsedSpace, sanitizeHtml } from "../../js/mzta-utils.js"; import { isThunderbird128OrGreater, getCustomPromptsUsedSpace, sanitizeHtml, validateCustomData_ChatGPTWeb } from "../../js/mzta-utils.js";
import { taLogger } from "../../js/mzta-logger.js"; import { taLogger } from "../../js/mzta-logger.js";
import { getPlaceholders } from "../../js/mzta-placeholders.js"; import { getPlaceholders } from "../../js/mzta-placeholders.js";
import { textareaAutocomplete } from "../../js/mzta-placeholders-autocomplete.js"; import { textareaAutocomplete } from "../../js/mzta-placeholders-autocomplete.js";
@ -154,6 +154,9 @@ document.addEventListener('DOMContentLoaded', async () => {
var chatgptWebModelNew = document.getElementById('chatGPTWebModelNew'); var chatgptWebModelNew = document.getElementById('chatGPTWebModelNew');
var chatgptWebProjectNew = document.getElementById('chatGPTWebProjectNew'); var chatgptWebProjectNew = document.getElementById('chatGPTWebProjectNew');
var chatgptWebCustomGptNew = document.getElementById('chatGPTWebCustomGPTNew'); var chatgptWebCustomGptNew = document.getElementById('chatGPTWebCustomGPTNew');
chatgptWebModelNew.addEventListener("input", validateCustomData_ChatGPTWeb);
chatgptWebProjectNew.addEventListener("input", validateCustomData_ChatGPTWeb);
chatgptWebCustomGptNew.addEventListener("input", validateCustomData_ChatGPTWeb);
selectActionNew.addEventListener('change', (e) => { selectActionNew.addEventListener('change', (e) => {
if (e.target.value === "2") { if (e.target.value === "2") {