Improve tray layout documentation

This commit is contained in:
arunkumar.a
2026-05-23 23:52:21 +05:30
parent c293786e9d
commit 9fc047f2cd
3 changed files with 6 additions and 2 deletions
+3
View File
@@ -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-cen
const 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);
+2 -2
View File
@@ -8,8 +8,8 @@
"resumeRecording": "繼續錄製",
"openVideoFile": "開啟影片檔案",
"openProject": "開啟專案",
"useVerticalTray": "使用直向工具列",
"useHorizontalTray": "使用橫向工具列"
"useVerticalTray": "使用直向托盤",
"useHorizontalTray": "使用橫向托盤"
},
"audio": {
"enableSystemAudio": "啟用系統音訊",
+1
View File
@@ -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 {