page.tsx 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. 'use client'
  2. import { useContextSelector } from 'use-context-selector'
  3. import { useTranslation } from 'react-i18next'
  4. import { RiDiscordFill, RiGithubFill } from '@remixicon/react'
  5. import Link from 'next/link'
  6. import style from '../list.module.css'
  7. import Apps from './Apps'
  8. import AppContext from '@/context/app-context'
  9. import { LicenseStatus } from '@/types/feature'
  10. const AppList = () => {
  11. const { t } = useTranslation()
  12. const systemFeatures = useContextSelector(AppContext, v => v.systemFeatures)
  13. return (
  14. <div className='relative flex flex-col overflow-y-auto bg-background-body shrink-0 h-0 grow'>
  15. <Apps />
  16. {systemFeatures.license.status === LicenseStatus.NONE && <footer className='px-12 py-6 grow-0 shrink-0'>
  17. <h3 className='text-xl font-semibold leading-tight text-gradient'>{t('app.join')}</h3>
  18. <p className='mt-1 system-sm-regular text-text-tertiary'>{t('app.communityIntro')}</p>
  19. <div className='flex items-center gap-2 mt-3'>
  20. <Link className={style.socialMediaLink} target='_blank' rel='noopener noreferrer' href='https://github.com/langgenius/dify'>
  21. <RiGithubFill className='w-5 h-5 text-text-tertiary' />
  22. </Link>
  23. <Link className={style.socialMediaLink} target='_blank' rel='noopener noreferrer' href='https://discord.gg/FngNHpbcY7'>
  24. <RiDiscordFill className='w-5 h-5 text-text-tertiary' />
  25. </Link>
  26. </div>
  27. </footer>}
  28. </div >
  29. )
  30. }
  31. export default AppList