mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-26 16:02:18 +08:00
81dbfd6748
# Conflicts: # README.md # api/.env.example # api/controllers/console/__init__.py # api/controllers/console/apikey.py # api/controllers/console/explore/completion.py # api/controllers/console/explore/workflow.py # api/controllers/service_api/app/workflow.py # api/controllers/service_api/wraps.py # api/controllers/web/workflow.py # api/core/model_runtime/model_providers/bedrock/get_bedrock_client.py # api/core/model_runtime/model_providers/bedrock/llm/llm.py # api/core/model_runtime/model_providers/openai_api_compatible/openai_api_compatible.yaml # api/core/model_runtime/model_providers/openai_api_compatible/text_embedding/text_embedding.py # api/models/model.py # api/poetry.lock # api/pyproject.toml # web/.env.example # web/Dockerfile # web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout.tsx # web/app/components/app/overview/appCard.tsx # web/app/components/base/chat/chat-with-history/chat-wrapper.tsx # web/app/components/base/chat/embedded-chatbot/index.tsx # web/app/components/base/mermaid/index.tsx # web/app/components/develop/index.tsx # web/app/components/develop/secret-key/secret-key-modal.tsx # web/app/components/explore/app-list/index.tsx # web/app/components/explore/item-operation/index.tsx # web/app/components/explore/sidebar/app-nav-item/index.tsx # web/app/components/explore/sidebar/index.tsx # web/app/components/header/account-setting/index.tsx # web/app/components/header/index.tsx # web/app/components/share/text-generation/index.tsx # web/app/components/tools/provider/detail.tsx # web/app/layout.tsx # web/package.json # web/service/base.ts # web/yarn.lock
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
'use client'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
import Link from 'next/link'
|
|
import { useSelectedLayoutSegment } from 'next/navigation'
|
|
import {
|
|
RiPlanetFill,
|
|
RiPlanetLine,
|
|
} from '@remixicon/react'
|
|
import classNames from '@/utils/classnames'
|
|
type ExploreNavProps = {
|
|
className?: string
|
|
}
|
|
|
|
const ExploreNav = ({
|
|
className,
|
|
}: ExploreNavProps) => {
|
|
const { t } = useTranslation()
|
|
const selectedSegment = useSelectedLayoutSegment()
|
|
const activated = selectedSegment === 'explore'
|
|
|
|
return (
|
|
<Link href="/explore/apps-center-extend" className={classNames(
|
|
className, 'group',
|
|
activated && 'bg-components-main-nav-nav-button-bg-active shadow-md',
|
|
activated ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text hover:bg-components-main-nav-nav-button-bg-hover',
|
|
)}>
|
|
{
|
|
activated
|
|
? <RiPlanetFill className='mr-2 h-4 w-4' />
|
|
: <RiPlanetLine className='mr-2 h-4 w-4' />
|
|
}
|
|
{t('common.menus.explore')}
|
|
</Link>
|
|
)
|
|
}
|
|
|
|
export default ExploreNav
|