mirror of
https://github.com/langgenius/dify.git
synced 2026-03-13 02:57:41 +08:00
fix: click readme hide config
This commit is contained in:
@ -87,11 +87,16 @@ const ReadmePanel: FC = () => {
|
||||
|
||||
const portalContent = showType === ReadmeShowType.drawer
|
||||
? (
|
||||
<div className={cn('fixed inset-0 z-[999] flex', position === 'left' ? 'justify-start' : 'justify-end')} onClick={onClose}>
|
||||
<div
|
||||
className={cn('fixed inset-0 z-[999] flex', position === 'left' ? 'justify-start' : 'justify-end')}
|
||||
data-readme-panel-root="true"
|
||||
onClick={onClose}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
'pointer-events-auto mb-2 ml-2 mr-2 mt-16 w-[600px] max-w-[600px] justify-start rounded-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg p-0 shadow-xl',
|
||||
)}
|
||||
data-readme-panel="true"
|
||||
onClick={(event) => {
|
||||
event.stopPropagation()
|
||||
}}
|
||||
@ -101,11 +106,16 @@ const ReadmePanel: FC = () => {
|
||||
</div>
|
||||
)
|
||||
: (
|
||||
<div className="fixed inset-0 z-[999] flex items-center justify-center p-2" onClick={onClose}>
|
||||
<div
|
||||
className="fixed inset-0 z-[999] flex items-center justify-center p-2"
|
||||
data-readme-panel-root="true"
|
||||
onClick={onClose}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
'pointer-events-auto relative h-[calc(100vh-16px)] w-full max-w-[800px] rounded-2xl bg-components-panel-bg p-0 shadow-xl',
|
||||
)}
|
||||
data-readme-panel="true"
|
||||
onClick={(event) => {
|
||||
event.stopPropagation()
|
||||
}}
|
||||
|
||||
@ -281,6 +281,8 @@ const ToolBlockComponent: FC<ToolBlockComponentProps> = ({
|
||||
const panelEl = portalContainer?.querySelector('[data-tool-setting-panel="true"]')
|
||||
if (!target || !panelEl)
|
||||
return
|
||||
if (target instanceof Element && target.closest('[data-readme-panel-root="true"], [data-readme-panel="true"]'))
|
||||
return
|
||||
if (target instanceof Element && target.closest('[data-modal-root="true"]'))
|
||||
return
|
||||
if (panelEl.contains(target))
|
||||
|
||||
@ -339,6 +339,8 @@ const ToolGroupBlockComponent: FC<ToolGroupBlockComponentProps> = ({
|
||||
const panelEl = portalContainer?.querySelector('[data-tool-group-setting-panel="true"]')
|
||||
if (!target || !panelEl)
|
||||
return
|
||||
if (target instanceof Element && target.closest('[data-readme-panel-root="true"], [data-readme-panel="true"]'))
|
||||
return
|
||||
if (target instanceof Element && target.closest('[data-modal-root="true"]'))
|
||||
return
|
||||
if (panelEl.contains(target))
|
||||
|
||||
Reference in New Issue
Block a user