feat(frontend): 新增多版本笔记功能,并做了向下兼容。

- 新增关于页面组件,介绍项目背景、功能和使用方法
- 重构笔记生成逻辑,支持多版本笔记
- 新增笔记版本选择、复制和导出功能
-优化笔记界面布局和交互
- 调整部分组件样式,提升用户体验
This commit is contained in:
黄建武
2025-05-04 11:00:54 +08:00
parent c492f0780b
commit 97f153646f
29 changed files with 1499 additions and 407 deletions

View File

@@ -1,4 +1,11 @@
import { BotMessageSquare, Captions, HardDriveDownload, Wrench } from 'lucide-react'
import {
BotMessageSquare,
SquareChevronRight,
Captions,
HardDriveDownload,
Wrench,
Info,
} from 'lucide-react'
import MenuBar, { IMenuProps } from '@/pages/SettingPage/components/menuBar.tsx'
const Menu = () => {
@@ -25,6 +32,18 @@ const Menu = () => {
// },
// //其他配置
// {
// id: 'prompt',
// name: '提示词设置',
// icon: <SquareChevronRight />,
// path: '/settings/prompt',
// },
{
id: 'about',
name: '关于',
icon: <Info />,
path: '/settings/about',
},
// {
// id: 'other',
// name: '其他配置',
// icon: <Wrench />,

View File

@@ -0,0 +1,4 @@
const Prompt = () => {
return <div className={'flex h-full w-full bg-white'}>prompt</div>
}
export default Prompt

View File

@@ -0,0 +1,226 @@
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import { Card, CardContent } from '@/components/ui/card'
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
import { Github, Star, ExternalLink, Download } from 'lucide-react'
import { ScrollArea } from '@/components/ui/scroll-area.tsx'
export default function AboutPage() {
const images = [
'https://common-1304618721.cos.ap-chengdu.myqcloud.com/20250504102850.png',
'https://common-1304618721.cos.ap-chengdu.myqcloud.com/20250504103028.png',
'https://common-1304618721.cos.ap-chengdu.myqcloud.com/20250504103304.png',
'https://common-1304618721.cos.ap-chengdu.myqcloud.com/20250504103625.png',
]
return (
<ScrollArea className={'h-full overflow-y-auto bg-white'}>
<div className="container mx-auto px-4 py-12">
{/* Hero Section */}
<div className="mb-16 flex flex-col items-center justify-center text-center">
<div className="mb-4 flex items-center gap-4">
<img
src="/public/icon.svg"
alt="BiliNote Logo"
width={50}
height={50}
className="rounded-lg"
/>
<h1 className="text-4xl font-bold">BiliNote v1.4.0</h1>
</div>
<p className="text-muted-foreground mb-6 text-xl italic">
AI AI
</p>
<div className="mb-8 flex flex-wrap justify-center gap-2">
<Badge variant="secondary">MIT License</Badge>
<Badge variant="secondary">React</Badge>
<Badge variant="secondary">FastAPI</Badge>
<Badge variant="secondary">Docker Compose</Badge>
<Badge variant="secondary">Active</Badge>
</div>
<div className="flex flex-wrap justify-center gap-4">
<Button asChild>
<a href="https://www.bilinote.app" target="_blank">
<ExternalLink className="mr-2 h-4 w-4" />
BiliNote
</a>
</Button>
<Button variant="outline" asChild>
<a href="https://github.com/JefferyHcool/BiliNote" target="_blank">
<Github className="mr-2 h-4 w-4" />
GitHub
</a>
</Button>
<Button variant="outline" asChild>
<a href="https://github.com/JefferyHcool/BiliNote/releases" target="_blank">
<Download className="mr-2 h-4 w-4" />
</a>
</Button>
</div>
</div>
{/* Project Introduction */}
<section className="mb-16">
<h2 className="mb-6 text-center text-3xl font-bold"> </h2>
<div className="mx-auto max-w-3xl text-center">
<p className="text-lg">
BiliNote AI YouTube
Markdown
</p>
</div>
</section>
{/* Features Section */}
<section className="mb-16">
<h2 className="mb-8 text-center text-3xl font-bold">🔧 </h2>
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
{[
{ title: '多平台支持', desc: '支持 Bilibili、YouTube、本地视频、抖音等多个平台' },
{ title: '笔记格式选择', desc: '支持返回多种笔记格式,满足不同需求' },
{ title: '笔记风格选择', desc: '支持多种笔记风格,个性化定制' },
{ title: '多模态视频理解', desc: '结合视觉和音频内容,全面理解视频' },
{ title: '自定义 GPT 配置', desc: '支持自行配置 GPT 大模型' },
{ title: '本地音频转写', desc: '支持 Fast-Whisper 等本地模型音频转写' },
{ title: '结构化笔记', desc: '自动生成结构化 Markdown 笔记' },
{ title: '智能截图', desc: '可选插入自动截取的关键画面' },
{ title: '内容跳转', desc: '支持关联原视频的内容跳转链接' },
].map((feature, index) => (
<Card key={index} className="h-full">
<CardContent className="pt-2">
<h3 className="mb-2 text-xl font-semibold">{feature.title}</h3>
<p className="text-muted-foreground">{feature.desc}</p>
</CardContent>
</Card>
))}
</div>
</section>
{/* Screenshots Section */}
<section className="mb-16">
<h2 className="mb-8 text-center text-3xl font-bold">📸 </h2>
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
{images.map(num => (
<div key={num} className="overflow-hidden rounded-lg border shadow-sm">
<img
src={num}
alt={`BiliNote Screenshot ${num}`}
width={600}
height={400}
className="w-full object-cover transition-transform hover:scale-105"
/>
</div>
))}
</div>
</section>
{/* Quick Start Section */}
<section className="mb-16">
<h2 className="mb-8 text-center text-3xl font-bold">🚀 </h2>
<Tabs defaultValue="manual" className="mx-auto max-w-3xl">
<TabsList className="grid w-full grid-cols-2">
<TabsTrigger value="manual"></TabsTrigger>
<TabsTrigger value="docker">Docker </TabsTrigger>
</TabsList>
<TabsContent value="manual" className="mt-6 space-y-6">
<div>
<h3 className="mb-3 text-xl font-semibold">1. </h3>
<div className="bg-muted rounded-md p-4 font-mono text-sm">
git clone https://github.com/JefferyHcool/BiliNote.git
<br />
cd BiliNote
<br />
mv .env.example .env
</div>
</div>
<div>
<h3 className="mb-3 text-xl font-semibold">2. FastAPI</h3>
<div className="bg-muted rounded-md p-4 font-mono text-sm">
cd backend
<br />
pip install -r requirements.txt
<br />
python main.py
</div>
</div>
<div>
<h3 className="mb-3 text-xl font-semibold">3. Vite + React</h3>
<div className="bg-muted rounded-md p-4 font-mono text-sm">
cd BiliNote_frontend
<br />
pnpm install
<br />
pnpm dev
</div>
</div>
<p>
访<code className="bg-muted rounded px-2 py-1">http://localhost:5173</code>
</p>
</TabsContent>
<TabsContent value="docker" className="mt-6 space-y-6">
<div>
<h3 className="mb-3 text-xl font-semibold">1. </h3>
<div className="bg-muted rounded-md p-4 font-mono text-sm">
git clone https://github.com/JefferyHcool/BiliNote.git
<br />
cd BiliNote
<br />
mv .env.example .env
</div>
</div>
<div>
<h3 className="mb-3 text-xl font-semibold">2. Docker Compose</h3>
<div className="bg-muted rounded-md p-4 font-mono text-sm">
docker compose up --build
</div>
</div>
<p>
<br />
http://localhost:${'{FRONTEND_PORT}'}
<br />
http://localhost:${'{BACKEND_PORT}'}
<br />
<span className="text-muted-foreground text-sm">
.env
</span>
</p>
</TabsContent>
</Tabs>
</section>
{/* Community Section */}
<section className="mb-16">
<h2 className="mb-8 text-center text-3xl font-bold"></h2>
<div className="mx-auto max-w-3xl">
<div className="flex flex-col items-center justify-center gap-8">
<div className="text-center">
<h3 className="mb-3 text-xl font-semibold">BiliNote QQ </h3>
<p className="text-lg font-medium">785367111</p>
</div>
<div className="text-center">
<h3 className="mb-3 text-xl font-semibold">BiliNote </h3>
<div className="bg-muted mx-auto flex h-52 w-52 items-center justify-center rounded-md">
<img src={'https://common-1304618721.cos.ap-chengdu.myqcloud.com/wechat.png'} />
</div>
</div>
</div>
</div>
</section>
{/* License Section */}
<section className="mb-8 text-center">
<h2 className="mb-4 text-3xl font-bold">📜 License</h2>
<p>MIT License</p>
</section>
{/* Footer */}
<footer className="border-t pt-8 text-center">
<p className="mb-4">💬 PR issueStar </p>
</footer>
</div>
</ScrollArea>
)
}

View File

@@ -13,10 +13,10 @@ interface IMenuItem {
menuItem: IMenuProps
}
const MenuBar: FC<IMenuItem> = ({ menuItem }) => {
const MenuBar: ({ menuItem }: { menuItem: any }) => JSX.Element = ({ menuItem }) => {
const location = useLocation()
const isActive = location.pathname.startsWith(menuItem.path + '/')
|| location.pathname === menuItem.path
const isActive =
location.pathname.startsWith(menuItem.path + '/') || location.pathname === menuItem.path
return (
<Link to={menuItem.path} className="w-full">