markupr 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/review-feedback.md +47 -0
- package/.eslintrc.json +35 -0
- package/.github/CODEOWNERS +16 -0
- package/.github/FUNDING.yml +1 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +56 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +54 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +89 -0
- package/.github/dependabot.yml +70 -0
- package/.github/workflows/ci.yml +184 -0
- package/.github/workflows/deploy-landing.yml +134 -0
- package/.github/workflows/nightly.yml +288 -0
- package/.github/workflows/release.yml +318 -0
- package/CHANGELOG.md +127 -0
- package/CLAUDE.md +137 -0
- package/CODE_OF_CONDUCT.md +9 -0
- package/CONTRIBUTING.md +390 -0
- package/LICENSE +21 -0
- package/PRODUCT_VISION.md +277 -0
- package/README.md +517 -0
- package/SECURITY.md +51 -0
- package/SIGNING_INSTRUCTIONS.md +284 -0
- package/assets/DMG_BACKGROUND_INSTRUCTIONS.md +130 -0
- package/assets/svg-source/dmg-background.svg +70 -0
- package/assets/svg-source/icon.svg +20 -0
- package/assets/svg-source/tray-icon-processing.svg +7 -0
- package/assets/svg-source/tray-icon-recording.svg +7 -0
- package/assets/svg-source/tray-icon.svg +6 -0
- package/assets/tray-complete.png +0 -0
- package/assets/tray-complete@2x.png +0 -0
- package/assets/tray-completeTemplate.png +0 -0
- package/assets/tray-completeTemplate@2x.png +0 -0
- package/assets/tray-error.png +0 -0
- package/assets/tray-error@2x.png +0 -0
- package/assets/tray-errorTemplate.png +0 -0
- package/assets/tray-errorTemplate@2x.png +0 -0
- package/assets/tray-icon-processing.png +0 -0
- package/assets/tray-icon-processing@2x.png +0 -0
- package/assets/tray-icon-processingTemplate.png +0 -0
- package/assets/tray-icon-processingTemplate@2x.png +0 -0
- package/assets/tray-icon-recording.png +0 -0
- package/assets/tray-icon-recording@2x.png +0 -0
- package/assets/tray-icon-recordingTemplate.png +0 -0
- package/assets/tray-icon-recordingTemplate@2x.png +0 -0
- package/assets/tray-icon.png +0 -0
- package/assets/tray-icon@2x.png +0 -0
- package/assets/tray-iconTemplate.png +0 -0
- package/assets/tray-iconTemplate@2x.png +0 -0
- package/assets/tray-idle.png +0 -0
- package/assets/tray-idle@2x.png +0 -0
- package/assets/tray-idleTemplate.png +0 -0
- package/assets/tray-idleTemplate@2x.png +0 -0
- package/assets/tray-processing-0.png +0 -0
- package/assets/tray-processing-0@2x.png +0 -0
- package/assets/tray-processing-0Template.png +0 -0
- package/assets/tray-processing-0Template@2x.png +0 -0
- package/assets/tray-processing-1.png +0 -0
- package/assets/tray-processing-1@2x.png +0 -0
- package/assets/tray-processing-1Template.png +0 -0
- package/assets/tray-processing-1Template@2x.png +0 -0
- package/assets/tray-processing-2.png +0 -0
- package/assets/tray-processing-2@2x.png +0 -0
- package/assets/tray-processing-2Template.png +0 -0
- package/assets/tray-processing-2Template@2x.png +0 -0
- package/assets/tray-processing-3.png +0 -0
- package/assets/tray-processing-3@2x.png +0 -0
- package/assets/tray-processing-3Template.png +0 -0
- package/assets/tray-processing-3Template@2x.png +0 -0
- package/assets/tray-processing.png +0 -0
- package/assets/tray-processing@2x.png +0 -0
- package/assets/tray-processingTemplate.png +0 -0
- package/assets/tray-processingTemplate@2x.png +0 -0
- package/assets/tray-recording.png +0 -0
- package/assets/tray-recording@2x.png +0 -0
- package/assets/tray-recordingTemplate.png +0 -0
- package/assets/tray-recordingTemplate@2x.png +0 -0
- package/build/DMG_BACKGROUND_SPEC.md +50 -0
- package/build/dmg-background.png +0 -0
- package/build/dmg-background@2x.png +0 -0
- package/build/entitlements.mac.inherit.plist +27 -0
- package/build/entitlements.mac.plist +41 -0
- package/build/favicon-16.png +0 -0
- package/build/favicon-180.png +0 -0
- package/build/favicon-192.png +0 -0
- package/build/favicon-32.png +0 -0
- package/build/favicon-48.png +0 -0
- package/build/favicon-512.png +0 -0
- package/build/favicon-64.png +0 -0
- package/build/icon-128.png +0 -0
- package/build/icon-16.png +0 -0
- package/build/icon-24.png +0 -0
- package/build/icon-256.png +0 -0
- package/build/icon-32.png +0 -0
- package/build/icon-48.png +0 -0
- package/build/icon-64.png +0 -0
- package/build/icon.icns +0 -0
- package/build/icon.ico +0 -0
- package/build/icon.iconset/icon_128x128.png +0 -0
- package/build/icon.iconset/icon_128x128@2x.png +0 -0
- package/build/icon.iconset/icon_16x16.png +0 -0
- package/build/icon.iconset/icon_16x16@2x.png +0 -0
- package/build/icon.iconset/icon_256x256.png +0 -0
- package/build/icon.iconset/icon_256x256@2x.png +0 -0
- package/build/icon.iconset/icon_32x32.png +0 -0
- package/build/icon.iconset/icon_32x32@2x.png +0 -0
- package/build/icon.iconset/icon_512x512.png +0 -0
- package/build/icon.iconset/icon_512x512@2x.png +0 -0
- package/build/icon.png +0 -0
- package/build/installer-header.bmp +0 -0
- package/build/installer-header.png +0 -0
- package/build/installer-sidebar.bmp +0 -0
- package/build/installer-sidebar.png +0 -0
- package/build/installer.nsh +45 -0
- package/build/overlay-processing.png +0 -0
- package/build/overlay-recording.png +0 -0
- package/build/toolbar-record.png +0 -0
- package/build/toolbar-screenshot.png +0 -0
- package/build/toolbar-settings.png +0 -0
- package/build/toolbar-stop.png +0 -0
- package/dist/main/index.mjs +12612 -0
- package/dist/preload/index.mjs +907 -0
- package/dist/renderer/assets/index-CCmUjl9K.js +19495 -0
- package/dist/renderer/assets/index-CUqz_Gs6.css +2270 -0
- package/dist/renderer/index.html +27 -0
- package/docs/AI_AGENT_QUICKSTART.md +42 -0
- package/docs/AI_PIPELINE_DESIGN.md +595 -0
- package/docs/API.md +514 -0
- package/docs/ARCHITECTURE.md +460 -0
- package/docs/CONFIGURATION.md +336 -0
- package/docs/DEVELOPMENT.md +508 -0
- package/docs/EXPORT_FORMATS.md +451 -0
- package/docs/GETTING_STARTED.md +236 -0
- package/docs/KEYBOARD_SHORTCUTS.md +334 -0
- package/docs/TROUBLESHOOTING.md +418 -0
- package/docs/landing/index.html +672 -0
- package/docs/landing/script.js +342 -0
- package/docs/landing/styles.css +1543 -0
- package/electron-builder.yml +140 -0
- package/electron.vite.config.ts +63 -0
- package/package.json +108 -0
- package/railway.json +12 -0
- package/scripts/build.mjs +51 -0
- package/scripts/generate-icons.mjs +314 -0
- package/scripts/generate-installer-images.cjs +253 -0
- package/scripts/generate-tray-icons.mjs +258 -0
- package/scripts/notarize.cjs +180 -0
- package/scripts/one-click-clean-test.sh +147 -0
- package/scripts/postinstall.mjs +36 -0
- package/scripts/setup-markupr.sh +55 -0
- package/setup +17 -0
- package/site/index.html +1835 -0
- package/site/package.json +11 -0
- package/site/railway.json +12 -0
- package/site/server.js +31 -0
- package/src/main/AutoUpdater.ts +392 -0
- package/src/main/CrashRecovery.ts +655 -0
- package/src/main/ErrorHandler.ts +703 -0
- package/src/main/HotkeyManager.ts +399 -0
- package/src/main/MenuManager.ts +529 -0
- package/src/main/PermissionManager.ts +420 -0
- package/src/main/SessionController.ts +1465 -0
- package/src/main/TrayManager.ts +540 -0
- package/src/main/ai/AIPipelineManager.ts +199 -0
- package/src/main/ai/ClaudeAnalyzer.ts +339 -0
- package/src/main/ai/ImageOptimizer.ts +176 -0
- package/src/main/ai/StructuredMarkdownBuilder.ts +379 -0
- package/src/main/ai/index.ts +16 -0
- package/src/main/ai/types.ts +258 -0
- package/src/main/analysis/ClarificationGenerator.ts +385 -0
- package/src/main/analysis/FeedbackAnalyzer.ts +531 -0
- package/src/main/analysis/index.ts +19 -0
- package/src/main/audio/AudioCapture.ts +978 -0
- package/src/main/audio/audioUtils.ts +100 -0
- package/src/main/audio/index.ts +20 -0
- package/src/main/capture/index.ts +1 -0
- package/src/main/index.ts +1693 -0
- package/src/main/ipc/captureHandlers.ts +272 -0
- package/src/main/ipc/index.ts +45 -0
- package/src/main/ipc/outputHandlers.ts +302 -0
- package/src/main/ipc/sessionHandlers.ts +56 -0
- package/src/main/ipc/settingsHandlers.ts +471 -0
- package/src/main/ipc/types.ts +56 -0
- package/src/main/ipc/windowHandlers.ts +277 -0
- package/src/main/output/ClipboardService.ts +369 -0
- package/src/main/output/ExportService.ts +539 -0
- package/src/main/output/FileManager.ts +416 -0
- package/src/main/output/MarkdownGenerator.ts +791 -0
- package/src/main/output/MarkdownPatcher.ts +299 -0
- package/src/main/output/index.ts +186 -0
- package/src/main/output/sessionAdapter.ts +207 -0
- package/src/main/output/templates/html-template.ts +553 -0
- package/src/main/pipeline/FrameExtractor.ts +330 -0
- package/src/main/pipeline/PostProcessor.ts +399 -0
- package/src/main/pipeline/TranscriptAnalyzer.ts +226 -0
- package/src/main/pipeline/index.ts +36 -0
- package/src/main/platform/WindowsTaskbar.ts +600 -0
- package/src/main/platform/index.ts +16 -0
- package/src/main/settings/SettingsManager.ts +730 -0
- package/src/main/settings/index.ts +19 -0
- package/src/main/transcription/ModelDownloadManager.ts +494 -0
- package/src/main/transcription/TierManager.ts +219 -0
- package/src/main/transcription/TranscriptionRecoveryService.ts +340 -0
- package/src/main/transcription/WhisperService.ts +748 -0
- package/src/main/transcription/index.ts +56 -0
- package/src/main/transcription/types.ts +135 -0
- package/src/main/windows/PopoverManager.ts +284 -0
- package/src/main/windows/TaskbarIntegration.ts +452 -0
- package/src/main/windows/index.ts +23 -0
- package/src/preload/index.ts +1047 -0
- package/src/renderer/App.tsx +515 -0
- package/src/renderer/AppWrapper.tsx +28 -0
- package/src/renderer/assets/logo-dark.svg +7 -0
- package/src/renderer/assets/logo.svg +7 -0
- package/src/renderer/audio/AudioCaptureRenderer.ts +454 -0
- package/src/renderer/capture/ScreenRecordingRenderer.ts +492 -0
- package/src/renderer/components/AnnotationOverlay.tsx +836 -0
- package/src/renderer/components/AudioWaveform.tsx +811 -0
- package/src/renderer/components/ClarificationQuestions.tsx +656 -0
- package/src/renderer/components/CountdownTimer.tsx +495 -0
- package/src/renderer/components/CrashRecoveryDialog.tsx +632 -0
- package/src/renderer/components/DonateButton.tsx +127 -0
- package/src/renderer/components/ErrorBoundary.tsx +308 -0
- package/src/renderer/components/ExportDialog.tsx +872 -0
- package/src/renderer/components/HotkeyHint.tsx +261 -0
- package/src/renderer/components/KeyboardShortcuts.tsx +787 -0
- package/src/renderer/components/ModelDownloadDialog.tsx +844 -0
- package/src/renderer/components/Onboarding.tsx +1830 -0
- package/src/renderer/components/ProcessingOverlay.tsx +157 -0
- package/src/renderer/components/RecordingOverlay.tsx +423 -0
- package/src/renderer/components/SessionHistory.tsx +1746 -0
- package/src/renderer/components/SessionReview.tsx +1321 -0
- package/src/renderer/components/SettingsPanel.tsx +217 -0
- package/src/renderer/components/Skeleton.tsx +347 -0
- package/src/renderer/components/StatusIndicator.tsx +86 -0
- package/src/renderer/components/ThemeProvider.tsx +429 -0
- package/src/renderer/components/Tooltip.tsx +370 -0
- package/src/renderer/components/TranscriptionPreview.tsx +183 -0
- package/src/renderer/components/TranscriptionTierSelector.tsx +640 -0
- package/src/renderer/components/UpdateNotification.tsx +377 -0
- package/src/renderer/components/WindowSelector.tsx +947 -0
- package/src/renderer/components/index.ts +99 -0
- package/src/renderer/components/primitives/ApiKeyInput.tsx +98 -0
- package/src/renderer/components/primitives/ColorPicker.tsx +65 -0
- package/src/renderer/components/primitives/DangerButton.tsx +45 -0
- package/src/renderer/components/primitives/DirectoryPicker.tsx +41 -0
- package/src/renderer/components/primitives/Dropdown.tsx +34 -0
- package/src/renderer/components/primitives/KeyRecorder.tsx +117 -0
- package/src/renderer/components/primitives/SettingsSection.tsx +32 -0
- package/src/renderer/components/primitives/Slider.tsx +43 -0
- package/src/renderer/components/primitives/Toggle.tsx +36 -0
- package/src/renderer/components/primitives/index.ts +10 -0
- package/src/renderer/components/settings/AdvancedTab.tsx +174 -0
- package/src/renderer/components/settings/AppearanceTab.tsx +77 -0
- package/src/renderer/components/settings/GeneralTab.tsx +40 -0
- package/src/renderer/components/settings/HotkeysTab.tsx +79 -0
- package/src/renderer/components/settings/RecordingTab.tsx +84 -0
- package/src/renderer/components/settings/index.ts +9 -0
- package/src/renderer/components/settings/settingsStyles.ts +673 -0
- package/src/renderer/components/settings/tabConfig.tsx +85 -0
- package/src/renderer/components/settings/useSettingsPanel.ts +447 -0
- package/src/renderer/contexts/ProcessingContext.tsx +227 -0
- package/src/renderer/contexts/RecordingContext.tsx +683 -0
- package/src/renderer/contexts/UIContext.tsx +326 -0
- package/src/renderer/contexts/index.ts +24 -0
- package/src/renderer/donateMessages.ts +69 -0
- package/src/renderer/hooks/index.ts +75 -0
- package/src/renderer/hooks/useAnimation.tsx +544 -0
- package/src/renderer/hooks/useTheme.ts +313 -0
- package/src/renderer/index.html +26 -0
- package/src/renderer/main.tsx +52 -0
- package/src/renderer/styles/animations.css +1093 -0
- package/src/renderer/styles/app-shell.css +662 -0
- package/src/renderer/styles/globals.css +515 -0
- package/src/renderer/styles/theme.ts +578 -0
- package/src/renderer/types/electron.d.ts +385 -0
- package/src/shared/hotkeys.ts +283 -0
- package/src/shared/types.ts +809 -0
- package/tests/clipboard.test.ts +228 -0
- package/tests/e2e/criticalPaths.test.ts +594 -0
- package/tests/feedbackAnalyzer.test.ts +303 -0
- package/tests/integration/sessionFlow.test.ts +583 -0
- package/tests/markdownGenerator.test.ts +418 -0
- package/tests/output.test.ts +96 -0
- package/tests/setup.ts +486 -0
- package/tests/unit/appIntegration.test.ts +676 -0
- package/tests/unit/appViewState.test.ts +281 -0
- package/tests/unit/audioIpcChannels.test.ts +17 -0
- package/tests/unit/exportService.test.ts +492 -0
- package/tests/unit/hotkeys.test.ts +92 -0
- package/tests/unit/navigationPreload.test.ts +94 -0
- package/tests/unit/onboardingFlow.test.ts +345 -0
- package/tests/unit/permissionManager.test.ts +175 -0
- package/tests/unit/permissionManagerExpanded.test.ts +296 -0
- package/tests/unit/screenRecordingRenderer.test.ts +368 -0
- package/tests/unit/sessionController.test.ts +515 -0
- package/tests/unit/tierManager.test.ts +61 -0
- package/tests/unit/tierManagerExpanded.test.ts +142 -0
- package/tests/unit/transcriptAnalyzer.test.ts +64 -0
- package/tsconfig.json +25 -0
- package/vitest.config.ts +46 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* markupr Settings Panel
|
|
3
|
+
*
|
|
4
|
+
* Thin composition shell. State lives in useSettingsPanel hook,
|
|
5
|
+
* primitives in ./primitives/, tabs in ./settings/.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React, { useMemo } from 'react';
|
|
9
|
+
import { useTheme } from '../hooks/useTheme';
|
|
10
|
+
import { DonateButton } from './DonateButton';
|
|
11
|
+
import { GeneralTab, RecordingTab, AppearanceTab, HotkeysTab, AdvancedTab, TABS } from './settings';
|
|
12
|
+
import type { SettingsTab } from './settings';
|
|
13
|
+
import { styles } from './settings/settingsStyles';
|
|
14
|
+
import { useSettingsPanel } from './settings/useSettingsPanel';
|
|
15
|
+
|
|
16
|
+
interface SettingsPanelProps {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
initialTab?: SettingsTab;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const SettingsPanel: React.FC<SettingsPanelProps> = ({
|
|
23
|
+
isOpen,
|
|
24
|
+
onClose,
|
|
25
|
+
initialTab = 'general',
|
|
26
|
+
}) => {
|
|
27
|
+
const { colors } = useTheme();
|
|
28
|
+
const s = useSettingsPanel(isOpen, onClose, initialTab);
|
|
29
|
+
|
|
30
|
+
const renderTabContent = useMemo(() => {
|
|
31
|
+
switch (s.activeTab) {
|
|
32
|
+
case 'general':
|
|
33
|
+
return <GeneralTab settings={s.settings} onSettingChange={s.handleSettingChange} onResetSection={s.resetGeneralSection} />;
|
|
34
|
+
case 'recording':
|
|
35
|
+
return <RecordingTab settings={s.settings} audioDevices={s.audioDevices} onSettingChange={s.handleSettingChange} onResetSection={s.resetRecordingSection} />;
|
|
36
|
+
case 'appearance':
|
|
37
|
+
return <AppearanceTab settings={s.settings} onSettingChange={s.handleSettingChange} onResetSection={s.resetAppearanceSection} />;
|
|
38
|
+
case 'hotkeys':
|
|
39
|
+
return <HotkeysTab settings={s.settings} onHotkeyChange={s.handleHotkeyChange} onResetSection={s.resetHotkeysSection} />;
|
|
40
|
+
case 'advanced':
|
|
41
|
+
return (
|
|
42
|
+
<AdvancedTab
|
|
43
|
+
settings={s.settings}
|
|
44
|
+
openAiApiKey={s.openAiApiKey}
|
|
45
|
+
anthropicApiKey={s.anthropicApiKey}
|
|
46
|
+
onSettingChange={s.handleSettingChange}
|
|
47
|
+
onOpenAiApiKeyChange={s.handleOpenAiApiKeyChange}
|
|
48
|
+
onToggleOpenAiApiKeyVisibility={s.handleToggleOpenAiApiKeyVisibility}
|
|
49
|
+
onTestOpenAiApiKey={s.handleTestOpenAiApiKey}
|
|
50
|
+
onAnthropicApiKeyChange={s.handleAnthropicApiKeyChange}
|
|
51
|
+
onToggleAnthropicApiKeyVisibility={s.handleToggleAnthropicApiKeyVisibility}
|
|
52
|
+
onTestAnthropicApiKey={s.handleTestAnthropicApiKey}
|
|
53
|
+
onClearAllData={s.handleClearAllData}
|
|
54
|
+
onExportSettings={s.handleExportSettings}
|
|
55
|
+
onImportSettings={s.handleImportSettings}
|
|
56
|
+
onResetSection={s.resetAdvancedSection}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
59
|
+
default:
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}, [
|
|
63
|
+
s.activeTab, s.settings, s.audioDevices, s.openAiApiKey, s.anthropicApiKey,
|
|
64
|
+
s.handleSettingChange, s.handleHotkeyChange,
|
|
65
|
+
s.handleOpenAiApiKeyChange, s.handleToggleOpenAiApiKeyVisibility, s.handleTestOpenAiApiKey,
|
|
66
|
+
s.handleAnthropicApiKeyChange, s.handleToggleAnthropicApiKeyVisibility, s.handleTestAnthropicApiKey,
|
|
67
|
+
s.handleClearAllData, s.handleExportSettings, s.handleImportSettings,
|
|
68
|
+
s.resetGeneralSection, s.resetRecordingSection, s.resetAppearanceSection, s.resetHotkeysSection, s.resetAdvancedSection,
|
|
69
|
+
]);
|
|
70
|
+
|
|
71
|
+
if (!isOpen) return null;
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<div style={styles.overlay}>
|
|
75
|
+
<div style={styles.backdrop} onClick={onClose} />
|
|
76
|
+
|
|
77
|
+
<div
|
|
78
|
+
ref={s.panelRef}
|
|
79
|
+
style={{
|
|
80
|
+
...styles.panel,
|
|
81
|
+
opacity: s.isAnimating ? 0 : 1,
|
|
82
|
+
transform: s.isAnimating ? 'scale(0.95) translateY(10px)' : 'scale(1) translateY(0)',
|
|
83
|
+
}}
|
|
84
|
+
>
|
|
85
|
+
{/* Header */}
|
|
86
|
+
<div style={styles.header}>
|
|
87
|
+
<div style={styles.headerTitleWrap}>
|
|
88
|
+
<h2 style={styles.headerTitle}>Settings</h2>
|
|
89
|
+
{!s.hasRequiredByokKeys && (
|
|
90
|
+
<button
|
|
91
|
+
type="button"
|
|
92
|
+
style={styles.byokBadge}
|
|
93
|
+
onClick={() => s.setActiveTab('advanced')}
|
|
94
|
+
title="Open BYOK key setup"
|
|
95
|
+
>
|
|
96
|
+
BYOK Setup Required
|
|
97
|
+
</button>
|
|
98
|
+
)}
|
|
99
|
+
</div>
|
|
100
|
+
<button style={styles.closeButton} onClick={onClose} aria-label="Close settings">
|
|
101
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
102
|
+
<path d="M5 5l10 10M15 5l-10 10" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
|
|
103
|
+
</svg>
|
|
104
|
+
</button>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
{/* Content */}
|
|
108
|
+
<div style={{ ...styles.content, flexDirection: s.isCompact ? 'column' : 'row' }}>
|
|
109
|
+
<nav style={{ ...styles.sidebar, ...(s.isCompact ? styles.sidebarCompact : {}) }}>
|
|
110
|
+
{TABS.map((tab) => (
|
|
111
|
+
<button
|
|
112
|
+
key={tab.id}
|
|
113
|
+
style={{
|
|
114
|
+
...styles.tabButton,
|
|
115
|
+
...(s.isCompact ? styles.tabButtonCompact : {}),
|
|
116
|
+
backgroundColor: s.activeTab === tab.id ? 'rgba(10, 132, 255, 0.16)' : 'transparent',
|
|
117
|
+
color: s.activeTab === tab.id ? colors.text.link : colors.text.tertiary,
|
|
118
|
+
borderColor: s.activeTab === tab.id ? 'rgba(10, 132, 255, 0.32)' : 'transparent',
|
|
119
|
+
}}
|
|
120
|
+
onClick={() => s.setActiveTab(tab.id)}
|
|
121
|
+
aria-selected={s.activeTab === tab.id}
|
|
122
|
+
>
|
|
123
|
+
{tab.icon}
|
|
124
|
+
<span style={styles.tabLabel}>{tab.label}</span>
|
|
125
|
+
</button>
|
|
126
|
+
))}
|
|
127
|
+
</nav>
|
|
128
|
+
|
|
129
|
+
<div style={{ ...styles.tabPanel, ...(s.isCompact ? styles.tabPanelCompact : {}) }}>
|
|
130
|
+
{renderTabContent}
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
{/* Footer */}
|
|
135
|
+
<div style={styles.footer}>
|
|
136
|
+
<div style={styles.footerLeft}>
|
|
137
|
+
<span style={styles.footerText}>
|
|
138
|
+
markupr {s.appVersion ? `v${s.appVersion}` : ''} {s.hasChanges && <span style={styles.savedIndicator}>Changes saved</span>}
|
|
139
|
+
</span>
|
|
140
|
+
<DonateButton />
|
|
141
|
+
</div>
|
|
142
|
+
<button
|
|
143
|
+
style={styles.resetAllButton}
|
|
144
|
+
onClick={async () => {
|
|
145
|
+
await s.resetGeneralSection();
|
|
146
|
+
await s.resetRecordingSection();
|
|
147
|
+
await s.resetAppearanceSection();
|
|
148
|
+
await s.resetHotkeysSection();
|
|
149
|
+
await s.resetAdvancedSection();
|
|
150
|
+
}}
|
|
151
|
+
>
|
|
152
|
+
Reset All to Defaults
|
|
153
|
+
</button>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
{/* spin keyframe provided by animations.css; form element styles below */}
|
|
158
|
+
<style>
|
|
159
|
+
{`
|
|
160
|
+
input[type="range"]::-webkit-slider-thumb {
|
|
161
|
+
-webkit-appearance: none;
|
|
162
|
+
appearance: none;
|
|
163
|
+
width: 16px;
|
|
164
|
+
height: 16px;
|
|
165
|
+
border-radius: 50%;
|
|
166
|
+
background: var(--accent-default);
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
border: 2px solid var(--bg-primary);
|
|
169
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
input[type="range"]::-webkit-slider-runnable-track {
|
|
173
|
+
width: 100%;
|
|
174
|
+
height: 4px;
|
|
175
|
+
background: rgba(124, 137, 160, 0.4);
|
|
176
|
+
border-radius: 2px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
select {
|
|
180
|
+
-webkit-appearance: none;
|
|
181
|
+
appearance: none;
|
|
182
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238f9db5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
183
|
+
background-repeat: no-repeat;
|
|
184
|
+
background-position: right 12px center;
|
|
185
|
+
padding-right: 36px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
select:focus {
|
|
189
|
+
outline: none;
|
|
190
|
+
border-color: var(--accent-default);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
input[type="color"] {
|
|
194
|
+
-webkit-appearance: none;
|
|
195
|
+
appearance: none;
|
|
196
|
+
border: none;
|
|
197
|
+
width: 32px;
|
|
198
|
+
height: 32px;
|
|
199
|
+
padding: 0;
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
input[type="color"]::-webkit-color-swatch-wrapper {
|
|
204
|
+
padding: 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
input[type="color"]::-webkit-color-swatch {
|
|
208
|
+
border: none;
|
|
209
|
+
border-radius: 50%;
|
|
210
|
+
}
|
|
211
|
+
`}
|
|
212
|
+
</style>
|
|
213
|
+
</div>
|
|
214
|
+
);
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
export default SettingsPanel;
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeleton Loading Components
|
|
3
|
+
*
|
|
4
|
+
* Premium shimmer-effect loading placeholders that match the markupr design system.
|
|
5
|
+
* Use these to indicate loading states while maintaining visual hierarchy.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// Types
|
|
12
|
+
// ============================================================================
|
|
13
|
+
|
|
14
|
+
interface SkeletonProps {
|
|
15
|
+
/** Width of the skeleton (CSS value) */
|
|
16
|
+
width?: string | number;
|
|
17
|
+
/** Height of the skeleton (CSS value) */
|
|
18
|
+
height?: string | number;
|
|
19
|
+
/** Border radius (CSS value or true for default 8px) */
|
|
20
|
+
rounded?: boolean | string | number;
|
|
21
|
+
/** Use circular shape */
|
|
22
|
+
circle?: boolean;
|
|
23
|
+
/** Animation type */
|
|
24
|
+
animation?: 'shimmer' | 'pulse' | 'none';
|
|
25
|
+
/** Additional CSS class */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** Additional inline styles */
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface SkeletonTextProps {
|
|
32
|
+
/** Number of lines to render */
|
|
33
|
+
lines?: number;
|
|
34
|
+
/** Width of the last line (creates natural variation) */
|
|
35
|
+
lastLineWidth?: string | number;
|
|
36
|
+
/** Gap between lines */
|
|
37
|
+
gap?: number;
|
|
38
|
+
/** Animation type */
|
|
39
|
+
animation?: 'shimmer' | 'pulse' | 'none';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface SkeletonCardProps {
|
|
43
|
+
/** Show thumbnail placeholder */
|
|
44
|
+
showThumbnail?: boolean;
|
|
45
|
+
/** Number of text lines */
|
|
46
|
+
lines?: number;
|
|
47
|
+
/** Show avatar */
|
|
48
|
+
showAvatar?: boolean;
|
|
49
|
+
/** Animation type */
|
|
50
|
+
animation?: 'shimmer' | 'pulse' | 'none';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ============================================================================
|
|
54
|
+
// Base Skeleton Component
|
|
55
|
+
// ============================================================================
|
|
56
|
+
|
|
57
|
+
export const Skeleton: React.FC<SkeletonProps> = ({
|
|
58
|
+
width,
|
|
59
|
+
height,
|
|
60
|
+
rounded = true,
|
|
61
|
+
circle = false,
|
|
62
|
+
animation = 'shimmer',
|
|
63
|
+
className = '',
|
|
64
|
+
style = {},
|
|
65
|
+
}) => {
|
|
66
|
+
const getBorderRadius = () => {
|
|
67
|
+
if (circle) return '50%';
|
|
68
|
+
if (rounded === true) return 8;
|
|
69
|
+
if (rounded === false) return 0;
|
|
70
|
+
return rounded;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const animationClass =
|
|
74
|
+
animation === 'shimmer'
|
|
75
|
+
? 'ff-skeleton'
|
|
76
|
+
: animation === 'pulse'
|
|
77
|
+
? 'ff-skeleton-pulse'
|
|
78
|
+
: '';
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<div
|
|
82
|
+
className={`${animationClass} ${className}`}
|
|
83
|
+
style={{
|
|
84
|
+
width: width ?? '100%',
|
|
85
|
+
height: height ?? 16,
|
|
86
|
+
borderRadius: getBorderRadius(),
|
|
87
|
+
backgroundColor: 'rgba(55, 65, 81, 0.3)',
|
|
88
|
+
...style,
|
|
89
|
+
}}
|
|
90
|
+
/>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// ============================================================================
|
|
95
|
+
// Skeleton Text (Multiple lines)
|
|
96
|
+
// ============================================================================
|
|
97
|
+
|
|
98
|
+
export const SkeletonText: React.FC<SkeletonTextProps> = ({
|
|
99
|
+
lines = 3,
|
|
100
|
+
lastLineWidth = '70%',
|
|
101
|
+
gap = 8,
|
|
102
|
+
animation = 'shimmer',
|
|
103
|
+
}) => {
|
|
104
|
+
return (
|
|
105
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap }}>
|
|
106
|
+
{Array.from({ length: lines }).map((_, index) => (
|
|
107
|
+
<Skeleton
|
|
108
|
+
key={index}
|
|
109
|
+
width={index === lines - 1 ? lastLineWidth : '100%'}
|
|
110
|
+
height={16}
|
|
111
|
+
animation={animation}
|
|
112
|
+
style={{
|
|
113
|
+
animationDelay: `${index * 100}ms`,
|
|
114
|
+
}}
|
|
115
|
+
/>
|
|
116
|
+
))}
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// ============================================================================
|
|
122
|
+
// Skeleton Avatar
|
|
123
|
+
// ============================================================================
|
|
124
|
+
|
|
125
|
+
export const SkeletonAvatar: React.FC<{
|
|
126
|
+
size?: number;
|
|
127
|
+
animation?: 'shimmer' | 'pulse' | 'none';
|
|
128
|
+
}> = ({ size = 40, animation = 'shimmer' }) => {
|
|
129
|
+
return <Skeleton width={size} height={size} circle animation={animation} />;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// ============================================================================
|
|
133
|
+
// Skeleton Thumbnail
|
|
134
|
+
// ============================================================================
|
|
135
|
+
|
|
136
|
+
export const SkeletonThumbnail: React.FC<{
|
|
137
|
+
width?: string | number;
|
|
138
|
+
aspectRatio?: string;
|
|
139
|
+
animation?: 'shimmer' | 'pulse' | 'none';
|
|
140
|
+
}> = ({ width = '100%', aspectRatio = '16/9', animation = 'shimmer' }) => {
|
|
141
|
+
return (
|
|
142
|
+
<Skeleton
|
|
143
|
+
width={width}
|
|
144
|
+
height="auto"
|
|
145
|
+
rounded={8}
|
|
146
|
+
animation={animation}
|
|
147
|
+
style={{
|
|
148
|
+
aspectRatio,
|
|
149
|
+
}}
|
|
150
|
+
/>
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// ============================================================================
|
|
155
|
+
// Skeleton Button
|
|
156
|
+
// ============================================================================
|
|
157
|
+
|
|
158
|
+
export const SkeletonButton: React.FC<{
|
|
159
|
+
width?: string | number;
|
|
160
|
+
height?: number;
|
|
161
|
+
animation?: 'shimmer' | 'pulse' | 'none';
|
|
162
|
+
}> = ({ width = 120, height = 40, animation = 'shimmer' }) => {
|
|
163
|
+
return <Skeleton width={width} height={height} rounded={8} animation={animation} />;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// ============================================================================
|
|
167
|
+
// Skeleton Card (Composite)
|
|
168
|
+
// ============================================================================
|
|
169
|
+
|
|
170
|
+
export const SkeletonCard: React.FC<SkeletonCardProps> = ({
|
|
171
|
+
showThumbnail = true,
|
|
172
|
+
lines = 2,
|
|
173
|
+
showAvatar = false,
|
|
174
|
+
animation = 'shimmer',
|
|
175
|
+
}) => {
|
|
176
|
+
return (
|
|
177
|
+
<div style={styles.card}>
|
|
178
|
+
{showThumbnail && (
|
|
179
|
+
<SkeletonThumbnail animation={animation} />
|
|
180
|
+
)}
|
|
181
|
+
<div style={styles.cardContent}>
|
|
182
|
+
{showAvatar && (
|
|
183
|
+
<div style={styles.avatarRow}>
|
|
184
|
+
<SkeletonAvatar size={32} animation={animation} />
|
|
185
|
+
<div style={{ flex: 1 }}>
|
|
186
|
+
<Skeleton width="60%" height={14} animation={animation} />
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
)}
|
|
190
|
+
<Skeleton
|
|
191
|
+
width="80%"
|
|
192
|
+
height={18}
|
|
193
|
+
animation={animation}
|
|
194
|
+
style={{ marginBottom: 8 }}
|
|
195
|
+
/>
|
|
196
|
+
<SkeletonText lines={lines} animation={animation} />
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// ============================================================================
|
|
203
|
+
// Skeleton List Item
|
|
204
|
+
// ============================================================================
|
|
205
|
+
|
|
206
|
+
export const SkeletonListItem: React.FC<{
|
|
207
|
+
showIcon?: boolean;
|
|
208
|
+
showAction?: boolean;
|
|
209
|
+
animation?: 'shimmer' | 'pulse' | 'none';
|
|
210
|
+
}> = ({ showIcon = true, showAction = false, animation = 'shimmer' }) => {
|
|
211
|
+
return (
|
|
212
|
+
<div style={styles.listItem}>
|
|
213
|
+
{showIcon && <SkeletonAvatar size={24} animation={animation} />}
|
|
214
|
+
<div style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
215
|
+
<Skeleton width="70%" height={14} animation={animation} />
|
|
216
|
+
<Skeleton width="40%" height={12} animation={animation} />
|
|
217
|
+
</div>
|
|
218
|
+
{showAction && <SkeletonButton width={80} height={32} animation={animation} />}
|
|
219
|
+
</div>
|
|
220
|
+
);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
// ============================================================================
|
|
224
|
+
// Skeleton Feedback Item (markupr specific)
|
|
225
|
+
// ============================================================================
|
|
226
|
+
|
|
227
|
+
export const SkeletonFeedbackItem: React.FC<{
|
|
228
|
+
showThumbnail?: boolean;
|
|
229
|
+
animation?: 'shimmer' | 'pulse' | 'none';
|
|
230
|
+
}> = ({ showThumbnail = true, animation = 'shimmer' }) => {
|
|
231
|
+
return (
|
|
232
|
+
<div style={styles.feedbackItem}>
|
|
233
|
+
{/* Drag handle */}
|
|
234
|
+
<div style={styles.dragHandle}>
|
|
235
|
+
<Skeleton width={12} height={20} rounded={2} animation={animation} />
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
{/* Content */}
|
|
239
|
+
<div style={{ flex: 1 }}>
|
|
240
|
+
{/* Header with tags */}
|
|
241
|
+
<div style={styles.feedbackHeader}>
|
|
242
|
+
<Skeleton width={60} height={16} animation={animation} />
|
|
243
|
+
<Skeleton width={50} height={20} rounded={6} animation={animation} />
|
|
244
|
+
<Skeleton width={50} height={20} rounded={6} animation={animation} />
|
|
245
|
+
</div>
|
|
246
|
+
|
|
247
|
+
{/* Transcription */}
|
|
248
|
+
<SkeletonText lines={2} lastLineWidth="60%" gap={6} animation={animation} />
|
|
249
|
+
|
|
250
|
+
{/* Thumbnails */}
|
|
251
|
+
{showThumbnail && (
|
|
252
|
+
<div style={styles.thumbnailRow}>
|
|
253
|
+
<Skeleton width={60} height={45} rounded={6} animation={animation} />
|
|
254
|
+
<Skeleton width={60} height={45} rounded={6} animation={animation} />
|
|
255
|
+
</div>
|
|
256
|
+
)}
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
);
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
// ============================================================================
|
|
263
|
+
// Skeleton Window Source (Window Selector specific)
|
|
264
|
+
// ============================================================================
|
|
265
|
+
|
|
266
|
+
export const SkeletonWindowSource: React.FC<{
|
|
267
|
+
animation?: 'shimmer' | 'pulse' | 'none';
|
|
268
|
+
}> = ({ animation = 'shimmer' }) => {
|
|
269
|
+
return (
|
|
270
|
+
<div style={styles.windowSource}>
|
|
271
|
+
<Skeleton width={104} height={64} rounded={8} animation={animation} />
|
|
272
|
+
<Skeleton width="80%" height={11} animation={animation} />
|
|
273
|
+
<Skeleton width={12} height={12} circle animation={animation} />
|
|
274
|
+
</div>
|
|
275
|
+
);
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
// ============================================================================
|
|
279
|
+
// Styles
|
|
280
|
+
// ============================================================================
|
|
281
|
+
|
|
282
|
+
const styles: Record<string, React.CSSProperties> = {
|
|
283
|
+
card: {
|
|
284
|
+
backgroundColor: 'rgba(31, 41, 55, 0.6)',
|
|
285
|
+
borderRadius: 12,
|
|
286
|
+
border: '1px solid rgba(75, 85, 99, 0.3)',
|
|
287
|
+
overflow: 'hidden',
|
|
288
|
+
},
|
|
289
|
+
cardContent: {
|
|
290
|
+
padding: 16,
|
|
291
|
+
},
|
|
292
|
+
avatarRow: {
|
|
293
|
+
display: 'flex',
|
|
294
|
+
alignItems: 'center',
|
|
295
|
+
gap: 12,
|
|
296
|
+
marginBottom: 12,
|
|
297
|
+
},
|
|
298
|
+
listItem: {
|
|
299
|
+
display: 'flex',
|
|
300
|
+
alignItems: 'center',
|
|
301
|
+
gap: 12,
|
|
302
|
+
padding: '12px 16px',
|
|
303
|
+
backgroundColor: 'rgba(31, 41, 55, 0.4)',
|
|
304
|
+
borderRadius: 8,
|
|
305
|
+
},
|
|
306
|
+
feedbackItem: {
|
|
307
|
+
display: 'flex',
|
|
308
|
+
gap: 12,
|
|
309
|
+
padding: 16,
|
|
310
|
+
backgroundColor: 'rgba(31, 41, 55, 0.6)',
|
|
311
|
+
borderRadius: 12,
|
|
312
|
+
border: '1px solid rgba(75, 85, 99, 0.3)',
|
|
313
|
+
},
|
|
314
|
+
dragHandle: {
|
|
315
|
+
display: 'flex',
|
|
316
|
+
alignItems: 'center',
|
|
317
|
+
justifyContent: 'center',
|
|
318
|
+
width: 20,
|
|
319
|
+
},
|
|
320
|
+
feedbackHeader: {
|
|
321
|
+
display: 'flex',
|
|
322
|
+
alignItems: 'center',
|
|
323
|
+
gap: 8,
|
|
324
|
+
marginBottom: 10,
|
|
325
|
+
},
|
|
326
|
+
thumbnailRow: {
|
|
327
|
+
display: 'flex',
|
|
328
|
+
gap: 8,
|
|
329
|
+
marginTop: 12,
|
|
330
|
+
},
|
|
331
|
+
windowSource: {
|
|
332
|
+
display: 'flex',
|
|
333
|
+
flexDirection: 'column',
|
|
334
|
+
alignItems: 'center',
|
|
335
|
+
padding: 12,
|
|
336
|
+
borderRadius: 12,
|
|
337
|
+
border: '2px solid transparent',
|
|
338
|
+
backgroundColor: 'rgba(255, 255, 255, 0.04)',
|
|
339
|
+
gap: 8,
|
|
340
|
+
},
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
// ============================================================================
|
|
344
|
+
// Exports
|
|
345
|
+
// ============================================================================
|
|
346
|
+
|
|
347
|
+
export default Skeleton;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status Indicator Component
|
|
3
|
+
*
|
|
4
|
+
* Shows the current recording/processing status with visual feedback
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { SessionStatus } from '../../shared/types';
|
|
9
|
+
import { useTheme } from '../hooks/useTheme';
|
|
10
|
+
|
|
11
|
+
interface StatusIndicatorProps {
|
|
12
|
+
status: SessionStatus;
|
|
13
|
+
error?: string | null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const StatusIndicator: React.FC<StatusIndicatorProps> = ({ status, error }) => {
|
|
17
|
+
const { colors } = useTheme();
|
|
18
|
+
|
|
19
|
+
const getColor = (): string => {
|
|
20
|
+
switch (status) {
|
|
21
|
+
case 'recording':
|
|
22
|
+
return colors.status.error;
|
|
23
|
+
case 'processing':
|
|
24
|
+
return colors.status.warning;
|
|
25
|
+
case 'complete':
|
|
26
|
+
return colors.status.success;
|
|
27
|
+
case 'error':
|
|
28
|
+
return colors.status.error;
|
|
29
|
+
default:
|
|
30
|
+
return '#8e8e93';
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const getText = (): string => {
|
|
35
|
+
switch (status) {
|
|
36
|
+
case 'recording':
|
|
37
|
+
return 'Recording...';
|
|
38
|
+
case 'processing':
|
|
39
|
+
return 'Processing...';
|
|
40
|
+
case 'complete':
|
|
41
|
+
return 'Copied to clipboard!';
|
|
42
|
+
case 'error':
|
|
43
|
+
return error || 'Error occurred';
|
|
44
|
+
default:
|
|
45
|
+
return 'Ready';
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const color = getColor();
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<div style={styles.container} role="status" aria-live={status === 'error' ? 'assertive' : 'polite'}>
|
|
53
|
+
<div
|
|
54
|
+
style={{
|
|
55
|
+
...styles.dot,
|
|
56
|
+
backgroundColor: color,
|
|
57
|
+
boxShadow: status === 'recording' ? `0 0 8px ${color}` : 'none',
|
|
58
|
+
animation: status === 'recording' ? 'pulse 1.5s ease-in-out infinite' : 'none',
|
|
59
|
+
}}
|
|
60
|
+
/>
|
|
61
|
+
<span style={styles.text}>{getText()}</span>
|
|
62
|
+
{/* pulse keyframe provided by animations.css */}
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const styles: Record<string, React.CSSProperties> = {
|
|
68
|
+
container: {
|
|
69
|
+
display: 'flex',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
gap: 12,
|
|
72
|
+
},
|
|
73
|
+
dot: {
|
|
74
|
+
width: 10,
|
|
75
|
+
height: 10,
|
|
76
|
+
borderRadius: '50%',
|
|
77
|
+
transition: 'all 0.2s ease',
|
|
78
|
+
},
|
|
79
|
+
text: {
|
|
80
|
+
color: '#eef3ff',
|
|
81
|
+
fontSize: 13,
|
|
82
|
+
fontWeight: 500,
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export default StatusIndicator;
|