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: add clear-all button for transcription history
Gabriel Stein139b84c57e24
diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsxindex c530583e5..fa17eac03 100644--- a/src/components/ControlPanel.tsx+++ b/src/components/ControlPanel.tsx@@ -16,6 +16,7 @@ import {initializeTranscriptions,removeTranscription as removeFromStore,updateTranscription as updateInStore,+ clearTranscriptions as clearStore,} from "../stores/transcriptionStore";import ControlPanelSidebar, { type ControlPanelView } from "./ControlPanelSidebar";import WindowControls from "./WindowControls";@@ -287,6 +288,37 @@ export default function ControlPanel() {[showConfirmDialog, showAlertDialog, t]);+ const clearAllTranscriptions = useCallback(() => {+ showConfirmDialog({+ title: t("controlPanel.history.clearAllTitle"),+ description: t("controlPanel.history.clearAllDescription"),+ onConfirm: async () => {+ try {+ const result = await window.electronAPI.clearTranscriptions();+ if (result.success) {+ clearStore();+ toast({+ title: t("controlPanel.history.clearAllSuccess"),+ variant: "success",+ duration: 2000,+ });+ } else {+ showAlertDialog({+ title: t("controlPanel.history.clearAllErrorTitle"),+ description: t("controlPanel.history.clearAllErrorDescription"),+ });+ }+ } catch {+ showAlertDialog({+ title: t("controlPanel.history.clearAllErrorTitle"),+ description: t("controlPanel.history.clearAllErrorDescription"),+ });+ }+ },+ variant: "destructive",+ });+ }, [showConfirmDialog, showAlertDialog, toast, t]);+const showAudioInFolder = useCallback(async (id: number) => {try {@@ -657,6 +689,7 @@ export default function ControlPanel() {useReasoningModel={useReasoningModel}copyToClipboard={copyToClipboard}deleteTranscription={deleteTranscription}+ clearAllTranscriptions={clearAllTranscriptions}onShowAudioInFolder={showAudioInFolder}onRetryTranscription={retryTranscription}onOpenSettings={(section) => {diff --git a/src/components/HistoryView.tsx b/src/components/HistoryView.tsxindex 9bbe91996..7064789de 100644--- a/src/components/HistoryView.tsx+++ b/src/components/HistoryView.tsx@@ -1,7 +1,7 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";import { Button } from "./ui/button";-import { Loader2, Sparkles, Cloud, X, Mic } from "lucide-react";+import { Loader2, Sparkles, Cloud, X, Mic, Trash2 } from "lucide-react";import TranscriptionItem from "./ui/TranscriptionItem";import type { TranscriptionItem as TranscriptionItemType } from "../types/electron";import { formatHotkeyLabel } from "../utils/hotkeys";@@ -21,6 +21,7 @@ interface HistoryViewProps {useReasoningModel: boolean;copyToClipboard: (text: string) => void;deleteTranscription: (id: number) => void;+ clearAllTranscriptions: () => void;onOpenSettings: (section?: string) => void;onShowAudioInFolder: (id: number) => void;onRetryTranscription: (id: number) => Promise<void>;@@ -37,6 +38,7 @@ export default function HistoryView({useReasoningModel,copyToClipboard,deleteTranscription,+ clearAllTranscriptions,onOpenSettings,onShowAudioInFolder,onRetryTranscription,@@ -260,13 +262,22 @@ export default function HistoryView({</div></div>) : (- <div>+ <div className="group">{groupedHistory.map((group, index) => (<div key={group.label} className={index > 0 ? "mt-4" : ""}>- <div className="sticky -top-1 z-10 -mx-4 px-5 pt-2 pb-2 bg-background">+ <div className="sticky -top-1 z-10 -mx-4 px-5 pt-2 pb-2 bg-background flex items-center justify-between"><span className="text-[11px] font-semibold text-muted-foreground dark:text-muted-foreground uppercase tracking-wide">{group.label}</span>+ {index === 0 && (+ <button+ onClick={clearAllTranscriptions}+ className="flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-muted-foreground/60 opacity-0 group-hover:opacity-100 hover:!text-destructive hover:!bg-destructive/8 dark:hover:!bg-destructive/10 active:scale-[0.98] focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/30 transition-all duration-200"+ >+ <Trash2 size={11} />+ <span>{t("controlPanel.history.clearAll")}</span>+ </button>+ )}</div><div className="space-y-1.5 relative z-0">{group.items.map((item) => (diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex 12f94a6ec..20b9c9caa 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -224,7 +224,13 @@"today": "Heute","yesterday": "Gestern"},- "transcriptionFailed": "Transkription fehlgeschlagen"+ "transcriptionFailed": "Transkription fehlgeschlagen",+ "clearAll": "Alle löschen",+ "clearAllTitle": "Alle Transkriptionen löschen",+ "clearAllDescription": "Alle Transkriptionen und Audiodateien werden dauerhaft entfernt.",+ "clearAllSuccess": "Verlauf gelöscht",+ "clearAllErrorTitle": "Verlauf konnte nicht gelöscht werden",+ "clearAllErrorDescription": "Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut."},"cloudMigration": {"title": "Willkommen bei OpenWhispr Pro",diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 9b4e91716..5de3ff8c9 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -240,7 +240,13 @@"audioNotFound": "Audio file not found or expired","noAiProcessing": "No AI processing was applied to this transcription","transcriptionFailed": "Transcription failed",- "rawTranscript": "Raw Transcript"+ "rawTranscript": "Raw Transcript",+ "clearAll": "Clear all",+ "clearAllTitle": "Clear All Transcriptions",+ "clearAllDescription": "All transcriptions and audio files will be permanently removed.",+ "clearAllSuccess": "History cleared",+ "clearAllErrorTitle": "Couldn't clear history",+ "clearAllErrorDescription": "Something went wrong. Please try again."},"cloudMigration": {"title": "Welcome to OpenWhispr Pro",diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex e2a0a5302..347e46c50 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -224,7 +224,13 @@"today": "Hoy","yesterday": "Ayer"},- "transcriptionFailed": "La transcripción falló"+ "transcriptionFailed": "La transcripción falló",+ "clearAll": "Borrar todo",+ "clearAllTitle": "Borrar todas las transcripciones",+ "clearAllDescription": "Todas las transcripciones y archivos de audio se eliminarán permanentemente.",+ "clearAllSuccess": "Historial borrado",+ "clearAllErrorTitle": "No se pudo borrar el historial",+ "clearAllErrorDescription": "Algo salió mal. Inténtalo de nuevo."},"cloudMigration": {"title": "Bienvenido a OpenWhispr Pro",diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex 1db392182..469760231 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -224,7 +224,13 @@"today": "Aujourd'hui","yesterday": "Hier"},- "transcriptionFailed": "La transcription a échoué"+ "transcriptionFailed": "La transcription a échoué",+ "clearAll": "Tout effacer",+ "clearAllTitle": "Effacer toutes les transcriptions",+ "clearAllDescription": "Toutes les transcriptions et fichiers audio seront définitivement supprimés.",+ "clearAllSuccess": "Historique effacé",+ "clearAllErrorTitle": "Impossible d'effacer l'historique",+ "clearAllErrorDescription": "Une erreur est survenue. Veuillez réessayer."},"cloudMigration": {"title": "Bienvenue sur OpenWhispr Pro",diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex 00af581a8..025f977cd 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -224,7 +224,13 @@"today": "Oggi","yesterday": "Ieri"},- "transcriptionFailed": "La trascrizione è fallita"+ "transcriptionFailed": "La trascrizione è fallita",+ "clearAll": "Cancella tutto",+ "clearAllTitle": "Cancella tutte le trascrizioni",+ "clearAllDescription": "Tutte le trascrizioni e i file audio verranno rimossi definitivamente.",+ "clearAllSuccess": "Cronologia cancellata",+ "clearAllErrorTitle": "Impossibile cancellare la cronologia",+ "clearAllErrorDescription": "Qualcosa è andato storto. Riprova."},"cloudMigration": {"title": "Benvenuto in OpenWhispr Pro",diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 1f2a0d8d7..515468f03 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -224,7 +224,13 @@"today": "今日","yesterday": "昨日"},- "transcriptionFailed": "文字起こしに失敗しました"+ "transcriptionFailed": "文字起こしに失敗しました",+ "clearAll": "すべて削除",+ "clearAllTitle": "すべての文字起こしを削除",+ "clearAllDescription": "すべての文字起こしと音声ファイルが完全に削除されます。",+ "clearAllSuccess": "履歴を削除しました",+ "clearAllErrorTitle": "履歴を削除できませんでした",+ "clearAllErrorDescription": "問題が発生しました。もう一度お試しください。"},"cloudMigration": {"title": "OpenWhispr Pro へようこそ",diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex 8001a742e..d9c44ca8c 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -196,7 +196,13 @@"today": "Hoje","yesterday": "Ontem"},- "transcriptionFailed": "A transcrição falhou"+ "transcriptionFailed": "A transcrição falhou",+ "clearAll": "Limpar tudo",+ "clearAllTitle": "Limpar todas as transcrições",+ "clearAllDescription": "Todas as transcrições e arquivos de áudio serão removidos permanentemente.",+ "clearAllSuccess": "Histórico limpo",+ "clearAllErrorTitle": "Não foi possível limpar o histórico",+ "clearAllErrorDescription": "Algo deu errado. Tente novamente."},"cloudMigration": {"title": "Boas-vindas ao OpenWhispr Pro",diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex a6d4ed46c..528704c98 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -224,7 +224,13 @@"today": "Сегодня","yesterday": "Вчера"},- "transcriptionFailed": "Транскрипция не удалась"+ "transcriptionFailed": "Транскрипция не удалась",+ "clearAll": "Очистить все",+ "clearAllTitle": "Очистить все транскрипции",+ "clearAllDescription": "Все транскрипции и аудиофайлы будут безвозвратно удалены.",+ "clearAllSuccess": "История очищена",+ "clearAllErrorTitle": "Не удалось очистить историю",+ "clearAllErrorDescription": "Что-то пошло не так. Попробуйте ещё раз."},"cloudMigration": {"title": "Добро пожаловать в OpenWhispr Pro",diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex b633512e4..79cc22a4b 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -224,7 +224,13 @@"today": "今天","yesterday": "昨天"},- "transcriptionFailed": "转录失败"+ "transcriptionFailed": "转录失败",+ "clearAll": "全部清除",+ "clearAllTitle": "清除所有转录",+ "clearAllDescription": "所有转录和音频文件将被永久删除。",+ "clearAllSuccess": "历史记录已清除",+ "clearAllErrorTitle": "无法清除历史记录",+ "clearAllErrorDescription": "出了点问题,请重试。"},"cloudMigration": {"title": "欢迎使用 OpenWhispr Pro",diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 5af52b292..bc520e266 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -224,7 +224,13 @@"today": "今天","yesterday": "昨天"},- "transcriptionFailed": "轉錄失敗"+ "transcriptionFailed": "轉錄失敗",+ "clearAll": "全部清除",+ "clearAllTitle": "清除所有轉錄",+ "clearAllDescription": "所有轉錄和音訊檔案將被永久刪除。",+ "clearAllSuccess": "歷史紀錄已清除",+ "clearAllErrorTitle": "無法清除歷史紀錄",+ "clearAllErrorDescription": "發生錯誤,請重試。"},"cloudMigration": {"title": "歡迎使用 OpenWhispr Pro",