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": "Alle LoRAs verfügbar - Einsatzbereit",
"missing": "{missing} von {total} LoRAs fehlen"
},
"resources": {
"inLibrary": "In Bibliothek",
"notInLibrary": "Nicht in Bibliothek",
"deleted": "Gelöscht",
"inLibraryTooltip": "Dieses Modell ist in deiner lokalen Bibliothek vorhanden",
"notInLibraryTooltip": "Dieses Modell ist nicht in deiner Bibliothek",
"deletedTooltip": "Dieses LoRA wurde an der Quelle gelöscht und kann nicht mehr heruntergeladen werden",
"download": "Herunterladen",
"downloadLoraTooltip": "Dieses LoRA herunterladen",
"preparingDownload": "Download wird vorbereitet…",
"reconnect": "Neu verknüpfen",
"reconnectTooltip": "Mit einem lokalen LoRA neu verknüpfen",
"viewOnCivitai": "Auf Civitai anzeigen",
"openLoraDetails": "{name} in der LoRA-Bibliothek anzeigen",
"openCheckpointDetails": "{name} in der Modellbibliothek anzeigen"
},
"controls": {
"import": {
"action": "Importieren",
@@ -2029,6 +2045,8 @@
"missingCheckpointPath": "Checkpoint-Pfad nicht verfügbar",
"missingCheckpointInfo": "Checkpoint-Informationen fehlen",
"downloadCheckpointFailed": "Checkpoint-Download fehlgeschlagen: {message}",
"missingLoraDownloadInfo": "Download-Informationen für dieses LoRA fehlen",
"downloadLoraFailed": "LoRA-Download fehlgeschlagen: {message}",
"cannotDelete": "Kann Rezept nicht löschen: Fehlende Rezept-ID",
"deleteConfirmationError": "Fehler beim Anzeigen der Löschbestätigung",
"deletedSuccessfully": "Rezept erfolgreich gelöscht",
+18
View File
@@ -885,6 +885,22 @@
"allAvailable": "All LoRAs available - Ready to use",
"missing": "{missing} of {total} LoRAs missing"
},
"resources": {
"inLibrary": "In Library",
"notInLibrary": "Not in Library",
"deleted": "Deleted",
"inLibraryTooltip": "This model exists in your local library",
"notInLibraryTooltip": "This model is not in your library",
"deletedTooltip": "This LoRA was deleted from the source and is no longer available for download",
"download": "Download",
"downloadLoraTooltip": "Download this LoRA",
"preparingDownload": "Preparing download...",
"reconnect": "Reconnect",
"reconnectTooltip": "Reconnect with a local LoRA",
"viewOnCivitai": "View on Civitai",
"openLoraDetails": "View {name} in the LoRA library",
"openCheckpointDetails": "View {name} in the model library"
},
"controls": {
"import": {
"action": "Import",
@@ -2029,6 +2045,8 @@
"missingCheckpointPath": "Checkpoint path not available",
"missingCheckpointInfo": "Missing checkpoint information",
"downloadCheckpointFailed": "Failed to download checkpoint: {message}",
"missingLoraDownloadInfo": "Missing download information for this LoRA",
"downloadLoraFailed": "Failed to download LoRA: {message}",
"cannotDelete": "Cannot delete recipe: Missing recipe ID",
"deleteConfirmationError": "Error showing delete confirmation",
"deletedSuccessfully": "Recipe deleted successfully",
+18
View File
@@ -885,6 +885,22 @@
"allAvailable": "Todos los LoRAs disponibles - Listo para usar",
"missing": "Faltan {missing} de {total} LoRAs"
},
"resources": {
"inLibrary": "En la biblioteca",
"notInLibrary": "No en la biblioteca",
"deleted": "Eliminado",
"inLibraryTooltip": "Este modelo existe en tu biblioteca local",
"notInLibraryTooltip": "Este modelo no está en tu biblioteca",
"deletedTooltip": "Este LoRA fue eliminado de la fuente y ya no se puede descargar",
"download": "Descargar",
"downloadLoraTooltip": "Descargar este LoRA",
"preparingDownload": "Preparando descarga…",
"reconnect": "Reconectar",
"reconnectTooltip": "Reconectar con un LoRA local",
"viewOnCivitai": "Ver en Civitai",
"openLoraDetails": "Ver {name} en la biblioteca de LoRAs",
"openCheckpointDetails": "Ver {name} en la biblioteca de modelos"
},
"controls": {
"import": {
"action": "Importar",
@@ -2029,6 +2045,8 @@
"missingCheckpointPath": "Ruta del checkpoint no disponible",
"missingCheckpointInfo": "Falta información del checkpoint",
"downloadCheckpointFailed": "Error al descargar el checkpoint: {message}",
"missingLoraDownloadInfo": "Falta la información de descarga de este LoRA",
"downloadLoraFailed": "Error al descargar el LoRA: {message}",
"cannotDelete": "No se puede eliminar receta: Falta ID de receta",
"deleteConfirmationError": "Error mostrando confirmación de eliminación",
"deletedSuccessfully": "Receta eliminada exitosamente",
+18
View File
@@ -885,6 +885,22 @@
"allAvailable": "Tous les LoRAs sont disponibles - Prêt à l'emploi",
"missing": "{missing} LoRA(s) manquant(s) sur {total}"
},
"resources": {
"inLibrary": "Dans la bibliothèque",
"notInLibrary": "Pas dans la bibliothèque",
"deleted": "Supprimé",
"inLibraryTooltip": "Ce modèle existe dans votre bibliothèque locale",
"notInLibraryTooltip": "Ce modèle n'est pas dans votre bibliothèque",
"deletedTooltip": "Ce LoRA a été supprimé de la source et ne peut plus être téléchargé",
"download": "Télécharger",
"downloadLoraTooltip": "Télécharger ce LoRA",
"preparingDownload": "Préparation du téléchargement…",
"reconnect": "Reconnecter",
"reconnectTooltip": "Reconnecter avec un LoRA local",
"viewOnCivitai": "Voir sur Civitai",
"openLoraDetails": "Voir {name} dans la bibliothèque LoRA",
"openCheckpointDetails": "Voir {name} dans la bibliothèque de modèles"
},
"controls": {
"import": {
"action": "Importer",
@@ -2029,6 +2045,8 @@
"missingCheckpointPath": "Chemin du checkpoint indisponible",
"missingCheckpointInfo": "Informations sur le checkpoint manquantes",
"downloadCheckpointFailed": "Échec du téléchargement du checkpoint : {message}",
"missingLoraDownloadInfo": "Informations de téléchargement manquantes pour ce LoRA",
"downloadLoraFailed": "Échec du téléchargement du LoRA : {message}",
"cannotDelete": "Impossible de supprimer la recipe : ID de recipe manquant",
"deleteConfirmationError": "Erreur lors de l'affichage de la confirmation de suppression",
"deletedSuccessfully": "Recipe supprimée avec succès",
+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": "נתיב ה-checkpoint אינו זמין",
"missingCheckpointInfo": "חסרים פרטי checkpoint",
"downloadCheckpointFailed": "הורדת checkpoint נכשלה: {message}",
"missingLoraDownloadInfo": "חסר מידע הורדה עבור LoRA זה",
"downloadLoraFailed": "הורדת ה-LoRA נכשלה: {message}",
"cannotDelete": "לא ניתן למחוק מתכון: חסר מזהה מתכון",
"deleteConfirmationError": "שגיאה בהצגת אישור המחיקה",
"deletedSuccessfully": "המתכון נמחק בהצלחה",
+18
View File
@@ -885,6 +885,22 @@
"allAvailable": "すべてのLoRAが利用可能 - 使用可能",
"missing": "{total} 件中 {missing} 件のLoRAが不足"
},
"resources": {
"inLibrary": "ライブラリ内",
"notInLibrary": "ライブラリ外",
"deleted": "削除済み",
"inLibraryTooltip": "このモデルはローカルライブラリに存在します",
"notInLibraryTooltip": "このモデルはライブラリにありません",
"deletedTooltip": "この LoRA は配信元から削除されたため、ダウンロードできません",
"download": "ダウンロード",
"downloadLoraTooltip": "この LoRA をダウンロード",
"preparingDownload": "ダウンロードを準備中…",
"reconnect": "再接続",
"reconnectTooltip": "ローカルの LoRA と再接続",
"viewOnCivitai": "Civitai で表示",
"openLoraDetails": "LoRA ライブラリで {name} を表示",
"openCheckpointDetails": "モデルライブラリで {name} を表示"
},
"controls": {
"import": {
"action": "インポート",
@@ -2029,6 +2045,8 @@
"missingCheckpointPath": "チェックポイントのパスがありません",
"missingCheckpointInfo": "チェックポイント情報が不足しています",
"downloadCheckpointFailed": "チェックポイントのダウンロードに失敗しました: {message}",
"missingLoraDownloadInfo": "この LoRA のダウンロード情報がありません",
"downloadLoraFailed": "LoRA のダウンロードに失敗しました: {message}",
"cannotDelete": "レシピを削除できません:レシピIDがありません",
"deleteConfirmationError": "削除確認の表示中にエラーが発生しました",
"deletedSuccessfully": "レシピが正常に削除されました",
+18
View File
@@ -885,6 +885,22 @@
"allAvailable": "모든 LoRA 사용 가능 - 바로 사용 가능",
"missing": "총 {total}개 중 {missing}개 LoRA 누락"
},
"resources": {
"inLibrary": "라이브러리에 있음",
"notInLibrary": "라이브러리에 없음",
"deleted": "삭제됨",
"inLibraryTooltip": "이 모델은 로컬 라이브러리에 있습니다",
"notInLibraryTooltip": "이 모델은 라이브러리에 없습니다",
"deletedTooltip": "이 LoRA는 소스에서 삭제되어 더 이상 다운로드할 수 없습니다",
"download": "다운로드",
"downloadLoraTooltip": "이 LoRA 다운로드",
"preparingDownload": "다운로드 준비 중…",
"reconnect": "다시 연결",
"reconnectTooltip": "로컬 LoRA와 다시 연결",
"viewOnCivitai": "Civitai에서 보기",
"openLoraDetails": "LoRA 라이브러리에서 {name} 보기",
"openCheckpointDetails": "모델 라이브러리에서 {name} 보기"
},
"controls": {
"import": {
"action": "가져오기",
@@ -2029,6 +2045,8 @@
"missingCheckpointPath": "체크포인트 경로를 사용할 수 없습니다",
"missingCheckpointInfo": "체크포인트 정보가 부족합니다",
"downloadCheckpointFailed": "체크포인트 다운로드 실패: {message}",
"missingLoraDownloadInfo": "이 LoRA의 다운로드 정보가 없습니다",
"downloadLoraFailed": "LoRA 다운로드 실패: {message}",
"cannotDelete": "레시피를 삭제할 수 없습니다: 레시피 ID 누락",
"deleteConfirmationError": "삭제 확인 표시 오류",
"deletedSuccessfully": "레시피가 성공적으로 삭제되었습니다",
+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": "Рецепт успешно удален",
+18
View File
@@ -885,6 +885,22 @@
"allAvailable": "所有 LoRA 均已就绪 - 可直接使用",
"missing": "{total} 个 LoRA 中缺失 {missing} 个"
},
"resources": {
"inLibrary": "在库中",
"notInLibrary": "不在库中",
"deleted": "已删除",
"inLibraryTooltip": "该模型已存在于本地库中",
"notInLibraryTooltip": "该模型不在你的本地库中",
"deletedTooltip": "该 LoRA 已从来源站删除,无法下载",
"download": "下载",
"downloadLoraTooltip": "下载此 LoRA",
"preparingDownload": "正在准备下载…",
"reconnect": "重新关联",
"reconnectTooltip": "与本地 LoRA 重新关联",
"viewOnCivitai": "在 Civitai 上查看",
"openLoraDetails": "在 LoRA 库中查看 {name}",
"openCheckpointDetails": "在模型库中查看 {name}"
},
"controls": {
"import": {
"action": "导入",
@@ -2029,6 +2045,8 @@
"missingCheckpointPath": "缺少检查点路径",
"missingCheckpointInfo": "缺少检查点信息",
"downloadCheckpointFailed": "下载检查点失败:{message}",
"missingLoraDownloadInfo": "缺少此 LoRA 的下载信息",
"downloadLoraFailed": "下载 LoRA 失败:{message}",
"cannotDelete": "无法删除配方:缺少配方 ID",
"deleteConfirmationError": "显示删除确认出错",
"deletedSuccessfully": "配方删除成功",
+18
View File
@@ -885,6 +885,22 @@
"allAvailable": "所有 LoRA 皆已就緒 - 可直接使用",
"missing": "{total} 個 LoRA 中缺少 {missing} 個"
},
"resources": {
"inLibrary": "已在庫存",
"notInLibrary": "不在庫存",
"deleted": "已刪除",
"inLibraryTooltip": "此模型已存在於本地庫",
"notInLibraryTooltip": "此模型不在你的本地庫中",
"deletedTooltip": "此 LoRA 已從來源站刪除,無法下載",
"download": "下載",
"downloadLoraTooltip": "下載此 LoRA",
"preparingDownload": "正在準備下載…",
"reconnect": "重新關聯",
"reconnectTooltip": "與本地 LoRA 重新關聯",
"viewOnCivitai": "在 Civitai 上檢視",
"openLoraDetails": "在 LoRA 庫中檢視 {name}",
"openCheckpointDetails": "在模型庫中檢視 {name}"
},
"controls": {
"import": {
"action": "匯入",
@@ -2029,6 +2045,8 @@
"missingCheckpointPath": "缺少檢查點路徑",
"missingCheckpointInfo": "缺少檢查點資訊",
"downloadCheckpointFailed": "下載檢查點失敗:{message}",
"missingLoraDownloadInfo": "缺少此 LoRA 的下載資訊",
"downloadLoraFailed": "下載 LoRA 失敗:{message}",
"cannotDelete": "無法刪除配方:缺少配方 ID",
"deleteConfirmationError": "顯示刪除確認時發生錯誤",
"deletedSuccessfully": "配方已成功刪除",