diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index fa7644f..dd68e02 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -131,6 +131,7 @@ "no_usage_data": "No usage data available", "view_detailed_usage": "View Detailed Stats", "edit_settings": "Edit Settings", + "routing_strategy": "Routing Strategy", "available_models": "Available Models", "available_models_desc": "Total models from all providers" }, diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index 3232b8f..e7b9ff8 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -131,6 +131,7 @@ "no_usage_data": "Данные об использовании отсутствуют", "view_detailed_usage": "Просмотреть детальную статистику", "edit_settings": "Изменить настройки", + "routing_strategy": "Стратегия маршрутизации", "available_models": "Доступные модели", "available_models_desc": "Всего моделей от всех провайдеров" }, diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index 54257df..a26ba22 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -131,6 +131,7 @@ "no_usage_data": "暂无使用数据", "view_detailed_usage": "查看详细统计", "edit_settings": "编辑设置", + "routing_strategy": "路由策略", "available_models": "可用模型", "available_models_desc": "所有提供商的模型总数" }, diff --git a/src/pages/DashboardPage.module.scss b/src/pages/DashboardPage.module.scss index 9a640d8..1ccf601 100644 --- a/src/pages/DashboardPage.module.scss +++ b/src/pages/DashboardPage.module.scss @@ -261,6 +261,39 @@ word-break: break-all; } +.configBadge { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 4px 10px; + border-radius: $radius-full; + border: 1px solid var(--border-color); + font-size: 12px; + font-weight: 600; + line-height: 1.2; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.configBadgeRoundRobin { + color: var(--primary-color); + border-color: rgba($primary-color, 0.24); + background: rgba($primary-color, 0.12); +} + +.configBadgeFillFirst { + color: $success-color; + border-color: rgba($success-color, 0.3); + background: rgba($success-color, 0.12); +} + +.configBadgeUnknown { + color: var(--text-secondary); + background: var(--bg-primary); +} + .configItemFull { grid-column: 1 / -1; } diff --git a/src/pages/DashboardPage.tsx b/src/pages/DashboardPage.tsx index a6608c6..ca20098 100644 --- a/src/pages/DashboardPage.tsx +++ b/src/pages/DashboardPage.tsx @@ -221,6 +221,22 @@ export function DashboardPage() { } ]; + const routingStrategyRaw = config?.routingStrategy?.trim() || ''; + const routingStrategyDisplay = !routingStrategyRaw + ? '-' + : routingStrategyRaw === 'round-robin' + ? t('basic_settings.routing_strategy_round_robin') + : routingStrategyRaw === 'fill-first' + ? t('basic_settings.routing_strategy_fill_first') + : routingStrategyRaw; + const routingStrategyBadgeClass = !routingStrategyRaw + ? styles.configBadgeUnknown + : routingStrategyRaw === 'round-robin' + ? styles.configBadgeRoundRobin + : routingStrategyRaw === 'fill-first' + ? styles.configBadgeFillFirst + : styles.configBadgeUnknown; + return (
@@ -311,6 +327,12 @@ export function DashboardPage() { {config.wsAuth ? t('common.yes') : t('common.no')}
+
+ {t('dashboard.routing_strategy')} + + {routingStrategyDisplay} + +
{config.proxyUrl && (
{t('basic_settings.proxy_url_label')}