mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-07 14:30:15 -03:00
refactor(ui): group example image download actions into a submenu
Move the 'Download Missing' / 'Re-process All' example image actions under a single 'Download Example Images' submenu item in the single-model and bulk context menus, matching the existing send-to-workflow submenu pattern. Shorten the submenu labels and update all locale translations.
This commit is contained in:
@@ -137,17 +137,10 @@ export class BulkContextMenu extends BaseContextMenu {
|
||||
downloadMissingLorasItem.style.display = currentModelType === 'recipes' ? 'flex' : 'none';
|
||||
}
|
||||
|
||||
const downloadExampleImagesItem = this.menu.querySelector('[data-action="download-example-images"]');
|
||||
if (downloadExampleImagesItem) {
|
||||
const downloadExampleImagesSubmenu = this.menu.querySelector('[data-has-submenu="download-example-images"]');
|
||||
if (downloadExampleImagesSubmenu) {
|
||||
// Show on model pages (loras, checkpoints, embeddings), hide on recipes
|
||||
const modelPages = ['loras', 'checkpoints', 'embeddings'];
|
||||
downloadExampleImagesItem.style.display = modelPages.includes(currentModelType) ? 'flex' : 'none';
|
||||
}
|
||||
|
||||
const downloadMissingExampleImagesItem = this.menu.querySelector('[data-action="download-missing-example-images"]');
|
||||
if (downloadMissingExampleImagesItem) {
|
||||
// Show on model pages (loras, checkpoints, embeddings), hide on recipes
|
||||
downloadMissingExampleImagesItem.style.display = ['loras', 'checkpoints', 'embeddings'].includes(currentModelType) ? 'flex' : 'none';
|
||||
downloadExampleImagesSubmenu.style.display = ['loras', 'checkpoints', 'embeddings'].includes(currentModelType) ? 'flex' : 'none';
|
||||
}
|
||||
|
||||
const skipMetadataRefreshItem = this.menu.querySelector('[data-action="skip-metadata-refresh"]');
|
||||
|
||||
Reference in New Issue
Block a user