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:
Wolfsblvt
2024-04-27 10:26:01 +02:00
parent f90f370fed
commit 2e562d187a
5 changed files with 127 additions and 52 deletions

View File

@ -152,6 +152,7 @@ import {
Stopwatch,
isValidUrl,
ensureImageFormatSupported,
flashHighlight,
} from './scripts/utils.js';
import { ModuleWorkerWrapper, doDailyExtensionUpdatesCheck, extension_settings, getContext, loadExtensionSettings, renderExtensionTemplate, renderExtensionTemplateAsync, runGenerationInterceptors, saveMetadataDebounced, writeExtensionField } from './scripts/extensions.js';
@ -6799,10 +6800,7 @@ function select_rm_info(type, charId, previousCharId = null) {
const scrollOffset = element.offset().top - element.parent().offset().top;
element.parent().scrollTop(scrollOffset);
element.addClass('flash animated');
setTimeout(function () {
element.removeClass('flash animated');
}, 5000);
flashHighlight(element, 5000);
});
} catch (e) {
console.error(e);
@ -6828,10 +6826,7 @@ function select_rm_info(type, charId, previousCharId = null) {
const element = $(selector);
const scrollOffset = element.offset().top - element.parent().offset().top;
element.parent().scrollTop(scrollOffset);
$(element).addClass('flash animated');
setTimeout(function () {
$(element).removeClass('flash animated');
}, 5000);
flashHighlight(element, 5000);
});
} catch (e) {
console.error(e);