feat(recipes): redesign resource item badges and actions in recipe modal

- Badges are pure status indicators with tooltips; remediation moves to a
  per-item action row (Download / Reconnect), matching the versions-tab
  badge/button pattern
- Civitai link inlines with the model title; the action row renders only
  when real actions exist, removing empty-row whitespace
- Single-LoRA download resolves identifiers from hash on demand (same
  fallback as the bulk missing-download flow) and shows immediate
  'Preparing download' feedback while resolving
- Successful downloads (LoRA and checkpoint) refresh the resources
  section and the recipe card in place, mirroring the bulk flow
- Row navigation is limited to in-library items with keyboard support;
  checkpoint type renders as muted text instead of a chip; badges use
  tonal styling; the local-path hover tooltip is removed
- Add resourceItems frontend tests and translate the new keys for all
  10 locales
This commit is contained in:
Will Miao
2026-08-28 09:30:37 +08:00
parent 15bf079af2
commit a7d65fe84a
13 changed files with 1100 additions and 169 deletions
+18
View File
@@ -885,6 +885,22 @@
"allAvailable": "Все LoRAs доступны - Готово к использованию",
"missing": "Отсутствует {missing} из {total} LoRAs"
},
"resources": {
"inLibrary": "В библиотеке",
"notInLibrary": "Не в библиотеке",
"deleted": "Удалено",
"inLibraryTooltip": "Эта модель есть в вашей локальной библиотеке",
"notInLibraryTooltip": "Этой модели нет в вашей библиотеке",
"deletedTooltip": "Этот LoRA был удалён из источника и больше недоступен для скачивания",
"download": "Скачать",
"downloadLoraTooltip": "Скачать этот LoRA",
"preparingDownload": "Подготовка к скачиванию…",
"reconnect": "Переподключить",
"reconnectTooltip": "Переподключить к локальному LoRA",
"viewOnCivitai": "Открыть на Civitai",
"openLoraDetails": "Открыть {name} в библиотеке LoRA",
"openCheckpointDetails": "Открыть {name} в библиотеке моделей"
},
"controls": {
"import": {
"action": "Импортировать",
@@ -2029,6 +2045,8 @@
"missingCheckpointPath": "Путь к чекпойнту недоступен",
"missingCheckpointInfo": "Отсутствуют данные о чекпойнте",
"downloadCheckpointFailed": "Не удалось скачать чекпойнт: {message}",
"missingLoraDownloadInfo": "Нет информации для скачивания этого LoRA",
"downloadLoraFailed": "Не удалось скачать LoRA: {message}",
"cannotDelete": "Невозможно удалить рецепт: отсутствует ID рецепта",
"deleteConfirmationError": "Ошибка отображения подтверждения удаления",
"deletedSuccessfully": "Рецепт успешно удален",