feat: Enhance UI styling and interaction details
- Update window vibrancy to 'sidebar' for better visual effect - Refine input bar styling with softer background and rounded corners - Adjust toolbar button sizes and styling - Modify topic position selection to use Segmented component - Tweak light theme background opacity
This commit is contained in:
parent
9e808208ab
commit
28c59ea436
@ -34,6 +34,7 @@ if (!app.requestSingleInstanceLock()) {
|
|||||||
windowService.showMainWindow()
|
windowService.showMainWindow()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
registerShortcuts(mainWindow)
|
registerShortcuts(mainWindow)
|
||||||
|
|
||||||
registerIpc(mainWindow, app)
|
registerIpc(mainWindow, app)
|
||||||
|
|||||||
@ -51,7 +51,7 @@ export class WindowService {
|
|||||||
show: false, // 初始不显示
|
show: false, // 初始不显示
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
transparent: isMac,
|
transparent: isMac,
|
||||||
vibrancy: 'under-window',
|
vibrancy: 'sidebar',
|
||||||
visualEffectState: 'active',
|
visualEffectState: 'active',
|
||||||
titleBarStyle: isLinux ? 'default' : 'hidden',
|
titleBarStyle: isLinux ? 'default' : 'hidden',
|
||||||
titleBarOverlay: theme === 'dark' ? titleBarOverlayDark : titleBarOverlayLight,
|
titleBarOverlay: theme === 'dark' ? titleBarOverlayDark : titleBarOverlayLight,
|
||||||
|
|||||||
@ -89,7 +89,7 @@ body[theme-mode='light'] {
|
|||||||
--color-background: var(--color-white);
|
--color-background: var(--color-white);
|
||||||
--color-background-soft: var(--color-white-soft);
|
--color-background-soft: var(--color-white-soft);
|
||||||
--color-background-mute: var(--color-white-mute);
|
--color-background-mute: var(--color-white-mute);
|
||||||
--color-background-opacity: rgba(255, 255, 255, 0.7);
|
--color-background-opacity: rgba(235, 235, 235, 0.7);
|
||||||
|
|
||||||
--color-primary: #00b96b;
|
--color-primary: #00b96b;
|
||||||
--color-primary-soft: #00b96b99;
|
--color-primary-soft: #00b96b99;
|
||||||
|
|||||||
@ -595,7 +595,7 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic }) => {
|
|||||||
icon={<QuestionCircleOutlined style={{ color: 'red' }} />}
|
icon={<QuestionCircleOutlined style={{ color: 'red' }} />}
|
||||||
okText={t('chat.input.clear.title')}>
|
okText={t('chat.input.clear.title')}>
|
||||||
<ToolbarButton type="text">
|
<ToolbarButton type="text">
|
||||||
<ClearOutlined />
|
<ClearOutlined style={{ fontSize: 17 }} />
|
||||||
</ToolbarButton>
|
</ToolbarButton>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
@ -650,11 +650,12 @@ const Container = styled.div`
|
|||||||
`
|
`
|
||||||
|
|
||||||
const InputBarContainer = styled.div`
|
const InputBarContainer = styled.div`
|
||||||
border: 1px solid var(--color-border);
|
border: 0.5px solid var(--color-border);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 0 20px 15px 20px;
|
margin: 15px 20px;
|
||||||
border-radius: 10px;
|
border-radius: 15px;
|
||||||
|
background-color: var(--color-background-opacity);
|
||||||
`
|
`
|
||||||
|
|
||||||
const TextareaStyle: CSSProperties = {
|
const TextareaStyle: CSSProperties = {
|
||||||
@ -697,7 +698,7 @@ const ToolbarMenu = styled.div`
|
|||||||
const ToolbarButton = styled(Button)`
|
const ToolbarButton = styled(Button)`
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
font-size: 17px;
|
font-size: 16px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
color: var(--color-icon);
|
color: var(--color-icon);
|
||||||
@ -712,7 +713,7 @@ const ToolbarButton = styled(Button)`
|
|||||||
color: var(--color-icon);
|
color: var(--color-icon);
|
||||||
}
|
}
|
||||||
.icon-a-addchat {
|
.icon-a-addchat {
|
||||||
font-size: 19px;
|
font-size: 18px;
|
||||||
margin-bottom: -2px;
|
margin-bottom: -2px;
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|||||||
@ -176,6 +176,8 @@ const MenuButton = styled.div`
|
|||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
right: 9px;
|
right: 9px;
|
||||||
top: 6px;
|
top: 6px;
|
||||||
|
padding: 0 5px;
|
||||||
|
border: 0.5px solid var(--color-border);
|
||||||
`
|
`
|
||||||
|
|
||||||
const TopicCount = styled.div`
|
const TopicCount = styled.div`
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import {
|
|||||||
setSidebarIcons
|
setSidebarIcons
|
||||||
} from '@renderer/store/settings'
|
} from '@renderer/store/settings'
|
||||||
import { ThemeMode } from '@renderer/types'
|
import { ThemeMode } from '@renderer/types'
|
||||||
import { Button, Input, Select, Switch } from 'antd'
|
import { Button, Input, Segmented, Select, Switch } from 'antd'
|
||||||
import { FC, useCallback, useState } from 'react'
|
import { FC, useCallback, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
@ -98,9 +98,9 @@ const DisplaySettings: FC = () => {
|
|||||||
<SettingDivider />
|
<SettingDivider />
|
||||||
<SettingRow>
|
<SettingRow>
|
||||||
<SettingRowTitle>{t('settings.topic.position')}</SettingRowTitle>
|
<SettingRowTitle>{t('settings.topic.position')}</SettingRowTitle>
|
||||||
<Select
|
<Segmented
|
||||||
value={topicPosition || 'right'}
|
value={topicPosition || 'right'}
|
||||||
style={{ width: 120 }}
|
shape="round"
|
||||||
onChange={setTopicPosition}
|
onChange={setTopicPosition}
|
||||||
options={[
|
options={[
|
||||||
{ value: 'left', label: t('settings.topic.position.left') },
|
{ value: 'left', label: t('settings.topic.position.left') },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user