feat(auto-organize): add auto-organize functionality for selected models and update context menu

This commit is contained in:
Will Miao
2025-09-05 20:51:30 +08:00
parent 5e69671366
commit c109e392ad
15 changed files with 374 additions and 46 deletions

View File

@@ -33,6 +33,7 @@ export class BulkContextMenu extends BaseContextMenu {
const copyAllItem = this.menu.querySelector('[data-action="copy-all"]');
const refreshAllItem = this.menu.querySelector('[data-action="refresh-all"]');
const moveAllItem = this.menu.querySelector('[data-action="move-all"]');
const autoOrganizeItem = this.menu.querySelector('[data-action="auto-organize"]');
const deleteAllItem = this.menu.querySelector('[data-action="delete-all"]');
if (sendToWorkflowAppendItem) {
@@ -50,6 +51,9 @@ export class BulkContextMenu extends BaseContextMenu {
if (moveAllItem) {
moveAllItem.style.display = config.moveAll ? 'flex' : 'none';
}
if (autoOrganizeItem) {
autoOrganizeItem.style.display = config.autoOrganize ? 'flex' : 'none';
}
if (deleteAllItem) {
deleteAllItem.style.display = config.deleteAll ? 'flex' : 'none';
}
@@ -97,6 +101,9 @@ export class BulkContextMenu extends BaseContextMenu {
case 'move-all':
window.moveManager.showMoveModal('bulk');
break;
case 'auto-organize':
bulkManager.autoOrganizeSelectedModels();
break;
case 'delete-all':
bulkManager.showBulkDeleteModal();
break;