refactor(styles, AntdProvider, DisplaySettings, DefaultAssistantSettings): enhance UI elements and improve styling consistency

- Updated ant.scss to refine modal styles for better visual distinction.
- Adjusted AntdProvider theme settings for Segmented and Switch components to improve color consistency.
- Modified DisplaySettings to change button sizes and styles for a more cohesive appearance.
- Tweaked DefaultAssistantSettings button dimensions for improved layout and usability.
This commit is contained in:
Teo 2025-06-13 23:04:17 +08:00
parent 99b23e1d5d
commit 0378f9ceb1
4 changed files with 16 additions and 8 deletions

View File

@ -232,7 +232,7 @@
}
}
.ant-modal {
.ant-modal:not(.ant-modal-confirm) {
.ant-modal-confirm-body-has-title {
padding: 16px 0 0 0;
}
@ -257,6 +257,11 @@
}
}
}
.ant-modal.ant-modal-confirm.ant-modal-confirm-confirm {
.ant-modal-content {
padding: 16px;
}
}
.ant-collapse {
border: 1px solid var(--color-border);

View File

@ -63,11 +63,12 @@ const AntdProvider: FC<PropsWithChildren> = ({ children }) => {
fontFamily: 'var(--code-font-family)'
},
Segmented: {
itemActiveBg: 'var(--color-background-mute)',
itemHoverBg: 'var(--color-background-mute)'
itemActiveBg: 'var(--color-background-soft)',
itemHoverBg: 'var(--color-background-soft)',
trackBg: 'rgba(153,153,153,0.15)'
},
Switch: {
colorTextQuaternary: 'rgba(153,153,153,0.25)'
colorTextQuaternary: 'rgba(153,153,153,0.15)'
}
},
token: {

View File

@ -196,7 +196,7 @@ const DisplaySettings: FC = () => {
value={userTheme.colorPrimary}
onChange={(color) => handleColorPrimaryChange(color.toHexString())}
showText
style={{ width: '110px' }}
size="small"
presets={[
{
label: 'Presets',
@ -222,13 +222,15 @@ const DisplaySettings: FC = () => {
<SettingRow>
<SettingRowTitle>{t('settings.zoom.title')}</SettingRowTitle>
<ZoomButtonGroup>
<Button onClick={() => handleZoomFactor(-0.1)} icon={<Minus size="14" />} />
<Button onClick={() => handleZoomFactor(-0.1)} icon={<Minus size="14" />} color="default" variant="text" />
<ZoomValue>{Math.round(currentZoom * 100)}%</ZoomValue>
<Button onClick={() => handleZoomFactor(0.1)} icon={<Plus size="14" />} />
<Button onClick={() => handleZoomFactor(0.1)} icon={<Plus size="14" />} color="default" variant="text" />
<Button
onClick={() => handleZoomFactor(0, true)}
style={{ marginLeft: 8 }}
icon={<RotateCcw size="14" />}
color="default"
variant="text"
/>
</ZoomButtonGroup>
</SettingRow>

View File

@ -101,7 +101,7 @@ const AssistantSettings: FC = () => {
<HStack gap={8} alignItems="center" style={{ margin: '10px 0' }}>
<Popover content={<EmojiPicker onEmojiClick={handleEmojiSelect} />} arrow>
<EmojiButtonWrapper>
<Button style={{ fontSize: 20, padding: '4px', minWidth: '32px', height: '32px' }}>{emoji}</Button>
<Button style={{ fontSize: 20, padding: '4px', minWidth: '30px', height: '30px' }}>{emoji}</Button>
{emoji && (
<CloseCircleFilled
className="delete-icon"