mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
fix: chat setup ui
This commit is contained in:
@ -240,10 +240,10 @@ const Chat: FC<ChatProps> = ({
|
|||||||
disableFeedback={disableFeedback}
|
disableFeedback={disableFeedback}
|
||||||
onFeedback={onFeedback}
|
onFeedback={onFeedback}
|
||||||
>
|
>
|
||||||
<div className='relative h-full'>
|
<div className={cn('relative h-full', isTryApp && 'flex flex-col')}>
|
||||||
<div
|
<div
|
||||||
ref={chatContainerRef}
|
ref={chatContainerRef}
|
||||||
className={cn('relative h-full overflow-y-auto overflow-x-hidden', isTryApp && 'grow', chatContainerClassName)}
|
className={cn('relative h-full overflow-y-auto overflow-x-hidden', isTryApp && 'h-0 grow', chatContainerClassName)}
|
||||||
>
|
>
|
||||||
{chatNode}
|
{chatNode}
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import Divider from '@/app/components/base/divider'
|
|||||||
import InputsFormContent from '@/app/components/base/chat/embedded-chatbot/inputs-form/content'
|
import InputsFormContent from '@/app/components/base/chat/embedded-chatbot/inputs-form/content'
|
||||||
import { useEmbeddedChatbotContext } from '../context'
|
import { useEmbeddedChatbotContext } from '../context'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
|
import { AppSourceType } from '@/service/share'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
collapsed: boolean
|
collapsed: boolean
|
||||||
@ -18,6 +19,7 @@ const InputsFormNode = ({
|
|||||||
}: Props) => {
|
}: Props) => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const {
|
const {
|
||||||
|
appSourceType,
|
||||||
isMobile,
|
isMobile,
|
||||||
currentConversationId,
|
currentConversationId,
|
||||||
themeBuilder,
|
themeBuilder,
|
||||||
@ -25,15 +27,17 @@ const InputsFormNode = ({
|
|||||||
allInputsHidden,
|
allInputsHidden,
|
||||||
inputsForms,
|
inputsForms,
|
||||||
} = useEmbeddedChatbotContext()
|
} = useEmbeddedChatbotContext()
|
||||||
|
const isTryApp = appSourceType === AppSourceType.tryApp
|
||||||
|
|
||||||
if (allInputsHidden || inputsForms.length === 0)
|
if (allInputsHidden || inputsForms.length === 0)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('mb-6 flex flex-col items-center px-4 pt-6', isMobile && 'mb-4 pt-4')}>
|
<div className={cn('mb-6 flex flex-col items-center px-4 pt-6', isMobile && 'mb-4 pt-4', isTryApp && 'px-0')}>
|
||||||
<div className={cn(
|
<div className={cn(
|
||||||
'w-full max-w-[672px] rounded-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg shadow-md',
|
'w-full max-w-[672px] rounded-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg shadow-md',
|
||||||
collapsed && 'border border-components-card-border bg-components-card-bg shadow-none',
|
collapsed && 'border border-components-card-border bg-components-card-bg shadow-none',
|
||||||
|
isTryApp && 'max-w-[auto]',
|
||||||
)}>
|
)}>
|
||||||
<div className={cn(
|
<div className={cn(
|
||||||
'flex items-center gap-3 rounded-t-2xl px-6 py-4',
|
'flex items-center gap-3 rounded-t-2xl px-6 py-4',
|
||||||
|
|||||||
@ -57,7 +57,7 @@ const TryApp: FC<Props> = ({
|
|||||||
<div className='system-md-semibold grow truncate text-text-primary' title={appDetail.name}>{appDetail.name}</div>
|
<div className='system-md-semibold grow truncate text-text-primary' title={appDetail.name}>{appDetail.name}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='mx-auto mt-4 flex w-[769px] grow flex-col'>
|
<div className='mx-auto mt-4 flex h-[0] w-[769px] grow flex-col'>
|
||||||
{!isHideTryNotice && (
|
{!isHideTryNotice && (
|
||||||
<Alert className='mb-4 shrink-0' message={t('explore.tryApp.tryInfo')} onHide={hideTryNotice} />
|
<Alert className='mb-4 shrink-0' message={t('explore.tryApp.tryInfo')} onHide={hideTryNotice} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user