import { useEffect, useRef, useState } from "react"; import { useLocation } from "react-router-dom"; import { HelpCircle, Info, BookOpen, GitBranch } from "lucide-react"; import Button from "../components/Button"; import { helpContextForPathname, helpQueryForContext, type HelpContext } from "../utils/helpContext"; export default function HelpMenu() { const [open, setOpen] = useState(false); const [aboutOpen, setAboutOpen] = useState(false); const [contextOpen, setContextOpen] = useState(false); const wrapRef = useRef(null); const location = useLocation(); const helpContext = helpContextForPathname(location.pathname); useEffect(() => { function openContextHelp(event: KeyboardEvent) { if (event.key !== "F1") return; event.preventDefault(); event.stopPropagation(); event.stopImmediatePropagation(); setOpen(false); setContextOpen(true); } function onPointerDown(event: MouseEvent) { if (wrapRef.current && !wrapRef.current.contains(event.target as Node)) { setOpen(false); } } window.addEventListener("keydown", openContextHelp, true); window.addEventListener("mousedown", onPointerDown); return () => { window.removeEventListener("keydown", openContextHelp, true); window.removeEventListener("mousedown", onPointerDown); }; }, []); function openHelp() { setOpen(false); setContextOpen(true); } return (
{open && (

e.preventDefault()}> User docs e.preventDefault()}> Admin docs
GitLab
)} {contextOpen && setContextOpen(false)} />} {aboutOpen && setAboutOpen(false)} />}
); } function ContextHelpModal({ context, onClose }: { context: HelpContext; onClose: () => void }) { return (

Context help

{context.title}

Help context: {context.id}

This area is prepared for context-sensitive help. Future help content can use this context identifier, or the equivalent help query parameter {helpQueryForContext(context)}, to open the right page or section.

Next actions

The first guided help content can cover campaign creation, review, attachment resolution and sending preparation.

); } function AboutModal({ onClose }: { onClose: () => void }) { return (

About MultiMailer

MultiMailer WebUI

Version 0.1.0 — early development build.

MultiMailer is a local-first / server-assisted campaign mailer for structured, personalized bulk messages with attachment resolution, review workflows and auditable sending.

add-ideas.de

License: project license pending / to be finalized. Backend components are currently development prototypes.

); }