mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-07 22:10:21 +08:00
feat(video): add image reference button and send tooltip
Add button for image reference with tooltip in video panel Include send button tooltip using i18n translation
This commit is contained in:
parent
d80eac2fbe
commit
2f9b174095
@ -1027,6 +1027,7 @@
|
|||||||
"selected": "Selected",
|
"selected": "Selected",
|
||||||
"selectedItems": "Selected {{count}} items",
|
"selectedItems": "Selected {{count}} items",
|
||||||
"selectedMessages": "Selected {{count}} messages",
|
"selectedMessages": "Selected {{count}} messages",
|
||||||
|
"send": "Send",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"sort": {
|
"sort": {
|
||||||
"pinyin": {
|
"pinyin": {
|
||||||
@ -4656,6 +4657,11 @@
|
|||||||
"reason": "The file may be corrupted or has been deleted externally."
|
"reason": "The file may be corrupted or has been deleted externally."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"input_reference": {
|
||||||
|
"add": {
|
||||||
|
"tooltip": "Add image reference"
|
||||||
|
}
|
||||||
|
},
|
||||||
"prompt": {
|
"prompt": {
|
||||||
"placeholder": "describes the video to generate"
|
"placeholder": "describes the video to generate"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import { Button, Skeleton, Textarea } from '@heroui/react'
|
import { Button, Skeleton, Textarea, Tooltip } from '@heroui/react'
|
||||||
import { loggerService } from '@logger'
|
import { loggerService } from '@logger'
|
||||||
import { useAddOpenAIVideo } from '@renderer/hooks/video/useOpenAIVideos'
|
import { useAddOpenAIVideo } from '@renderer/hooks/video/useOpenAIVideos'
|
||||||
import { createVideo } from '@renderer/services/ApiService'
|
import { createVideo } from '@renderer/services/ApiService'
|
||||||
import { Provider } from '@renderer/types'
|
import { Provider } from '@renderer/types'
|
||||||
import { Video } from '@renderer/types/video'
|
import { Video } from '@renderer/types/video'
|
||||||
import { getErrorMessage } from '@renderer/utils'
|
import { getErrorMessage } from '@renderer/utils'
|
||||||
import { ArrowUp } from 'lucide-react'
|
import { ArrowUp, ImageIcon } from 'lucide-react'
|
||||||
import { useCallback, useState } from 'react'
|
import { useCallback, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
@ -73,14 +73,28 @@ export const VideoPanel = ({ provider, video }: VideoPanelProps) => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Button
|
<div className="absolute bottom-0 flex w-full items-end justify-between p-2">
|
||||||
color="primary"
|
<div className="flex">
|
||||||
radius="full"
|
<Tooltip content={t('video.input_reference.add.tooltip')} closeDelay={0}>
|
||||||
isIconOnly
|
<Button
|
||||||
isLoading={isProcessing}
|
variant="light"
|
||||||
className="absolute right-2 bottom-2 h-6 w-6 min-w-0">
|
startContent={<ImageIcon size={16} />}
|
||||||
<ArrowUp size={16} className="text-primary-foreground" />
|
isIconOnly
|
||||||
</Button>
|
className="h-6 w-6 min-w-0"
|
||||||
|
isDisabled={isProcessing}
|
||||||
|
onPress={() => {
|
||||||
|
window.toast.info('Not implemented')
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Tooltip content={t('common.send')} closeDelay={0}>
|
||||||
|
<Button color="primary" radius="full" isIconOnly isLoading={isProcessing} className="h-6 w-6 min-w-0">
|
||||||
|
<ArrowUp size={16} className="text-primary-foreground" />
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user