Fix: Update the background color and hover effect of secondary buttons (#23186)

This commit is contained in:
GuanMu
2025-07-31 21:19:34 +08:00
committed by GitHub
parent 79ea94483e
commit 98aea05ad2
8 changed files with 91 additions and 40 deletions

View File

@@ -21,6 +21,7 @@ import {
} from '@/app/components/base/icons/src/vender/line/mediaAndDevices'
import { useEventEmitterContextContext } from '@/context/event-emitter'
import { EVENT_WORKFLOW_STOP } from '@/app/components/workflow/variable-inspect/types'
import useTheme from '@/hooks/use-theme'
const RunMode = memo(() => {
const { t } = useTranslation()
@@ -102,21 +103,27 @@ const PreviewMode = memo(() => {
PreviewMode.displayName = 'PreviewMode'
const RunAndHistory: FC = () => {
const { theme } = useTheme()
const isChatMode = useIsChatMode()
const { nodesReadOnly } = useNodesReadOnly()
return (
<div className='flex h-8 items-center rounded-lg border-[0.5px] border-components-button-secondary-border bg-components-button-secondary-bg px-0.5 shadow-xs'>
{
!isChatMode && <RunMode />
}
{
isChatMode && <PreviewMode />
}
<div className='mx-0.5 h-3.5 w-[1px] bg-divider-regular'></div>
<ViewHistory />
<Checklist disabled={nodesReadOnly} />
</div>
<>
<div className={cn(
'flex h-8 items-center rounded-lg border-[0.5px] border-components-button-secondary-border bg-components-button-secondary-bg px-0.5 shadow-xs',
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
)}>
{
!isChatMode && <RunMode />
}
{
isChatMode && <PreviewMode />
}
<div className='mx-0.5 h-3.5 w-[1px] bg-divider-regular'></div>
<ViewHistory />
<Checklist disabled={nodesReadOnly} />
</div>
</>
)
}