Skip to content

Commit 4d848f4

Browse files
authored
♻️ Delete unused navbar
2 parents e6297c1 + f167937 commit 4d848f4

File tree

2 files changed

+1
-212
lines changed

2 files changed

+1
-212
lines changed

frontend/app/[locale]/setup/SetupLayout.tsx

Lines changed: 1 addition & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,8 @@
11
"use client";
22

3-
import React, {ReactNode} from "react";
3+
import {ReactNode} from "react";
44
import {useTranslation} from "react-i18next";
55

6-
import {Badge, Button, Dropdown} from "antd";
7-
import {DownOutlined} from "@ant-design/icons";
8-
import {FiRefreshCw} from "react-icons/fi";
9-
import {Globe} from "lucide-react";
10-
import {languageOptions} from "@/const/constants";
11-
import {useLanguageSwitch} from "@/lib/language";
12-
import {CONNECTION_STATUS, ConnectionStatus,} from "@/const/modelConfig";
13-
14-
// ================ Setup Header Content Components ================
15-
// These components are exported so they can be used to customize the TopNavbar
16-
17-
interface SetupHeaderRightContentProps {
18-
connectionStatus: ConnectionStatus;
19-
isCheckingConnection: boolean;
20-
onCheckConnection: () => void;
21-
}
22-
23-
export function SetupHeaderRightContent({
24-
connectionStatus,
25-
isCheckingConnection,
26-
onCheckConnection,
27-
}: SetupHeaderRightContentProps) {
28-
const { t } = useTranslation();
29-
const { currentLanguage, handleLanguageChange } = useLanguageSwitch();
30-
31-
// Get status text
32-
const getStatusText = () => {
33-
switch (connectionStatus) {
34-
case CONNECTION_STATUS.SUCCESS:
35-
return t("setup.header.status.connected");
36-
case CONNECTION_STATUS.ERROR:
37-
return t("setup.header.status.disconnected");
38-
case CONNECTION_STATUS.PROCESSING:
39-
return t("setup.header.status.checking");
40-
default:
41-
return t("setup.header.status.unknown");
42-
}
43-
};
44-
45-
return (
46-
<div className="flex items-center gap-3">
47-
<Dropdown
48-
menu={{
49-
items: languageOptions.map((opt) => ({
50-
key: opt.value,
51-
label: opt.label,
52-
})),
53-
onClick: ({ key }) => handleLanguageChange(key as string),
54-
}}
55-
>
56-
<a className="ant-dropdown-link text-sm !font-medium text-slate-600 hover:text-slate-900 dark:text-slate-300 dark:hover:text-white transition-colors flex items-center gap-2 cursor-pointer w-[110px] border-0 shadow-none bg-transparent text-left">
57-
<Globe className="h-4 w-4" />
58-
{languageOptions.find((o) => o.value === currentLanguage)?.label ||
59-
currentLanguage}
60-
<DownOutlined className="text-[10px]" />
61-
</a>
62-
</Dropdown>
63-
{/* ModelEngine connectivity status */}
64-
<div className="flex items-center px-3 py-1.5 rounded-md border border-slate-200 dark:border-slate-700">
65-
<Badge
66-
status={connectionStatus}
67-
text={getStatusText()}
68-
className="[&>.ant-badge-status-dot]:w-[8px] [&>.ant-badge-status-dot]:h-[8px] [&>.ant-badge-status-text]:text-base [&>.ant-badge-status-text]:ml-2 [&>.ant-badge-status-text]:font-medium"
69-
/>
70-
<Button
71-
icon={
72-
<FiRefreshCw
73-
className={isCheckingConnection ? "animate-spin" : ""}
74-
/>
75-
}
76-
size="small"
77-
type="text"
78-
onClick={onCheckConnection}
79-
disabled={isCheckingConnection}
80-
className="ml-2"
81-
/>
82-
</div>
83-
</div>
84-
);
85-
}
86-
876
// ================ Navigation ================
887
interface NavigationProps {
898
onBack?: () => void;
@@ -179,7 +98,6 @@ interface SetupLayoutProps {
17998
/**
18099
* SetupLayout - Content wrapper for setup pages
181100
* This component should be wrapped by NavigationLayout
182-
* Use SetupHeaderRightContent for customizing the top navbar
183101
*/
184102
export default function SetupLayout({
185103
children,

frontend/components/ui/navbar.tsx

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)