mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-05-16 10:07:36 -03:00
feat(ui): use recipes terminology in bulk delete confirmation for recipes page
The bulk delete confirmation modal always displayed "models" in its text (title, message, countMessage) regardless of the current page type. On the recipes page this is misleading since users are managing recipes, not models. - Add bulkDeleteRecipes i18n keys to all 10 locale files - Update showBulkDeleteModal() to detect currentPageType and use recipes-specific wording when on the recipes page
This commit is contained in:
@@ -546,9 +546,23 @@ export class BulkManager {
|
||||
return;
|
||||
}
|
||||
|
||||
const countElement = document.getElementById('bulkDeleteCount');
|
||||
if (countElement) {
|
||||
countElement.textContent = state.selectedModels.size;
|
||||
const count = state.selectedModels.size;
|
||||
const isRecipes = state.currentPageType === 'recipes';
|
||||
const keyPrefix = isRecipes ? 'modals.bulkDeleteRecipes' : 'modals.bulkDelete';
|
||||
|
||||
const titleEl = document.querySelector('#bulkDeleteModal h2');
|
||||
if (titleEl) {
|
||||
titleEl.textContent = translate(`${keyPrefix}.title`);
|
||||
}
|
||||
|
||||
const messageEl = document.querySelector('#bulkDeleteModal .delete-message');
|
||||
if (messageEl) {
|
||||
messageEl.textContent = translate(`${keyPrefix}.message`);
|
||||
}
|
||||
|
||||
const countInfoEl = document.querySelector('#bulkDeleteModal .delete-model-info p');
|
||||
if (countInfoEl) {
|
||||
countInfoEl.innerHTML = `<span id="bulkDeleteCount">${count}</span> ${translate(`${keyPrefix}.countMessage`)}`;
|
||||
}
|
||||
|
||||
modalManager.showModal('bulkDeleteModal');
|
||||
|
||||
Reference in New Issue
Block a user