2024-02-01 13:40:44 +05:30
|
|
|
import logoImage from "data-base64:~assets/icon.png"
|
|
|
|
|
import { useMessage } from "~hooks/useMessage"
|
2024-02-02 00:13:10 +05:30
|
|
|
import { Link } from "react-router-dom"
|
2024-02-03 11:18:15 +05:30
|
|
|
import { Tooltip } from "antd"
|
2024-02-23 23:25:17 +05:30
|
|
|
import { CogIcon } from "~icons/CogIcon"
|
|
|
|
|
import { BoxesIcon } from "~icons/BoxesIcon"
|
|
|
|
|
import { ArrowPathIcon } from "~icons/ArrowPathIcon"
|
2024-02-01 13:40:44 +05:30
|
|
|
export const SidepanelHeader = () => {
|
2024-02-03 11:18:15 +05:30
|
|
|
const { clearChat, isEmbedding } = useMessage()
|
2024-02-01 13:40:44 +05:30
|
|
|
return (
|
2024-02-07 23:22:06 +05:30
|
|
|
<div className="flex px-3 justify-between bg-white dark:bg-[#171717] border-b border-gray-300 dark:border-gray-700 py-4 items-center">
|
2024-02-01 13:40:44 +05:30
|
|
|
<div className="focus:outline-none focus-visible:ring-2 focus-visible:ring-pink-700 flex items-center dark:text-white">
|
|
|
|
|
<img className="h-6 w-auto" src={logoImage} alt="Page Assist" />
|
|
|
|
|
<span className="ml-1 text-sm ">Page Assist</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center space-x-3">
|
2024-02-03 11:18:15 +05:30
|
|
|
{isEmbedding ? (
|
2024-02-23 23:25:17 +05:30
|
|
|
<Tooltip title="It may take a few minutes to embed the page. Please wait...">
|
|
|
|
|
<BoxesIcon className="h-5 w-5 text-gray-500 dark:text-gray-400 animate-bounce animate-infinite" />
|
2024-02-03 11:18:15 +05:30
|
|
|
</Tooltip>
|
|
|
|
|
) : null}
|
2024-02-01 13:40:44 +05:30
|
|
|
<button
|
|
|
|
|
onClick={() => {
|
|
|
|
|
clearChat()
|
|
|
|
|
}}
|
|
|
|
|
className="flex items-center space-x-1 focus:outline-none focus-visible:ring-2 focus-visible:ring-pink-700">
|
|
|
|
|
<ArrowPathIcon className="h-5 w-5 text-gray-500 dark:text-gray-400" />
|
|
|
|
|
</button>
|
2024-02-02 00:13:10 +05:30
|
|
|
<Link to="/settings">
|
|
|
|
|
<CogIcon className="h-5 w-5 text-gray-500 dark:text-gray-400" />
|
|
|
|
|
</Link>
|
2024-02-01 13:40:44 +05:30
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|