mirror of
https://github.com/temetro/temetro.git
synced 2026-08-26 02:17:22 +00:00
Collapse sidebar footer into the user menu; tweak sub-nav & appointments
- Footer is now a single user row. The ⌘K command hint moved into the user menu below Theme, and the clinic switcher became a hover submenu below that (revealing the active clinic's name/slug/count, the switch list, and Create clinic). Removed SidebarCommandButton and deleted team-switcher.tsx. - Patients sub-nav (Patients / Appointments & Schedule): no icons, no background change on hover/active — only the text color changes. - Appointments & Schedule: added an "Add" button that opens the create-patient dialog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
ArrowDownIcon,
|
||||
ArrowUpIcon,
|
||||
CornerDownLeftIcon,
|
||||
Search,
|
||||
} from "lucide-react";
|
||||
import { ArrowDownIcon, ArrowUpIcon, CornerDownLeftIcon } from "lucide-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import {
|
||||
createContext,
|
||||
@@ -32,7 +27,6 @@ import {
|
||||
CommandPanel,
|
||||
} from "@/components/ui/command";
|
||||
import { Kbd, KbdGroup } from "@/components/ui/kbd";
|
||||
import { useSidebar } from "@/components/ui/sidebar";
|
||||
import { navItems } from "@/lib/nav";
|
||||
|
||||
type CommandPaletteContextValue = { open: () => void };
|
||||
@@ -171,28 +165,3 @@ export function CommandPaletteProvider({ children }: { children: ReactNode }) {
|
||||
</CommandPaletteContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
// Sidebar-footer affordance: shows the ⌘K hint and opens the palette on click.
|
||||
// Hidden when the sidebar is collapsed to its icon rail.
|
||||
export function SidebarCommandButton() {
|
||||
const { open } = useCommandPalette();
|
||||
const { state } = useSidebar();
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (state === "collapsed") return null;
|
||||
|
||||
return (
|
||||
<button
|
||||
className="flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-muted-foreground text-sm transition-colors hover:bg-sidebar-muted hover:text-foreground"
|
||||
onClick={open}
|
||||
type="button"
|
||||
>
|
||||
<Search className="size-4" />
|
||||
<span>{t("nav.quickNav")}</span>
|
||||
<KbdGroup className="ml-auto">
|
||||
<Kbd>⌘</Kbd>
|
||||
<Kbd>K</Kbd>
|
||||
</KbdGroup>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user