diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 0d7211d..d70c8da 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -50,18 +50,18 @@ export const SECTIONS_CONFIG = { component: AdvancedSettings, enabled: () => true, }, - postprocessing: { - labelKey: "sidebar.postProcessing", - icon: Sparkles, - component: PostProcessingSettings, - enabled: (settings) => settings?.post_process_enabled ?? false, - }, history: { labelKey: "sidebar.history", icon: History, component: HistorySettings, enabled: () => true, }, + postprocessing: { + labelKey: "sidebar.postProcessing", + icon: Sparkles, + component: PostProcessingSettings, + enabled: (settings) => settings?.post_process_enabled ?? false, + }, debug: { labelKey: "sidebar.debug", icon: FlaskConical, diff --git a/src/components/settings/GlobalShortcutInput.tsx b/src/components/settings/GlobalShortcutInput.tsx index 66be894..537a782 100644 --- a/src/components/settings/GlobalShortcutInput.tsx +++ b/src/components/settings/GlobalShortcutInput.tsx @@ -49,24 +49,6 @@ export const GlobalShortcutInput: React.FC = ({ const handleKeyDown = async (e: KeyboardEvent) => { if (cleanup) return; if (e.repeat) return; // ignore auto-repeat - if (e.key === "Escape") { - // Cancel recording and restore original binding - if (editingShortcutId && originalBinding) { - try { - await updateBinding(editingShortcutId, originalBinding); - } catch (error) { - console.error("Failed to restore original binding:", error); - toast.error(t("settings.general.shortcut.errors.restore")); - } - } else if (editingShortcutId) { - await commands.resumeBinding(editingShortcutId).catch(console.error); - } - setEditingShortcutId(null); - setKeyPressed([]); - setRecordedKeys([]); - setOriginalBinding(""); - return; - } e.preventDefault(); // Get the key with OS-specific naming and normalize it diff --git a/src/components/settings/HandyKeysShortcutInput.tsx b/src/components/settings/HandyKeysShortcutInput.tsx index ee1d5f5..d5f5ed0 100644 --- a/src/components/settings/HandyKeysShortcutInput.tsx +++ b/src/components/settings/HandyKeysShortcutInput.tsx @@ -134,19 +134,8 @@ export const HandyKeysShortcutInput: React.FC = ({ setupListener(); - // Handle escape key to cancel - const handleKeyDown = (e: KeyboardEvent) => { - if (e.key === "Escape") { - e.preventDefault(); - cancelRecording(); - } - }; - - window.addEventListener("keydown", handleKeyDown); - return () => { cleanup = true; - window.removeEventListener("keydown", handleKeyDown); if (unlistenRef.current) { unlistenRef.current(); unlistenRef.current = null; diff --git a/src/components/settings/debug/DebugSettings.tsx b/src/components/settings/debug/DebugSettings.tsx index 49bd9ec..442febf 100644 --- a/src/components/settings/debug/DebugSettings.tsx +++ b/src/components/settings/debug/DebugSettings.tsx @@ -1,6 +1,5 @@ import React from "react"; import { useTranslation } from "react-i18next"; -import { type } from "@tauri-apps/plugin-os"; import { WordCorrectionThreshold } from "./WordCorrectionThreshold"; import { LogLevelSelector } from "./LogLevelSelector"; import { PasteDelay } from "./PasteDelay"; @@ -9,15 +8,10 @@ import { SettingsGroup } from "../../ui/SettingsGroup"; import { AlwaysOnMicrophone } from "../AlwaysOnMicrophone"; import { SoundPicker } from "../SoundPicker"; import { ClamshellMicrophoneSelector } from "../ClamshellMicrophoneSelector"; -import { ShortcutInput } from "../ShortcutInput"; import { UpdateChecksToggle } from "../UpdateChecksToggle"; -import { useSettings } from "../../../hooks/useSettings"; export const DebugSettings: React.FC = () => { const { t } = useTranslation(); - const { getSetting } = useSettings(); - const pushToTalk = getSetting("push_to_talk"); - const isLinux = type() === "linux"; return (
@@ -33,14 +27,6 @@ export const DebugSettings: React.FC = () => { - {/* Cancel shortcut is disabled on Linux due to instability with dynamic shortcut registration */} - {!isLinux && ( - - )}
); diff --git a/src/components/settings/general/GeneralSettings.tsx b/src/components/settings/general/GeneralSettings.tsx index 88bedf8..adbb678 100644 --- a/src/components/settings/general/GeneralSettings.tsx +++ b/src/components/settings/general/GeneralSettings.tsx @@ -1,5 +1,6 @@ import React from "react"; import { useTranslation } from "react-i18next"; +import { type } from "@tauri-apps/plugin-os"; import { MicrophoneSelector } from "../MicrophoneSelector"; import { ShortcutInput } from "../ShortcutInput"; import { SettingsGroup } from "../../ui/SettingsGroup"; @@ -13,12 +14,18 @@ import { ModelSettingsCard } from "./ModelSettingsCard"; export const GeneralSettings: React.FC = () => { const { t } = useTranslation(); - const { audioFeedbackEnabled } = useSettings(); + const { audioFeedbackEnabled, getSetting } = useSettings(); + const pushToTalk = getSetting("push_to_talk"); + const isLinux = type() === "linux"; return (
+ {/* Cancel shortcut is hidden with push-to-talk (release key cancels) and on Linux (dynamic shortcut instability) */} + {!isLinux && !pushToTalk && ( + + )} diff --git a/src/i18n/locales/bg/translation.json b/src/i18n/locales/bg/translation.json index 617da9d..10d6389 100644 --- a/src/i18n/locales/bg/translation.json +++ b/src/i18n/locales/bg/translation.json @@ -547,7 +547,10 @@ "downloading": "Изтегля се... {{progress}}%", "installing": "Инсталиране...", "preparing": "Подготовка...", - "checkForUpdates": "Проверка за актуализации" + "checkForUpdates": "Проверка за актуализации", + "portableUpdateTitle": "Необходима е ръчна актуализация", + "portableUpdateMessage": "Преносимите инсталации не могат да бъдат актуализирани автоматично. За актуализация: изтеглете най-новия NSIS инсталатор от GitHub Releases, инсталирайте го в същата папка, след което копирайте папката Data/ (настройки, модели, записи) от старата версия в новата.", + "portableUpdateButton": "Отвори GitHub Releases" }, "common": { "loading": "Зареждане...",