add run-history

This commit is contained in:
StyleZhang
2024-02-26 15:38:49 +08:00
parent 58d8b0dd01
commit 7574107d8c
5 changed files with 68 additions and 3 deletions

View File

@ -1,10 +1,14 @@
import type { FC } from 'react'
import { memo } from 'react'
import { useStore } from '../store'
import { Play } from '@/app/components/base/icons/src/vender/line/mediaAndDevices'
import { ClockPlay } from '@/app/components/base/icons/src/vender/line/time'
import TooltipPlus from '@/app/components/base/tooltip-plus'
const RunAndHistory: FC = () => {
const showRunHistory = useStore(state => state.showRunHistory)
const setShowRunHistory = useStore(state => state.setShowRunHistory)
return (
<div className='flex items-center px-0.5 h-8 rounded-lg border-[0.5px] border-gray-200 bg-white shadow-xs'>
<div className={`
@ -18,7 +22,13 @@ const RunAndHistory: FC = () => {
<TooltipPlus
popupContent='View run history'
>
<div className='flex items-center justify-center w-7 h-7 rounded-md hover:bg-black/5 cursor-pointer'>
<div
className={`
flex items-center justify-center w-7 h-7 rounded-md hover:bg-black/5 cursor-pointer
${showRunHistory && 'bg-black/5'}
`}
onClick={() => setShowRunHistory(true)}
>
<ClockPlay className='w-4 h-4 text-gray-500' />
</div>
</TooltipPlus>