panel empty

This commit is contained in:
jZonG 2025-04-18 14:42:01 +08:00
parent 5be6587477
commit 3d47279e6c
3 changed files with 44 additions and 7 deletions

View File

@ -80,7 +80,7 @@ const Panel: FC = () => {
<div
ref={rightPanelRef}
tabIndex={-1}
className={cn('absolute bottom-1 right-0 top-14 z-10 flex outline-none')}
className={cn('absolute bottom-1 right-0 top-14 z-[11] flex outline-none')}
key={`${isRestoring}`}
>
{

View File

@ -0,0 +1,19 @@
import type { FC } from 'react'
import { Variable02 } from '@/app/components/base/icons/src/vender/solid/development'
const Empty: FC = () => {
return (
<div className='flex h-full flex-col gap-3 rounded-xl bg-background-section p-8'>
<div className='flex h-10 w-10 items-center justify-center rounded-[10px] border-[0.5px] border-components-card-border bg-components-card-bg shadow-lg backdrop-blur-sm'>
<Variable02 className='h-5 w-5 text-text-accent' />
</div>
<div className='flex flex-col gap-1'>
<div className='system-sm-semibold text-text-secondary'>Variable Inspect</div>
<div className='system-xs-regular text-text-tertiary'>No variables to inspect</div>
<a className='system-xs-regular cursor-pointer text-text-accent'>Learn more</a>
</div>
</div>
)
}
export default Empty

View File

@ -1,14 +1,32 @@
import type { FC } from 'react'
// import {
// RiLoader2Line,
// RiStopCircleFill,
// } from '@remixicon/react'
import {
RiCloseLine,
} from '@remixicon/react'
import { useStore } from '../store'
import Empty from './empty'
import ActionButton from '@/app/components/base/action-button'
import cn from '@/utils/classnames'
const Panel: FC = () => {
const workflowCanvasHeight = useStore(s => s.workflowCanvasHeight)
const setShowVariableInspectPanel = useStore(s => s.setShowVariableInspectPanel)
const isEmpty = true
if (isEmpty) {
return (
<div className={cn('flex h-full flex-col')}>
<div className='flex shrink-0 items-center justify-between pl-4 pr-2 pt-2'>
<div className='system-sm-semibold-uppercase'>Variable Inspect</div>
<ActionButton onClick={() => setShowVariableInspectPanel(false)}>
<RiCloseLine className='h-4 w-4' />
</ActionButton>
</div>
<div className='grow p-2'>
<Empty />
</div>
</div>
)
}
return (
<div className={cn('relative pb-1')}>