refactor(frontend): unify Model/WebSearch/MCP settings pages with shared card + drawer
Aligns the three list-style settings pages (ModelSettings, WebSearchSettings,
McpSettings) under a consistent visual language, and replaces the modal editors
with right-side drawers for a calmer editing flow.
- Extract shared building blocks under frontend/src/components/settings/:
SettingCard (list-item card), SettingDrawer (500px right drawer with a
pinned footer), and useConfirmDelete (a single DialogPlugin.confirm path
that replaces the mix of window.confirm / t-popconfirm / ad-hoc dialogs).
- Swap the old bespoke overlay / t-dialog shells in ModelEditorDialog and
McpServiceDialog for SettingDrawer. Form logic is untouched.
- Model settings now use a single t-tabs filter (All/Chat/Embedding/ReRank/
Vision/Speech with per-type counts) and decouple "Add model" from the tab
state via a dropdown in the header. Type tags get a 5-color palette so
categories read at a glance. The list is a two-column grid.
- Web search and MCP lists are likewise rendered as two-column grids, with
richer cards: transport type / provider, on-off and default state, plus a
compact meta row showing base URL, proxy or service URL.
- Introduce modelSettings.typeShort.{chat,embedding,rerank,vllm,asr} in all
four locales for the shortened category labels.
This commit is contained in:
@@ -2660,6 +2660,13 @@ export default {
|
||||
modelSettings: {
|
||||
title: 'Настройки моделей',
|
||||
description: 'Управление типами AI‑моделей: локальные (Ollama) и удалённые API',
|
||||
typeShort: {
|
||||
chat: 'Чат',
|
||||
embedding: 'Embedding',
|
||||
rerank: 'ReRank',
|
||||
vllm: 'Зрение',
|
||||
asr: 'Речь',
|
||||
},
|
||||
actions: {
|
||||
addModel: 'Добавить модель',
|
||||
setDefault: 'Сделать по умолчанию'
|
||||
|
||||
Reference in New Issue
Block a user