Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions console/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -738,5 +738,11 @@
}
}
}
},
"sidebar": {
"api_docs": {
"title": "API Documentation",
"description": "Explore the API"
}
}
}
6 changes: 6 additions & 0 deletions console/public/locales/es.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"sidebar": {
"api_docs": {
"title": "Documentación API",
"description": "Explorar la API"
}
},
"abort_campaign": "Cancelar campaña",
"aborted": "Cancellado",
"aborting": "Abortando",
Expand Down
6 changes: 6 additions & 0 deletions console/public/locales/zh.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"sidebar": {
"api_docs": {
"title": "API 文档",
"description": "探索 API"
}
},
"abort_campaign": "中止活动",
"aborted": "已中止",
"action": "操作",
Expand Down
19 changes: 18 additions & 1 deletion console/src/components/app-sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from "react";
import { useTranslation } from "react-i18next";

import { ProjectSwitcher } from "@/components/project-switcher";
import {
Expand All @@ -22,6 +23,7 @@ import { useResolver } from "@/hooks";
import api from "@/api";
import { UserDropdown } from "./user-dropdown";
import type { Admin } from "@/types";
import { BookIcon } from "./icons";
Comment on lines 25 to +26
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BookIcon import should be grouped with other icon imports or component imports for better organization. Consider placing it with other UI component imports on lines 5-18.

Suggested change
import type { Admin } from "@/types";
import { BookIcon } from "./icons";
import { BookIcon } from "./icons";
import type { Admin } from "@/types";

Copilot uses AI. Check for mistakes.

interface AppSidebarProps {
links?: SidebarLink[];
Expand All @@ -31,6 +33,7 @@ export function AppSidebar({
links,
...props
}: AppSidebarProps & React.ComponentProps<typeof Sidebar>) {
const { t } = useTranslation();
const [project] = useContext(ProjectContext);
const profile = useContext(AdminContext);
const location = useLocation();
Expand All @@ -50,7 +53,7 @@ export function AppSidebar({
console.error("Failed to fetch projects:", error);
return [];
}
}, [])
}, []),
);

return (
Expand Down Expand Up @@ -89,6 +92,20 @@ export function AppSidebar({
</SidebarGroup>
</SidebarContent>
<SidebarFooter>
<a
href="/api/"
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-3 rounded-lg border bg-sidebar-accent p-3 text-sm transition-colors hover:bg-sidebar-accent/80"
>
<BookIcon />
<div className="flex flex-col">
<span className="font-medium">{t("sidebar.api_docs.title")}</span>
<span className="text-xs text-muted-foreground">
{t("sidebar.api_docs.description")}
</span>
</div>
</a>
<UserDropdown
user={{
name: getUserDisplayName(profile),
Expand Down
Loading