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
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
import { useDisableBlogPosts } from "@/app/(dashboard)/hooks/useDisableBlogPosts";
import { useDisableBouncingIcon } from "@/app/(dashboard)/hooks/useDisableBouncingIcon";
import { useDisableShowPrompts } from "@/app/(dashboard)/hooks/useDisableShowPrompts";
import { useDisableUsageIndicator } from "@/app/(dashboard)/hooks/useDisableUsageIndicator";
import {
Expand Down Expand Up @@ -32,7 +31,6 @@ const UserDropdown: React.FC<UserDropdownProps> = ({ onLogout }) => {
const disableShowPrompts = useDisableShowPrompts();
const disableUsageIndicator = useDisableUsageIndicator();
const disableBlogPosts = useDisableBlogPosts();
const disableBouncingIcon = useDisableBouncingIcon();
const [disableShowNewBadge, setDisableShowNewBadge] = useState(false);

useEffect(() => {
Expand Down Expand Up @@ -169,23 +167,6 @@ const UserDropdown: React.FC<UserDropdownProps> = ({ onLogout }) => {
aria-label="Toggle hide blog posts"
/>
</Space>
<Space style={{ width: "100%", justifyContent: "space-between" }}>
<Text type="secondary">Hide Bouncing Icon</Text>
<Switch
size="small"
checked={disableBouncingIcon}
onChange={(checked) => {
if (checked) {
setLocalStorageItem("disableBouncingIcon", "true");
emitLocalStorageChange("disableBouncingIcon");
} else {
removeLocalStorageItem("disableBouncingIcon");
emitLocalStorageChange("disableBouncingIcon");
}
}}
aria-label="Toggle hide bouncing icon"
/>
</Space>
</Space>
);

Expand Down
42 changes: 2 additions & 40 deletions ui/litellm-dashboard/src/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { useHealthReadiness } from "@/app/(dashboard)/hooks/healthReadiness/useHealthReadiness";
import { useDisableBouncingIcon } from "@/app/(dashboard)/hooks/useDisableBouncingIcon";
import { getProxyBaseUrl } from "@/components/networking";
import { useTheme } from "@/contexts/ThemeContext";
import { clearTokenCookies } from "@/utils/cookieUtils";
import { clearStoredReturnUrl } from "@/utils/returnUrlUtils";
import { fetchProxySettings } from "@/utils/proxyUtils";
import { MenuFoldOutlined, MenuUnfoldOutlined, MoonOutlined, SunOutlined } from "@ant-design/icons";
import { Button, Switch, Tag, Tooltip } from "antd";
import { Button, Switch, Tag } from "antd";
import Link from "next/link";
import React, { useEffect, useState } from "react";
import { BlogDropdown } from "./Navbar/BlogDropdown/BlogDropdown";
Expand Down Expand Up @@ -48,12 +47,6 @@ const Navbar: React.FC<NavbarProps> = ({
const { logoUrl } = useTheme();
const { data: healthData } = useHealthReadiness();
const version = healthData?.litellm_version;
const baseVersion = healthData?.litellm_base_version;
const buildSha = healthData?.litellm_build_sha;
// Only show the tooltip when the running build differs from the upstream
// base (i.e. an internal release) or when a build sha was injected.
const hasBuildInfo = Boolean(buildSha) || (baseVersion && baseVersion !== version);
const disableBouncingIcon = useDisableBouncingIcon();

// Simple logo URL: use custom logo if available, otherwise default
const imageUrl = logoUrl || `${baseUrl}/get_image`;
Expand Down Expand Up @@ -120,38 +113,7 @@ const Navbar: React.FC<NavbarProps> = ({
</Link>
{version && (
<div className="relative">
{!disableBouncingIcon && (
<span
className="absolute -top-1 -left-2 text-lg animate-bounce"
style={{ animationDuration: "2s" }}
title="Thanks for using LiteLLM!"
>
πŸŒ‘
</span>
)}
<Tooltip
title={
hasBuildInfo ? (
<div className="text-xs">
{baseVersion && <div>Upstream base: v{baseVersion}</div>}
{buildSha && <div>Build sha: {buildSha}</div>}
</div>
) : (
""
)
}
>
<Tag className="relative text-xs font-medium cursor-pointer z-10">
<a
href="https://docs.litellm.ai/release_notes"
target="_blank"
rel="noopener noreferrer"
className="flex-shrink-0"
>
v{version}
</a>
</Tag>
</Tooltip>
<Tag className="relative text-xs font-medium z-10">{version}</Tag>
</div>
)}
</div>
Expand Down
Loading