Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
feat: added support links in titlebar
Gabriel Stein1790e23bef98
diff --git a/.gitignore b/.gitignoreindex 3b61a84ef..095136c61 100644--- a/.gitignore+++ b/.gitignore@@ -4,6 +4,7 @@ npm-debug.log*yarn-debug.log*yarn-error.log*pnpm-debug.log*+package-lock.json# Runtime datapidsdiff --git a/package.json b/package.jsonindex a1245e9b9..522bda7cf 100644--- a/package.json+++ b/package.json@@ -53,13 +53,14 @@},"dependencies": {"@radix-ui/react-dialog": "^1.1.14",+ "@radix-ui/react-dropdown-menu": "^2.1.15","@radix-ui/react-slot": "^1.2.3","better-sqlite3": "^11.10.0","class-variance-authority": "^0.7.1","clsx": "^2.1.1","dotenv": "^16.3.1",- "ffmpeg-static": "^5.2.0","electron-updater": "^6.6.2",+ "ffmpeg-static": "^5.2.0","lucide-react": "^0.518.0","react": "^19.1.0","react-dom": "^19.1.0",diff --git a/preload.js b/preload.jsindex 074f96d23..12e43adc0 100644--- a/preload.js+++ b/preload.js@@ -81,4 +81,7 @@ contextBridge.exposeInMainWorld("electronAPI", {// Audio event listenersonNoAudioDetected: (callback) =>ipcRenderer.on("no-audio-detected", callback),++ // External link opener+ openExternal: (url) => ipcRenderer.invoke("open-external", url),});diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsxindex 029c5ea8f..8da8e6e29 100644--- a/src/components/ControlPanel.tsx+++ b/src/components/ControlPanel.tsx@@ -4,6 +4,7 @@ import { Button } from "./ui/button";import { Trash2, RefreshCw, Settings, FileText, Mic } from "lucide-react";import SettingsModal from "./SettingsModal";import TitleBar from "./TitleBar";+import SupportDropdown from "./ui/SupportDropdown";import TranscriptionItem from "./ui/TranscriptionItem";import { ConfirmDialog, AlertDialog } from "./ui/dialog";import { useDialogs } from "../hooks/useDialogs";@@ -181,6 +182,7 @@ export default function ControlPanel() {<div className="absolute -top-1 -right-1 w-2 h-2 bg-blue-500 rounded-full"></div></div>)}+ <SupportDropdown /><Buttonvariant="ghost"size="icon"diff --git a/src/components/ui/SupportDropdown.tsx b/src/components/ui/SupportDropdown.tsxnew file mode 100644index 000000000..b29ec869c--- /dev/null+++ b/src/components/ui/SupportDropdown.tsx@@ -0,0 +1,74 @@+import React from "react";+import { Button } from "./button";+import { HelpCircle, Mail, Bug } from "lucide-react";+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuTrigger,+} from "./dropdown-menu";++interface SupportDropdownProps {+ className?: string;+}++export default function SupportDropdown({ className }: SupportDropdownProps) {+ const handleContactSupport = async () => {+ try {+ const result = await window.electronAPI?.openExternal(+ "mailto:[email protected]"+ );+ if (!result?.success) {+ console.error("Failed to open email client:", result?.error);+ // Fallback: try opening the email as a web URL+ await window.electronAPI?.openExternal(+ "https://mail.google.com/mail/?view=cm&[email protected]"+ );+ }+ } catch (error) {+ console.error("Error opening email client:", error);+ }+ };++ const handleSubmitBug = async () => {+ try {+ const result = await window.electronAPI?.openExternal(+ "https://github.com/HeroTools/open-wispr/issues"+ );+ if (!result?.success) {+ console.error("Failed to open GitHub issues:", result?.error);+ }+ } catch (error) {+ console.error("Error opening GitHub issues:", error);+ }+ };++ return (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button variant="ghost" size="icon" className={className}>+ <HelpCircle size={16} />+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent+ align="end"+ className="bg-white border border-gray-200 shadow-lg"+ >+ <DropdownMenuItem+ onClick={handleContactSupport}+ className="cursor-pointer hover:bg-gray-50 focus:bg-gray-50"+ >+ <Mail className="mr-2 h-4 w-4" />+ Contact Support+ </DropdownMenuItem>+ <DropdownMenuItem+ onClick={handleSubmitBug}+ className="cursor-pointer hover:bg-gray-50 focus:bg-gray-50"+ >+ <Bug className="mr-2 h-4 w-4" />+ Submit Bug+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ );+}diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsxnew file mode 100644index 000000000..0a84341cd--- /dev/null+++ b/src/components/ui/dropdown-menu.tsx@@ -0,0 +1,198 @@+import * as React from "react";+import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";+import { Check, ChevronRight, Circle } from "lucide-react";++import { cn } from "../lib/utils";++const DropdownMenu = DropdownMenuPrimitive.Root;++const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;++const DropdownMenuGroup = DropdownMenuPrimitive.Group;++const DropdownMenuPortal = DropdownMenuPrimitive.Portal;++const DropdownMenuSub = DropdownMenuPrimitive.Sub;++const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;++const DropdownMenuSubTrigger = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {+ inset?: boolean;+ }+>(({ className, inset, children, ...props }, ref) => (+ <DropdownMenuPrimitive.SubTrigger+ ref={ref}+ className={cn(+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",+ inset && "pl-8",+ className+ )}+ {...props}+ >+ {children}+ <ChevronRight className="ml-auto h-4 w-4" />+ </DropdownMenuPrimitive.SubTrigger>+));+DropdownMenuSubTrigger.displayName =+ DropdownMenuPrimitive.SubTrigger.displayName;++const DropdownMenuSubContent = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>+>(({ className, ...props }, ref) => (+ <DropdownMenuPrimitive.SubContent+ ref={ref}+ className={cn(+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ className+ )}+ {...props}+ />+));+DropdownMenuSubContent.displayName =+ DropdownMenuPrimitive.SubContent.displayName;++const DropdownMenuContent = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>+>(({ className, sideOffset = 4, ...props }, ref) => (+ <DropdownMenuPrimitive.Portal>+ <DropdownMenuPrimitive.Content+ ref={ref}+ sideOffset={sideOffset}+ className={cn(+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ className+ )}+ {...props}+ />+ </DropdownMenuPrimitive.Portal>+));+DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;++const DropdownMenuItem = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.Item>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {+ inset?: boolean;+ }+>(({ className, inset, ...props }, ref) => (+ <DropdownMenuPrimitive.Item+ ref={ref}+ className={cn(+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ inset && "pl-8",+ className+ )}+ {...props}+ />+));+DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;++const DropdownMenuCheckboxItem = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>+>(({ className, children, checked, ...props }, ref) => (+ <DropdownMenuPrimitive.CheckboxItem+ ref={ref}+ className={cn(+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ className+ )}+ checked={checked}+ {...props}+ >+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">+ <DropdownMenuPrimitive.ItemIndicator>+ <Check className="h-4 w-4" />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.CheckboxItem>+));+DropdownMenuCheckboxItem.displayName =+ DropdownMenuPrimitive.CheckboxItem.displayName;++const DropdownMenuRadioItem = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>+>(({ className, children, ...props }, ref) => (+ <DropdownMenuPrimitive.RadioItem+ ref={ref}+ className={cn(+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ className+ )}+ {...props}+ >+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">+ <DropdownMenuPrimitive.ItemIndicator>+ <Circle className="h-2 w-2 fill-current" />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.RadioItem>+));+DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;++const DropdownMenuLabel = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.Label>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {+ inset?: boolean;+ }+>(({ className, inset, ...props }, ref) => (+ <DropdownMenuPrimitive.Label+ ref={ref}+ className={cn(+ "px-2 py-1.5 text-sm font-semibold",+ inset && "pl-8",+ className+ )}+ {...props}+ />+));+DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;++const DropdownMenuSeparator = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.Separator>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>+>(({ className, ...props }, ref) => (+ <DropdownMenuPrimitive.Separator+ ref={ref}+ className={cn("-mx-1 my-1 h-px bg-muted", className)}+ {...props}+ />+));+DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;++const DropdownMenuShortcut = ({+ className,+ ...props+}: React.HTMLAttributes<HTMLSpanElement>) => {+ return (+ <span+ className={cn("ml-auto text-xs tracking-widest opacity-60", className)}+ {...props}+ />+ );+};+DropdownMenuShortcut.displayName = "DropdownMenuShortcut";++export {+ DropdownMenu,+ DropdownMenuTrigger,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuCheckboxItem,+ DropdownMenuRadioItem,+ DropdownMenuLabel,+ DropdownMenuSeparator,+ DropdownMenuShortcut,+ DropdownMenuGroup,+ DropdownMenuPortal,+ DropdownMenuSub,+ DropdownMenuSubContent,+ DropdownMenuSubTrigger,+ DropdownMenuRadioGroup,+};diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex f9d4b1fa7..c66bbbd7c 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -1,4 +1,4 @@-const { ipcMain, app } = require("electron");+const { ipcMain, app, shell } = require("electron");const AppUtils = require("../utils");class IPCHandlers {@@ -243,6 +243,17 @@ class IPCHandlers {ipcMain.handle("stop-window-drag", async (event) => {return await this.windowManager.stopWindowDrag();});++ // External link handler+ ipcMain.handle("open-external", async (event, url) => {+ try {+ await shell.openExternal(url);+ return { success: true };+ } catch (error) {+ console.error("❌ Failed to open external URL:", error);+ return { success: false, error: error.message };+ }+ });}}diff --git a/src/types/electron.ts b/src/types/electron.tsindex 3250c4a44..e2e9f76ef 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -165,6 +165,11 @@ declare global {// Settings management (used by OnboardingFlow but not in preload.js)saveSettings?: (settings: SaveSettings) => Promise<void>;++ // External URL operations+ openExternal: (+ url: string+ ) => Promise<{ success: boolean; error?: string }>;};}}