feat(i18n): update AppSidebar component for internationalization support
chore(site): add siteConfig
This commit is contained in:
parent
ae662bff78
commit
b6a4c3182e
@ -18,6 +18,10 @@
|
|||||||
"shareProject": "Share Project",
|
"shareProject": "Share Project",
|
||||||
"deleteProject": "Delete Project",
|
"deleteProject": "Delete Project",
|
||||||
"more": "More"
|
"more": "More"
|
||||||
|
},
|
||||||
|
"NavSecondary": {
|
||||||
|
"support": "Support",
|
||||||
|
"feedback": "Feedback"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -18,6 +18,10 @@
|
|||||||
"shareProject": "分享项目",
|
"shareProject": "分享项目",
|
||||||
"deleteProject": "删除项目",
|
"deleteProject": "删除项目",
|
||||||
"more": "更多"
|
"more": "更多"
|
||||||
|
},
|
||||||
|
"NavSecondary": {
|
||||||
|
"support": "支持",
|
||||||
|
"feedback": "反馈"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -22,11 +22,16 @@ import {
|
|||||||
SidebarMenuButton,
|
SidebarMenuButton,
|
||||||
SidebarMenuItem,
|
SidebarMenuItem,
|
||||||
} from "@/components/ui/sidebar";
|
} from "@/components/ui/sidebar";
|
||||||
|
import { siteConfig } from "@/config/site";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
import { NavMain } from "@/components/nav-main";
|
import { NavMain } from "@/components/nav-main";
|
||||||
import { NavUser } from "@/components/nav-user";
|
import { NavUser } from "@/components/nav-user";
|
||||||
import { NavProjects } from "@/components/nav-projects";
|
import { NavProjects } from "@/components/nav-projects";
|
||||||
import { NavSecondary } from "@/components/nav-secondary";
|
import { NavSecondary } from "@/components/nav-secondary";
|
||||||
|
|
||||||
|
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
||||||
|
const t = useTranslations();
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
user: {
|
user: {
|
||||||
name: "gitea",
|
name: "gitea",
|
||||||
@ -122,13 +127,13 @@ const data = {
|
|||||||
],
|
],
|
||||||
navSecondary: [
|
navSecondary: [
|
||||||
{
|
{
|
||||||
title: "Support",
|
title: t("Components.NavSecondary.support"),
|
||||||
url: "#",
|
url: siteConfig.url,
|
||||||
icon: LifeBuoy,
|
icon: LifeBuoy,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Feedback",
|
title: t("Components.NavSecondary.feedback"),
|
||||||
url: "#",
|
url: siteConfig.url,
|
||||||
icon: Send,
|
icon: Send,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -151,7 +156,6 @@ const data = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
||||||
return (
|
return (
|
||||||
<Sidebar variant="inset" {...props}>
|
<Sidebar variant="inset" {...props}>
|
||||||
<SidebarHeader>
|
<SidebarHeader>
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
|
export const siteConfig = {
|
||||||
|
url: "https://github.com/NGC2207/judge4c",
|
||||||
|
};
|
||||||
|
|
||||||
export const META_THEME_COLORS = {
|
export const META_THEME_COLORS = {
|
||||||
light: "#ffffff",
|
light: "#ffffff",
|
||||||
dark: "#09090b",
|
dark: "#09090b",
|
||||||
}
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user