feat(frontend): opt-in Other Models toggles, hidden nav and announcement

- The Other nav entry is hidden while the feature is off
  (nav-item--hidden, toggled client-side after enabling) and now uses the
  fa-shapes icon.
- Shared utils/otherModels.js helpers (enable through the settings API,
  open the settings Library section) are reused by the disabled page, the
  announcement banner and the download modal.
- BannerService registers a one-time dismissible "other-models-announcement"
  banner while the feature is off; SettingsManager drops the banner and
  updates the nav when the master switch flips.
- A disabled download routing answer now surfaces a showActionToast with an
  "Enable Other Models" action.
- Settings UI: master toggle + five sub_type checkboxes whose default-root
  selects are disabled when unchecked; i18n keys added to en.json and synced
  (other locales keep TODO placeholders).
This commit is contained in:
Will Miao
2026-09-13 07:59:28 +08:00
parent 28fbb86dce
commit 69a62d739c
25 changed files with 1006 additions and 19 deletions
+25 -1
View File
@@ -545,6 +545,15 @@
"defaultClipVisionRootHelp": "[TODO: Translate] Set default CLIP vision root directory for downloads, imports and moves",
"defaultControlnetRoot": "[TODO: Translate] ControlNet Root",
"defaultControlnetRootHelp": "[TODO: Translate] Set default ControlNet root directory for downloads, imports and moves",
"enableOtherModels": "[TODO: Translate] Other Models Management",
"enableOtherModelsHelp": "[TODO: Translate] When off, VAE / upscaler / text encoder / CLIP folders are not scanned, the Other Models page stays disabled, and these model types cannot be downloaded.",
"otherSubTypes": "[TODO: Translate] Managed Types",
"otherSubTypesHelp": "[TODO: Translate] Choose which other-model categories are scanned and shown on the Other Models page.",
"subTypeVae": "[TODO: Translate] VAE",
"subTypeUpscaler": "[TODO: Translate] Upscaler",
"subTypeTextEncoder": "[TODO: Translate] Text Encoder",
"subTypeClipVision": "[TODO: Translate] CLIP Vision",
"subTypeControlnet": "[TODO: Translate] ControlNet",
"recipesPath": "配方存储路径",
"recipesPathHelp": "已保存配方的可选自定义目录。留空则使用第一个 LoRA 根目录下的 recipes 文件夹。",
"recipesPathPlaceholder": "/path/to/recipes",
@@ -1214,7 +1223,16 @@
"title": "Embedding 模型"
},
"other": {
"title": "[TODO: Translate] Other Models"
"title": "[TODO: Translate] Other Models",
"disabled": {
"title": "[TODO: Translate] Other Models management is off",
"description": "[TODO: Translate] Enable it to scan and manage VAE, upscaler, text encoder and CLIP vision files, and to download them from CivitAI.",
"enableButton": "[TODO: Translate] Enable Other Models",
"hint": "[TODO: Translate] You can change the managed model types later in Settings > Library.",
"enableFailed": "[TODO: Translate] Failed to enable Other Models",
"downloadBlocked": "[TODO: Translate] Other Models management is disabled for this model type. Enable it in Settings > Library to download this file.",
"enableAction": "[TODO: Translate] Enable Other Models"
}
},
"sidebar": {
"modelRoot": "根目录",
@@ -2615,6 +2633,12 @@
"rebuilding": "正在重建缓存...",
"rebuildFailed": "重建缓存失败:{error}",
"retry": "重试"
},
"otherModels": {
"title": "[TODO: Translate] Other Models Management is available",
"content": "[TODO: Translate] Scan and manage VAE, upscaler, text encoder and CLIP vision files — and download them from CivitAI — from one dedicated page.",
"enable": "[TODO: Translate] Enable Other Models",
"openSettings": "[TODO: Translate] Open Settings"
}
}
}