|
|
|
@ -4,7 +4,10 @@ import {
|
|
|
|
Bars3Icon,
|
|
|
|
Bars3Icon,
|
|
|
|
PencilSquareIcon,
|
|
|
|
PencilSquareIcon,
|
|
|
|
} from '@heroicons/react/24/solid'
|
|
|
|
} from '@heroicons/react/24/solid'
|
|
|
|
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
import AppIcon from '@/app/components/base/app-icon'
|
|
|
|
import AppIcon from '@/app/components/base/app-icon'
|
|
|
|
|
|
|
|
import { ReplayIcon } from '@/app/components/app/chat/icon-component'
|
|
|
|
|
|
|
|
import Tooltip from '@/app/components/base/tooltip'
|
|
|
|
|
|
|
|
|
|
|
|
export type IHeaderProps = {
|
|
|
|
export type IHeaderProps = {
|
|
|
|
title: string
|
|
|
|
title: string
|
|
|
|
@ -26,6 +29,7 @@ const Header: FC<IHeaderProps> = ({
|
|
|
|
onShowSideBar,
|
|
|
|
onShowSideBar,
|
|
|
|
onCreateNewChat,
|
|
|
|
onCreateNewChat,
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
|
|
|
|
const { t } = useTranslation()
|
|
|
|
if (!isMobile)
|
|
|
|
if (!isMobile)
|
|
|
|
return null
|
|
|
|
return null
|
|
|
|
|
|
|
|
|
|
|
|
@ -37,7 +41,6 @@ const Header: FC<IHeaderProps> = ({
|
|
|
|
bg-gradient-to-r from-blue-600 to-sky-500
|
|
|
|
bg-gradient-to-r from-blue-600 to-sky-500
|
|
|
|
`}
|
|
|
|
`}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div></div>
|
|
|
|
|
|
|
|
<div className="flex items-center space-x-2">
|
|
|
|
<div className="flex items-center space-x-2">
|
|
|
|
{customerIcon || <AppIcon size="small" icon={icon} background={icon_background} />}
|
|
|
|
{customerIcon || <AppIcon size="small" icon={icon} background={icon_background} />}
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
@ -46,7 +49,17 @@ const Header: FC<IHeaderProps> = ({
|
|
|
|
{title}
|
|
|
|
{title}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div></div>
|
|
|
|
<Tooltip
|
|
|
|
|
|
|
|
selector={'embed-scene-restart-button'}
|
|
|
|
|
|
|
|
htmlContent={t('share.chat.resetChat')}
|
|
|
|
|
|
|
|
position='top'
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<div className='flex cursor-pointer hover:rounded-lg hover:bg-black/5 w-8 h-8 items-center justify-center' onClick={() => {
|
|
|
|
|
|
|
|
onCreateNewChat?.()
|
|
|
|
|
|
|
|
}}>
|
|
|
|
|
|
|
|
<ReplayIcon className="h-4 w-4 text-sm font-bold text-white" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</Tooltip>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|