Fix model options hiding on Chrome

a0dda44ff952069b8382d01506b4baaeddbe628c

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +11 -20Showing whitespace changes
public/index.html+6 -6
@@ -3237,7 +3237,7 @@
32373237 </div>
32383238
32393239 <!-- Express Mode Configuration -->
32403240 <div id="vertexai_express_config" class="vertexai-auth-section" data-mode="express">
32413241 <h4>
32423242 <span data-i18n="Google Vertex AI API Key">
32433243 Google Vertex AI API Key
@@ -3256,7 +3256,7 @@
32563256 </div>
32573257
32583258 <!-- Full Version Configuration -->
32593259 <div id="vertexai_full_config" class="vertexai-auth-section" styledata-mode="display: none;full">
32603260 <h4>
32613261 <span data-i18n="Service Account Configuration">
32623262 Service Account Configuration
@@ -3293,8 +3293,8 @@
32933293 Paste the complete JSON content of your Google Cloud Service Account key file. The content will be stored securely.
32943294 </div>
32953295 <div class="flex-container">
32963296 <button type="button" id="vertexai_validate_service_account" class="menu_button menu_button_icon" data-i18n="Validate JSON">Validate JSON</button>
32973297 <button type="button" id="vertexai_clear_service_account" class="menu_button menu_button_icon" data-i18n="Clear">Clear</button>
32983298 </div>
32993299 <div id="vertexai_service_account_status" class="info-block" style="display: none;">
33003300 <span id="vertexai_service_account_info"></span>
@@ -3317,14 +3317,14 @@
33173317 </optgroup>
33183318
33193319 <!-- Full Version Models -->
33203320 <optgroup id="vertexai_full_gemini_25" label="Gemini 2.5" data-mode="full" style="display: none;">
33213321 <option value="gemini-2.5-pro-preview-05-06">gemini-2.5-pro-preview-05-06</option>
33223322 <option value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option>
33233323 <option value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option>
33243324 <option value="gemini-2.5-flash-preview-05-20">gemini-2.5-flash-preview-05-20</option>
33253325 <option value="gemini-2.5-flash-preview-04-17">gemini-2.5-flash-preview-04-17</option>
33263326 </optgroup>
33273327 <optgroup id="vertexai_full_gemini_20" label="Gemini 2.0" data-mode="full" style="display: none;">
33283328 <option value="gemini-2.0-flash-001">gemini-2.0-flash-001</option>
33293329 <option value="gemini-2.0-flash-exp">gemini-2.0-flash-exp</option>
33303330 <option value="gemini-2.0-flash-preview-image-generation">gemini-2.0-flash-preview-image-generation</option>
public/scripts/openai.js+5 -14
@@ -5521,20 +5521,11 @@ function onVertexAIAuthModeChange() {
55215521 const authMode = String($(this).val());
55225522 oai_settings.vertexai_auth_mode = authMode;
55235523
5524- // Show/hide appropriate configuration sections
5524+ $('#vertexai_form [data-mode]').each(function () {
5525- if (authMode === 'express') {
5525+ const mode = $(this).data('mode');
55265526 $('#vertexai_express_config'this).showtoggle(mode === authMode);
55275527 $(this).find('#vertexai_full_configoption').hidetoggle(mode === authMode);
5528- // Show express mode model groups and hide full version model groups
5528+ });
5529- $('#model_vertexai_select optgroup[data-mode="express"]').show();
5530- $('#model_vertexai_select optgroup[data-mode="full"]').hide();
5531- } else {
5532- $('#vertexai_express_config').hide();
5533- $('#vertexai_full_config').show();
5534- // Hide express mode model groups and show full version model groups
5535- $('#model_vertexai_select optgroup[data-mode="express"]').hide();
5536- $('#model_vertexai_select optgroup[data-mode="full"]').show();
5537- }
55385529
55395530 saveSettingsDebounced();
55405531}