Commit Graph

65 Commits

Author SHA1 Message Date
Wolfsblvt 4df18ccb0b Add Slug Parameter to Action Loader for Programmatic Identification (#5490)
* feat: add slug parameter to action-loader for programmatic identification

Add optional `slug` parameter to ActionLoaderHandle for easier identification via code or CSS. Update all loader.show() calls across the codebase to include descriptive slugs ('app-init', 'chat-rename', 'chat-delete', 'bulk-delete', 'chat-load', 'image-generation', 'legacy-loader'). Add data attributes (data-slug, data-loader-id, data-blocking) to toast content div. Expose slug via getter and make id private with getter.

* Apply suggestions from code review

Fix slug jsdoc wording

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: Add identifier to second loader in img gen

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-20 22:29:40 +03:00
Wolfsblvt 45009cd0e4 Deprecate legacy loader and migrate all callsites to action-loader system with informative toasts (#5326)
* Refactor loader.js to use action-loader system and move overlay management into action-loader module

- Deprecate showLoader() and hideLoader() in favor of action-loader API
- Implement legacy functions as thin wrappers around ActionLoaderHandle
- Move overlay management (showOverlay, hideOverlay, isOverlayDisplayed) into action-loader.js
- Move Popup-based loader implementation and preloader cleanup to action-loader
- Add loader.isBlocking() method to check for active blocking overlays

* Migrate from legacy loader functions to action-loader API throughout codebase

- Replace showLoader()/hideLoader() imports with loader from action-loader.js
- Update firstLoadInit() to use loader.show() with title, message, and ToastMode.STATIC
- Pass initLoaderHandle to getSettings() for early hide during onboarding flow
- Refactor renameGroupOrCharacterChat() to use loader.show() instead of boolean flag
- Wrap handleDeleteChat() with loader.show() and proper error handling
- Update BulkEditOver...

* Update loader titles and remove redundant reload notification

- Change bookmark loader title from "Bookmark" to "Chat History" for clarity
- Remove loader notification before extensions reload (redundant with browser reload)

* lint fix

* Add splash screen support to action loader with custom overlay content

- Add `overlayContent` option to ActionLoaderOptions for custom HTML in overlay
- Implement splash screen styles with centered logo, spinner, and message
- Update firstLoadInit() to use custom splash screen instead of static toast
- Pass custom content through showOverlay() to replace default spinner
- Adjust non-blocking loader warning to account for custom overlay content

* Refactor loader overlay to use DOM elements instead of HTML strings

- Add createDefaultLoaderOverlay() function to generate fresh loader overlay elements
- Export createOverlay() method on loader utility API for external use
- Change overlayContent parameter type from string-only to string|HTMLElement|null
- Add getOverlayContent() helper to normalize custom content for Popup
- Update firstLoadInit() to build splash screen using DOM manipulation instead of template literals
- Add splash-logo class and

* Use a true ellipsis

* Adjust sizing for desktop

* Even truer ellipsis

* Add transition to splash screen and fix blur animation on hideOverlay (#5338)

* Initial plan

* Blur entire splash screen on hideOverlay, not just spinner

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/eee6c06d-7c9d-4363-bc8f-2647ed390368

* Add transition to splash-screen and fix transition detection

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/9368bc36-31a0-4a58-aebd-7b569696ff2e

---------

Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Add translations to supported locales

* Localize logo alt on welcome screen

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Claude <242468646+Claude@users.noreply.github.com>
2026-03-22 03:30:23 +02:00
Cohee 357da3219b Chore: Add code formatting conventions as eslint rules (#5158)
* Add code formatting conventions as eslint rules

* Improve formatting in addQuickReply
2026-02-15 01:16:34 +02:00
Cohee 02b137c8e2 Fix type errors in BulkEditOverlay 2025-07-28 22:46:41 +03:00
Cohee b6d282b4ee Fix for eslint 2025-06-03 00:11:06 +03:00
Cohee 8d143a81c3 bulk edit: update for new popup 2025-06-03 00:11:01 +03:00
Cohee af5e9aa518 Fix shift-click in bulk for first in list 2025-02-28 22:44:10 +02:00
Wolfsblvt 7c9b347116 Refactor chid/grid attributes to data attributes
- We don't believe in imaginary HTML attributes that we make up, right?
2025-01-24 21:12:49 +01:00
Cohee 93137e3e2a [chore] Fix lint errors 2024-10-13 14:02:53 +03:00
Cohee 1fa9710a5c Fix bulk delete async hell (#2730)
* Fix bulk delete async hell

* Remove refresh flag (always refresh)

* Don't throw on deletion fetch failed

* Clear toast on bulk finish
2024-08-30 19:52:57 +03:00
d-ber 0f606642ce Refactor tag import setting override 2024-08-16 22:55:48 +02:00
d-ber 2d476d4461 Use wider css class for bulk tag menu 2024-08-16 22:00:01 +02:00
d-ber d3ce9ea0d5 Add button to bulk import existing tags 2024-08-15 16:36:57 +02:00
d-ber 651072c61b Add button to bulk import all tags 2024-08-15 16:36:50 +02:00
Wolfsblvt ab8c67ede6 Refactor overwrite check to utility function
- Refactor overwrite check to utility function
- Don't mind me refactoring character delete functions. I tried something, but I think the refactoring still makes sense
2024-05-22 23:52:35 +02:00
Cohee 9c218455c4 [chore] Run ESLint 2024-04-12 14:22:12 +03:00
Cohee b2f42f1b9f Close context menu immediately when clicked on mass tag 2024-03-31 10:54:23 +03:00
Wolfsblvt 80f4bd4d9e Global refactor of printCharacter and filter print
- (!) Refactor character list and filter redrawing to one global debounce
- Refactor all places where character list and filters where redrawn to the correct usage (hope I didn't miss any)
- Automatically redraw character list on each tag bulk edit
- Fix tags not being sorted in bulk edit mutual tags list
- Refactor bulk tag edit class to actually be an instance object
- Remember scroll position on character list redraw - unless it's a full refresh
2024-03-30 03:06:40 +01:00
Wolfsblvt bf8b6b80d7 Refactor and improve bulk delete popup
- Improve bulk edit popup with display of avatars and better format
- Refactor both calls of bulk delete to use the same method
- Add display of filename on avatar hover for inline avatars (@Cohee you forgot this one (: )
2024-03-29 05:53:26 +01:00
Wolfsblvt 167673fcf5 Updated code documentation
- Updated code documentation for all methods added/changed with this PR
- Expanded tooltip to "bulk edit" to explain how it works
2024-03-29 04:41:16 +01:00
Wolfsblvt 9005d3f790 Merge remote-tracking branch 'upstream/staging' into improve-bulk-edit-and-fixes 2024-03-29 02:42:27 +01:00
Cohee 6ca2111ef6 Honey I broke mass duplicator 2024-03-28 01:15:14 +02:00
Cohee 6ed604593c Copy tags on duplicating 2024-03-28 01:13:54 +02:00
Wolfsblvt a4c4f36fc6 Bulk edit select improvements & bulk tag edit inline avatars
- bulk edit tags shows inline avatars for all selected characters
- allow shift-click selecting/deselecting multiple characters on bulk edit
- bulk select all button added
- bulk select shows selected character count
2024-03-27 08:33:32 +01:00
Wolfsblvt 40daf1ca1d Bulk edit tag improvements
- Show mutual tags on bulk edit
- Update tag list on tag added/removed in bulk edit
- Add "remove mutual" button to bulk edit tags
2024-03-27 08:33:32 +01:00
Cohee afec103eb2 Fix character deleted emission 2024-03-17 20:35:49 +02:00
Cohee 3b188c37dd Add character deleted event to the list 2024-03-17 19:50:44 +02:00
Wolfsblvt 5ac7826fec Tag Folders: Additional Fixes
- Refactored to one general printTagList method
- Made a robust getTagKeyForEntity function
- Fixed group not displaying tags if autoloaded
- Fixed added tags on character/groups not being auto sorted
- Fixed autoload of group/character that I killed
- Fixed typo
2024-03-07 23:48:50 +01:00
Cohee b915b89ca9 Fix ESLint 2023-12-09 16:09:10 +02:00
artisticMink dfd41a110a Prevent 'no such file or directory' error when mass deleting characters 2023-12-09 14:36:37 +01:00
artisticMink ba3966e148 Only refresh character list after all deletions have been processed. 2023-12-09 14:31:18 +01:00
Cohee d36422e558 Fix/optimize bulk favorite 2023-12-06 01:56:07 +02:00
valadaptive b689b8bd30 Rename character API endpoints
Precursor to moving the character API into its own module
2023-12-04 17:35:06 -05:00
Cohee 64a3564892 lint: Comma dangle 2023-12-02 22:06:57 +02:00
Cohee 08fedf3a96 lint: Use 4 space indent 2023-12-02 21:56:16 +02:00
Cohee c63cd87cc0 lint: Require semicolons 2023-12-02 21:11:06 +02:00
valadaptive a37f874e38 Require single quotes 2023-12-02 13:04:51 -05:00
Cohee 2092f849f7 #1348 Show a full screen loader when bulk deleting characters 2023-11-12 21:58:43 +02:00
Cohee 7e2ec3ea43 Disable bulk edit for bogus folders 2023-11-10 22:18:48 +02:00
Cohee 3a5cd5d202 Close context menu if open when clicking on group 2023-11-10 00:04:16 +02:00
Cohee 7385de8cf8 Adjust position if context menu is outside of viewport 2023-11-09 23:55:14 +02:00
artisticMink b2b4be5452 Fix documentation typo 2023-11-09 15:24:24 +01:00
artisticMink b56fb69eca Prevent deselecting of pointer target character on menu close 2023-11-09 15:18:59 +01:00
artisticMink 2f7e34f66c Close context menu when tapping on character 2023-11-09 15:03:49 +01:00
artisticMink fa452e94b0 Prevent loss of selected characters when closing menu 2023-11-08 21:22:00 +01:00
artisticMink b8540a190b Prevent groups from being clicked.
Includes visual indication.
2023-11-08 20:52:34 +01:00
artisticMink 7e3c155e37 Unify access to character block container 2023-11-08 19:29:50 +01:00
artisticMink b7b478eea8 Cancel long-press on mouseup, touchend
Fixes menu opening multiple times in different position when a user selects quickly and ends with a long-press.
2023-11-08 18:48:35 +01:00
Cohee 44f77f3bb3 Fix mobile scrolling. Increase press timeout. Cancel longpress on scroll 2023-11-08 01:10:51 +02:00
Cohee 48e41d89cb Only override context menu if clicking within character block 2023-11-08 00:59:09 +02:00