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:
@ -1419,3 +1419,13 @@ export function setValueByPath(obj, path, value) {
|
||||
|
||||
currentObject[keyParts[keyParts.length - 1]] = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flashes the given HTML element via CSS flash animation for a defined period
|
||||
* @param {JQuery<HTMLElement>} element - The element to flash
|
||||
* @param {number} timespan - A numer in milliseconds how the flash should last
|
||||
*/
|
||||
export function flashHighlight(element, timespan = 2000) {
|
||||
element.addClass('flash animated');
|
||||
setTimeout(() => element.removeClass('flash animated'), timespan);
|
||||
}
|
||||
|
Reference in New Issue
Block a user