mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Use select2 for character lore selector
This commit is contained in:
@@ -5586,6 +5586,15 @@ function openCharacterWorldPopup() {
|
|||||||
const worldId = (menu_type == 'create' ? create_save.world : characters[chid]?.data?.extensions?.world) || '';
|
const worldId = (menu_type == 'create' ? create_save.world : characters[chid]?.data?.extensions?.world) || '';
|
||||||
template.find('.character_name').text(name);
|
template.find('.character_name').text(name);
|
||||||
|
|
||||||
|
// Not needed on mobile
|
||||||
|
if (deviceInfo && deviceInfo.device.type === 'desktop') {
|
||||||
|
$(extraSelect).select2({
|
||||||
|
width: '100%',
|
||||||
|
placeholder: 'No auxillary Lorebooks set. Click here to select.',
|
||||||
|
allowClear: true,
|
||||||
|
closeOnSelect: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Apped to base dropdown
|
// Apped to base dropdown
|
||||||
world_names.forEach((item, i) => {
|
world_names.forEach((item, i) => {
|
||||||
@@ -5622,7 +5631,7 @@ function openCharacterWorldPopup() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let selectScrollTop = null;
|
/*let selectScrollTop = null;
|
||||||
|
|
||||||
if (deviceInfo && deviceInfo.device.type === 'desktop') {
|
if (deviceInfo && deviceInfo.device.type === 'desktop') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -5632,7 +5641,7 @@ function openCharacterWorldPopup() {
|
|||||||
option.prop('selected', !option.prop('selected'));
|
option.prop('selected', !option.prop('selected'));
|
||||||
await delay(1);
|
await delay(1);
|
||||||
selectElement.scrollTop = selectScrollTop;
|
selectElement.scrollTop = selectScrollTop;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
onExtraWorldInfoChanged();
|
onExtraWorldInfoChanged();
|
||||||
});
|
});
|
||||||
|
@@ -4859,7 +4859,7 @@ body.waifuMode .zoomed_avatar {
|
|||||||
text-shadow: 0px 0px calc(var(--shadowWidth) * 1px) var(--SmartThemeShadowColor);
|
text-shadow: 0px 0px calc(var(--shadowWidth) * 1px) var(--SmartThemeShadowColor);
|
||||||
backdrop-filter: blur(calc(var(--SmartThemeBlurStrength)*2));
|
backdrop-filter: blur(calc(var(--SmartThemeBlurStrength)*2));
|
||||||
color: var(--SmartThemeBodyColor);
|
color: var(--SmartThemeBodyColor);
|
||||||
z-index: 4000;
|
z-index: 40000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-selection__clear {
|
.select2-selection__clear {
|
||||||
|
Reference in New Issue
Block a user