Update styles and HTML structure for ChatGPT Web models integration in custom prompts
This commit is contained in:
parent
1d798c4a8c
commit
75e25c2824
3 changed files with 13 additions and 7 deletions
|
|
@ -233,7 +233,7 @@ label, .id_show, .text_show, .name_show, .type_show, .action_show{
|
|||
font-style: italic;
|
||||
}
|
||||
|
||||
#chatgpt_web_additional_info, #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info, .chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_show{
|
||||
#chatgpt_web_additional_info, #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info, .chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_show, .chatgpt_web_models_list_table{
|
||||
background-color: rgb(255, 209, 183);
|
||||
display:none;
|
||||
}
|
||||
|
|
@ -336,11 +336,12 @@ input.input_additional[type="text"]{
|
|||
background-color: #4c4e58;
|
||||
}
|
||||
|
||||
#chatgpt_web_additional_info{
|
||||
#chatgpt_web_additional_info, #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info, .chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_show, .chatgpt_web_models_list_table{
|
||||
background-color: rgb(39, 11, 0);
|
||||
color: rgb(182, 182, 182);
|
||||
}
|
||||
|
||||
#chatgpt_web_additional_info, #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info, .chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_show{
|
||||
color: black;
|
||||
#chatgpt_web_additional_info_toggle:hover, .chatgpt_web_additional_info_toggle:hover{
|
||||
background-color: rgb(88, 25, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
<label for="chatGPTWebModelNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_model__:</label>
|
||||
<br>
|
||||
<input type="text" id="chatGPTWebModelNew" name="chatGPTWebModelNew" class="input_new input_additional" tabindex="10">
|
||||
<table title="__MSG_prefs_OptionText_chatgpt_web_model_tooltip__"><tr id="chatgpt_web_models_list">TODO</tr></table>
|
||||
<table class="chatgpt_web_models_list_table" title="__MSG_prefs_OptionText_chatgpt_web_model_tooltip__"><tr id="chatgpt_web_models_list"></tr></table>
|
||||
<br><br>
|
||||
<label for="chatGPTWebProjectNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_project__:</label>
|
||||
<br>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
import { prefs_default } from "../../options/mzta-options-default.js";
|
||||
import { getPrompts, setDefaultPromptsProperties, setCustomPrompts, preparePromptsForExport, preparePromptsForImport } from "../../js/mzta-prompts.js";
|
||||
import { isThunderbird128OrGreater, getCustomPromptsUsedSpace, sanitizeHtml, validateCustomData_ChatGPTWeb } from "../../js/mzta-utils.js";
|
||||
import { ChatGPTWeb_models, isThunderbird128OrGreater, getCustomPromptsUsedSpace, sanitizeHtml, validateCustomData_ChatGPTWeb, getChatGPTWebModelsList_HTML } from "../../js/mzta-utils.js";
|
||||
import { taLogger } from "../../js/mzta-logger.js";
|
||||
import { getPlaceholders } from "../../js/mzta-placeholders.js";
|
||||
import { textareaAutocomplete } from "../../js/mzta-placeholders-autocomplete.js";
|
||||
|
|
@ -346,6 +346,11 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
toggleAdditionalPropertiesShow(element.closest('tr'));
|
||||
});
|
||||
|
||||
getChatGPTWebModelsList_HTML(ChatGPTWeb_models, 'chatgpt_web_models_list');
|
||||
document.querySelectorAll('.id_output').forEach(element => {
|
||||
getChatGPTWebModelsList_HTML(ChatGPTWeb_models, 'chatgpt_web_models_list_' + element.value);
|
||||
});
|
||||
|
||||
}, { once: true });
|
||||
|
||||
//========= handling an item in a row
|
||||
|
|
@ -632,7 +637,7 @@ function loadPromptsList(values){
|
|||
<span class="field_title_us">__MSG_prefs_OptionText_chatgpt_web_model__:</span>
|
||||
<br>
|
||||
<input type="text" class="input_additional chatgpt_web_model_output" tabindex="10" value="` + values.chatgpt_web_model + `">
|
||||
<table title="__MSG_prefs_OptionText_chatgpt_web_model_tooltip__"><tr id="chatgpt_web_models_list">TODO</tr></table>
|
||||
<table class="chatgpt_web_models_list_table" title="__MSG_prefs_OptionText_chatgpt_web_model_tooltip__"><tr id="chatgpt_web_models_list_` + values.id + `">TODO</tr></table>
|
||||
<br><br>
|
||||
<span class="field_title_us">__MSG_prefs_OptionText_chatgpt_web_project__:</span>
|
||||
<br>
|
||||
|
|
|
|||
Loading…
Reference in a new issue