diff --git a/apps/desktop/src/renderer/locales/settings-provider-copy.ts b/apps/desktop/src/renderer/locales/settings-provider-copy.ts index e5e6ff39e3..1aa4b06e6b 100644 --- a/apps/desktop/src/renderer/locales/settings-provider-copy.ts +++ b/apps/desktop/src/renderer/locales/settings-provider-copy.ts @@ -79,7 +79,7 @@ const zhCopy = { tabs: { recommended: '推荐', accounts: '账号', plans: '模型计划', api: 'API', aggregators: '聚合服务', local: '本地' }, loadFailed: '载入模型连接失败', loadingAria: '正在加载模型供应商', connections: '模型连接', retry: '点击重试。', empty: '还没有模型连接', - emptyHelp: '从下方选择一种连接方式开始。', default: '默认', addHelp: '选择账号登录、模型计划、API、聚合服务或本地运行时。', + emptyHelp: '从下方选择一种连接方式开始。', default: '默认', setDefault: '设为默认', setDefaultTitle: '让新对话默认使用这个连接', setDefaultPending: '设置中…', setDefaultFailed: '设为默认失败', addHelp: '选择账号登录、模型计划、API、聚合服务或本地运行时。', categoriesAria: '模型供应商分类', searchPlaceholder: '搜索服务商', searchAria: '搜索模型服务商', noMatch: '没有匹配的服务商', createSubtitle: '完成必要配置后,连接会出现在模型页上方。', connection: '模型连接', count: (value: number) => `· ${value}`, connectTitle: (name: string) => `连接 ${name}`, @@ -220,7 +220,7 @@ const enCopy: ProviderSettingsCopy = { tabs: { recommended: 'Recommended', accounts: 'Accounts', plans: 'Model plans', api: 'API', aggregators: 'Aggregators', local: 'Local' }, loadFailed: 'Failed to load model connections', loadingAria: 'Loading model providers', connections: 'Connections', retry: 'Select to retry.', empty: 'No model connections yet', - emptyHelp: 'Choose a connection method below to begin.', default: 'Default', addHelp: 'Choose account sign-in, a model plan, API, aggregator, or local runtime.', + emptyHelp: 'Choose a connection method below to begin.', default: 'Default', setDefault: 'Set as default', setDefaultTitle: 'New chats will use this connection', setDefaultPending: 'Setting…', setDefaultFailed: 'Could not set as default', addHelp: 'Choose account sign-in, a model plan, API, aggregator, or local runtime.', categoriesAria: 'Model provider categories', searchPlaceholder: 'Search providers', searchAria: 'Search model providers', noMatch: 'No matching providers', createSubtitle: 'After required setup, the connection appears above on the Models page.', connection: 'Model connection', count: (value: number) => `· ${value}`, connectTitle: (name: string) => `Connect ${name}`, diff --git a/apps/desktop/src/renderer/settings/ProvidersPanel.tsx b/apps/desktop/src/renderer/settings/ProvidersPanel.tsx index 7364ca5e14..87c6815a6e 100644 --- a/apps/desktop/src/renderer/settings/ProvidersPanel.tsx +++ b/apps/desktop/src/renderer/settings/ProvidersPanel.tsx @@ -19,6 +19,7 @@ import { type ProviderType, } from '@maka/core'; import { useMountedRef, useUiLocale, useToast , dotForStatus } from '@maka/ui'; +import { settingsActionErrorMessage } from './settings-error-copy'; import { connectionChipStatus } from './provider-connection-status'; import { CATALOG_INITIAL_FILTER, @@ -249,7 +250,43 @@ export function ProvidersPanel({ bridge, initialPage = 'connections', initialCon logo={} titleId={detailTitleId} title={selected.name} - badge={selected.slug === defaultSlug ? : null} + /* The control sits in the slot that shows the state. Setting the + default connection was reachable only from the command palette, + while this page displayed a 默认 Badge and offered no way to + change it — so a user who came here to change it (the obvious + place, since it is where the answer is shown) found a read-only + label and gave up. Whichever of the two a connection is, this + slot now tells the truth AND is the way to change it. + + `secondary`, not ghost: this button sits alone beside a title, + where a ghost's bare text reads as a subtitle rather than + something you can press — which would recreate the very problem + it exists to solve. 测试连接 below is secondary sm, and that is + this page's dialect for "quiet but unmistakably a control". + + `clickAction` rather than onClick: it opens no confirm, so there + is no state-driven UI to await inside the transition, and the + button gets its own pending affordance for free. */ + badge={selected.slug === defaultSlug + ? + : ( +