diff --git a/src/layouts/just-navigation/index.tsx b/src/layouts/just-navigation/index.tsx deleted file mode 100644 index 6198482d..00000000 --- a/src/layouts/just-navigation/index.tsx +++ /dev/null @@ -1,178 +0,0 @@ -import { Link, Outlet, useLocation, useMatch, useNavigate } from 'react-router-dom'; -import { useEffect } from 'react'; -import { BiLinkExternal } from '@react-icons/all-files/bi/BiLinkExternal'; -import { BiBookBookmark } from '@react-icons/all-files/bi/BiBookBookmark'; -import { BiCodeBlock } from '@react-icons/all-files/bi/BiCodeBlock'; -import { AiOutlineGithub } from '@react-icons/all-files/ai/AiOutlineGithub'; -import { BiCubeAlt } from '@react-icons/all-files/bi/BiCubeAlt'; -import { HiTranslate } from '@react-icons/all-files/hi/HiTranslate'; -import clsx from 'clsx'; -import { BiMenu } from '@react-icons/all-files/bi/BiMenu'; -import { useTranslation } from 'react-i18next'; - -import { ReactComponent as Logo } from '@/assets/logo.svg'; -import { Drawer } from '@/components/drawer'; -import { Menu } from '@/components/menu'; -import i18nLocale from '@/locale'; - -const links = [ - { - title: i18nLocale.t('guide'), - path: '/guide', - icon: , - }, - { - title: i18nLocale.t('schema'), - path: '/schema', - icon: , - }, - { - title: i18nLocale.t('playground'), - path: '/playground', - icon: , - }, - { - title: 'LabelU-kit', - path: 'https://github.com/opendatalab/labelU-kit#readme', - icon: null, - type: 'external', - }, -]; - -const langs = [ - { - title: '中文', - path: 'zh-CN', - }, - { - title: 'English', - path: 'en-US', - }, -]; - -export default function JustNavigation({ children }: React.PropsWithChildren<{}>) { - const location = useLocation(); - const navigate = useNavigate(); - const match = useMatch('/:path/*'); - const secondPath = match?.pathname.split('/')[1]; - const { i18n } = useTranslation(); - - useEffect(() => { - if (location.pathname === '/' || location.pathname === '/guide') { - navigate(`/guide/introduction`, { - replace: true, - }); - } - }, [i18n.language, location.pathname, navigate]); - - const handleLangChange = (lang: string) => () => { - i18n.changeLanguage(lang); - window.location.reload(); - }; - - return ( -
-
-
-
- -
- {links.map(({ title, path, icon, type }) => ( - - {icon} {title} - - ))} -
- -
- } - width="calc(100vw - 72px)" - > - - -
- -
-
- -
- LabelU -
- -
-
-
-
- {links.map(({ title, path, icon, type }) => ( - - {icon} {title} - {type === 'external' && } - - ))} -
-
- - - - - - -
    - {langs.map(({ title, path }) => ( -
  • - {title} -
  • - ))} -
-
- - - - - -
-
- -
- {children} -
- - ); -} diff --git a/src/layouts/main/index.tsx b/src/layouts/main/index.tsx index 0480c956..4f4d8d7b 100644 --- a/src/layouts/main/index.tsx +++ b/src/layouts/main/index.tsx @@ -26,11 +26,6 @@ const links = [ path: 'schema', icon: , }, - { - title: i18nLocale.t('playground'), - path: 'playground', - icon: , - }, { title: 'LabelU-kit', path: 'https://github.com/opendatalab/labelU-kit#readme', diff --git a/src/pages/guide.introduction/markdown_zh-CN.mdx b/src/pages/guide.introduction/markdown_zh-CN.mdx index 05985d8e..9cb81f6c 100644 --- a/src/pages/guide.introduction/markdown_zh-CN.mdx +++ b/src/pages/guide.introduction/markdown_zh-CN.mdx @@ -3,8 +3,9 @@ ### 产品介绍 LabelU是一个开源的数据标注工具,它可以帮助用户快速、准确、高效地对数据进行标注,从而提高机器学习模型的性能和质量。LabelU支持多种标注类型,包括标签分类、文本描述、拉框、多边形、点、线、立体框、时间戳、片段分割等,满足不同场景和需求的标注任务。 -体验产品可通过以下两种方式: -- 在线体验:[https://labelu.shlab.tech/](https://labelu.shlab.tech/) +体验产品可通过以下方式: +- 标注工具:[https://opendatalab.github.io/labelU-Kit/](https://opendatalab.github.io/labelU-Kit/) +- LabelU 在线体验:[https://labelu.shlab.tech/](https://labelu.shlab.tech/) - 本地部署:[https://opendatalab.github.io/labelU/#/guide/install](https://opendatalab.github.io/labelU/#/guide/install) ### 功能特性 diff --git a/src/routes.tsx b/src/routes.tsx index 9f9e985b..ea2dbe10 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -26,8 +26,6 @@ import PolygonSchema from './pages/schema.image.polygon'; import CuboidSchema from './pages/schema.image.cuboid'; import AudioSegmentSchema from './pages/schema.audio.segment'; import AudioFrameSchema from './pages/schema.audio.frame'; -import Playground from './pages/playground'; -import JustNavigation from './layouts/just-navigation'; export interface RouteWithName extends NonIndexRouteObject { name?: string; @@ -299,15 +297,6 @@ const routes = [ }, ], }, - { - path: '/playground', - element: , - handle: { - crumb: () => { - return i18n.t('playground'); - }, - }, - }, { path: '*', element: ,