From 85044a3442b329f1450e9ed27a8f2c4a1460ef90 Mon Sep 17 00:00:00 2001 From: Nyk <0xnykcd@googlemail.com> Date: Tue, 3 Mar 2026 18:23:24 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20product=20improvements=20=E2=80=94=20UX?= =?UTF-8?q?=20polish,=20competitive=20features,=20accessibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tier 1 — Core UX Polish: - Recording duration timer in overlay (0:05 format) - Delete confirmation dialog for history entries (native Tauri ask()) - History search/filter with saved-only toggle - Overlay theme colors via CSS variables - Dictx Pro CTA in sidebar Tier 2 — Competitive Features: - Model download ETA and size display (245 MB / 650 MB — ~2:30 remaining) - Keyboard shortcuts help dialog (press ? to view) - Copy All button for history (copies visible/filtered entries) - Model use-case hints in onboarding cards Tier 3 — Accessibility & Polish: - ARIA labels on history icon buttons - Sidebar keyboard navigation (role=button, Enter/Space, focus ring) - WCAG contrast fix for disabled states (text-mid-gray vs opacity-50) - Micro-animations on history action buttons (active:scale-110) Also updates FUNDING.yml from original fork to 0xNyk + Gumroad. --- .github/FUNDING.yml | 6 +- CONTRIBUTING.md | 1 + src/App.tsx | 22 ++- src/components/Sidebar.tsx | 21 ++- src/components/icons/DictxIcon.tsx | 89 +++++++++-- src/components/onboarding/ModelCard.tsx | 45 +++++- src/components/onboarding/Onboarding.tsx | 12 ++ .../settings/history/HistorySettings.tsx | 147 +++++++++++++++--- .../settings/models/ModelsSettings.tsx | 10 ++ src/components/ui/SettingContainer.tsx | 16 +- src/components/ui/ShortcutsDialog.tsx | 101 ++++++++++++ src/i18n/locales/en/translation.json | 62 ++++++-- src/overlay/RecordingOverlay.css | 21 ++- src/overlay/RecordingOverlay.tsx | 53 +++++-- src/stores/settingsStore.ts | 4 +- 15 files changed, 529 insertions(+), 81 deletions(-) create mode 100644 src/components/ui/ShortcutsDialog.tsx diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 0207048..22bf594 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,4 +1,2 @@ -github: cjpais -custom: ["https://handy.computer/donate", "https://www.paypal.me/cjpais"] -buy_me_a_coffee: cjpais -ko_fi: cjpais +github: 0xNyk +custom: ["https://0xnyk.gumroad.com/l/dictx"] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9749e07..f447044 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -304,6 +304,7 @@ Look for issues labeled `good first issue` or `help wanted` if you're new to the ## 📞 Getting Help - **Discussions**: Ask questions in [GitHub Discussions](https://github.com/0xNyk/dictx/discussions) + ## 📜 License By contributing to Dictx, you agree that your contributions will be licensed under the MIT License. See [LICENSE](LICENSE) for details. diff --git a/src/App.tsx b/src/App.tsx index 873d084..8f16e6e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -15,6 +15,7 @@ import AccessibilityPermissions from "./components/AccessibilityPermissions"; import Footer from "./components/footer"; import Onboarding, { AccessibilityOnboarding } from "./components/onboarding"; import { Sidebar, SidebarSection, SECTIONS_CONFIG } from "./components/Sidebar"; +import { ShortcutsDialog } from "./components/ui/ShortcutsDialog"; import { useSettings } from "./hooks/useSettings"; import { useSettingsStore } from "./stores/settingsStore"; import { commands } from "@/bindings"; @@ -38,6 +39,7 @@ function App() { const [isReturningUser, setIsReturningUser] = useState(false); const [currentSection, setCurrentSection] = useState("general"); + const [showShortcuts, setShowShortcuts] = useState(false); const { settings, updateSetting } = useSettings(); const direction = getLanguageDirection(i18n.language); const refreshAudioDevices = useSettingsStore( @@ -72,7 +74,7 @@ function App() { } }, [onboardingStep, refreshAudioDevices, refreshOutputDevices]); - // Handle keyboard shortcuts for debug mode toggle + // Handle keyboard shortcuts for debug mode toggle and shortcuts dialog useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { // Check for Ctrl+Shift+D (Windows/Linux) or Cmd+Shift+D (macOS) @@ -86,12 +88,20 @@ function App() { const currentDebugMode = settings?.debug_mode ?? false; updateSetting("debug_mode", !currentDebugMode); } + + // Show shortcuts help with "?" when no input is focused + if ( + event.key === "?" && + !event.ctrlKey && + !event.metaKey && + !(event.target instanceof HTMLInputElement) && + !(event.target instanceof HTMLTextAreaElement) + ) { + setShowShortcuts((prev) => !prev); + } }; - // Add event listener when component mounts document.addEventListener("keydown", handleKeyDown); - - // Cleanup event listener when component unmounts return () => { document.removeEventListener("keydown", handleKeyDown); }; @@ -198,6 +208,10 @@ function App() { {/* Fixed footer at bottom */}