feat: Add 7 organism screen components with Storybook stories
- ServerListScreen: Home page with server card grid and add server menu - ToolsScreen: Three-panel layout (tool list, detail/form, results) - ResourcesScreen: Two-panel with accordion sections and content preview - PromptsScreen: Two-panel with prompt selection and message display - LoggingScreen: Two-panel with log controls and real-time log stream - TasksScreen: Active and completed task card sections - HistoryScreen: Request history with search, filter, and pinned entries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
39ef184b53
commit
75f6f6452a
1 changed files with 1229 additions and 0 deletions
|
|
@ -0,0 +1,62 @@
|
|||
import { Button, Checkbox, Grid, Group, Paper, ScrollArea, Stack, Text, Title } from '@mantine/core';
|
||||
import { LogControls } from '../../molecules/LogControls/LogControls';
|
||||
import { LogEntry } from '../../atoms/LogEntry/LogEntry';
|
||||
import type { LogControlsProps } from '../../molecules/LogControls/LogControls';
|
||||
import type { LogEntryProps } from '../../atoms/LogEntry/LogEntry';
|
||||
|
||||
export interface LoggingScreenProps {
|
||||
controls: LogControlsProps;
|
||||
entries: LogEntryProps[];
|
||||
autoScroll: boolean;
|
||||
onToggleAutoScroll: () => void;
|
||||
onCopyAll: () => void;
|
||||
}
|
||||
|
||||
export function LoggingScreen({
|
||||
controls,
|
||||
entries,
|
||||
autoScroll,
|
||||
onToggleAutoScroll,
|
||||
onCopyAll,
|
||||
}: LoggingScreenProps) {
|
||||
return (
|
||||
<Grid>
|
||||
<Grid.Col span={3}>
|
||||
<Paper withBorder p="md">
|
||||
<LogControls {...controls} />
|
||||
</Paper>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={9}>
|
||||
<Paper withBorder p="md">
|
||||
<Stack gap="sm">
|
||||
<Group justify="space-between">
|
||||
<Title order={4}>Log Stream</Title>
|
||||
<Group>
|
||||
<Checkbox
|
||||
label="Auto-scroll"
|
||||
checked={autoScroll}
|
||||
onChange={onToggleAutoScroll}
|
||||
/>
|
||||
<Button variant="light" size="sm" onClick={onCopyAll}>
|
||||
Copy All
|
||||
</Button>
|
||||
</Group>
|
||||
</Group>
|
||||
<ScrollArea h={500}>
|
||||
<Stack gap="xs">
|
||||
{entries.map((entry, index) => (
|
||||
<LogEntry key={index} {...entry} />
|
||||
))}
|
||||
</Stack>
|
||||
</ScrollArea>
|
||||
{entries.length === 0 && (
|
||||
<Text c="dimmed" ta="center">
|
||||
No log entries
|
||||
</Text>
|
||||
)}
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue