Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.
TypeScript ai-agentai-resume-analyzerapplication-trackerapplication-tracking-systematscareerjob-applicationjob-automationjob-huntingjob-searchjob-seeker-toolsjob-trackerjob-trackingjobsearchjobseekersmcpollamaresumeresume-reviewself-hosted
Add support dialog component
Khuram Niazdc31decb1c24
diff --git a/src/components/Header.tsx b/src/components/Header.tsxindex 4f36407..75875d4 100644--- a/src/components/Header.tsx+++ b/src/components/Header.tsx@@ -1,22 +1,7 @@import Link from "next/link";-import {- PanelLeft,- Briefcase,- Search,- PowerIcon,- Settings,- Info,-} from "lucide-react";+import { PanelLeft, Briefcase } from "lucide-react";import { Button } from "./ui/button";-import {- DropdownMenu,- DropdownMenuTrigger,- DropdownMenuContent,- DropdownMenuLabel,- DropdownMenuSeparator,- DropdownMenuItem,-} from "./ui/dropdown-menu";import {Sheet,SheetClose,@@ -26,9 +11,8 @@ import {} from "@/components/ui/sheet";import { SIDEBAR_LINKS } from "@/lib/constants";import { signOut } from "@/auth";-import UserAvatar from "./UserAvatar";import { getCurrentUser } from "@/utils/user.utils";-import { redirect } from "next/navigation";+import { ProfileDropdown } from "./ProfileDropdown";async function Header() {// const session = await auth();@@ -81,37 +65,13 @@ async function Header() {/> */}</div>- <DropdownMenu>- <DropdownMenuTrigger>- <UserAvatar user={user} />- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- <DropdownMenuLabel>My Account</DropdownMenuLabel>- <DropdownMenuSeparator />- <DropdownMenuItem>- <Settings className="w-5 mr-2" />- <Link href="/dashboard/settings">Settings</Link>- </DropdownMenuItem>- <DropdownMenuItem>- <Info className="w-5 mr-2" />- Support- </DropdownMenuItem>- <DropdownMenuSeparator />- <form- action={async () => {- "use server";- await signOut();- }}- >- <DropdownMenuItem>- <Button variant="ghost" className="w-full">- <PowerIcon className="w-5" />- <div className="hidden md:block mx-2">Logout</div>- </Button>- </DropdownMenuItem>- </form>- </DropdownMenuContent>- </DropdownMenu>+ <ProfileDropdown+ user={user}+ signOutAction={async () => {+ "use server";+ await signOut();+ }}+ /></header>);}diff --git a/src/components/ProfileDropdown.tsx b/src/components/ProfileDropdown.tsxnew file mode 100644index 0000000..baee916--- /dev/null+++ b/src/components/ProfileDropdown.tsx@@ -0,0 +1,66 @@+"use client";++import { useState } from "react";+import Link from "next/link";+import { PowerIcon, Settings, Info } from "lucide-react";+import { Button } from "./ui/button";+import {+ DropdownMenu,+ DropdownMenuTrigger,+ DropdownMenuContent,+ DropdownMenuLabel,+ DropdownMenuSeparator,+ DropdownMenuItem,+} from "./ui/dropdown-menu";+import UserAvatar from "./UserAvatar";+import { SupportDialog } from "./SupportDialog";++interface ProfileDropdownProps {+ user: any;+ signOutAction: () => void;+}++export function ProfileDropdown({ user, signOutAction }: ProfileDropdownProps) {+ const [supportDialogOpen, setSupportDialogOpen] = useState(false);++ return (+ <>+ <DropdownMenu>+ <DropdownMenuTrigger>+ <UserAvatar user={user} />+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuLabel>My Account</DropdownMenuLabel>+ <DropdownMenuSeparator />+ <DropdownMenuItem asChild>+ <Link href="/dashboard/settings" className="cursor-pointer">+ <Settings className="w-5 mr-2" />+ Settings+ </Link>+ </DropdownMenuItem>+ <DropdownMenuItem+ onClick={() => setSupportDialogOpen(true)}+ className="cursor-pointer"+ >+ <Info className="w-5 mr-2" />+ Support+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <form action={signOutAction}>+ <DropdownMenuItem>+ <Button variant="ghost" className="w-full">+ <PowerIcon className="w-5" />+ <div className="hidden md:block mx-2">Logout</div>+ </Button>+ </DropdownMenuItem>+ </form>+ </DropdownMenuContent>+ </DropdownMenu>++ <SupportDialog+ open={supportDialogOpen}+ onOpenChange={setSupportDialogOpen}+ />+ </>+ );+}diff --git a/src/components/SupportDialog.tsx b/src/components/SupportDialog.tsxnew file mode 100644index 0000000..705c035--- /dev/null+++ b/src/components/SupportDialog.tsx@@ -0,0 +1,52 @@+"use client";++import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogHeader,+ DialogTitle,+} from "./ui/dialog";+import packageJson from "../../package.json";++interface SupportDialogProps {+ open: boolean;+ onOpenChange: (open: boolean) => void;+}++export function SupportDialog({ open, onOpenChange }: SupportDialogProps) {+ const appVersion = packageJson.version;+ const currentYear = new Date().getFullYear();++ return (+ <Dialog open={open} onOpenChange={onOpenChange}>+ <DialogContent className="sm:max-w-md">+ <DialogHeader>+ <DialogTitle>Support</DialogTitle>+ <DialogDescription>+ <a+ href="https://github.com/Gsync/jobsync/issues"+ target="_blank"+ rel="noopener noreferrer"+ className="text-primary hover:underline"+ >+ https://github.com/Gsync/jobsync/issues+ </a>+ </DialogDescription>+ </DialogHeader>+ <div className="space-y-4 py-4">+ <div className="space-y-2">+ <h3 className="text-sm font-semibold">Version</h3>+ <p className="text-sm text-muted-foreground">v{appVersion}</p>+ </div>+ <div className="space-y-2">+ <h3 className="text-sm font-semibold">Copyright</h3>+ <p className="text-sm text-muted-foreground">+ © {currentYear} JobSync. All rights reserved.+ </p>+ </div>+ </div>+ </DialogContent>+ </Dialog>+ );+}