From ca3e5c98e62bd4f46c870aa332346de1b2a45192 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 4 Mar 2026 17:11:32 +0100 Subject: [PATCH] add context menu (w/ brand options) to header logo allows downloading brand assets directly from the logo in the header --- apps/web/src/components/header.tsx | 66 +++++++++++++++++++++++++----- 1 file changed, 56 insertions(+), 10 deletions(-) diff --git a/apps/web/src/components/header.tsx b/apps/web/src/components/header.tsx index 7fe0046f..a32d5d6d 100644 --- a/apps/web/src/components/header.tsx +++ b/apps/web/src/components/header.tsx @@ -7,10 +7,22 @@ import { Button } from "./ui/button"; import { ArrowRight } from "lucide-react"; import Image from "next/image"; import { ThemeToggle } from "./theme-toggle"; -import { GithubIcon, Menu02Icon } from "@hugeicons/core-free-icons"; +import { + Copy01Icon, + Download01Icon, + GithubIcon, + LinkSquare02Icon, + Menu02Icon, +} from "@hugeicons/core-free-icons"; import { HugeiconsIcon } from "@hugeicons/react"; import { cn } from "@/utils/ui"; import { DEFAULT_LOGO_URL, SOCIAL_LINKS } from "@/constants/site-constants"; +import { + ContextMenu, + ContextMenuContent, + ContextMenuItem, + ContextMenuTrigger, +} from "./ui/context-menu"; export function Header() { const [isMenuOpen, setIsMenuOpen] = useState(false); @@ -39,15 +51,49 @@ export function Header() {
- - OpenCut Logo - + + + + OpenCut Logo + + + + { + const res = await fetch(DEFAULT_LOGO_URL); + const svg = await res.text(); + await navigator.clipboard.writeText(svg); + }} + > + + Copy SVG + + { + const a = document.createElement("a"); + a.href = DEFAULT_LOGO_URL; + a.download = "opencut-logo.svg"; + a.click(); + }} + > + + Download SVG + + + + + Brand assets + + + + +