Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
Improve tray layout documentation
arunkumar.a9fc047f2cdb1
diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsxindex 5b3b4af7f..328db39d8 100644--- a/src/components/launch/LaunchWindow.tsx+++ b/src/components/launch/LaunchWindow.tsx@@ -60,6 +60,7 @@ const ICON_CONFIG = {type IconName = keyof typeof ICON_CONFIG;+/** Renders the configured icon for a HUD control. */function getIcon(name: IconName, className?: string) {const { icon: Icon, size } = ICON_CONFIG[name];return <Icon size={size} className={className} />;@@ -81,6 +82,7 @@ const hudSidebarClasses = "ml-0.5 pl-1.5 border-l border-white/10 flex items-cenconst hudSidebarVerticalClasses ="mt-0.5 pt-1.5 border-t border-white/10 flex flex-col items-center gap-0.5";+/** Launches the floating recording HUD and its recorder controls. */export function LaunchWindow() {const t = useScopedT("launch");const availableLocales = getAvailableLocales();@@ -371,6 +373,7 @@ export function LaunchWindow() {window.electronAPI.hudOverlayClose();}};+ /** Switches the HUD between horizontal and vertical tray layouts. */const toggleTrayLayout = () => {const nextLayout = trayLayout === "horizontal" ? "vertical" : "horizontal";setTrayLayout(nextLayout);diff --git a/src/i18n/locales/zh-TW/launch.json b/src/i18n/locales/zh-TW/launch.jsonindex 42ba52a7f..d0b529ebe 100644--- a/src/i18n/locales/zh-TW/launch.json+++ b/src/i18n/locales/zh-TW/launch.json@@ -8,8 +8,8 @@"resumeRecording": "繼續錄製","openVideoFile": "開啟影片檔案","openProject": "開啟專案",- "useVerticalTray": "使用直向工具列",- "useHorizontalTray": "使用橫向工具列"+ "useVerticalTray": "使用直向托盤",+ "useHorizontalTray": "使用橫向托盤"},"audio": {"enableSystemAudio": "啟用系統音訊",diff --git a/src/lib/userPreferences.ts b/src/lib/userPreferences.tsindex a14b64625..128eb73b8 100644--- a/src/lib/userPreferences.ts+++ b/src/lib/userPreferences.ts@@ -42,6 +42,7 @@ export const DEFAULT_PREFS: UserPreferences = {trayLayout: "horizontal",};+/** Parses stored preferences without throwing on malformed JSON. */function safeJsonParse(text: string | null): Record<string, unknown> | null {if (!text) return null;try {