mirror of
https://github.com/temetro/temetro.git
synced 2026-08-10 02:29:58 +00:00
eb94c1549a
- Fix clinic onboarding loop: refresh session after setActive before navigating, surface setActive errors, and guard AppAuthGuard's onboarding redirect race (#1) - Add a mobile-only floating top-right SidebarTrigger so the sidebar is reachable when the offcanvas sidebar is closed on phones (#5) - Make notifications clickable: navigate to the source (conversation/patient) and mark read; MessagesView/PatientsView honor ?conversation= / ?file= deep links (#6) - Analysis page: add an Overview header with a time-range segmented control and a Customize popover that shows/hides sections; range slices month-based charts (#10) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
"use client";
|
|
|
|
import { PanelLeft } from "lucide-react";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { Button } from "@/components/ui/button";
|
|
import { useSidebar } from "@/components/ui/sidebar";
|
|
|
|
// A floating top-right button that opens the sidebar on phones. The in-sidebar
|
|
// SidebarTrigger is unreachable on mobile once the offcanvas sidebar is closed,
|
|
// so this gives a persistent way to bring it back. Hidden on md+ where the
|
|
// sidebar is always docked.
|
|
export function MobileSidebarTrigger() {
|
|
const { t } = useTranslation();
|
|
const { toggleSidebar, openMobile } = useSidebar();
|
|
|
|
// While the offcanvas Sheet is open it already covers the screen — no need to
|
|
// float a button over it.
|
|
if (openMobile) return null;
|
|
|
|
return (
|
|
<Button
|
|
aria-label={t("nav.openSidebar")}
|
|
className="fixed top-3 right-3 z-50 size-9 rounded-full bg-background/80 shadow-sm backdrop-blur md:hidden"
|
|
onClick={toggleSidebar}
|
|
size="icon"
|
|
variant="outline"
|
|
>
|
|
<PanelLeft className="size-4" />
|
|
</Button>
|
|
);
|
|
}
|