warning when no model selected

This commit is contained in:
mic 2024-07-28 22:57:27 +02:00
parent 27cf8b62dd
commit aa75de3602

View file

@ -119,10 +119,16 @@ function warnAPIKeyEmpty() {
btnFetchModels.disabled = true;
modelChatGPT.disabled = true;
modelChatGPT.selectedIndex = -1;
modelChatGPT.style.border = 'none';
}else{
apiKeyInput.style.border = 'none';
btnFetchModels.disabled = false;
modelChatGPT.disabled = false;
if((modelChatGPT.selectedIndex === -1)||(modelChatGPT.value === '')){
modelChatGPT.style.border = '2px solid red';
}else{
modelChatGPT.style.border = 'none';
}
}
}