mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-25 11:18:22 +00:00
- Fix `font-norma` typo to `font-normal` in message-list subtask count - Fix dark mode `--border` using reddish hue (22.216) instead of neutral - Replace hardcoded `rgb(184,184,192)` in hero with `text-muted-foreground` - Replace hardcoded `bg-[#a3a1a1]` in streaming indicator with `bg-muted-foreground` - Add missing `font-sans` to welcome description `<pre>` for consistency - Make case-study-section padding responsive (`px-4 md:px-20`) Closes #1940
75 lines
2.1 KiB
TypeScript
75 lines
2.1 KiB
TypeScript
"use client";
|
|
|
|
import { useSearchParams } from "next/navigation";
|
|
import { useEffect, useMemo } from "react";
|
|
|
|
import { useI18n } from "@/core/i18n/hooks";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
import { AuroraText } from "../ui/aurora-text";
|
|
|
|
let waved = false;
|
|
|
|
export function Welcome({
|
|
className,
|
|
mode,
|
|
}: {
|
|
className?: string;
|
|
mode?: "ultra" | "pro" | "thinking" | "flash";
|
|
}) {
|
|
const { t } = useI18n();
|
|
const searchParams = useSearchParams();
|
|
const isUltra = useMemo(() => mode === "ultra", [mode]);
|
|
const colors = useMemo(() => {
|
|
if (isUltra) {
|
|
return ["#efefbb", "#e9c665", "#e3a812"];
|
|
}
|
|
return ["var(--color-foreground)"];
|
|
}, [isUltra]);
|
|
useEffect(() => {
|
|
waved = true;
|
|
}, []);
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"mx-auto flex w-full flex-col items-center justify-center gap-2 px-8 py-4 text-center",
|
|
className,
|
|
)}
|
|
>
|
|
<div className="text-2xl font-bold">
|
|
{searchParams.get("mode") === "skill" ? (
|
|
`✨ ${t.welcome.createYourOwnSkill} ✨`
|
|
) : (
|
|
<div className="flex items-center gap-2">
|
|
<div className={cn("inline-block", !waved ? "animate-wave" : "")}>
|
|
{isUltra ? "🚀" : "👋"}
|
|
</div>
|
|
<AuroraText colors={colors}>{t.welcome.greeting}</AuroraText>
|
|
</div>
|
|
)}
|
|
</div>
|
|
{searchParams.get("mode") === "skill" ? (
|
|
<div className="text-muted-foreground text-sm">
|
|
{t.welcome.createYourOwnSkillDescription.includes("\n") ? (
|
|
<pre className="font-sans whitespace-pre">
|
|
{t.welcome.createYourOwnSkillDescription}
|
|
</pre>
|
|
) : (
|
|
<p>{t.welcome.createYourOwnSkillDescription}</p>
|
|
)}
|
|
</div>
|
|
) : (
|
|
<div className="text-muted-foreground text-sm">
|
|
{t.welcome.description.includes("\n") ? (
|
|
<pre className="font-sans whitespace-pre">
|
|
{t.welcome.description}
|
|
</pre>
|
|
) : (
|
|
<p>{t.welcome.description}</p>
|
|
)}
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|