fix(recipes): distinguish unobtainable LoRAs in recipe status and skip them in syntax

The recipe card pill counted LoRAs deleted from the source (isDeleted) as
available, showing a green 'ready 2/2' for recipes that cannot be fully
reproduced. LoRAs with an unresolvable hash (hashInvalid) were counted as
missing/downloadable even though downloads always fail, and recipe syntax
generation emitted broken tokens for them.

- Four-state status on RecipeCard pill and RecipeTab badge: ready (all in
  library), missing (downloadable, red, keeps the action cue), partial
  (unobtainable entries skipped when used, amber, fa-circle-minus),
  unavailable (nothing usable, gray, fa-ban)
- Pill numerator is now the real in-library count; tooltips spell out
  missing vs unavailable (deleted from source or unresolvable hash)
- get_recipe_syntax_tokens skips hashInvalid entries like deleted ones
  instead of emitting tokens pointing at nonexistent files
- Bulk missing-download manager and recipe context menu exclude
  hashInvalid LoRAs, matching the modal's per-item download block
- New locale keys loraStatus.missingAndUnavailable/partial/noneUsable,
  translated for all 9 non-en locales
This commit is contained in:
Will Miao
2026-08-29 16:41:48 +08:00
parent ebe3df7d22
commit c972c755fc
19 changed files with 258 additions and 40 deletions
@@ -1078,6 +1078,19 @@
color: #facc15;
}
/* Partial: usable but degraded — some LoRAs are unobtainable and skipped.
Orange sits between ready green and missing amber. */
.recipe-card__badge--partial {
background: rgba(249, 115, 22, 0.2);
color: #fb923c;
}
/* Unavailable: no usable LoRA at all — red marks the recipe as dead. */
.recipe-card__badge--unavailable {
background: rgba(239, 68, 68, 0.2);
color: #f87171;
}
.recipe-card__badge--empty {
background: rgba(148, 163, 184, 0.18);
color: #e2e8f0;
@@ -1093,6 +1106,16 @@
background: rgba(245, 199, 43, 0.22);
}
[data-theme="light"] .recipe-card__badge--partial {
color: #c2410c;
background: rgba(249, 115, 22, 0.18);
}
[data-theme="light"] .recipe-card__badge--unavailable {
color: #b91c1c;
background: rgba(239, 68, 68, 0.16);
}
[data-theme="light"] .recipe-card__badge--empty {
color: rgba(71, 85, 105, 0.9);
background: rgba(148, 163, 184, 0.2);