feat(download): add Hugging Face model download to standalone UI wizard (#965, #977)

Integrate HF model downloading into the existing CivitAI-style wizard flow:
- URL type detection (civitai / hf-resolve / hf-repo / direct-http)
- Repo file explorer with checkbox-based file selection
- Batch/queue download with per-file WebSocket progress
- Aria2 backend support (respects download_backend setting)
- Scanner cache integration via create_default_metadata + add_model_to_cache
- i18n updates for all 10 locales
This commit is contained in:
Will Miao
2026-06-30 19:36:12 +08:00
parent 16f5222efd
commit 09ca91fc0e
20 changed files with 20207 additions and 19207 deletions

View File

@@ -14,7 +14,7 @@
<div class="error-message" id="urlError"></div>
<div class="input-hint">
<i class="fas fa-info-circle"></i>
<span>{{ t('modals.download.urlHint') }}</span>
<span id="urlHint">{{ t('modals.download.urlHint') }}</span>
</div>
</div>
<div class="modal-actions">
@@ -22,6 +22,24 @@
</div>
</div>
<!-- Step 1b: HF Repo File Explorer (shown when HF repo URL is detected) -->
<div class="download-step" id="repoFileStep" style="display: none;">
<div class="input-group">
<label>{{ t('modals.download.selectHfFiles') }}</label>
<div class="hf-repo-header">
<span id="hfRepoLabel" class="hf-repo-label"></span>
</div>
<div class="repo-file-list" id="repoFileList">
<!-- Files will be inserted here dynamically -->
</div>
<div class="error-message" id="repoFileError"></div>
</div>
<div class="modal-actions">
<button class="secondary-btn" id="backToUrlFromHfBtn">{{ t('common.actions.back') }}</button>
<button class="primary-btn" id="nextFromHfFiles">{{ t('common.actions.next') }}</button>
</div>
</div>
<!-- Step 2: Batch Preview (multi-URL mode) -->
<div class="download-step" id="batchPreviewStep" style="display: none;">
<div class="batch-preview-list" id="batchPreviewList">