mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 20:00:00 +08:00
去除边框
This commit is contained in:
parent
7bd8d1b1a4
commit
a95a2e01e0
@ -399,7 +399,11 @@ const MessageMenubar: FC<Props> = (props) => {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{isAssistantMessage && ttsEnabled && (
|
{isAssistantMessage && ttsEnabled && (
|
||||||
<TTSButton message={message} className="message-action-button" />
|
<Tooltip title={t('chat.tts.play')} mouseEnterDelay={0.8}>
|
||||||
|
<ActionButton className="message-action-button" onClick={() => TTSService.speakFromMessage(message)}>
|
||||||
|
<SoundOutlined />
|
||||||
|
</ActionButton>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{!isUserMessage && (
|
{!isUserMessage && (
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { SoundOutlined } from '@ant-design/icons'
|
import { SoundOutlined } from '@ant-design/icons'
|
||||||
import { Button, Tooltip } from 'antd'
|
import { Tooltip } from 'antd'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { useCallback, useEffect, useState } from 'react'
|
import { useCallback, useEffect, useState } from 'react'
|
||||||
import TTSService from '@renderer/services/TTSService'
|
import TTSService from '@renderer/services/TTSService'
|
||||||
@ -47,13 +47,9 @@ const TTSStopButton: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<StopButtonContainer>
|
<StopButtonContainer>
|
||||||
<Tooltip title={t('chat.tts.stop_global')}>
|
<Tooltip title={t('chat.tts.stop_global')}>
|
||||||
<StyledButton
|
<ActionButton onClick={handleStopTTS}>
|
||||||
type="primary"
|
<SoundOutlined />
|
||||||
shape="circle"
|
</ActionButton>
|
||||||
icon={<SoundOutlined />}
|
|
||||||
onClick={handleStopTTS}
|
|
||||||
size="large"
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</StopButtonContainer>
|
</StopButtonContainer>
|
||||||
)
|
)
|
||||||
@ -66,8 +62,26 @@ const StopButtonContainer = styled.div`
|
|||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
`
|
`
|
||||||
|
|
||||||
const StyledButton = styled(Button)`
|
const ActionButton = styled.div`
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
background-color: var(--color-primary);
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||||
|
&:hover {
|
||||||
|
background-color: var(--color-primary-soft);
|
||||||
|
}
|
||||||
|
.anticon {
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--color-white);
|
||||||
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
export default TTSStopButton
|
export default TTSStopButton
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user