From fecd9528d6f2aa140746a6c69e7b6473e6ee6470 Mon Sep 17 00:00:00 2001 From: mkdir700 Date: Wed, 22 Oct 2025 07:41:23 +0800 Subject: [PATCH 1/2] conductor-checkpoint-start From f98ed4dc6af41c4c545111c12005782a8c378d7a Mon Sep 17 00:00:00 2001 From: mkdir700 Date: Wed, 22 Oct 2025 07:42:57 +0800 Subject: [PATCH 2/2] fix(styled-components): resolve unknown props warnings in settings page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Convert HStack layout props (gap, alignItems, justifyContent) to transient props with $ prefix - Convert ColorCircle isActive prop to transient prop $isActive - Update all usage across settings components to use transient props - Remove duplicate gap property in Box component - Build passes without styled-components warnings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/renderer/src/components/Layout/index.ts | 17 ++++++++--------- .../src/pages/settings/AboutSettings.tsx | 2 +- .../src/pages/settings/AppearanceSettings.tsx | 10 +++++----- .../src/pages/settings/ShortcutSettings.tsx | 4 ++-- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/renderer/src/components/Layout/index.ts b/src/renderer/src/components/Layout/index.ts index 78534814..644704c9 100644 --- a/src/renderer/src/components/Layout/index.ts +++ b/src/renderer/src/components/Layout/index.ts @@ -22,7 +22,7 @@ export interface BoxProps { opacity?: string | number borderRadius?: PxValue border?: string - gap?: PxValue + $gap?: PxValue mt?: PxValue marginTop?: PxValue mb?: PxValue @@ -46,9 +46,9 @@ export interface BoxProps { } export interface StackProps extends BoxProps { - justifyContent?: 'center' | 'flex-start' | 'flex-end' | 'space-between' - alignItems?: 'center' | 'flex-start' | 'flex-end' | 'space-between' - flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse' + $justifyContent?: 'center' | 'flex-start' | 'flex-end' | 'space-between' + $alignItems?: 'center' | 'flex-start' | 'flex-end' | 'space-between' + $flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse' } export interface ButtonProps extends StackProps { @@ -90,12 +90,11 @@ export const Box = styled.div` right: ${(props) => getElementValue(props.right) || 'auto'}; bottom: ${(props) => getElementValue(props.bottom) || 'auto'}; top: ${(props) => getElementValue(props.top) || 'auto'}; - gap: ${(p) => (p.gap ? getElementValue(p.gap) : 0)}; + gap: ${(p) => (p.$gap ? getElementValue(p.$gap) : 0)}; opacity: ${(props) => props.opacity ?? 1}; border-radius: ${(props) => getElementValue(props.borderRadius) || 0}; box-sizing: border-box; border: ${(props) => props?.border || 'none'}; - gap: ${(p) => (p.gap ? getElementValue(p.gap) : 0)}; margin: ${(props) => (props.m || props.margin ? (props.m ?? props.margin) : 'none')}; margin-top: ${(props) => props.mt || props.marginTop ? getElementValue(props.mt || props.marginTop) : 'default'}; @@ -118,9 +117,9 @@ export const Box = styled.div` export const Stack = styled(Box)` display: flex; - justify-content: ${(props) => props.justifyContent ?? 'flex-start'}; - align-items: ${(props) => props.alignItems ?? 'flex-start'}; - flex-direction: ${(props) => props.flexDirection ?? 'row'}; + justify-content: ${(props) => props.$justifyContent ?? 'flex-start'}; + align-items: ${(props) => props.$alignItems ?? 'flex-start'}; + flex-direction: ${(props) => props.$flexDirection ?? 'row'}; ` export const Center = styled(Stack)` diff --git a/src/renderer/src/pages/settings/AboutSettings.tsx b/src/renderer/src/pages/settings/AboutSettings.tsx index 17646cb0..1c3140fa 100644 --- a/src/renderer/src/pages/settings/AboutSettings.tsx +++ b/src/renderer/src/pages/settings/AboutSettings.tsx @@ -193,7 +193,7 @@ const AboutSettings: FC = () => { {t('settings.about.title')} - + ` +const ColorCircle = styled.div<{ color: string; $isActive?: boolean }>` position: absolute; top: 50%; left: 50%; @@ -37,7 +37,7 @@ const ColorCircle = styled.div<{ color: string; isActive?: boolean }>` background-color: ${(props) => props.color}; cursor: pointer; transform: translate(-50%, -50%); - border: 2px solid ${(props) => (props.isActive ? 'var(--color-border)' : 'transparent')}; + border: 2px solid ${(props) => (props.$isActive ? 'var(--color-border)' : 'transparent')}; transition: opacity 0.2s; &:hover { @@ -169,13 +169,13 @@ export function AppearanceSettings(): React.JSX.Element { {t('settings.theme.color_primary')} - - + + {THEME_COLOR_PRESETS.map((color) => ( handleColorPrimaryChange(color)} /> diff --git a/src/renderer/src/pages/settings/ShortcutSettings.tsx b/src/renderer/src/pages/settings/ShortcutSettings.tsx index 3d368306..d2e5f7f9 100644 --- a/src/renderer/src/pages/settings/ShortcutSettings.tsx +++ b/src/renderer/src/pages/settings/ShortcutSettings.tsx @@ -330,7 +330,7 @@ const ShortcutSettings: FC = () => { alignItems: 'center' }} > - + {isEditing ? ( { @@ -417,7 +417,7 @@ const ShortcutSettings: FC = () => { showHeader={false} /> - +