feat(ui): gray out enrich-hf-llm when no hf_url, add backend fast-fail, rename labels across locales, reposition menu item

This commit is contained in:
Will Miao
2026-07-06 00:34:18 +08:00
parent d0e8938039
commit 308d8f71b8
15 changed files with 95 additions and 66 deletions

View File

@@ -24,6 +24,14 @@ export class LoraContextMenu extends BaseContextMenu {
showMenu(x, y, card) {
super.showMenu(x, y, card);
this.updateExcludeMenuItem();
this.updateEnrichMenuItem(card);
}
updateEnrichMenuItem(card) {
const enrichItem = this.menu?.querySelector('[data-action="enrich-hf-llm"]');
if (!enrichItem) return;
const hasHfUrl = !!card.dataset.hf_url;
enrichItem.classList.toggle('disabled', !hasHfUrl);
}
handleMenuAction(action, menuItem) {