From efac69036244565c7be14f0103ffee405eb527ad Mon Sep 17 00:00:00 2001 From: Yun Chan Date: Wed, 22 Jul 2026 02:37:32 +0900 Subject: [PATCH 01/10] =?UTF-8?q?refactor(ui):=20web/admin=20amber->main?= =?UTF-8?q?=20=EC=B9=98=ED=99=98=20+=20theme.ts=20deprecated=20=EB=B3=84?= =?UTF-8?q?=EC=B9=AD=20=EC=A0=9C=EA=B1=B0=20(WS-AMBER)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - apps/web 11건 + apps/admin 10건 accent.amber->main 치환 - packages/ui/src/theme.ts에서 amber/amberDim/amberGlow @deprecated 별칭 제거 (본체 main/dim/glow 유지). 전 모노레포 amber 잔여 0건 확인. SKIP: site/src/tokens.ts(별도 토큰 계통, d3roPalette 비의존) 정책: docs/REFACTOR_POLICY.md DP1, 이식 인사이트 P7 --- apps/admin/src/app/login/page.tsx | 4 ++-- apps/admin/src/components/audit-diff-viewer.tsx | 2 +- apps/admin/src/components/charts/dau-chart.tsx | 4 ++-- apps/admin/src/components/charts/feature-usage-chart.tsx | 2 +- apps/admin/src/components/charts/top-users-chart.tsx | 2 +- apps/admin/src/components/payment-history.tsx | 6 +++--- apps/web/src/app/(app)/billing/page.tsx | 4 ++-- apps/web/src/app/(app)/meetings/[id]/page.tsx | 2 +- apps/web/src/app/accept-invite/page.tsx | 4 ++-- apps/web/src/components/dashboard/meetings-trend-chart.tsx | 2 +- apps/web/src/components/layout/sidebar.tsx | 4 ++-- apps/web/src/components/meetings/markdown-preview.tsx | 4 ++-- apps/web/src/components/record/mic-recorder.tsx | 2 +- packages/ui/src/theme.ts | 4 ---- 14 files changed, 21 insertions(+), 25 deletions(-) diff --git a/apps/admin/src/app/login/page.tsx b/apps/admin/src/app/login/page.tsx index 19d27f15..9fa92fe9 100644 --- a/apps/admin/src/app/login/page.tsx +++ b/apps/admin/src/app/login/page.tsx @@ -31,10 +31,10 @@ export default function AdminLoginPage(): React.ReactElement { onClick={() => void handleGoogleLogin()} fullWidth sx={{ - bgcolor: d3roPalette.accent.amber, + bgcolor: d3roPalette.accent.main, color: d3roPalette.bg.app, fontWeight: 600, - '&:hover': { bgcolor: d3roPalette.accent.amber, filter: 'brightness(1.1)' }, + '&:hover': { bgcolor: d3roPalette.accent.main, filter: 'brightness(1.1)' }, }} > Sign in with Google diff --git a/apps/admin/src/components/audit-diff-viewer.tsx b/apps/admin/src/components/audit-diff-viewer.tsx index 29b446af..27e27fd4 100644 --- a/apps/admin/src/components/audit-diff-viewer.tsx +++ b/apps/admin/src/components/audit-diff-viewer.tsx @@ -56,7 +56,7 @@ function computeDiff( const typeColors: Record = { added: d3roPalette.tag.green, removed: d3roPalette.tag.red, - changed: d3roPalette.accent.amber, + changed: d3roPalette.accent.main, unchanged: d3roPalette.text.muted, } diff --git a/apps/admin/src/components/charts/dau-chart.tsx b/apps/admin/src/components/charts/dau-chart.tsx index 8cfc73fe..b71d6175 100644 --- a/apps/admin/src/components/charts/dau-chart.tsx +++ b/apps/admin/src/components/charts/dau-chart.tsx @@ -48,9 +48,9 @@ export function DauChart({ data }: DauChartProps): React.ReactElement { diff --git a/apps/admin/src/components/charts/feature-usage-chart.tsx b/apps/admin/src/components/charts/feature-usage-chart.tsx index 64a97ff4..013dc3f4 100644 --- a/apps/admin/src/components/charts/feature-usage-chart.tsx +++ b/apps/admin/src/components/charts/feature-usage-chart.tsx @@ -28,7 +28,7 @@ interface FeatureUsageChartProps { } const FEATURE_COLORS: Record = { - llm_haiku: d3roPalette.accent.amber, + llm_haiku: d3roPalette.accent.main, llm_sonnet: d3roPalette.tag.green, llm_opus: d3roPalette.tag.purple, stt_transcribe: d3roPalette.tag.blue, diff --git a/apps/admin/src/components/charts/top-users-chart.tsx b/apps/admin/src/components/charts/top-users-chart.tsx index 9d5f8998..9f97e094 100644 --- a/apps/admin/src/components/charts/top-users-chart.tsx +++ b/apps/admin/src/components/charts/top-users-chart.tsx @@ -57,7 +57,7 @@ export function TopUsersChart({ data }: TopUsersChartProps): React.ReactElement color: d3roPalette.text.primary, }} /> - + diff --git a/apps/admin/src/components/payment-history.tsx b/apps/admin/src/components/payment-history.tsx index b537dae1..bbedda4d 100644 --- a/apps/admin/src/components/payment-history.tsx +++ b/apps/admin/src/components/payment-history.tsx @@ -63,7 +63,7 @@ export function PaymentHistory({ userId }: PaymentHistoryProps): React.ReactElem if (loading) { return ( - + ) } @@ -135,7 +135,7 @@ export function PaymentHistory({ userId }: PaymentHistoryProps): React.ReactElem sx={{ fontFamily: d3roFontMono, fontSize: d3roTypo.small.size, - borderLeft: `2px solid ${d3roPalette.accent.amber}`, + borderLeft: `2px solid ${d3roPalette.accent.main}`, pl: 1.5, py: 0.5, }} @@ -144,7 +144,7 @@ export function PaymentHistory({ userId }: PaymentHistoryProps): React.ReactElem {new Date(log.created_at).toLocaleString()} - + {log.action} diff --git a/apps/web/src/app/(app)/billing/page.tsx b/apps/web/src/app/(app)/billing/page.tsx index 3c297ce6..087fc96e 100644 --- a/apps/web/src/app/(app)/billing/page.tsx +++ b/apps/web/src/app/(app)/billing/page.tsx @@ -93,7 +93,7 @@ export default async function BillingPage(): Promise { p: 4, height: '100%', border: active - ? `2px solid ${d3roPalette.accent.amber}` + ? `2px solid ${d3roPalette.accent.main}` : plan.highlight ? `2px solid ${d3roPalette.tag.purple}` : undefined, @@ -124,7 +124,7 @@ export default async function BillingPage(): Promise { p: 1.5, bgcolor: d3roPalette.bg.inset, borderRadius: 1, - color: d3roPalette.accent.amber, + color: d3roPalette.accent.main, ...typoSx('label'), }} > diff --git a/apps/web/src/app/(app)/meetings/[id]/page.tsx b/apps/web/src/app/(app)/meetings/[id]/page.tsx index 24dffb1f..5b9f9ad1 100644 --- a/apps/web/src/app/(app)/meetings/[id]/page.tsx +++ b/apps/web/src/app/(app)/meetings/[id]/page.tsx @@ -111,7 +111,7 @@ export default async function MeetingDetailPage({ params }: PageProps): Promise< key={memo.id} sx={{ p: 1.5, - borderLeft: `3px solid ${d3roPalette.accent.amber}`, + borderLeft: `3px solid ${d3roPalette.accent.main}`, bgcolor: d3roPalette.bg.inset }} > diff --git a/apps/web/src/app/accept-invite/page.tsx b/apps/web/src/app/accept-invite/page.tsx index bbb86f09..9c3f0ea0 100644 --- a/apps/web/src/app/accept-invite/page.tsx +++ b/apps/web/src/app/accept-invite/page.tsx @@ -142,7 +142,7 @@ function AcceptInviteInner(): React.ReactElement { component="a" href="/dashboard" sx={{ - color: d3roPalette.accent.amber, + color: d3roPalette.accent.main, textDecoration: 'none', fontSize: 13 }} @@ -161,7 +161,7 @@ function AcceptInviteInner(): React.ReactElement { component="a" href="/login" sx={{ - color: d3roPalette.accent.amber, + color: d3roPalette.accent.main, textDecoration: 'none', fontSize: 13 }} diff --git a/apps/web/src/components/dashboard/meetings-trend-chart.tsx b/apps/web/src/components/dashboard/meetings-trend-chart.tsx index e3bb2551..3c884b94 100644 --- a/apps/web/src/components/dashboard/meetings-trend-chart.tsx +++ b/apps/web/src/components/dashboard/meetings-trend-chart.tsx @@ -62,7 +62,7 @@ export function MeetingsTrendChart({ points }: MeetingsTrendChartProps): React.R type="monotone" dataKey="meetings" name="Meetings" - stroke={d3roPalette.accent.amber} + stroke={d3roPalette.accent.main} strokeWidth={2} dot={{ r: 3 }} activeDot={{ r: 5 }} diff --git a/apps/web/src/components/layout/sidebar.tsx b/apps/web/src/components/layout/sidebar.tsx index dd673552..246266aa 100644 --- a/apps/web/src/components/layout/sidebar.tsx +++ b/apps/web/src/components/layout/sidebar.tsx @@ -136,11 +136,11 @@ export function Sidebar(): React.ReactElement { sx={{ '&.Mui-selected': { bgcolor: d3roPalette.bg.inset, - borderLeft: `3px solid ${d3roPalette.accent.amber}` + borderLeft: `3px solid ${d3roPalette.accent.main}` } }} > - + {item.icon} Date: Wed, 22 Jul 2026 02:37:45 +0900 Subject: [PATCH 02/10] =?UTF-8?q?refactor(ui-native):=20d3roNativePalette?= =?UTF-8?q?=20amber->main=20=EA=B0=9C=EB=AA=85=20(WS-NATIVE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - packages/ui-native theme.ts accent: amber->main, amberDim->dim, amberGlow->glow (값 보존) - apps/mobile 20건 + apps/mobile-rn 18건 + ui-native 컴포넌트 9건 = 47 참조 치환 SKIP: Led/PhosphorText/Header color prop 'amber'(의미론적 컴포넌트 API, 별도 마이그레이션) green/greenGlow 키(amber계 범위外) 정책: docs/REFACTOR_POLICY.md DP1, 이식 인사이트 P7 --- apps/mobile-rn/src/navigation/TabNavigator.tsx | 6 +++--- apps/mobile-rn/src/screens/HistoryScreen.tsx | 6 +++--- apps/mobile-rn/src/screens/LoginScreen.tsx | 6 +++--- apps/mobile-rn/src/screens/RecordScreen.tsx | 6 +++--- apps/mobile-rn/src/screens/SettingsScreen.tsx | 6 +++--- apps/mobile-rn/src/screens/TalkScreen.tsx | 6 +++--- apps/mobile/app/(tabs)/_layout.tsx | 8 ++++---- apps/mobile/app/(tabs)/history.tsx | 6 +++--- apps/mobile/app/(tabs)/record.tsx | 6 +++--- apps/mobile/app/(tabs)/settings.tsx | 6 +++--- apps/mobile/app/(tabs)/talk.tsx | 6 +++--- apps/mobile/app/_layout.tsx | 2 +- apps/mobile/app/login.tsx | 6 +++--- packages/ui-native/src/components/FilterChip.tsx | 4 ++-- packages/ui-native/src/components/Led.tsx | 4 ++-- packages/ui-native/src/components/PhosphorText.tsx | 6 +++--- packages/ui-native/src/components/PhysicalButton.tsx | 2 +- packages/ui-native/src/components/WaveBars.tsx | 2 +- packages/ui-native/src/theme.ts | 6 +++--- 19 files changed, 50 insertions(+), 50 deletions(-) diff --git a/apps/mobile-rn/src/navigation/TabNavigator.tsx b/apps/mobile-rn/src/navigation/TabNavigator.tsx index 81906548..0a9f235f 100644 --- a/apps/mobile-rn/src/navigation/TabNavigator.tsx +++ b/apps/mobile-rn/src/navigation/TabNavigator.tsx @@ -60,7 +60,7 @@ export default function TabNavigator(): React.ReactElement { paddingBottom: 20, paddingTop: 8, }, - tabBarActiveTintColor: d3roNativePalette.accent.amber, + tabBarActiveTintColor: d3roNativePalette.accent.main, tabBarInactiveTintColor: d3roNativePalette.text.muted, tabBarLabelStyle: { fontFamily: MONO, @@ -132,10 +132,10 @@ const fabStyles = StyleSheet.create({ width: 56, height: 56, borderRadius: 28, - backgroundColor: d3roNativePalette.accent.amber, + backgroundColor: d3roNativePalette.accent.main, justifyContent: 'center', alignItems: 'center', - shadowColor: d3roNativePalette.accent.amber, + shadowColor: d3roNativePalette.accent.main, shadowOffset: { width: 0, height: 0 }, shadowOpacity: 0.4, shadowRadius: 10, diff --git a/apps/mobile-rn/src/screens/HistoryScreen.tsx b/apps/mobile-rn/src/screens/HistoryScreen.tsx index b00198f2..01b39954 100644 --- a/apps/mobile-rn/src/screens/HistoryScreen.tsx +++ b/apps/mobile-rn/src/screens/HistoryScreen.tsx @@ -70,7 +70,7 @@ export default function HistoryScreen(): React.ReactElement { if (loading) { return ( - + ) } @@ -110,7 +110,7 @@ export default function HistoryScreen(): React.ReactElement { { setRefreshing(true); void load() }} - tintColor={d3roNativePalette.accent.amber} + tintColor={d3roNativePalette.accent.main} /> } ListEmptyComponent={ @@ -247,7 +247,7 @@ const styles = StyleSheet.create({ cardHeaderLeft: { flexDirection: 'row', alignItems: 'center' }, timeLabel: { marginLeft: 8 }, wordBadge: { - backgroundColor: d3roNativePalette.accent.amberDim, + backgroundColor: d3roNativePalette.accent.dim, paddingHorizontal: 8, paddingVertical: 2, borderRadius: 4 diff --git a/apps/mobile-rn/src/screens/LoginScreen.tsx b/apps/mobile-rn/src/screens/LoginScreen.tsx index b2d9e4b2..1936409a 100644 --- a/apps/mobile-rn/src/screens/LoginScreen.tsx +++ b/apps/mobile-rn/src/screens/LoginScreen.tsx @@ -293,11 +293,11 @@ const styles = StyleSheet.create({ fontFamily: Platform.OS === 'ios' ? 'System' : 'Roboto' }, loginBtn: { - backgroundColor: P.accent.amber, + backgroundColor: P.accent.main, borderRadius: 12, paddingVertical: 14, alignItems: 'center', - shadowColor: P.accent.amber, + shadowColor: P.accent.main, shadowOffset: { width: 0, height: 0 }, shadowOpacity: 0.3, shadowRadius: 10, @@ -315,7 +315,7 @@ const styles = StyleSheet.create({ warningBox: { borderWidth: 1, borderColor: 'rgba(255,92,53,0.3)', - backgroundColor: P.accent.amberDim, + backgroundColor: P.accent.dim, padding: 12, borderRadius: 8, marginTop: 8 diff --git a/apps/mobile-rn/src/screens/RecordScreen.tsx b/apps/mobile-rn/src/screens/RecordScreen.tsx index d62778b5..0fb5e7b7 100644 --- a/apps/mobile-rn/src/screens/RecordScreen.tsx +++ b/apps/mobile-rn/src/screens/RecordScreen.tsx @@ -197,7 +197,7 @@ export default function RecordScreen(): React.ReactElement { )} {state === 'processing' && ( - + )} {transcript !== '' && state === 'done' && ( @@ -284,8 +284,8 @@ const styles = StyleSheet.create({ }, errorBox: { borderWidth: 1, - borderColor: d3roNativePalette.accent.amber, - backgroundColor: d3roNativePalette.accent.amberDim, + borderColor: d3roNativePalette.accent.main, + backgroundColor: d3roNativePalette.accent.dim, padding: 10, borderRadius: 6, width: '100%' diff --git a/apps/mobile-rn/src/screens/SettingsScreen.tsx b/apps/mobile-rn/src/screens/SettingsScreen.tsx index 5691d4e5..e43052d3 100644 --- a/apps/mobile-rn/src/screens/SettingsScreen.tsx +++ b/apps/mobile-rn/src/screens/SettingsScreen.tsx @@ -99,7 +99,7 @@ export default function SettingsScreen(): React.ReactElement { value={true} trackColor={{ false: d3roNativePalette.bg.inset, - true: d3roNativePalette.accent.amber + true: d3roNativePalette.accent.main }} thumbColor="#ffffff" /> @@ -121,7 +121,7 @@ export default function SettingsScreen(): React.ReactElement { value={true} trackColor={{ false: d3roNativePalette.bg.inset, - true: d3roNativePalette.accent.amber + true: d3roNativePalette.accent.main }} thumbColor="#ffffff" /> @@ -132,7 +132,7 @@ export default function SettingsScreen(): React.ReactElement { value={true} trackColor={{ false: d3roNativePalette.bg.inset, - true: d3roNativePalette.accent.amber + true: d3roNativePalette.accent.main }} thumbColor="#ffffff" /> diff --git a/apps/mobile-rn/src/screens/TalkScreen.tsx b/apps/mobile-rn/src/screens/TalkScreen.tsx index b72781b5..5a0a631a 100644 --- a/apps/mobile-rn/src/screens/TalkScreen.tsx +++ b/apps/mobile-rn/src/screens/TalkScreen.tsx @@ -164,7 +164,7 @@ const styles = StyleSheet.create({ }, userBubble: { alignSelf: 'flex-end', - backgroundColor: d3roNativePalette.accent.amberDim, + backgroundColor: d3roNativePalette.accent.dim, borderWidth: 1, borderColor: 'rgba(255, 92, 53, 0.3)', borderTopRightRadius: 4 @@ -204,7 +204,7 @@ const styles = StyleSheet.create({ width: 32, height: 32, borderRadius: 16, - backgroundColor: d3roNativePalette.accent.amberDim, + backgroundColor: d3roNativePalette.accent.dim, borderWidth: 1, borderColor: 'rgba(255, 92, 53, 0.3)', justifyContent: 'center', @@ -218,7 +218,7 @@ const styles = StyleSheet.create({ borderBottomWidth: 8, borderLeftColor: 'transparent', borderRightColor: 'transparent', - borderBottomColor: d3roNativePalette.accent.amber + borderBottomColor: d3roNativePalette.accent.main }, inputStatus: { paddingVertical: 4 } }) diff --git a/apps/mobile/app/(tabs)/_layout.tsx b/apps/mobile/app/(tabs)/_layout.tsx index ff8c2607..88e884f6 100644 --- a/apps/mobile/app/(tabs)/_layout.tsx +++ b/apps/mobile/app/(tabs)/_layout.tsx @@ -43,7 +43,7 @@ export default function TabsLayout(): React.ReactElement { paddingBottom: 20, paddingTop: 8 }, - tabBarActiveTintColor: d3roNativePalette.accent.amber, + tabBarActiveTintColor: d3roNativePalette.accent.main, tabBarInactiveTintColor: d3roNativePalette.text.muted, tabBarLabelStyle: { fontFamily: MONO_FONT, @@ -52,7 +52,7 @@ export default function TabsLayout(): React.ReactElement { letterSpacing: 0.5 }, headerStyle: { backgroundColor: d3roNativePalette.bg.app }, - headerTintColor: d3roNativePalette.accent.amber, + headerTintColor: d3roNativePalette.accent.main, headerTitleStyle: { fontWeight: '300', letterSpacing: 1, fontFamily: MONO_FONT }, headerShown: false }} @@ -129,10 +129,10 @@ const styles = StyleSheet.create({ width: 56, height: 56, borderRadius: 28, - backgroundColor: d3roNativePalette.accent.amber, + backgroundColor: d3roNativePalette.accent.main, justifyContent: 'center', alignItems: 'center', - shadowColor: d3roNativePalette.accent.amber, + shadowColor: d3roNativePalette.accent.main, shadowOffset: { width: 0, height: 0 }, shadowOpacity: 0.4, shadowRadius: 10, diff --git a/apps/mobile/app/(tabs)/history.tsx b/apps/mobile/app/(tabs)/history.tsx index efbf5810..bf550465 100644 --- a/apps/mobile/app/(tabs)/history.tsx +++ b/apps/mobile/app/(tabs)/history.tsx @@ -70,7 +70,7 @@ export default function HistoryScreen(): React.ReactElement { if (loading) { return ( - + ) } @@ -110,7 +110,7 @@ export default function HistoryScreen(): React.ReactElement { { setRefreshing(true); void load() }} - tintColor={d3roNativePalette.accent.amber} + tintColor={d3roNativePalette.accent.main} /> } ListEmptyComponent={ @@ -247,7 +247,7 @@ const styles = StyleSheet.create({ cardHeaderLeft: { flexDirection: 'row', alignItems: 'center' }, timeLabel: { marginLeft: 8 }, wordBadge: { - backgroundColor: d3roNativePalette.accent.amberDim, + backgroundColor: d3roNativePalette.accent.dim, paddingHorizontal: 8, paddingVertical: 2, borderRadius: 4 diff --git a/apps/mobile/app/(tabs)/record.tsx b/apps/mobile/app/(tabs)/record.tsx index 243b86fd..322bed53 100644 --- a/apps/mobile/app/(tabs)/record.tsx +++ b/apps/mobile/app/(tabs)/record.tsx @@ -181,7 +181,7 @@ export default function RecordScreen(): React.ReactElement { )} {state === 'processing' && ( - + )} {transcript !== '' && state === 'done' && ( @@ -268,8 +268,8 @@ const styles = StyleSheet.create({ }, errorBox: { borderWidth: 1, - borderColor: d3roNativePalette.accent.amber, - backgroundColor: d3roNativePalette.accent.amberDim, + borderColor: d3roNativePalette.accent.main, + backgroundColor: d3roNativePalette.accent.dim, padding: 10, borderRadius: 6, width: '100%' diff --git a/apps/mobile/app/(tabs)/settings.tsx b/apps/mobile/app/(tabs)/settings.tsx index 4b2527db..9e4119e1 100644 --- a/apps/mobile/app/(tabs)/settings.tsx +++ b/apps/mobile/app/(tabs)/settings.tsx @@ -98,7 +98,7 @@ export default function SettingsScreen(): React.ReactElement { value={true} trackColor={{ false: d3roNativePalette.bg.inset, - true: d3roNativePalette.accent.amber + true: d3roNativePalette.accent.main }} thumbColor="#ffffff" /> @@ -120,7 +120,7 @@ export default function SettingsScreen(): React.ReactElement { value={true} trackColor={{ false: d3roNativePalette.bg.inset, - true: d3roNativePalette.accent.amber + true: d3roNativePalette.accent.main }} thumbColor="#ffffff" /> @@ -131,7 +131,7 @@ export default function SettingsScreen(): React.ReactElement { value={true} trackColor={{ false: d3roNativePalette.bg.inset, - true: d3roNativePalette.accent.amber + true: d3roNativePalette.accent.main }} thumbColor="#ffffff" /> diff --git a/apps/mobile/app/(tabs)/talk.tsx b/apps/mobile/app/(tabs)/talk.tsx index 4f9cafea..d070108d 100644 --- a/apps/mobile/app/(tabs)/talk.tsx +++ b/apps/mobile/app/(tabs)/talk.tsx @@ -164,7 +164,7 @@ const styles = StyleSheet.create({ }, userBubble: { alignSelf: 'flex-end', - backgroundColor: d3roNativePalette.accent.amberDim, + backgroundColor: d3roNativePalette.accent.dim, borderWidth: 1, borderColor: 'rgba(255, 92, 53, 0.3)', borderTopRightRadius: 4 @@ -204,7 +204,7 @@ const styles = StyleSheet.create({ width: 32, height: 32, borderRadius: 16, - backgroundColor: d3roNativePalette.accent.amberDim, + backgroundColor: d3roNativePalette.accent.dim, borderWidth: 1, borderColor: 'rgba(255, 92, 53, 0.3)', justifyContent: 'center', @@ -218,7 +218,7 @@ const styles = StyleSheet.create({ borderBottomWidth: 8, borderLeftColor: 'transparent', borderRightColor: 'transparent', - borderBottomColor: d3roNativePalette.accent.amber + borderBottomColor: d3roNativePalette.accent.main }, inputStatus: { paddingVertical: 4 } }) diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx index 268be817..5eb0fd33 100644 --- a/apps/mobile/app/_layout.tsx +++ b/apps/mobile/app/_layout.tsx @@ -19,7 +19,7 @@ export default function RootLayout(): React.ReactElement { diff --git a/apps/mobile/app/login.tsx b/apps/mobile/app/login.tsx index 8a9428ad..43f5a7b6 100644 --- a/apps/mobile/app/login.tsx +++ b/apps/mobile/app/login.tsx @@ -274,11 +274,11 @@ const styles = StyleSheet.create({ fontFamily: Platform.OS === 'ios' ? 'System' : 'Roboto' }, loginBtn: { - backgroundColor: P.accent.amber, + backgroundColor: P.accent.main, borderRadius: 12, paddingVertical: 14, alignItems: 'center', - shadowColor: P.accent.amber, + shadowColor: P.accent.main, shadowOffset: { width: 0, height: 0 }, shadowOpacity: 0.3, shadowRadius: 10, @@ -296,7 +296,7 @@ const styles = StyleSheet.create({ warningBox: { borderWidth: 1, borderColor: 'rgba(255,92,53,0.3)', - backgroundColor: P.accent.amberDim, + backgroundColor: P.accent.dim, padding: 12, borderRadius: 8, marginTop: 8 diff --git a/packages/ui-native/src/components/FilterChip.tsx b/packages/ui-native/src/components/FilterChip.tsx index 6d1a2392..93f0ba34 100644 --- a/packages/ui-native/src/components/FilterChip.tsx +++ b/packages/ui-native/src/components/FilterChip.tsx @@ -23,9 +23,9 @@ export function FilterChip({ onPress={onPress} style={[ { - backgroundColor: active ? d3roNativePalette.accent.amber : d3roNativePalette.bg.card, + backgroundColor: active ? d3roNativePalette.accent.main : d3roNativePalette.bg.card, borderWidth: 1, - borderColor: active ? d3roNativePalette.accent.amber : d3roNativePalette.border.default, + borderColor: active ? d3roNativePalette.accent.main : d3roNativePalette.border.default, borderRadius: d3roNativeRadius.pill, paddingHorizontal: 16, paddingVertical: 6 diff --git a/packages/ui-native/src/components/Led.tsx b/packages/ui-native/src/components/Led.tsx index aae30ca9..75a3c277 100644 --- a/packages/ui-native/src/components/Led.tsx +++ b/packages/ui-native/src/components/Led.tsx @@ -11,7 +11,7 @@ export interface LedProps { } const COLOR_MAP: Record = { - amber: d3roNativePalette.accent.amber, + amber: d3roNativePalette.accent.main, green: d3roNativePalette.tag.green, red: d3roNativePalette.tag.red, orange: d3roNativePalette.tag.orange, @@ -19,7 +19,7 @@ const COLOR_MAP: Record = { } export function Led({ color = 'amber', on = true, size = 8 }: LedProps): React.ReactElement { - const c = COLOR_MAP[color] ?? d3roNativePalette.accent.amber + const c = COLOR_MAP[color] ?? d3roNativePalette.accent.main const style: ViewStyle = { width: size, height: size, diff --git a/packages/ui-native/src/components/PhosphorText.tsx b/packages/ui-native/src/components/PhosphorText.tsx index 2dbd359c..617072ee 100644 --- a/packages/ui-native/src/components/PhosphorText.tsx +++ b/packages/ui-native/src/components/PhosphorText.tsx @@ -23,12 +23,12 @@ export function PhosphorText({ const isAmberVariant = variant === 'hero' || variant === 'title' || variant === 'value' const resolvedColor: string = (() => { - if (color === 'amber') return d3roNativePalette.accent.amber + if (color === 'amber') return d3roNativePalette.accent.main if (color === 'primary') return d3roNativePalette.text.primary if (color === 'secondary') return d3roNativePalette.text.secondary if (color === 'label') return d3roNativePalette.text.label if (color === 'muted') return d3roNativePalette.text.muted - return isAmberVariant ? d3roNativePalette.accent.amber : d3roNativePalette.text.primary + return isAmberVariant ? d3roNativePalette.accent.main : d3roNativePalette.text.primary })() const baseStyle: TextStyle = { @@ -37,7 +37,7 @@ export function PhosphorText({ fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace', ...(isAmberVariant ? { - textShadowColor: d3roNativePalette.accent.amberGlow, + textShadowColor: d3roNativePalette.accent.glow, textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 6 } diff --git a/packages/ui-native/src/components/PhysicalButton.tsx b/packages/ui-native/src/components/PhysicalButton.tsx index 4721495c..90387d4a 100644 --- a/packages/ui-native/src/components/PhysicalButton.tsx +++ b/packages/ui-native/src/components/PhysicalButton.tsx @@ -31,7 +31,7 @@ export function PhysicalButton({ const bgColor = variant === 'primary' - ? d3roNativePalette.accent.amber + ? d3roNativePalette.accent.main : variant === 'danger' ? d3roNativePalette.tag.red : 'transparent' diff --git a/packages/ui-native/src/components/WaveBars.tsx b/packages/ui-native/src/components/WaveBars.tsx index a0e114cd..e6bc7d13 100644 --- a/packages/ui-native/src/components/WaveBars.tsx +++ b/packages/ui-native/src/components/WaveBars.tsx @@ -54,7 +54,7 @@ function WaveBar({ index, active }: { index: number; active: boolean }): React.R style={{ width: 6, height, - backgroundColor: d3roNativePalette.accent.amber, + backgroundColor: d3roNativePalette.accent.main, borderRadius: 3 }} /> diff --git a/packages/ui-native/src/theme.ts b/packages/ui-native/src/theme.ts index 9636f401..65795f78 100644 --- a/packages/ui-native/src/theme.ts +++ b/packages/ui-native/src/theme.ts @@ -24,9 +24,9 @@ export const d3roNativePalette = { muted: '#71717a' }, accent: { - amber: '#ff5c35', - amberDim: 'rgba(255, 92, 53, 0.15)', - amberGlow: 'rgba(255, 92, 53, 0.6)', + main: '#ff5c35', + dim: 'rgba(255, 92, 53, 0.15)', + glow: 'rgba(255, 92, 53, 0.6)', green: '#4ade80', greenGlow: 'rgba(74, 222, 128, 0.6)' }, From 00a99e40879b4e4cca506ed7fe1a5eadf1c70551 Mon Sep 17 00:00:00 2001 From: Yun Chan Date: Wed, 22 Jul 2026 02:37:58 +0900 Subject: [PATCH 03/10] =?UTF-8?q?refactor(popup):=205=EC=A2=85=20=ED=8C=9D?= =?UTF-8?q?=EC=97=85=20=5Fi18n=20=EC=A3=BC=EC=9E=85=20+=20=EC=83=89?= =?UTF-8?q?=EC=83=81=20=ED=86=A0=ED=81=B0=ED=99=94=20(WS-POPUP)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 4종 팝업(command/history/result/recording-tip) _i18n 주입: WindowManager getPopupI18nStrings() + 팝업 script applyI18nToHtml() - 한국어/영어 하드코딩 -> popup.* i18n 키 (ko/en 17키) - theme-vars.ts에 --d3-wave-1~9, --d3-status-error/success 토큰 추가 (6 테마) - 팝업 style.css hex -> CSS var 토큰 - packages/i18n getI18n() (main 프로세스용) 추가 SKIP: caption-overlay _i18n(별도 IPC 구조), wave box-shadow 보간(opacity 단순화) 정책: docs/REFACTOR_POLICY.md DP3, 이식 인사이트 P5 --- .../desktop/src/main/windows/WindowManager.ts | 44 ++++++++-- .../renderer/popups/caption-overlay/script.js | 6 +- .../renderer/popups/command-popup/index.html | 10 +-- .../renderer/popups/command-popup/script.js | 12 +++ .../renderer/popups/history-popup/index.html | 6 +- .../renderer/popups/history-popup/script.js | 24 ++++-- .../renderer/popups/recording-tip/script.js | 5 +- .../renderer/popups/recording-tip/style.css | 22 ++--- .../renderer/popups/result-popup/index.html | 2 +- .../renderer/popups/result-popup/script.js | 14 +++ .../renderer/popups/result-popup/style.css | 2 +- packages/i18n/src/index.tsx | 18 ++++ packages/i18n/src/locales/en.json | 20 ++++- packages/i18n/src/locales/ko.json | 20 ++++- packages/ui/src/theme-vars.ts | 86 +++++++++++++++++++ 15 files changed, 256 insertions(+), 35 deletions(-) diff --git a/apps/desktop/src/main/windows/WindowManager.ts b/apps/desktop/src/main/windows/WindowManager.ts index 0c2a7fbc..f6d68bda 100644 --- a/apps/desktop/src/main/windows/WindowManager.ts +++ b/apps/desktop/src/main/windows/WindowManager.ts @@ -10,6 +10,7 @@ import { getLogger } from '../services/LoggerService' import { getIsQuitting } from '../lifecycle' import { configGet } from '../services/ConfigService' import { buildPopupThemeCss } from '@d3ro/ui/theme-vars' +import { getI18n } from '@d3ro/i18n' const logger = getLogger('WindowManager') @@ -28,6 +29,39 @@ function injectPopupTheme(win: BrowserWindow): void { }) } +// ── 팝업 i18n 문자열 가져오기 ───────────────────────────── +/** + * 팝업에 주입할 i18n 문자열 맵을 반환. + */ +function getPopupI18nStrings(): Record { + const locale = (configGet('language') as string) || 'ko' + const { t } = getI18n(locale as 'ko' | 'en' | 'ja' | 'zh' | 'zh-TW' | 'es' | 'fr' | 'de' | 'pt' | 'ru' | 'vi' | 'th') + return { + // command-popup + commandSelect: t('popup.commandSelect'), + hintsSelect: t('popup.hints.select'), + hintsApply: t('popup.hints.apply'), + hintsClear: t('popup.hints.clear'), + hintsClose: t('popup.hints.close'), + noCommands: t('popup.noCommands'), + noCommand: t('popup.noCommand'), + // history-popup + hintsSelectEn: t('popup.hints.selectEn'), + hintsPaste: t('popup.hints.paste'), + noHistory: t('popup.noHistory'), + timeJustNow: t('popup.time.justNow'), + timeMinutesAgo: t('popup.time.minutesAgo'), + timeHoursAgo: t('popup.time.hoursAgo'), + timeDaysAgo: t('popup.time.daysAgo'), + // result-popup + copy: t('popup.copy'), + // recording-tip + errorDefault: t('popup.error.default'), + // caption-overlay + captionLoading: t('popup.caption.loading'), + } +} + // ── 윈도우 참조 ─────────────────────────────────────── let mainWindow: BrowserWindow | null = null @@ -181,7 +215,7 @@ export function showRecordingTip( win.setBounds({ x, y, width: TIP_WIDTH, height: TIP_HEIGHT }) // 상태 전송 후 즉시 show (2-phase 제거 — 숨겨진 윈도우의 렌더러 비활성 문제 방지) - win.webContents.send(IPC_CHANNELS.WINDOW.TIP_STATE_CHANGED, { state, ...params }) + win.webContents.send(IPC_CHANNELS.WINDOW.TIP_STATE_CHANGED, { state, _i18n: getPopupI18nStrings(), ...params }) if (!win.isVisible()) { win.showInactive() } @@ -198,7 +232,7 @@ export function updateRecordingTipState( params?: { text?: string; errorMessage?: string } ): void { if (recordingTipWindow && !recordingTipWindow.isDestroyed()) { - recordingTipWindow.webContents.send(IPC_CHANNELS.WINDOW.TIP_STATE_CHANGED, { state, ...params }) + recordingTipWindow.webContents.send(IPC_CHANNELS.WINDOW.TIP_STATE_CHANGED, { state, _i18n: getPopupI18nStrings(), ...params }) } } @@ -268,7 +302,7 @@ export function showResultPopup(text: string, autoHideMs = 5000): void { const win = getResultPopupWindow() // Phase 1: prepare - win.webContents.send(IPC_CHANNELS.POPUP_RESULT.PREPARE, { text }) + win.webContents.send(IPC_CHANNELS.POPUP_RESULT.PREPARE, { text, _i18n: getPopupI18nStrings() }) const handler = (_event: Electron.IpcMainEvent, data: { width: number; height: number }) => { ipcMain.removeListener(IPC_CHANNELS.POPUP_RESULT.MEASURED, handler) @@ -369,7 +403,7 @@ export function showHistoryPopup(entries: Array>): void win.setBounds({ x, y, width: popupWidth, height: popupHeight }) - win.webContents.send(IPC_CHANNELS.POPUP_HISTORY.SHOW_ITEMS, { entries }) + win.webContents.send(IPC_CHANNELS.POPUP_HISTORY.SHOW_ITEMS, { entries, _i18n: getPopupI18nStrings() }) if (!win.isVisible()) { win.showInactive() @@ -456,7 +490,7 @@ export function showCommandPopup(commands: Array>, activ if (y < display.workArea.y) { y = cursorPos.y + 20 } win.setBounds({ x, y, width: popupWidth, height: popupHeight }) - win.webContents.send(IPC_CHANNELS.POPUP_COMMAND.SHOW_ITEMS, { commands, activeId }) + win.webContents.send(IPC_CHANNELS.POPUP_COMMAND.SHOW_ITEMS, { commands, activeId, _i18n: getPopupI18nStrings() }) if (!win.isVisible()) { win.showInactive() } win.webContents.send(IPC_CHANNELS.POPUP_COMMAND.SHOW, {}) diff --git a/apps/desktop/src/renderer/popups/caption-overlay/script.js b/apps/desktop/src/renderer/popups/caption-overlay/script.js index 47edb966..b9a6f921 100644 --- a/apps/desktop/src/renderer/popups/caption-overlay/script.js +++ b/apps/desktop/src/renderer/popups/caption-overlay/script.js @@ -17,6 +17,9 @@ var linesContainer = document.getElementById('lines') var container = document.getElementById('container') + // ── i18n ────────────────────────────────────────────── + var i18nStrings = {} + // ── 상태 ────────────────────────────────────────────── /** @type {Array<{el: HTMLElement, timer: number|null, id: string}>} */ var lines = [] @@ -170,13 +173,14 @@ // 상태 변경 window.popupAPI.on('caption:stateChanged', function (data) { + if (data._i18n) i18nStrings = data._i18n if (data.state === 'starting') { // 로딩 표시 clearAllLines() var loadingEl = document.createElement('div') loadingEl.className = 'caption-line loading' loadingEl.id = 'caption-loading' - loadingEl.textContent = '⏳ Loading STT model...' + loadingEl.textContent = i18nStrings.captionLoading || '⏳ Loading STT model...' loadingEl.style.fontSize = config.fontSize + 'px' linesContainer.appendChild(loadingEl) } else if (data.state === 'active') { diff --git a/apps/desktop/src/renderer/popups/command-popup/index.html b/apps/desktop/src/renderer/popups/command-popup/index.html index ddc49a4f..664087ff 100644 --- a/apps/desktop/src/renderer/popups/command-popup/index.html +++ b/apps/desktop/src/renderer/popups/command-popup/index.html @@ -9,13 +9,13 @@
-
COMMAND SELECT
+
COMMAND SELECT
- ↑↓ 선택 - ⏎ 적용 - 0 해제 - ESC × + ↑↓ 선택 + ⏎ 적용 + 0 해제 + ESC ×
diff --git a/apps/desktop/src/renderer/popups/command-popup/script.js b/apps/desktop/src/renderer/popups/command-popup/script.js index 95d4a874..f40a72b5 100644 --- a/apps/desktop/src/renderer/popups/command-popup/script.js +++ b/apps/desktop/src/renderer/popups/command-popup/script.js @@ -13,6 +13,17 @@ var currentActiveId = null var i18nStrings = {} + // ── i18n 적용 (HTML 텍스트) ─────────────────────────── + function applyI18nToHtml() { + var elements = document.querySelectorAll('[data-i18n]') + elements.forEach(function(el) { + var key = el.getAttribute('data-i18n') + if (i18nStrings[key]) { + el.textContent = i18nStrings[key] + } + }) + } + // ── 아이템 렌더링 ─────────────────────────────────── function renderItems(commands, activeId) { currentCommands = commands @@ -135,6 +146,7 @@ window.popupAPI.on('command:showItems', function (data) { selectedIndex = 0 if (data._i18n) i18nStrings = data._i18n + applyI18nToHtml() renderItems(data.commands || [], data.activeId || null) container.classList.remove('hiding') }) diff --git a/apps/desktop/src/renderer/popups/history-popup/index.html b/apps/desktop/src/renderer/popups/history-popup/index.html index 029efb59..780a1fbf 100644 --- a/apps/desktop/src/renderer/popups/history-popup/index.html +++ b/apps/desktop/src/renderer/popups/history-popup/index.html @@ -11,9 +11,9 @@
- ↑↓ Select - ⏎ Paste - ESC × + ↑↓ Select + ⏎ Paste + ESC ×
diff --git a/apps/desktop/src/renderer/popups/history-popup/script.js b/apps/desktop/src/renderer/popups/history-popup/script.js index 68469d9d..249d338e 100644 --- a/apps/desktop/src/renderer/popups/history-popup/script.js +++ b/apps/desktop/src/renderer/popups/history-popup/script.js @@ -10,18 +10,30 @@ var items = [] var selectedIndex = 0 var currentEntries = [] + var i18nStrings = {} + + // ── i18n 적용 (HTML 텍스트) ─────────────────────────── + function applyI18nToHtml() { + var elements = document.querySelectorAll('[data-i18n]') + elements.forEach(function(el) { + var key = el.getAttribute('data-i18n') + if (i18nStrings[key]) { + el.textContent = i18nStrings[key] + } + }) + } // ── 상대 시간 표시 ─────────────────────────────────── function relativeTime(timestamp) { var diff = Date.now() - timestamp var sec = Math.floor(diff / 1000) - if (sec < 60) return 'just now' + if (sec < 60) return i18nStrings.timeJustNow || 'just now' var min = Math.floor(sec / 60) - if (min < 60) return min + 'm ago' + if (min < 60) return (i18nStrings.timeMinutesAgo || '{{m}}m ago').replace('{{m}}', min) var hr = Math.floor(min / 60) - if (hr < 24) return hr + 'h ago' + if (hr < 24) return (i18nStrings.timeHoursAgo || '{{h}}h ago').replace('{{h}}', hr) var day = Math.floor(hr / 24) - return day + 'd ago' + return (i18nStrings.timeDaysAgo || '{{d}}d ago').replace('{{d}}', day) } // ── 텍스트 truncate ────────────────────────────────── @@ -39,7 +51,7 @@ if (entries.length === 0) { var empty = document.createElement('div') empty.className = 'empty-state' - empty.textContent = 'No history yet' + empty.textContent = i18nStrings.noHistory || 'No history yet' itemsContainer.appendChild(empty) return } @@ -119,6 +131,8 @@ // ── IPC 리스너 ─────────────────────────────────────── window.popupAPI.on('history:showItems', function (data) { selectedIndex = 0 + if (data._i18n) i18nStrings = data._i18n + applyI18nToHtml() renderItems(data.entries || []) container.classList.remove('hiding') measureAndReport() diff --git a/apps/desktop/src/renderer/popups/recording-tip/script.js b/apps/desktop/src/renderer/popups/recording-tip/script.js index 1141f035..9bb5a807 100644 --- a/apps/desktop/src/renderer/popups/recording-tip/script.js +++ b/apps/desktop/src/renderer/popups/recording-tip/script.js @@ -42,6 +42,7 @@ var thinkingStartTime = 0 var thinkingRaf = null var currentState = 'idle' + var i18nStrings = {} // ── 웨이브 바 생성 ─────────────────────────────────── function createWaveBars() { @@ -133,7 +134,7 @@ currentState = 'error' hideAllViews() errorView.classList.remove('hidden') - errorText.textContent = message || '오류가 발생했습니다' + errorText.textContent = message || i18nStrings.errorDefault || '오류가 발생했습니다' } // ── 크기 측정 (2-phase 리사이즈) ──────────────────── @@ -153,6 +154,7 @@ function setupListeners() { // Phase 1: prepare — 숨겨진 상태에서 렌더링 후 크기 측정 window.popupAPI.on('window:tipPrepare', function (data) { + if (data._i18n) i18nStrings = data._i18n var state = data.state if (state === 'recording') showRecording() else if (state === 'thinking') showThinking() @@ -184,6 +186,7 @@ // 상태 변경 (showRecordingTip + updateRecordingTipState 양쪽에서 사용) window.popupAPI.on('window:tipStateChanged', function (data) { + if (data._i18n) i18nStrings = data._i18n var state = data.state if (state === 'recording') showRecording() else if (state === 'thinking') showThinking() diff --git a/apps/desktop/src/renderer/popups/recording-tip/style.css b/apps/desktop/src/renderer/popups/recording-tip/style.css index 5fda14f6..d65eaa50 100644 --- a/apps/desktop/src/renderer/popups/recording-tip/style.css +++ b/apps/desktop/src/renderer/popups/recording-tip/style.css @@ -64,16 +64,16 @@ body { min-height: 2px; } -/* 9바 시안→블루→퍼플 스펙트럼 (v2 Midnight — RAW.dark gradient.wave1~3 보간) */ -.wave-bar:nth-child(1) { background: #22d3ee; box-shadow: 0 0 6px rgba(34, 211, 238, 0.35); } -.wave-bar:nth-child(2) { background: #28bef0; box-shadow: 0 0 6px rgba(40, 190, 240, 0.35); } -.wave-bar:nth-child(3) { background: #2fa9f2; box-shadow: 0 0 6px rgba(47, 169, 242, 0.35); } -.wave-bar:nth-child(4) { background: #3596f4; box-shadow: 0 0 6px rgba(53, 150, 244, 0.35); } -.wave-bar:nth-child(5) { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.35); } -.wave-bar:nth-child(6) { background: #4f78f6; box-shadow: 0 0 6px rgba(79, 120, 246, 0.35); } -.wave-bar:nth-child(7) { background: #636ff6; box-shadow: 0 0 6px rgba(99, 111, 246, 0.35); } -.wave-bar:nth-child(8) { background: #7765f6; box-shadow: 0 0 6px rgba(119, 101, 246, 0.35); } -.wave-bar:nth-child(9) { background: #8b5cf6; box-shadow: 0 0 6px rgba(139, 92, 246, 0.35); } +/* 9바 시안→블루→퍼플 스펙트럼 (v2 Midnight — 테마 변수 사용) */ +.wave-bar:nth-child(1) { background: var(--d3-wave-1); box-shadow: 0 0 6px var(--d3-wave-1); opacity: 0.9; } +.wave-bar:nth-child(2) { background: var(--d3-wave-2); box-shadow: 0 0 6px var(--d3-wave-2); opacity: 0.92; } +.wave-bar:nth-child(3) { background: var(--d3-wave-3); box-shadow: 0 0 6px var(--d3-wave-3); opacity: 0.94; } +.wave-bar:nth-child(4) { background: var(--d3-wave-4); box-shadow: 0 0 6px var(--d3-wave-4); opacity: 0.96; } +.wave-bar:nth-child(5) { background: var(--d3-wave-5); box-shadow: 0 0 6px var(--d3-wave-5); opacity: 0.98; } +.wave-bar:nth-child(6) { background: var(--d3-wave-6); box-shadow: 0 0 6px var(--d3-wave-6); opacity: 0.98; } +.wave-bar:nth-child(7) { background: var(--d3-wave-7); box-shadow: 0 0 6px var(--d3-wave-7); opacity: 0.96; } +.wave-bar:nth-child(8) { background: var(--d3-wave-8); box-shadow: 0 0 6px var(--d3-wave-8); opacity: 0.94; } +.wave-bar:nth-child(9) { background: var(--d3-wave-9); box-shadow: 0 0 6px var(--d3-wave-9); opacity: 0.92; } .duration { color: var(--d3-text-primary); @@ -111,7 +111,7 @@ body { justify-content: center; width: 18px; height: 18px; - background: #ef4444; + background: var(--d3-status-error); color: white; border-radius: 50%; font-size: 12px; diff --git a/apps/desktop/src/renderer/popups/result-popup/index.html b/apps/desktop/src/renderer/popups/result-popup/index.html index 9055f553..552fe470 100644 --- a/apps/desktop/src/renderer/popups/result-popup/index.html +++ b/apps/desktop/src/renderer/popups/result-popup/index.html @@ -11,7 +11,7 @@
-