diff --git a/apps/desktop/src/preload/index.ts b/apps/desktop/src/preload/index.ts index aa9f5e6..9b844f0 100644 --- a/apps/desktop/src/preload/index.ts +++ b/apps/desktop/src/preload/index.ts @@ -187,6 +187,10 @@ function on(channel: string, callback: (data: T) => void): Unsubscribe { } const electronAPI = { + // ── Platform ─────────────────────────────────────────── + // 'darwin' | 'win32' | 'linux' — 렌더러에서 키바인딩/단축키 표기 분기 + platform: process.platform as NodeJS.Platform, + // ── Audio ────────────────────────────────────────────── audio: { getDevices: () => invoke(IPC_CHANNELS.AUDIO.GET_DEVICES), diff --git a/apps/desktop/src/renderer/components/HotkeyRecordModal.tsx b/apps/desktop/src/renderer/components/HotkeyRecordModal.tsx index 9cd769d..8a577a4 100644 --- a/apps/desktop/src/renderer/components/HotkeyRecordModal.tsx +++ b/apps/desktop/src/renderer/components/HotkeyRecordModal.tsx @@ -18,6 +18,7 @@ import { import { d3roPalette } from '@d3ro/ui/theme' import { useI18n } from '@d3ro/i18n' import type { HotkeyBinding } from '@d3ro/core/types' +import { formatHotkeyLabel } from '../utils/format-hotkey' // ── 키 이름 매핑 (Windows) ────────────────────────────── const KEY_DISPLAY_MAP: Record = { @@ -302,7 +303,7 @@ export function HotkeyRecordModal({ {currentBinding && ( - {t('hotkey.current', { keys: currentBinding.displayLabel })} + {t('hotkey.current', { keys: formatHotkeyLabel(currentBinding) })} )} diff --git a/apps/desktop/src/renderer/components/OnboardingModal.tsx b/apps/desktop/src/renderer/components/OnboardingModal.tsx index 4ebc14d..badca8f 100644 --- a/apps/desktop/src/renderer/components/OnboardingModal.tsx +++ b/apps/desktop/src/renderer/components/OnboardingModal.tsx @@ -18,6 +18,7 @@ import OpenInNewIcon from '@mui/icons-material/OpenInNew' import { d3roPalette, d3roFontMono, d3roShadow } from '@d3ro/ui/theme' import { Led } from '@d3ro/ui/components/ds' import { HotkeyRecordModal } from './HotkeyRecordModal' +import { formatHotkeyLabel, formatHotkeySegments } from '../utils/format-hotkey' import { useI18n } from '@d3ro/i18n' import type { HotkeyBinding, AudioDevice } from '@d3ro/core/types' @@ -167,9 +168,9 @@ export function OnboardingModal({ open, onClose }: OnboardingModalProps): React. {hotkeyBinding ? ( - {hotkeyBinding.displayLabel.split(' + ').map((key) => ( + {formatHotkeySegments(hotkeyBinding).map((key, idx) => ( {hotkeyBinding - ? t('onboarding.done.descWithKey', { key: hotkeyBinding.displayLabel }) + ? t('onboarding.done.descWithKey', { key: formatHotkeyLabel(hotkeyBinding) }) : t('onboarding.done.descNoKey')}