feat(bulk-tags): add bulk tag management modal and context menu integration

This commit is contained in:
Will Miao
2025-09-04 22:08:55 +08:00
parent a5a9f7ed83
commit 4eb67cf6da
7 changed files with 285 additions and 2 deletions

View File

@@ -50,6 +50,9 @@
<span>{{ t('loras.bulkOperations.selected', {'count': 0}) }}</span>
</div>
<div class="context-menu-separator"></div>
<div class="context-menu-item" data-action="add-tags">
<i class="fas fa-tags"></i> <span>{{ t('loras.bulkOperations.addTags') }}</span>
</div>
<div class="context-menu-item" data-action="send-to-workflow">
<i class="fas fa-paper-plane"></i> <span>{{ t('loras.bulkOperations.sendToWorkflow') }}</span>
</div>

View File

@@ -9,4 +9,5 @@
{% include 'components/modals/relink_civitai_modal.html' %}
{% include 'components/modals/example_access_modal.html' %}
{% include 'components/modals/download_modal.html' %}
{% include 'components/modals/move_modal.html' %}
{% include 'components/modals/move_modal.html' %}
{% include 'components/modals/bulk_add_tags_modal.html' %}

View File

@@ -0,0 +1,37 @@
<div id="bulkAddTagsModal" class="modal" style="display: none;">
<div class="modal-content">
<div class="modal-header">
<h3><i class="fas fa-tags"></i> {{ t('modals.bulkAddTags.title') }}</h3>
<button class="modal-close" onclick="modalManager.closeModal('bulkAddTagsModal')">
<i class="fas fa-times"></i>
</button>
</div>
<div class="modal-body">
<div class="bulk-add-tags-info">
<p>{{ t('modals.bulkAddTags.description') }} <span id="bulkAddTagsCount">0</span> {{ t('modals.bulkAddTags.models') }}</p>
</div>
<div class="model-tags-container bulk-tags-container edit-mode">
<div class="metadata-edit-container" style="display: block;">
<div class="metadata-edit-content">
<div class="metadata-edit-header">
<label>{{ t('modals.bulkAddTags.tagsToAdd') }}</label>
</div>
<div class="metadata-items" id="bulkTagsItems">
<!-- Tags will be added here dynamically -->
</div>
<div class="metadata-edit-controls">
<button class="save-tags-btn bulk-save-tags-btn" title="{{ t('modals.bulkAddTags.saveChanges') }}">
<i class="fas fa-save"></i> {{ t('common.actions.save') }}
</button>
</div>
<div class="metadata-add-form">
<input type="text" class="metadata-input bulk-metadata-input" placeholder="{{ t('modals.bulkAddTags.placeholder') }}">
</div>
<!-- Suggestions dropdown will be added here -->
</div>
</div>
</div>
</div>
</div>
</div>