mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 05:09:09 +08:00
fix: set message translate dropdown height (#6954)
fix: improve dropdown menu styling and placement in MessageMenubar component - Set a maximum height and overflow behavior for the dropdown menu to enhance usability. - Changed the dropdown placement from "topRight" to "top" for better alignment with the UI.
This commit is contained in:
parent
a83e40389f
commit
043b13e359
@ -382,6 +382,10 @@ const MessageMenubar: FC<Props> = (props) => {
|
|||||||
{!isUserMessage && (
|
{!isUserMessage && (
|
||||||
<Dropdown
|
<Dropdown
|
||||||
menu={{
|
menu={{
|
||||||
|
style: {
|
||||||
|
maxHeight: 250,
|
||||||
|
overflowY: 'auto'
|
||||||
|
},
|
||||||
items: [
|
items: [
|
||||||
...TranslateLanguageOptions.map((item) => ({
|
...TranslateLanguageOptions.map((item) => ({
|
||||||
label: item.emoji + ' ' + item.label,
|
label: item.emoji + ' ' + item.label,
|
||||||
@ -437,7 +441,7 @@ const MessageMenubar: FC<Props> = (props) => {
|
|||||||
onClick: (e) => e.domEvent.stopPropagation()
|
onClick: (e) => e.domEvent.stopPropagation()
|
||||||
}}
|
}}
|
||||||
trigger={['click']}
|
trigger={['click']}
|
||||||
placement="topRight"
|
placement="top"
|
||||||
arrow>
|
arrow>
|
||||||
<Tooltip title={t('chat.translate')} mouseEnterDelay={1.2}>
|
<Tooltip title={t('chat.translate')} mouseEnterDelay={1.2}>
|
||||||
<ActionButton className="message-action-button" onClick={(e) => e.stopPropagation()}>
|
<ActionButton className="message-action-button" onClick={(e) => e.stopPropagation()}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user