Partial revert of class/id distinction

This commit is contained in:
Cohee
2024-06-23 19:18:40 +03:00
parent f2d64a7d08
commit de7a5085b1
3 changed files with 5 additions and 6 deletions

View File

@ -2882,7 +2882,7 @@
</div> </div>
<h4 data-i18n="Available Models">Available Models</h4> <h4 data-i18n="Available Models">Available Models</h4>
<div class="flex-container"> <div class="flex-container">
<select class="text_pole model_custom_select"></select> <select id="model_custom_select" class="text_pole model_custom_select"></select>
</div> </div>
<h4 data-i18n="Prompt Post-Processing">Prompt Post-Processing</h4> <h4 data-i18n="Prompt Post-Processing">Prompt Post-Processing</h4>
<select id="custom_prompt_post_processing" class="text_pole" title="Applies additional processing to the prompt before sending it to the API." data-i18n="[title]Applies additional processing to the prompt before sending it to the API."> <select id="custom_prompt_post_processing" class="text_pole" title="Applies additional processing to the prompt before sending it to the API." data-i18n="[title]Applies additional processing to the prompt before sending it to the API.">

View File

@ -1563,7 +1563,7 @@ function saveModelList(data) {
}); });
if (!oai_settings.custom_model && model_list.length > 0) { if (!oai_settings.custom_model && model_list.length > 0) {
$('.model_custom_select').val(model_list[0].id).trigger('change'); $('#model_custom_select').val(model_list[0].id).trigger('change');
} }
} }
} }
@ -3882,7 +3882,7 @@ async function onModelChange() {
oai_settings.groq_model = value; oai_settings.groq_model = value;
} }
if (value && $(this).is('.model_custom_select')) { if (value && $(this).is('#model_custom_select')) {
console.log('Custom model changed to', value); console.log('Custom model changed to', value);
oai_settings.custom_model = value; oai_settings.custom_model = value;
$('#custom_model_id').val(value).trigger('input'); $('#custom_model_id').val(value).trigger('input');
@ -4359,7 +4359,7 @@ function toggleChatCompletionForms() {
$('#model_groq_select').trigger('change'); $('#model_groq_select').trigger('change');
} }
else if (oai_settings.chat_completion_source == chat_completion_sources.CUSTOM) { else if (oai_settings.chat_completion_source == chat_completion_sources.CUSTOM) {
$('.model_custom_select').trigger('change'); $('#model_custom_select').trigger('change');
} }
$('[data-source]').each(function () { $('[data-source]').each(function () {
const validSources = $(this).data('source').split(','); const validSources = $(this).data('source').split(',');
@ -5062,7 +5062,7 @@ $(document).ready(async function () {
$('#model_cohere_select').on('change', onModelChange); $('#model_cohere_select').on('change', onModelChange);
$('#model_perplexity_select').on('change', onModelChange); $('#model_perplexity_select').on('change', onModelChange);
$('#model_groq_select').on('change', onModelChange); $('#model_groq_select').on('change', onModelChange);
$('.model_custom_select').on('change', onModelChange); $('#model_custom_select').on('change', onModelChange);
$('#settings_preset_openai').on('change', onSettingsPresetChange); $('#settings_preset_openai').on('change', onSettingsPresetChange);
$('#new_oai_preset').on('click', onNewPresetClick); $('#new_oai_preset').on('click', onNewPresetClick);
$('#delete_oai_preset').on('click', onDeletePresetClick); $('#delete_oai_preset').on('click', onDeletePresetClick);

View File

@ -1175,7 +1175,6 @@ select {
color: var(--SmartThemeBodyColor); color: var(--SmartThemeBodyColor);
} }
#send_textarea { #send_textarea {
min-height: calc(var(--bottomFormBlockSize) + 2px); min-height: calc(var(--bottomFormBlockSize) + 2px);
height: calc(var(--bottomFormBlockSize) + 2px); height: calc(var(--bottomFormBlockSize) + 2px);