Lock extensions display order in top and context menus

This commit is contained in:
Cohee 2023-09-13 01:40:01 +03:00
parent c0e5d7efae
commit 09fc42a787
11 changed files with 105 additions and 9 deletions

View File

@ -94,3 +94,82 @@ input.extension_missing[type="checkbox"] {
margin-right: 10px; margin-right: 10px;
display: inline-flex; display: inline-flex;
} }
/* Fixes order of settings for extensions */
#extensions_settings,
#extensions_settings2 {
display: flex;
flex-direction: column;
}
#extensions_settings>.expression_settings {
order: 1;
}
#extensions_settings>.background_settings {
order: 2;
}
#extensions_settings>.sd_settings {
order: 3;
}
#extensions_settings>#tts_settings {
order: 4;
}
#extensions_settings>#rvc_settings {
order: 5;
}
#extensions_settings>.objective-settings {
order: 6;
}
#extensions_settings>#speech_recognition_settings {
order: 7;
}
#extensions_settings>#audio_settings {
order: 8;
}
#extensions_settings>#assets_ui {
order: 9;
}
#extensions_settings2>.translation_settings {
order: 1;
}
#extensions_settings2>.caption_settings {
order: 2;
}
#extensions_settings2>.quickReplySettings {
order: 3;
}
#extensions_settings2>#memory_settings {
order: 4;
}
#extensions_settings2>.hypebot_settings {
order: 5;
}
#extensions_settings2>.regex_settings {
order: 6;
}
#extensions_settings2>.vectors_settings {
order: 7;
}
#extensions_settings2>.chromadb_settings {
order: 8;
}
#extensions_settings2>.randomizer_settings {
order: 9;
}

View File

@ -6053,8 +6053,7 @@ function enlargeMessageImage() {
const img = document.createElement('img'); const img = document.createElement('img');
img.classList.add('img_enlarged'); img.classList.add('img_enlarged');
img.src = imgSrc; img.src = imgSrc;
$('#dialogue_popup').addClass('wide_dialogue_popup'); callPopup(img.outerHTML, 'text', '', { wide: true, large: true });
callPopup(img.outerHTML, 'text');
} }
function updateAlternateGreetingsHintVisibility(root) { function updateAlternateGreetingsHintVisibility(root) {

View File

@ -144,7 +144,7 @@ jQuery(function () {
const sendButton = $(` const sendButton = $(`
<div id="send_picture" class="list-group-item flex-container flexGap5"> <div id="send_picture" class="list-group-item flex-container flexGap5">
<div class="fa-solid fa-image extensionsMenuExtensionButton"></div> <div class="fa-solid fa-image extensionsMenuExtensionButton"></div>
Send a picture Send a Picture
</div>`); </div>`);
$('#extensionsMenu').prepend(sendButton); $('#extensionsMenu').prepend(sendButton);
@ -171,7 +171,7 @@ jQuery(function () {
} }
function addSettings() { function addSettings() {
const html = ` const html = `
<div class="background_settings"> <div class="caption_settings">
<div class="inline-drawer"> <div class="inline-drawer">
<div class="inline-drawer-toggle inline-drawer-header"> <div class="inline-drawer-toggle inline-drawer-header">
<b>Image Captioning</b> <b>Image Captioning</b>

View File

@ -1,3 +1,7 @@
#img_form { #img_form {
display: none; display: none;
} }
#send_picture {
order: 4;
}

View File

@ -11,6 +11,7 @@
opacity: 0.7; opacity: 0.7;
display: flex; display: flex;
align-items: center; align-items: center;
order: 4;
/* justify-content: center; */ /* justify-content: center; */
} }

View File

@ -50,3 +50,7 @@
margin: unset; margin: unset;
margin-bottom: 5px !important; margin-bottom: 5px !important;
} }
#objective-task-manual-check-menu-item {
order: 3;
}

View File

@ -136,7 +136,7 @@ jQuery(() => {
</div> </div>
</div>`; </div>`;
$('#extensions_settings').append(html); $('#extensions_settings2').append(html);
$('#ai_response_configuration .range-block-counter').each(addRandomizeButton); $('#ai_response_configuration .range-block-counter').each(addRandomizeButton);
$('#randomizer_enabled').on('input', onRandomizerEnabled); $('#randomizer_enabled').on('input', onRandomizerEnabled);
$('#randomizer_enabled').prop('checked', extension_settings.randomizer.enabled).trigger('input'); $('#randomizer_enabled').prop('checked', extension_settings.randomizer.enabled).trigger('input');

View File

@ -15,6 +15,7 @@
opacity: 0.7; opacity: 0.7;
display: flex; display: flex;
align-items: center; align-items: center;
order: 6;
/* justify-content: center; */ /* justify-content: center; */
} }

View File

@ -0,0 +1,3 @@
#token_counter {
order: 2;
}

View File

@ -4,3 +4,7 @@
gap: 10px; gap: 10px;
flex-direction: row; flex-direction: row;
} }
#translate_chat {
order: 7;
}

View File

@ -16,6 +16,7 @@
} }
#ttsExtensionMenuItem { #ttsExtensionMenuItem {
order: 1;
transition: 0.3s; transition: 0.3s;
opacity: 0.7; opacity: 0.7;
} }