11import type { ReactNode } from "react"
2- import { AlertTriangle , ArrowRight , Check , Cloud , Command , Download , Image , Mic , RefreshCw , Search , Sparkles , Upload , X } from "lucide-react"
2+ import { AlertTriangle , ArrowRight , Check , Cloud , Download , File , Image , Mic , NotebookPen , Palette , Pause , RefreshCw , Search , SearchX , Sparkles , Square , Upload , X } from "lucide-react"
33
44import type { NoteGenReplicaLanguage } from "@/components/notegen/types"
55import { cn } from "@/lib/utils"
@@ -9,19 +9,19 @@ export function NoteGenDialogBackdrop({ children, className }: { children: React
99}
1010
1111export function NoteGenGlobalSearch ( { lang = "cn" } : { lang ?: NoteGenReplicaLanguage } ) {
12- return < div className = "relative z-10 w-full max-w-md overflow-hidden rounded-xl border bg-popover text-popover-foreground shadow-2xl" > < div className = "flex h-11 items-center gap-2 border-b px-3" > < Search className = "size-4 text-muted-foreground" /> < span className = "flex-1 text-[10px] text-muted-foreground" > { lang === "en" ? "Search notes, captures and canvases…" : "搜索笔记、记录和画布……" } </ span > < span className = "flex items-center gap-1 rounded border px-1.5 py-0.5 text-[7px] text-muted-foreground" > < Command className = "size-2.5" /> K</ span > </ div > < div className = "p-2" > < p className = "px-2 py-1.5 text-[7px] uppercase text-muted-foreground" > { lang === "en" ? "Recent" : "最近" } </ p > { [ lang === "en" ? "Design principles" : "设计原则" , lang === "en" ? "Product map" : "产品地图" , lang === "en" ? "Today’s captures" : "今日记录" ] . map ( ( item , index ) => < div key = { item } className = { cn ( "flex h-8 items-center gap-2 rounded-md px-2 text-[9px]" , index === 0 && "bg-accent" ) } > < Search className = "size-3 text-muted-foreground" /> { item } < span className = "ml-auto text-[7px] text-muted-foreground" > ↵</ span > </ div > ) } </ div > </ div >
12+ const filters = [ lang === "en" ? "All" : "全部" , lang === "en" ? "Records" : "记录" , lang === "en" ? "Articles" : "文章" , lang === "en" ? "Canvases" : "画布" ]
13+ return < div className = "relative z-10 flex h-56 w-full max-w-2xl flex-col overflow-hidden rounded-xl border bg-popover text-popover-foreground shadow-2xl" > < div className = "flex items-center gap-3 border-b px-4 py-3" > < div className = "flex min-w-0 flex-1 items-center gap-2" > < Search className = "size-4 text-muted-foreground" /> < span className = "text-[10px] font-medium text-muted-foreground" > { lang === "en" ? "Search notes, records and canvases…" : "搜索笔记、记录和画布……" } </ span > </ div > < span className = "text-[8px] font-semibold" > { lang === "en" ? "0 results" : "0 个结果" } </ span > < span className = "h-5 w-px bg-border" /> < div className = "flex rounded-md border p-0.5" > { filters . map ( ( filter , index ) => < span key = { filter } className = { cn ( "rounded px-2 py-1 text-[7px]" , index === 0 ? "bg-accent font-medium" : "text-muted-foreground" ) } > { filter } </ span > ) } </ div > </ div > < div className = "flex flex-1 flex-col items-center justify-center" > < SearchX className = "size-8 text-muted-foreground" /> < p className = "mt-2 text-[10px] font-medium" > { lang === "en" ? "Search notes, records and canvases" : "搜索笔记、记录和画布" } </ p > < p className = "mt-1 text-[8px] text-muted-foreground" > { lang === "en" ? "Try a different keyword" : "尝试输入不同的关键词" } </ p > </ div > </ div >
1314}
1415
1516export function NoteGenRecordingOverlay ( { lang = "cn" } : { lang ?: NoteGenReplicaLanguage } ) {
16- const bars = [ 7 , 14 , 9 , 20 , 12 , 17 , 8 , 15 , 11 , 19 , 7 , 13 ]
17- return < div className = "relative z-10 flex w-full max-w-sm items-center gap-3 rounded-2xl border bg-background p-3 shadow-2xl" > < span className = "flex size-10 items-center justify-center rounded-full bg-red-500 text-white" > < Mic className = "size-4" /> </ span > < div className = "min-w-0 flex-1" > < div className = "flex items-center justify-between" > < span className = "text-[10px] font-medium" > { lang === "en" ? "Recording" : "正在录音" } </ span > < span className = "text-[9px] text-muted-foreground" > 00:18</ span > </ div > < div className = "mt-2 flex h-5 items-center gap-1" > { bars . map ( ( height , index ) => < span key = { index } className = "w-1 rounded-full bg-foreground/65" style = { { height } } /> ) } </ div > </ div > < span className = "flex size-8 items-center justify-center rounded-full border" > < span className = "size-2.5 rounded-sm bg-foreground" /> </ span > </ div >
17+ return < div className = "relative z-10 w-full max-w-sm rounded-xl border bg-background p-5 shadow-2xl" > < div > < h3 className = "text-sm font-semibold" > { lang === "en" ? "Voice recording" : "语音录制" } </ h3 > < p className = "mt-1 text-[8px] text-muted-foreground" > { lang === "en" ? "Record audio and transcribe it into text." : "录制音频并将其识别为文字。" } </ p > </ div > < div className = "flex flex-col items-center gap-4 py-5" > < div className = "font-mono text-4xl font-bold" > 00:18</ div > < div className = "flex items-center gap-2 text-[9px] text-muted-foreground" > < span className = "size-2.5 animate-pulse rounded-full bg-destructive" /> { lang === "en" ? "Recording" : "正在录音" } </ div > < div className = "flex gap-3" > < span className = "flex size-12 items-center justify-center rounded-full border" > < Pause className = "size-5" /> </ span > < span className = "flex size-12 items-center justify-center rounded-full bg-destructive text-destructive-foreground" > < Square className = "size-5" /> </ span > </ div > < span className = "text-[9px] text-muted-foreground" > { lang === "en" ? "Cancel" : "取消" } </ span > </ div > </ div >
1818}
1919
2020export function NoteGenSyncStatus ( { lang = "cn" , state = "success" } : { lang ?: NoteGenReplicaLanguage ; state ?: "syncing" | "success" | "conflict" } ) {
2121 const Icon = state === "syncing" ? Upload : state === "conflict" ? AlertTriangle : Check
2222 const label = state === "syncing" ? ( lang === "en" ? "Syncing changes…" : "正在同步更改……" ) : state === "conflict" ? ( lang === "en" ? "1 sync conflict needs review" : "有 1 个同步冲突待处理" ) : ( lang === "en" ? "Everything is up to date" : "所有内容均为最新" )
2323 const tone = state === "syncing" ? "text-blue-500" : state === "conflict" ? "text-amber-500" : "text-emerald-500"
24- return < div className = "relative z-10 flex w-full max-w-sm items-center gap-3 rounded-xl border bg-background p -3 shadow-xl " > < span className = { cn ( "flex size-8 items-center justify-center rounded-full bg-muted " , tone ) } > < Icon className = "size-4" /> </ span > < div > < div className = "text-[10px ] font-medium" > { label } </ div > < div className = "mt-0.5 text-[8px] text-muted-foreground" > GitHub · main </ div > </ div > < Cloud className = "ml-auto size-4 text-muted-foreground " /> </ div >
24+ return < div className = "relative z-10 flex items-center gap-1.5 rounded-full border bg-background px -3 py-1.5 shadow-sm " > < Icon className = { cn ( "size-3.5 " , tone ) } /> < span className = "text-[9px ] font-medium" > { label } </ span > { state === "syncing" ? < span className = "size-1.5 animate-pulse rounded-full bg-primary " /> : null } </ div >
2525}
2626
2727export function NoteGenImageViewer ( { lang = "cn" } : { lang ?: NoteGenReplicaLanguage } ) {
@@ -38,7 +38,7 @@ export function NoteGenActivityHeatmap({ lang = "cn" }: { lang?: NoteGenReplicaL
3838}
3939
4040export function NoteGenUpdatePrompt ( { lang = "cn" } : { lang ?: NoteGenReplicaLanguage } ) {
41- return < div className = "w-full max-w-sm rounded-xl border bg-background p-4 shadow-xl" > < div className = "flex items-start gap-3" > < span className = "flex size-9 items-center justify-center rounded-xl bg-foreground text-background" > < Download className = "size-4" /> </ span > < div > < h3 className = "text-[10px] font-semibold" > { lang === "en" ? "NoteGen 0.22 .0 is available" : "NoteGen 0.22 .0 已发布" } </ h3 > < p className = "mt-1 text-[8px] leading-4 text-muted-foreground" > { lang === "en" ? "Improved Agent tools, canvas editing, and mobile writing." : "改进 Agent 工具、画布编辑与移动端写作体验。" } </ p > </ div > </ div > < div className = "mt-4 flex justify-end gap-2" > < span className = "rounded-md border px-3 py-1.5 text-[8px]" > { lang === "en" ? "Later" : "稍后" } </ span > < span className = "rounded-md bg-foreground px-3 py-1.5 text-[8px] text-background" > { lang === "en" ? "Update now" : "立即更新" } </ span > </ div > </ div >
41+ return < div className = "w-full max-w-sm rounded-xl border bg-background p-4 shadow-xl" > < div className = "flex items-start gap-3" > < span className = "flex size-9 items-center justify-center rounded-xl bg-foreground text-background" > < Download className = "size-4" /> </ span > < div > < h3 className = "text-[10px] font-semibold" > { lang === "en" ? "NoteGen 0.36 .0 is available" : "NoteGen 0.36 .0 已发布" } </ h3 > < p className = "mt-1 text-[8px] leading-4 text-muted-foreground" > { lang === "en" ? "Improved Agent tools, canvas editing, and mobile writing." : "改进 Agent 工具、画布编辑与移动端写作体验。" } </ p > </ div > </ div > < div className = "mt-4 flex justify-end gap-2" > < span className = "rounded-md border px-3 py-1.5 text-[8px]" > { lang === "en" ? "Later" : "稍后" } </ span > < span className = "rounded-md bg-foreground px-3 py-1.5 text-[8px] text-background" > { lang === "en" ? "Update now" : "立即更新" } </ span > </ div > </ div >
4242}
4343
4444export function NoteGenOnboardingCard ( { lang = "cn" } : { lang ?: NoteGenReplicaLanguage } ) {
0 commit comments