{appDetail && (
-
+
)}
{children}
diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView.tsx
index 8f3ee510b8..208078f612 100644
--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView.tsx
+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView.tsx
@@ -24,9 +24,11 @@ import AppContext from '@/context/app-context'
export type ICardViewProps = {
appId: string
+ isInPanel?: boolean
+ className?: string
}
-const CardView: FC
= ({ appId }) => {
+const CardView: FC = ({ appId, isInPanel, className }) => {
const { t } = useTranslation()
const { notify } = useContext(ToastContext)
const appDetail = useAppStore(state => state.appDetail)
@@ -120,10 +122,11 @@ const CardView: FC = ({ appId }) => {
return
return (
-
+
diff --git a/web/app/(commonLayout)/datasets/ApiServer.tsx b/web/app/(commonLayout)/datasets/ApiServer.tsx
index 7baa342a62..0ed2663088 100644
--- a/web/app/(commonLayout)/datasets/ApiServer.tsx
+++ b/web/app/(commonLayout)/datasets/ApiServer.tsx
@@ -31,8 +31,6 @@ const ApiServer: FC
= ({
)
diff --git a/web/app/components/app-sidebar/app-info.tsx b/web/app/components/app-sidebar/app-info.tsx
index 12f9c59cd1..57eb013be7 100644
--- a/web/app/components/app-sidebar/app-info.tsx
+++ b/web/app/components/app-sidebar/app-info.tsx
@@ -1,18 +1,18 @@
import { useTranslation } from 'react-i18next'
import { useRouter } from 'next/navigation'
import { useContext, useContextSelector } from 'use-context-selector'
-import { RiArrowDownSLine } from '@remixicon/react'
import React, { useCallback, useState } from 'react'
+import {
+ RiDeleteBinLine,
+ RiEditLine,
+ RiEqualizer2Line,
+ RiFileCopy2Line,
+ RiFileDownloadLine,
+ RiFileUploadLine,
+} from '@remixicon/react'
import AppIcon from '../base/app-icon'
import SwitchAppModal from '../app/switch-app-modal'
-import s from './style.module.css'
import cn from '@/utils/classnames'
-import {
- PortalToFollowElem,
- PortalToFollowElemContent,
- PortalToFollowElemTrigger,
-} from '@/app/components/base/portal-to-follow-elem'
-import Divider from '@/app/components/base/divider'
import Confirm from '@/app/components/base/confirm'
import { useStore as useAppStore } from '@/app/components/app/store'
import { ToastContext } from '@/app/components/base/toast'
@@ -22,8 +22,6 @@ import { copyApp, deleteApp, exportAppConfig, updateAppInfo } from '@/service/ap
import DuplicateAppModal from '@/app/components/app/duplicate-modal'
import type { DuplicateAppModalProps } from '@/app/components/app/duplicate-modal'
import CreateAppModal from '@/app/components/explore/create-app-modal'
-import { AiText, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'
-import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'
import type { CreateAppModalProps } from '@/app/components/explore/create-app-modal'
import { NEED_REFRESH_APP_LIST_KEY } from '@/config'
import { getRedirection } from '@/utils/app-redirection'
@@ -31,6 +29,9 @@ import UpdateDSLModal from '@/app/components/workflow/update-dsl-modal'
import type { EnvironmentVariable } from '@/app/components/workflow/types'
import DSLExportConfirmModal from '@/app/components/workflow/dsl-export-confirm-modal'
import { fetchWorkflowDraft } from '@/service/workflow'
+import ContentDialog from '@/app/components/base/content-dialog'
+import Button from '@/app/components/base/button'
+import CardView from '@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView'
export type IAppInfoProps = {
expand: boolean
@@ -47,7 +48,6 @@ const AppInfo = ({ expand }: IAppInfoProps) => {
const [showEditModal, setShowEditModal] = useState(false)
const [showDuplicateModal, setShowDuplicateModal] = useState(false)
const [showConfirmDelete, setShowConfirmDelete] = useState(false)
- const [showSwitchTip, setShowSwitchTip] = useState
('')
const [showSwitchModal, setShowSwitchModal] = useState(false)
const [showImportDSLModal, setShowImportDSLModal] = useState(false)
const [secretEnvList, setSecretEnvList] = useState([])
@@ -183,291 +183,199 @@ const AppInfo = ({ expand }: IAppInfoProps) => {
return null
return (
-
-
-
{
- if (isCurrentWorkspaceEditor)
- setOpen(v => !v)
- }}
- className='block'
- >
-
-
-
-
- {appDetail.mode === 'advanced-chat' && (
-
- )}
- {appDetail.mode === 'agent-chat' && (
-
- )}
- {appDetail.mode === 'chat' && (
-
- )}
- {appDetail.mode === 'completion' && (
-
- )}
- {appDetail.mode === 'workflow' && (
-
- )}
-
-
- {expand && (
-
-
-
{appDetail.name}
- {isCurrentWorkspaceEditor &&
}
-
-
- {appDetail.mode === 'advanced-chat' && (
- <>
-
{t('app.types.chatbot').toUpperCase()}
-
{t('app.types.advanced').toUpperCase()}
- >
- )}
- {appDetail.mode === 'agent-chat' && (
-
{t('app.types.agent').toUpperCase()}
- )}
- {appDetail.mode === 'chat' && (
- <>
-
{t('app.types.chatbot').toUpperCase()}
-
{(t('app.types.basic').toUpperCase())}
- >
- )}
- {appDetail.mode === 'completion' && (
- <>
-
{t('app.types.completion').toUpperCase()}
-
{(t('app.types.basic').toUpperCase())}
- >
- )}
- {appDetail.mode === 'workflow' && (
-
{t('app.types.workflow').toUpperCase()}
- )}
-
+
+