mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-21 13:24:44 +08:00
feat: add i18n support and add Chinese (#372)
* feat: add i18n support and add Chinese * fix: resolve conflicts * Update en.json with cancle settings * Update zh.json with settngs cancle --------- Co-authored-by: johnny0120 <15564476+johnny0120@users.noreply.github.com> Co-authored-by: Willem Jiang <willem.jiang@gmail.com> Co-authored-by: Willem Jiang <143703838+willem-bd@users.noreply.github.com>
This commit is contained in:
@@ -3,12 +3,16 @@
|
||||
|
||||
import { StarFilledIcon, GitHubLogoIcon } from "@radix-ui/react-icons";
|
||||
import Link from "next/link";
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
import { LanguageSwitcher } from "~/components/deer-flow/language-switcher";
|
||||
import { NumberTicker } from "~/components/magicui/number-ticker";
|
||||
import { Button } from "~/components/ui/button";
|
||||
import { env } from "~/env";
|
||||
|
||||
export async function SiteHeader() {
|
||||
export function SiteHeader() {
|
||||
const t = useTranslations('common');
|
||||
|
||||
return (
|
||||
<header className="supports-backdrop-blur:bg-background/80 bg-background/40 sticky top-0 left-0 z-40 flex h-15 w-full flex-col items-center backdrop-blur-lg">
|
||||
<div className="container flex h-15 items-center justify-between px-3">
|
||||
@@ -16,7 +20,8 @@ export async function SiteHeader() {
|
||||
<span className="mr-1 text-2xl">🦌</span>
|
||||
<span>DeerFlow</span>
|
||||
</div>
|
||||
<div className="relative flex items-center">
|
||||
<div className="relative flex items-center gap-2">
|
||||
<LanguageSwitcher />
|
||||
<div
|
||||
className="pointer-events-none absolute inset-0 z-0 h-full w-full rounded-full opacity-60 blur-2xl"
|
||||
style={{
|
||||
@@ -32,7 +37,7 @@ export async function SiteHeader() {
|
||||
>
|
||||
<Link href="https://github.com/bytedance/deer-flow" target="_blank">
|
||||
<GitHubLogoIcon className="size-4" />
|
||||
Star on GitHub
|
||||
{t('starOnGitHub')}
|
||||
{env.NEXT_PUBLIC_STATIC_WEBSITE_ONLY &&
|
||||
env.GITHUB_OAUTH_TOKEN && <StarCounter />}
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user