mirror of
https://github.com/langgenius/dify.git
synced 2026-07-24 13:08:34 +08:00
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
'use client'
|
|
import type { FC } from 'react'
|
|
import { cn } from '@langgenius/dify-ui/cn'
|
|
import * as React from 'react'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { useDocLink } from '@/context/i18n'
|
|
import useTheme from '@/hooks/use-theme'
|
|
import { Theme } from '@/types/app'
|
|
import s from './style.module.css'
|
|
|
|
const i18nPrefix = 'sidebar.noApps'
|
|
|
|
const NoApps: FC = () => {
|
|
const { t } = useTranslation()
|
|
const { theme } = useTheme()
|
|
const docLink = useDocLink()
|
|
return (
|
|
<div className="rounded-xl bg-background-default-subtle p-4">
|
|
<div
|
|
className={cn(
|
|
'h-[35px] w-[86px] bg-contain bg-center bg-no-repeat',
|
|
theme === Theme.dark ? s.dark : s.light,
|
|
)}
|
|
></div>
|
|
<div className="mt-2 system-sm-semibold text-text-secondary">
|
|
{t(($) => $[`${i18nPrefix}.title`], { ns: 'explore' })}
|
|
</div>
|
|
<div className="my-1 system-xs-regular text-text-tertiary">
|
|
{t(($) => $[`${i18nPrefix}.description`], { ns: 'explore' })}
|
|
</div>
|
|
<a
|
|
className="system-xs-regular text-text-accent"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
href={docLink('/use-dify/publish/README')}
|
|
>
|
|
{t(($) => $[`${i18nPrefix}.learnMore`], { ns: 'explore' })}
|
|
</a>
|
|
</div>
|
|
)
|
|
}
|
|
export default React.memo(NoApps)
|