feat: refresh BossAI console frontend

This commit is contained in:
boos
2026-06-06 15:25:04 +08:00
parent 45aa741d9c
commit dd874bae30
6 changed files with 1060 additions and 14 deletions
+24 -9
View File
@@ -1,4 +1,5 @@
import React from 'react';
import MotionDiv from '../../components/AppMotion.js';
export type LoginShellVariant = 'admin' | 'user';
@@ -16,9 +17,15 @@ interface LoginShellProps {
}
const ADMIN_CAPABILITY_KEYS: Array<{ titleKey: string; descKey: string }> = [
{ titleKey: '统一代理网关', descKey: '一个 Key、一个入口,兼容 OpenAI / Claude 下游格式' },
{ titleKey: '自动模型发现', descKey: '上游新增模型自动出现在模型列表,零配置路由生成' },
{ titleKey: '智能路由引擎', descKey: '按成本、延迟、成功率自动选择最优通道,故障自动转移' },
{ titleKey: '统一 API 网关', descKey: 'OpenAI / Claude / 图像 / 视频模型统一接入、统一计费' },
{ titleKey: '工作流生产台', descKey: '连接 Comfy Cloud、RunningHub 与自有 API,把复杂流程产品化' },
{ titleKey: '智能路由引擎', descKey: '按成本、延迟、成功率选择通道,失败自动切换' },
];
const LOGIN_METRICS: Array<{ valueKey: string; labelKey: string }> = [
{ valueKey: '99.9%', labelKey: '网关可用性目标' },
{ valueKey: '4+', labelKey: '多模态生产入口' },
{ valueKey: '/v1', labelKey: '统一兼容入口' },
];
export default function LoginShell({
@@ -33,7 +40,7 @@ export default function LoginShell({
}: LoginShellProps) {
return (
<div className="login-shell" data-variant={variant}>
<div className="login-surface animate-scale-in">
<MotionDiv className="login-surface animate-scale-in" motionVariant="login" motionKey={variant}>
<section
className="login-brand-panel login-brand-panel-light"
style={variant === 'user' ? { padding: '28px 24px' } : undefined}
@@ -51,9 +58,9 @@ export default function LoginShell({
className="login-brand-summary"
style={variant === 'user' ? { textAlign: 'center' } : undefined}
>
<div className="login-brand-name">BoosAPI</div>
<div className="login-brand-name">BossAI</div>
<div className="login-brand-kicker">
{variant === 'user' ? t('用户登录') : t('AI 应用平台')}
{variant === 'user' ? t('创作者工作台') : t('多模型多模态 AI 应用平台')}
</div>
</div>
</div>
@@ -62,11 +69,19 @@ export default function LoginShell({
<>
<div className="login-brand-copy-block">
<p className="login-brand-copy">
{t('聚合多模型、多模态、工作流与智能路由,把对话、生图、视频和数字人生产放进一个统一平台。')}
{t('聚合对话、生图、视频、数字人与工作流编排,把 API 中转、模型路由和内容生产放进一套可运营的平台。')}
</p>
</div>
<div className="login-compat-line">
{t('兼容 New API / One API / OneHub / DoneHub / Veloera / AnyRouter / Sub2API')}
{t('兼容 OpenAI / Claude Messages / Comfy Cloud / RunningHub / 火山方舟等多类上游')}
</div>
<div className="login-metric-grid" aria-label={t('平台能力指标')}>
{LOGIN_METRICS.map((metric) => (
<div key={metric.labelKey} className="login-metric-card">
<strong>{t(metric.valueKey)}</strong>
<span>{t(metric.labelKey)}</span>
</div>
))}
</div>
<div className="login-capability-list">
{ADMIN_CAPABILITY_KEYS.map((feature, index) => (
@@ -98,7 +113,7 @@ export default function LoginShell({
{footer && <div className="login-auth-footer">{footer}</div>}
</div>
</section>
</div>
</MotionDiv>
</div>
);
}