feat: add queue management and terminal dashboard documentation in Chinese

- Introduced comprehensive documentation for the queue management feature, detailing its pain points, core functionalities, and component structure.
- Added terminal dashboard documentation, highlighting its layout, core features, and usage examples.
- Created an index page in Chinese for Claude Code Workflow, summarizing its purpose and core features, along with quick links to installation and guides.
This commit is contained in:
catlog22
2026-03-01 10:52:46 +08:00
parent a753327acc
commit 2fb93d20e0
34 changed files with 6908 additions and 257 deletions

View File

@@ -0,0 +1,64 @@
# Demo Components
This directory contains React components that are embedded in the documentation as interactive demos.
## Creating a New Demo
1. Create a new `.tsx` file in this directory (e.g., `my-demo.tsx`)
2. Export a default React component
3. Use it in markdown with `:::demo my-demo :::`
## Demo Template
```tsx
import React from 'react'
/**
* Brief description of what this demo shows
*/
export default function MyDemo() {
return (
<div style={{ padding: '16px' }}>
{/* Your demo content */}
</div>
)
}
```
## Demo Guidelines
- **Keep it simple**: Demos should be focused and easy to understand
- **Use inline styles**: Avoid external dependencies for portability
- **Add comments**: Explain what the demo is showing
- **Test interactions**: Ensure buttons, inputs, etc. work correctly
- **Handle state**: Use React hooks (`useState`, `useEffect`) for interactive demos
## Demo File Naming
- Use kebab-case: `button-variants.tsx`, `card-basic.tsx`
- Group by category:
- `ui/` - UI component demos
- `shared/` - Shared component demos
- `pages/` - Page-level demos
## Using Props
If you need to pass custom props to a demo, use the extended markdown syntax:
```markdown
:::demo my-demo
title: Custom Title
height: 300px
expandable: false
:::
```
## Available Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| name | string | - | Demo component name (required) |
| title | string | name | Custom demo title |
| height | string | 'auto' | Container height |
| expandable | boolean | true | Allow expand/collapse |
| showCode | boolean | true | Show code tab |

View File

@@ -0,0 +1,54 @@
import React from 'react'
import { Button } from '@/components/ui/Button'
/**
* Button Variants Demo
* Shows all 8 visual variants and 4 sizes of the Button component
*
* Variants include:
* - default: Primary brand color button
* - destructive: Red danger button
* - outline: Bordered light button
* - secondary: Gray secondary button
* - ghost: Transparent hover button
* - link: Link-style button
* - gradient: Brand gradient button
* - gradientPrimary: Primary gradient button
*
* Sizes include:
* - default: Standard size (h-10)
* - sm: Small size (h-9)
* - lg: Large size (h-11)
* - icon: Square icon size (h-10 w-10)
*/
export default function ButtonVariants() {
return (
<div className="flex flex-col gap-6 p-4">
{/* Variants Section */}
<div>
<h3 className="text-sm font-semibold mb-3 text-muted-foreground">Variants</h3>
<div className="flex flex-wrap gap-3">
<Button variant="default">Default</Button>
<Button variant="destructive">Destructive</Button>
<Button variant="outline">Outline</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="link">Link</Button>
<Button variant="gradient">Gradient</Button>
<Button variant="gradientPrimary">Gradient Primary</Button>
</div>
</div>
{/* Sizes Section */}
<div>
<h3 className="text-sm font-semibold mb-3 text-muted-foreground">Sizes</h3>
<div className="flex flex-wrap items-center gap-3">
<Button size="sm">Small</Button>
<Button size="default">Default</Button>
<Button size="lg">Large</Button>
<Button size="icon">🔍</Button>
</div>
</div>
</div>
)
}