diff --git a/_locales/en/messages.json b/_locales/en/messages.json index e9f56f5a..6c96d8dc 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1420,15 +1420,15 @@ "description": "" }, "customPrompts_show_additional_info": { - "message": "Show ChatGPT Web additional properties", + "message": "Show additional properties", "description": "" }, "customPrompts_hide_additional_info": { - "message": "Hide ChatGPT Web additional properties", + "message": "Hide additional properties", "description": "" }, "customPrompts_show_additional_info_show": { - "message": "ChatGPT Web additional properties", + "message": "Additional properties", "description": "" } } \ No newline at end of file diff --git a/pages/customprompts/mzta-custom-prompts.css b/pages/customprompts/mzta-custom-prompts.css index 89f0790b..dd8b0692 100644 --- a/pages/customprompts/mzta-custom-prompts.css +++ b/pages/customprompts/mzta-custom-prompts.css @@ -148,6 +148,11 @@ tbody.list tr{ font-size: small; } +.field_title_us{ + font-weight: bold; + font-size: smaller; +} + label, .id_show, .text_show, .name_show, .type_show, .action_show{ font-size: small; } diff --git a/pages/customprompts/mzta-custom-prompts.js b/pages/customprompts/mzta-custom-prompts.js index d928fead..d7e304b4 100644 --- a/pages/customprompts/mzta-custom-prompts.js +++ b/pages/customprompts/mzta-custom-prompts.js @@ -343,7 +343,7 @@ document.addEventListener('DOMContentLoaded', async () => { } document.querySelectorAll('.chatgpt_web_additional_info_show').forEach(element => { - toggleAdditionalPropertiesShow(element); + toggleAdditionalPropertiesShow(element.closest('tr')); }); }, { once: true }); @@ -413,17 +413,33 @@ function toggleAdditionalPropertiesShow(tr) { switch(prefs.connection_type) { case 'chatgpt_web': { let element = tr.querySelector('.chatgpt_web_additional_info_show'); - let chatGPTWebModel_show = tr.querySelector('.chatgpt_web_model_show').innerText; - let chatGPTWebProject_show = tr.querySelector('.chatgpt_web_project_show').innerText; - let chatGPTWebCustomGPT_show = tr.querySelector('.chatgpt_web_custom_gpt_show').innerText; + let chatGPTWebModel_show = tr.querySelector('.chatgpt_web_model_show'); + let chatGPTWebProject_show = tr.querySelector('.chatgpt_web_project_show'); + let chatGPTWebCustomGPT_show = tr.querySelector('.chatgpt_web_custom_gpt_show'); - if ((chatGPTWebModel_show !== '' && chatGPTWebModel_show !== 'undefined') || - (chatGPTWebProject_show !== '' && chatGPTWebProject_show !== 'undefined') || - (chatGPTWebCustomGPT_show !== '' && chatGPTWebCustomGPT_show !== 'undefined')) { + if ((chatGPTWebModel_show.innerText !== '' && chatGPTWebModel_show.innerText !== 'undefined') || + (chatGPTWebProject_show.innerText !== '' && chatGPTWebProject_show.innerText !== 'undefined') || + (chatGPTWebCustomGPT_show.innerText !== '' && chatGPTWebCustomGPT_show.innerText !== 'undefined')) { element.style.display = 'flex'; } else { element.style.display = 'none'; } + + if(chatGPTWebModel_show.innerText === '' || chatGPTWebModel_show.innerText === 'undefined') { + chatGPTWebModel_show.parentNode.style.display = 'none'; + } else { + chatGPTWebModel_show.parentNode.style.display = 'inline'; + } + if(chatGPTWebProject_show.innerText === '' || chatGPTWebProject_show.innerText === 'undefined') { + chatGPTWebProject_show.parentNode.style.display = 'none'; + } else { + chatGPTWebProject_show.parentNode.style.display = 'inline'; + } + if(chatGPTWebCustomGPT_show.innerText === '' || chatGPTWebCustomGPT_show.innerText === 'undefined') { + chatGPTWebCustomGPT_show.parentNode.style.display = 'none'; + } else { + chatGPTWebCustomGPT_show.parentNode.style.display = 'inline'; + } break; } // case 'chatgpt_api': @@ -444,7 +460,6 @@ function toggleAdditionalPropertiesShow(tr) { function toggleAdditionalPropertiesEditor(tr) { switch(prefs.connection_type) { case 'chatgpt_web': { - let element = tr.querySelector('.chatgpt_web_additional_info_show'); let info_toggle = tr.querySelector('.chatgpt_web_additional_info_toggle'); info_toggle.style.display = 'block'; let chatGPTWebModel_show = tr.querySelector('.chatgpt_web_model_show').innerText; @@ -612,25 +627,25 @@ function loadPromptsList(values){ -
__MSG_customPrompts_show_additional_info_show__ +
__MSG_customPrompts_show_additional_info_show__
__MSG_prefs_OptionText_chatgpt_web_model__:` + values.chatgpt_web_model + `
__MSG_prefs_OptionText_chatgpt_web_project__:` + values.chatgpt_web_project + `
__MSG_prefs_OptionText_chatgpt_web_custom_gpt__:` + values.chatgpt_web_custom_gpt + `
__MSG_customPrompts_show_additional_info__
- __MSG_prefs_OptionText_chatgpt_web_model__: + __MSG_prefs_OptionText_chatgpt_web_model__:
TODO


- __MSG_prefs_OptionText_chatgpt_web_project__: + __MSG_prefs_OptionText_chatgpt_web_project__:

__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ /g/PROJECT_ID-PROJECT_NAME/project
__MSG_prefs_OptionText_chatgpt_web_custom_data_info2__


- __MSG_prefs_OptionText_chatgpt_web_custom_gpt__: + __MSG_prefs_OptionText_chatgpt_web_custom_gpt__:

__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ /g/CUSTOM_GPT_ID