correctly hiding and showing the chatgpt additional prop toggle. see #102
This commit is contained in:
parent
c7c5d0c594
commit
01142fb582
1 changed files with 10 additions and 25 deletions
|
|
@ -640,8 +640,7 @@ function toggleApiPropertiesShow(tr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleAdditionalPropertiesEditor(tr) {
|
function toggleAdditionalPropertiesEditor(tr) {
|
||||||
switch(prefs.connection_type) {
|
if(prefs.connection_type == 'chatgpt_web' && tr.querySelector('.api_type_show').innerText == '') {
|
||||||
case 'chatgpt_web': {
|
|
||||||
let info_toggle = tr.querySelector('.chatgpt_web_additional_info_toggle');
|
let info_toggle = tr.querySelector('.chatgpt_web_additional_info_toggle');
|
||||||
info_toggle.style.display = 'block';
|
info_toggle.style.display = 'block';
|
||||||
let chatGPTWebModel_show = tr.querySelector('.chatgpt_web_model_show').innerText;
|
let chatGPTWebModel_show = tr.querySelector('.chatgpt_web_model_show').innerText;
|
||||||
|
|
@ -653,20 +652,6 @@ function toggleAdditionalPropertiesEditor(tr) {
|
||||||
(chatGPTWebCustomGPT_show !== '' && chatGPTWebCustomGPT_show !== 'undefined')) {
|
(chatGPTWebCustomGPT_show !== '' && chatGPTWebCustomGPT_show !== 'undefined')) {
|
||||||
info_toggle.click();
|
info_toggle.click();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
// case 'chatgpt_api':
|
|
||||||
// document.getElementById('chatgpt_api').style.display = 'block';
|
|
||||||
// break;
|
|
||||||
// case 'ollama_api':
|
|
||||||
// document.getElementById('ollama_api').style.display = 'block';
|
|
||||||
// break;
|
|
||||||
// case 'openai_comp_api':
|
|
||||||
// document.getElementById('openai_comp_api').style.display = 'block';
|
|
||||||
// break;
|
|
||||||
// case 'google_gemini_api':
|
|
||||||
// document.getElementById('google_gemini_api').style.display = 'block';
|
|
||||||
// break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let api_info_toggle = tr.querySelector('.api_additional_info_toggle');
|
let api_info_toggle = tr.querySelector('.api_additional_info_toggle');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue