fix(web): align playground chat layout
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { BookOpen, Boxes, Home, RefreshCw, ShieldCheck, UserCircle } from 'lucide-react';
|
||||
import { BookOpen, Boxes, Home, RefreshCw, ShieldCheck, Sparkles, UserCircle } from 'lucide-react';
|
||||
import type { HealthResponse } from '../../api';
|
||||
import type { LoadState, PageKey } from '../../types';
|
||||
import { Button, Badge } from '../ui';
|
||||
|
||||
const navItems: Array<{ key: PageKey; label: string; icon: ReactNode }> = [
|
||||
{ key: 'home', label: '首页', icon: <Home size={17} /> },
|
||||
{ key: 'playground', label: '在线测试', icon: <Sparkles size={17} /> },
|
||||
{ key: 'models', label: '模型', icon: <Boxes size={17} /> },
|
||||
{ key: 'workspace', label: '用户工作台', icon: <UserCircle size={17} /> },
|
||||
{ key: 'admin', label: '管理工作台', icon: <ShieldCheck size={17} /> },
|
||||
@@ -24,7 +25,7 @@ export function AppShell(props: {
|
||||
onSignOut: () => void;
|
||||
}) {
|
||||
return (
|
||||
<div className="appShell">
|
||||
<div className="appShell" data-page={props.activePage}>
|
||||
<header className="appTopbar">
|
||||
<div className="brandBlock">
|
||||
<div className="brandMark">AI</div>
|
||||
@@ -72,7 +73,7 @@ export function AppShell(props: {
|
||||
</header>
|
||||
|
||||
<div className="workspaceShell">
|
||||
<main className="contentShell">
|
||||
<main className="contentShell" data-page={props.activePage}>
|
||||
{props.state === 'error' && <Badge variant="destructive">数据加载失败</Badge>}
|
||||
{props.children}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user