diff --git a/web/app/(commonLayout)/try/app/[appId]/page.tsx b/web/app/(commonLayout)/try/app/[appId]/page.tsx index 84a21b9049..26084a39ab 100644 --- a/web/app/(commonLayout)/try/app/[appId]/page.tsx +++ b/web/app/(commonLayout)/try/app/[appId]/page.tsx @@ -1,5 +1,5 @@ import React from 'react' -import Main from '@/app/components/try/app/index' +import Main from '@/app/components/explore/try-app/app/index' export type IInstalledAppProps = { params: { diff --git a/web/app/(commonLayout)/try/right/page.tsx b/web/app/(commonLayout)/try/right/page.tsx deleted file mode 100644 index 8ea68b5b3d..0000000000 --- a/web/app/(commonLayout)/try/right/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Meta from '../../../components/try/app/meta' - -const Page = () => { - return ( - - ) -} - -export default Page diff --git a/web/app/components/explore/try-app/app-info/index.tsx b/web/app/components/explore/try-app/app-info/index.tsx new file mode 100644 index 0000000000..1452c786cb --- /dev/null +++ b/web/app/components/explore/try-app/app-info/index.tsx @@ -0,0 +1,18 @@ +'use client' +import type { FC } from 'react' +import React from 'react' + +type Props = { + className?: string +} + +const AppInfo: FC = ({ + className, +}) => { + return ( +
+ AppInfo Info +
+ ) +} +export default React.memo(AppInfo) diff --git a/web/app/components/try/app/chat.tsx b/web/app/components/explore/try-app/app/chat.tsx similarity index 92% rename from web/app/components/try/app/chat.tsx rename to web/app/components/explore/try-app/app/chat.tsx index 56d00db099..2a12d9d8e4 100644 --- a/web/app/components/try/app/chat.tsx +++ b/web/app/components/explore/try-app/app/chat.tsx @@ -2,7 +2,7 @@ import type { FC } from 'react' import React from 'react' import ChatWrapper from '@/app/components/base/chat/embedded-chatbot/chat-wrapper' -import { useThemeContext } from '../../base/chat/embedded-chatbot/theme/theme-context' +import { useThemeContext } from '../../../base/chat/embedded-chatbot/theme/theme-context' import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' import { EmbeddedChatbotContext, diff --git a/web/app/components/try/app/index.tsx b/web/app/components/explore/try-app/app/index.tsx similarity index 89% rename from web/app/components/try/app/index.tsx rename to web/app/components/explore/try-app/app/index.tsx index 26c24fcaba..c4be1d48f9 100644 --- a/web/app/components/try/app/index.tsx +++ b/web/app/components/explore/try-app/app/index.tsx @@ -3,7 +3,7 @@ import type { FC } from 'react' import React from 'react' import Chat from './chat' import TextGeneration from './text-generation' -import Loading from '../../base/loading' +import Loading from '../../../base/loading' import { useGetTryAppInfo } from '@/service/use-try-app' import type { AppData } from '@/models/share' import useDocumentTitle from '@/hooks/use-document-title' @@ -30,7 +30,7 @@ const TryApp: FC = ({ ) } return ( -
+
{isChat && ( )} @@ -46,9 +46,6 @@ const TryApp: FC = ({ } as AppData} /> )} -
- Right panel -
) } diff --git a/web/app/components/try/app/text-generation.tsx b/web/app/components/explore/try-app/app/text-generation.tsx similarity index 97% rename from web/app/components/try/app/text-generation.tsx rename to web/app/components/explore/try-app/app/text-generation.tsx index 889606d700..866b935df4 100644 --- a/web/app/components/try/app/text-generation.tsx +++ b/web/app/components/explore/try-app/app/text-generation.tsx @@ -6,7 +6,7 @@ import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' import AppIcon from '@/app/components/base/app-icon' import Loading from '@/app/components/base/loading' import { appDefaultIconBackground } from '@/config' -import RunOnce from '../../share/text-generation/run-once' +import RunOnce from '../../../share/text-generation/run-once' import { useWebAppStore } from '@/context/web-app-context' import type { AppData, SiteInfo } from '@/models/share' import { useGetTryAppParams } from '@/service/use-try-app' @@ -16,7 +16,7 @@ import type { VisionFile, VisionSettings } from '@/types/app' import { Resolution, TransferMethod } from '@/types/app' import { useBoolean } from 'ahooks' import { noop } from 'lodash' -import type { Task } from '../../share/text-generation/types' +import type { Task } from '../../../share/text-generation/types' import Res from '@/app/components/share/text-generation/result' import { AppSourceType } from '@/service/share' import { TaskStatus } from '@/app/components/share/text-generation/types' @@ -97,10 +97,10 @@ const TextGeneration: FC = ({ const { user_input_form, more_like_this, file_upload, text_to_speech }: any = appParams setVisionConfig({ - // legacy of image upload compatible + // legacy of image upload compatible ...file_upload, transfer_methods: file_upload?.allowed_file_upload_methods || file_upload?.allowed_upload_methods, - // legacy of image upload compatible + // legacy of image upload compatible image_file_size_limit: appParams?.system_parameters.image_file_size_limit, fileUploadConfig: appParams?.system_parameters, } as any) @@ -162,7 +162,7 @@ const TextGeneration: FC = ({
) - if(!siteInfo || !promptConfig) { + if (!siteInfo || !promptConfig) { return (
diff --git a/web/app/components/explore/try-app/index.tsx b/web/app/components/explore/try-app/index.tsx index 42d33f77ee..4fa29354cd 100644 --- a/web/app/components/explore/try-app/index.tsx +++ b/web/app/components/explore/try-app/index.tsx @@ -5,6 +5,8 @@ import Modal from '@/app/components/base/modal/index' import Tab, { TypeEnum } from './tab' import Button from '../../base/button' import { RiCloseLine } from '@remixicon/react' +import AppInfo from './app-info' +import App from './app' type Props = { appId: string @@ -23,22 +25,27 @@ const TryApp: FC = ({ onClose={onClose} className='h-[calc(100vh-32px)] max-w-[calc(100vw-32px)] p-2' > -
- - +
+
+ + +
+ {/* Main content */} +
+ + +
- - {appId} ) } diff --git a/web/app/components/try/app/meta.tsx b/web/app/components/try/app/meta.tsx deleted file mode 100644 index 9c19e40f83..0000000000 --- a/web/app/components/try/app/meta.tsx +++ /dev/null @@ -1,17 +0,0 @@ -'use client' -import type { FC } from 'react' -import React from 'react' - -type Props = { - -} - -const Meta: FC = ({ -}) => { - return ( -
- Meta Info -
- ) -} -export default React.memo(Meta)