mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Option to auto-sort tags (+UI improvements)
- Toggle to auto-sort tags alphabetically - Init auto-sort based on current sorted state, if not chosen before - Tag management redraw list if changes happen - Tag management highlight renamed rows on auto-sort if they get automatically reordered - Manual drag&drop of tags disables auto-sort option - Small fixes to popup tag management pop drawing - Utility function to flash highlight via CSS
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { callPopup, chat_metadata, eventSource, event_types, generateQuietPrompt, getCurrentChatId, getRequestHeaders, getThumbnailUrl, saveSettingsDebounced } from '../script.js';
|
||||
import { saveMetadataDebounced } from './extensions.js';
|
||||
import { registerSlashCommand } from './slash-commands.js';
|
||||
import { stringFormat } from './utils.js';
|
||||
import { flashHighlight, stringFormat } from './utils.js';
|
||||
|
||||
const BG_METADATA_KEY = 'custom_background';
|
||||
const LIST_METADATA_KEY = 'chat_backgrounds';
|
||||
@ -453,8 +453,7 @@ function highlightNewBackground(bg) {
|
||||
const newBg = $(`.bg_example[bgfile="${bg}"]`);
|
||||
const scrollOffset = newBg.offset().top - newBg.parent().offset().top;
|
||||
$('#Backgrounds').scrollTop(scrollOffset);
|
||||
newBg.addClass('flash animated');
|
||||
setTimeout(() => newBg.removeClass('flash animated'), 2000);
|
||||
flashHighlight(newBg);
|
||||
}
|
||||
|
||||
function onBackgroundFilterInput() {
|
||||
|
Reference in New Issue
Block a user