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
refactor(ui): align all dialogs with design system guidelines
Gabriel Steinb345064fa8c3
diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsxindex 4a06bb1f9..a11751336 100644--- a/src/components/SettingsPage.tsx+++ b/src/components/SettingsPage.tsx@@ -1709,7 +1709,7 @@ export default function SettingsPage({ activeSection = "general" }: SettingsPageopen={!!switchPreview}onOpenChange={(open) => !open && setSwitchPreview(null)}>- <DialogContent className="sm:max-w-[360px]">+ <DialogContent className="sm:max-w-90"><DialogHeader><DialogTitle>{t("settingsPage.account.pricing.confirmSwitch.title")}diff --git a/src/components/notes/ActionManagerDialog.tsx b/src/components/notes/ActionManagerDialog.tsxindex 1ec3166a6..65bbe7feb 100644--- a/src/components/notes/ActionManagerDialog.tsx+++ b/src/components/notes/ActionManagerDialog.tsx@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";import { Sparkles, Pencil, Trash2, Loader2 } from "lucide-react";import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog";import { Button } from "../ui/button";+import { Input } from "../ui/input";import { cn } from "../lib/utils";import {useActions,@@ -10,7 +11,6 @@ import {getActionName,getActionDescription,} from "../../stores/actionStore";-import { notesInputClass, notesTextareaClass } from "./shared";import type { ActionItem } from "../../types/electron";interface ActionManagerDialogProps {@@ -75,33 +75,29 @@ export default function ActionManagerDialog({ open, onOpenChange }: ActionManagereturn (<Dialog open={open} onOpenChange={onOpenChange}>- <DialogContent className="sm:max-w-lg gap-2.5">+ <DialogContent className="sm:max-w-lg"><DialogHeader>- <DialogTitle className="flex items-center gap-2 text-sm">- <Sparkles size={13} className="text-accent" />+ <DialogTitle className="flex items-center gap-2">+ <Sparkles size={14} className="text-accent" />{t("notes.actions.manageTitle")}</DialogTitle></DialogHeader>- <div className="space-y-2">+ <div className="space-y-3"><p className="text-xs font-medium text-foreground/50">{editingId !== null ? t("notes.actions.editAction") : t("notes.actions.addAction")}</p>- <input- type="text"+ <Inputvalue={name}onChange={(e) => setName(e.target.value)}placeholder={t("notes.actions.namePlaceholder")}disabled={isSaving}- className={cn(notesInputClass, "disabled:opacity-40")}/>- <input- type="text"+ <Inputvalue={description}onChange={(e) => setDescription(e.target.value)}placeholder={t("notes.actions.descriptionPlaceholder")}disabled={isSaving}- className={cn(notesInputClass, "disabled:opacity-40")}/><textareavalue={prompt}@@ -109,26 +105,26 @@ export default function ActionManagerDialog({ open, onOpenChange }: ActionManageplaceholder={t("notes.actions.promptPlaceholder")}rows={3}disabled={isSaving}- className={cn(notesTextareaClass, "disabled:opacity-40")}+ className={cn(+ "flex min-h-20 w-full rounded border border-border/70 bg-input px-3 py-2.5 text-sm text-foreground transition-colors duration-200 outline-none resize-y",+ "placeholder:text-muted-foreground/40",+ "hover:border-border-hover",+ "focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/10",+ "dark:bg-surface-1 dark:border-border-subtle/50",+ "dark:focus-visible:border-border-active dark:focus-visible:ring-ring/10",+ "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted"+ )}/><div className="flex items-center justify-end gap-2">{editingId !== null && (- <Button- variant="ghost"- size="sm"- onClick={resetForm}- disabled={isSaving}- className="h-7 text-xs"- >+ <Button variant="ghost" size="sm" onClick={resetForm} disabled={isSaving}>{t("notes.actions.cancel")}</Button>)}<Button- variant="default"size="sm"onClick={handleSave}disabled={isSaving || !name.trim() || !prompt.trim()}- className="h-7 text-xs">{isSaving ? (<Loader2 size={12} className="animate-spin" />diff --git a/src/components/notes/PersonalNotesView.tsx b/src/components/notes/PersonalNotesView.tsxindex 433aad2e8..16f8cdf00 100644--- a/src/components/notes/PersonalNotesView.tsx+++ b/src/components/notes/PersonalNotesView.tsx@@ -88,7 +88,7 @@ export default function PersonalNotesView({const [showActionManager, setShowActionManager] = useState(false);const [showNewNoteDialog, setShowNewNoteDialog] = useState(false);const [newNoteFolderId, setNewNoteFolderId] = useState<string>("");- const [showNewNoteFolderDialog, setShowNewNoteFolderDialog] = useState(false);+ const [isCreatingNewNoteFolder, setIsCreatingNewNoteFolder] = useState(false);const [newNoteFolderName, setNewNoteFolderName] = useState("");const saveTimeoutRef = useRef<NodeJS.Timeout | null>(null);const enhancedSaveTimeoutRef = useRef<NodeJS.Timeout | null>(null);@@ -268,7 +268,7 @@ export default function PersonalNotesView({const handleNewNoteFolderChange = useCallback((val: string) => {if (val === "__create_new__") {- setShowNewNoteFolderDialog(true);+ setIsCreatingNewNoteFolder(true);return;}setNewNoteFolderId(val);@@ -283,7 +283,7 @@ export default function PersonalNotesView({setNewNoteFolderId(String(res.folder.id));}setNewNoteFolderName("");- setShowNewNoteFolderDialog(false);+ setIsCreatingNewNoteFolder(false);}, [newNoteFolderName, loadFolders]);const handleConfirmNewNote = useCallback(async () => {@@ -1021,93 +1021,93 @@ export default function PersonalNotesView({/>)}- <Dialog open={showNewNoteDialog} onOpenChange={setShowNewNoteDialog}>- <DialogContent className="sm:max-w-[320px] p-5 gap-3">+ <Dialog+ open={showNewNoteDialog}+ onOpenChange={(open) => {+ setShowNewNoteDialog(open);+ if (!open) {+ setIsCreatingNewNoteFolder(false);+ setNewNoteFolderName("");+ }+ }}+ >+ <DialogContent className="sm:max-w-95 p-6 gap-5"><DialogHeader>- <DialogTitle className="text-sm">{t("notes.sidebar.newNote")}</DialogTitle>+ <DialogTitle>+ {isCreatingNewNoteFolder ? t("notes.upload.newFolder") : t("notes.sidebar.newNote")}+ </DialogTitle></DialogHeader>- {folders.length > 0 && (- <div className="flex items-center gap-2">- <FolderOpen size={12} className="text-foreground/20 shrink-0" />- <Select value={newNoteFolderId} onValueChange={handleNewNoteFolderChange}>- <SelectTrigger className="h-7 flex-1 text-xs rounded-lg px-2.5 [&>svg]:h-3 [&>svg]:w-3">- <SelectValue placeholder={t("notes.upload.selectFolder")} />- </SelectTrigger>- <SelectContent>- {folders.map((f) => (- <SelectItem key={f.id} value={String(f.id)}>- {f.name}- </SelectItem>- ))}- <SelectSeparator />- <SelectItem value="__create_new__">- <span className="flex items-center gap-1.5 text-primary/60">- <Plus size={11} />- {t("notes.upload.newFolder")}- </span>- </SelectItem>- </SelectContent>- </Select>++ {isCreatingNewNoteFolder ? (+ <div className="space-y-1.5">+ <label className="text-xs font-medium text-foreground/50">+ {t("notes.upload.folderName")}+ </label>+ <Input+ value={newNoteFolderName}+ onChange={(e) => setNewNoteFolderName(e.target.value)}+ placeholder={t("notes.folders.folderName")}+ autoFocus+ onKeyDown={(e) => {+ if (e.key === "Enter") handleCreateNewNoteFolder();+ }}+ /></div>+ ) : (+ folders.length > 0 && (+ <div className="space-y-1.5">+ <label className="text-xs font-medium text-foreground/50">+ {t("notes.folders.title")}+ </label>+ <Select value={newNoteFolderId} onValueChange={handleNewNoteFolderChange}>+ <SelectTrigger>+ <SelectValue placeholder={t("notes.upload.selectFolder")} />+ </SelectTrigger>+ <SelectContent>+ {folders.map((f) => (+ <SelectItem key={f.id} value={String(f.id)}>+ {f.name}+ </SelectItem>+ ))}+ <SelectSeparator />+ <SelectItem value="__create_new__">+ <span className="flex items-center gap-1.5 text-primary/60">+ <Plus size={13} />+ {t("notes.upload.newFolder")}+ </span>+ </SelectItem>+ </SelectContent>+ </Select>+ </div>+ ))}- <DialogFooter className="gap-1.5">- <Button- variant="ghost"- size="sm"- onClick={() => setShowNewNoteDialog(false)}- className="h-7 text-xs"- >- {t("notes.upload.cancel")}- </Button>- <Button- variant="default"- size="sm"- onClick={handleConfirmNewNote}- disabled={!newNoteFolderId}- className="h-7 text-xs"- >- {t("notes.upload.create")}- </Button>- </DialogFooter>- </DialogContent>- </Dialog>- <Dialog open={showNewNoteFolderDialog} onOpenChange={setShowNewNoteFolderDialog}>- <DialogContent className="sm:max-w-[320px] p-5 gap-3">- <DialogHeader>- <DialogTitle className="text-sm">{t("notes.upload.newFolder")}</DialogTitle>- </DialogHeader>- <Input- value={newNoteFolderName}- onChange={(e) => setNewNoteFolderName(e.target.value)}- placeholder={t("notes.upload.folderName")}- className="h-8 text-xs"- autoFocus- onKeyDown={(e) => {- if (e.key === "Enter") handleCreateNewNoteFolder();- }}- />- <DialogFooter className="gap-1.5">- <Button- variant="ghost"- size="sm"- onClick={() => {- setShowNewNoteFolderDialog(false);- setNewNoteFolderName("");- }}- className="h-7 text-xs"- >- {t("notes.upload.cancel")}- </Button>- <Button- variant="default"- size="sm"- onClick={handleCreateNewNoteFolder}- disabled={!newNoteFolderName.trim()}- className="h-7 text-xs"- >- {t("notes.upload.create")}- </Button>+ <DialogFooter>+ {isCreatingNewNoteFolder ? (+ <>+ <Button+ variant="ghost"+ onClick={() => {+ setIsCreatingNewNoteFolder(false);+ setNewNoteFolderName("");+ }}+ >+ {t("common.back")}+ </Button>+ <Button onClick={handleCreateNewNoteFolder} disabled={!newNoteFolderName.trim()}>+ {t("notes.upload.create")}+ </Button>+ </>+ ) : (+ <>+ <Button variant="ghost" onClick={() => setShowNewNoteDialog(false)}>+ {t("notes.upload.cancel")}+ </Button>+ <Button onClick={handleConfirmNewNote} disabled={!newNoteFolderId}>+ {t("notes.upload.create")}+ </Button>+ </>+ )}</DialogFooter></DialogContent></Dialog>diff --git a/src/components/notes/UploadAudioView.tsx b/src/components/notes/UploadAudioView.tsxindex 351dbc9d7..84531cbc7 100644--- a/src/components/notes/UploadAudioView.tsx+++ b/src/components/notes/UploadAudioView.tsx@@ -667,39 +667,35 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa</div><Dialog open={showNewFolderDialog} onOpenChange={setShowNewFolderDialog}>- <DialogContent className="sm:max-w-[320px] p-5 gap-3">+ <DialogContent className="sm:max-w-95"><DialogHeader>- <DialogTitle className="text-sm">{t("notes.upload.newFolder")}</DialogTitle>+ <DialogTitle>{t("notes.upload.newFolder")}</DialogTitle></DialogHeader>- <Input- value={newFolderName}- onChange={(e) => setNewFolderName(e.target.value)}- placeholder={t("notes.upload.folderName")}- className="h-8 text-xs"- autoFocus- onKeyDown={(e) => {- if (e.key === "Enter") handleCreateFolder();- }}- />- <DialogFooter className="gap-1.5">+ <div className="space-y-1.5">+ <label className="text-xs font-medium text-foreground/50">+ {t("notes.upload.folderName")}+ </label>+ <Input+ value={newFolderName}+ onChange={(e) => setNewFolderName(e.target.value)}+ placeholder={t("notes.folders.folderName")}+ autoFocus+ onKeyDown={(e) => {+ if (e.key === "Enter") handleCreateFolder();+ }}+ />+ </div>+ <DialogFooter><Buttonvariant="ghost"- size="sm"onClick={() => {setShowNewFolderDialog(false);setNewFolderName("");}}- className="h-7 text-xs">{t("notes.upload.cancel")}</Button>- <Button- variant="default"- size="sm"- onClick={handleCreateFolder}- disabled={!newFolderName.trim()}- className="h-7 text-xs"- >+ <Button onClick={handleCreateFolder} disabled={!newFolderName.trim()}>{t("notes.upload.create")}</Button></DialogFooter>