Refactor context menus to use ModelContextMenuMixin for shared functionality

- Introduced ModelContextMenuMixin to encapsulate shared methods for Lora and Checkpoint context menus.
- Updated CheckpointContextMenu to utilize the mixin for common actions and NSFW level handling.
- Simplified LoraContextMenu by integrating the mixin, removing redundant methods.
- Removed duplicated NSFW handling logic and centralized it in the mixin.
- Adjusted import/export statements to reflect the new structure and ensure proper functionality.
This commit is contained in:
Will Miao
2025-06-11 20:52:45 +08:00
parent eb01ad3af9
commit 7fec107b98
4 changed files with 413 additions and 728 deletions

View File

@@ -1,3 +1,4 @@
export { LoraContextMenu } from './LoraContextMenu.js';
export { RecipeContextMenu } from './RecipeContextMenu.js';
export { CheckpointContextMenu } from './CheckpointContextMenu.js';
export { CheckpointContextMenu } from './CheckpointContextMenu.js';
export { ModelContextMenuMixin } from './ModelContextMenuMixin.js';