Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): consolidate header actions into overflow menu on mobile #1551

Closedhenrik092(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/1551/headopened View on GitHub

Showing 1 changed file with 149 additions and 70 deletions.

x
0 of 1 viewed, 1 left
149 additions and 70 deletionsapps/web/src/components/chat/ChatHeader.tsxModified
View file
@@ -6,13 +6,16 @@
} from "@t3tools/contracts";
import { memo } from "react";
import GitActionsControl from "../GitActionsControl";
-import { DiffIcon, TerminalSquareIcon } from "lucide-react";
+import { DiffIcon, EllipsisIcon, TerminalSquareIcon } from "lucide-react";
import { Badge } from "../ui/badge";
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
import ProjectScriptsControl, { type NewProjectScriptInput } from "../ProjectScriptsControl";
import { Toggle } from "../ui/toggle";
import { SidebarTrigger } from "../ui/sidebar";
import { OpenInPicker } from "./OpenInPicker";
+import { useIsMobile } from "~/hooks/useMediaQuery";
+import { Button } from "../ui/button";
+import { Popover, PopoverPopup, PopoverTrigger } from "../ui/popover";
​
interface ChatHeaderProps {
activeThreadId: ThreadId;
@@ -61,6 +64,8 @@
onToggleTerminal,
onToggleDiff,
}: ChatHeaderProps) {
+ const isMobile = useIsMobile();
+​
return (
<div className="@container/header-actions flex min-w-0 flex-1 items-center gap-2">
<div className="flex min-w-0 flex-1 items-center gap-2 overflow-hidden sm:gap-3">
@@ -82,75 +87,149 @@