diff --git a/web/app/components/app/create-app-dialog/newAppDialog.tsx b/web/app/components/app/create-app-dialog/newAppDialog.tsx deleted file mode 100644 index 33e7d779f5..0000000000 --- a/web/app/components/app/create-app-dialog/newAppDialog.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { Fragment, useCallback } from 'react' -import type { ReactNode } from 'react' -import { Dialog, DialogPanel, Transition } from '@headlessui/react' -import cn from '@/utils/classnames' - -type DialogProps = { - className?: string - children: ReactNode - show: boolean - onClose?: () => void -} - -const NewAppDialog = ({ - className, - children, - show, - onClose, -}: DialogProps) => { - const close = useCallback(() => onClose?.(), [onClose]) - return ( - - - {/* -
- */} - {/* TODO: to new Transition */} -
- -
-
- {/* - - {children} - - */} - {/* TODO: to new Transition */} - - {children} - -
-
-
-
- ) -} - -export default NewAppDialog diff --git a/web/app/components/app/overview/settings/index.tsx b/web/app/components/app/overview/settings/index.tsx index 2487cd8685..5ec91f0e1d 100644 --- a/web/app/components/app/overview/settings/index.tsx +++ b/web/app/components/app/overview/settings/index.tsx @@ -242,7 +242,7 @@ const SettingsModal: FC = ({ onChange={e => onDesChange(e.target.value)} placeholder={t(`${prefixSettings}.webDescPlaceholder`) as string} /> - {isChatBot && ( + {isChat && (
{t('app.answerIcon.title')}
diff --git a/web/app/components/base/dialog/index.tsx b/web/app/components/base/dialog/index.tsx index 6554ef9009..829d3f0c04 100644 --- a/web/app/components/base/dialog/index.tsx +++ b/web/app/components/base/dialog/index.tsx @@ -1,6 +1,6 @@ import { Fragment, useCallback } from 'react' import type { ElementType, ReactNode } from 'react' -import { Dialog, DialogPanel, DialogTitle, Transition } from '@headlessui/react' +import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react' import classNames from '@/utils/classnames' // https://headlessui.com/react/dialog @@ -34,32 +34,25 @@ const CustomDialog = ({ return ( - {/* -
- */} - {/* TODO: to new Transition */} -
+ +
+
- {/* - + + {Boolean(title) && ( )} - */} - {/* TODO: to new Transition */} - - {Boolean(title) && ( - - {title} - - )} -
- {children} -
- {Boolean(footer) && ( -
- {footer} -
- )} -
+
diff --git a/web/app/components/base/features/new-feature-panel/dialog-wrapper.tsx b/web/app/components/base/features/new-feature-panel/dialog-wrapper.tsx index c61a325858..e6dc4e2139 100644 --- a/web/app/components/base/features/new-feature-panel/dialog-wrapper.tsx +++ b/web/app/components/base/features/new-feature-panel/dialog-wrapper.tsx @@ -1,6 +1,6 @@ import { Fragment, useCallback } from 'react' import type { ReactNode } from 'react' -import { Dialog, DialogPanel, Transition } from '@headlessui/react' +import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react' import cn from '@/utils/classnames' type DialogProps = { @@ -22,39 +22,29 @@ const DialogWrapper = ({ return ( - {/* -
- */} - {/* TODO: to new Transition */} -
+ +
+
- {/* - + + {children} - */} - {/* TODO: to new Transition */} - - {children} - +
diff --git a/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx b/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx index 94775172c4..a425ee84b9 100644 --- a/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx +++ b/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx @@ -116,10 +116,7 @@ const VoiceParamConfig = ({ {languages.map((item: Item) => ( - `relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-gray-100 text-gray-700 ${active ? 'bg-gray-100' : '' - }` - } + className='relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-gray-100 text-gray-700 data-[active]:bg-gray-100' value={item} disabled={false} > @@ -183,10 +180,7 @@ const VoiceParamConfig = ({ {voiceItems?.map((item: Item) => ( - `relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-gray-100 text-gray-700 ${active ? 'bg-gray-100' : '' - }` - } + className='relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-gray-100 text-gray-700 data-[active]:bg-gray-100' value={item} disabled={false} > diff --git a/web/app/components/base/fullscreen-modal/index.tsx b/web/app/components/base/fullscreen-modal/index.tsx index 9a76dfa62b..9d99e280ec 100644 --- a/web/app/components/base/fullscreen-modal/index.tsx +++ b/web/app/components/base/fullscreen-modal/index.tsx @@ -1,4 +1,4 @@ -import { Dialog, DialogPanel, Transition } from '@headlessui/react' +import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react' import { Fragment } from 'react' import { RiCloseLargeLine } from '@remixicon/react' import classNames from '@/utils/classnames' @@ -25,21 +25,16 @@ export default function FullScreenModal({ overflowVisible = false, }: IModal) { return ( - - - {/* -
- */} - {/* TODO: to new Transition */} -
+ + + +
+
- {/* + {closable @@ -75,25 +65,7 @@ export default function FullScreenModal({
} {children} - */} - {/* TODO: to new Transition */} - - {closable - &&
{ - e.stopPropagation() - onClose() - }}> - -
} - {children} -
+
diff --git a/web/app/components/base/modal/index.tsx b/web/app/components/base/modal/index.tsx index 4d586add57..04bc11b2c8 100644 --- a/web/app/components/base/modal/index.tsx +++ b/web/app/components/base/modal/index.tsx @@ -1,4 +1,4 @@ -import { Dialog, DialogPanel, DialogTitle, Transition } from '@headlessui/react' +import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react' import { Fragment } from 'react' import { RiCloseLine } from '@remixicon/react' import classNames from '@/utils/classnames' @@ -30,19 +30,14 @@ export default function Modal({ return ( - {/* -
- */} - {/* TODO: to new Transition */} -
+ +
+
- {/* + {title && } {children} - */} - {/* TODO: to new Transition */} - - {title && - {title} - } - {description &&
- {description} -
} - {closable - &&
- { - e.stopPropagation() - onClose() - } - } /> -
} - {children} -
+
diff --git a/web/app/components/base/select/index.tsx b/web/app/components/base/select/index.tsx index 6a99fd3f76..be74d92c3f 100644 --- a/web/app/components/base/select/index.tsx +++ b/web/app/components/base/select/index.tsx @@ -249,7 +249,7 @@ const SimpleSelect: FC = ({ {items.map((item: Item) => ( + className={ classNames( 'relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-state-base-hover text-text-secondary', optionClassName, diff --git a/web/app/components/header/account-setting/menu-dialog.tsx b/web/app/components/header/account-setting/menu-dialog.tsx index c6e1fd8ba8..c1d0c46d4d 100644 --- a/web/app/components/header/account-setting/menu-dialog.tsx +++ b/web/app/components/header/account-setting/menu-dialog.tsx @@ -35,22 +35,13 @@ const MenuDialog = ({ { }}>
- {/* - -
- {children} - - */} - {/* TODO: to new Transition */} - +
{children}