mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Merge 89d7679afd into 842c423ccd
This commit is contained in:
commit
9d71bf1308
2 changed files with 20 additions and 11 deletions
|
|
@ -272,6 +272,13 @@ describe("Navbar", () => {
|
|||
expect(screen.queryByRole("button", { name: /^notifications$/i })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should keep the theme toggle on public pages", () => {
|
||||
const publicPageProps = { ...defaultProps, isPublicPage: true };
|
||||
renderWithProviders(<Navbar {...publicPageProps} />);
|
||||
|
||||
expect(screen.getByRole("button", { name: /^theme$/i })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should handle hide new feature indicators toggle", async () => {
|
||||
const user = userEvent.setup();
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ const Navbar: React.FC<NavbarProps> = ({
|
|||
</div>
|
||||
)}
|
||||
|
||||
<div className="ml-auto flex min-w-0 flex-1 items-center justify-end gap-4">
|
||||
<div className="ml-auto flex min-w-0 flex-1 items-center justify-end gap-4 max-sm:gap-2">
|
||||
{showWorkerSwitch && (
|
||||
<div className="flex shrink-0 items-center">
|
||||
<WorkerDropdown onWorkerSwitch={handleWorkerSwitch} />
|
||||
|
|
@ -153,17 +153,19 @@ const Navbar: React.FC<NavbarProps> = ({
|
|||
</div>
|
||||
)}
|
||||
|
||||
{!isPublicPage && (
|
||||
<div className="flex shrink-0 items-center border-l border-border pl-4">
|
||||
<div className="flex items-center gap-0.5 rounded-lg bg-muted px-1 py-0 transition-colors hover:bg-accent">
|
||||
<ThemeToggle />
|
||||
<span className="mx-0.5 h-6 w-px shrink-0 bg-border" aria-hidden />
|
||||
<NotificationsBell />
|
||||
<span className="mx-0.5 h-6 w-px shrink-0 bg-border" aria-hidden />
|
||||
<UserDropdown onLogout={handleLogout} />
|
||||
</div>
|
||||
<div className="flex shrink-0 items-center border-l border-border pl-4 max-sm:border-l-0 max-sm:pl-2">
|
||||
<div className="flex items-center gap-0.5 rounded-lg bg-muted px-1 py-0 transition-colors hover:bg-accent">
|
||||
<ThemeToggle />
|
||||
{!isPublicPage && (
|
||||
<>
|
||||
<span className="mx-0.5 h-6 w-px shrink-0 bg-border" aria-hidden />
|
||||
<NotificationsBell />
|
||||
<span className="mx-0.5 h-6 w-px shrink-0 bg-border" aria-hidden />
|
||||
<UserDropdown onLogout={handleLogout} />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue