mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add gallery folder and sort order controls (#3605)
* Add gallery folder and sort order controls Closes #3601 * Refactor sort constants to use Object.freeze for immutability * Add comment * Remove excessive null propagation * Update type hint for gallery.folders * Use defaultSettings.sort as a fallback * Throw in groups * Handle rename/deletion events * Merge init functions * Fix multiple gallery file uplods * Add min-height for gallery element * Fix gallery endpoint not parsing body * translatable toasts * Pass folder path in request body * Change restore pictogram * Add title to gallery thumbnail images * Allow optional folder parameter in image list endpoint and handle deprecated usage warning * Add validation for folder parameter in image list endpoint * Add border to gallery sort selection * Remove override if default folder is set to input * Use server-side path sanitation * Sanitize gallery folder input before updating --------- Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
This commit is contained in:
@ -210,6 +210,12 @@ export const extension_settings = {
|
||||
* @type {string[]}
|
||||
*/
|
||||
disabled_attachments: [],
|
||||
gallery: {
|
||||
/** @type {{[characterKey: string]: string}} */
|
||||
folders: {},
|
||||
/** @type {string} */
|
||||
sort: 'dateAsc',
|
||||
},
|
||||
};
|
||||
|
||||
function showHideExtensionsMenu() {
|
||||
|
Reference in New Issue
Block a user