2023-03-06 12:53:20 +01:00
|
|
|
import React, { useState } from 'react';
|
2023-03-11 18:40:26 +01:00
|
|
|
import { useTranslation, Trans } from 'react-i18next';
|
2023-03-06 12:53:20 +01:00
|
|
|
import PopupModal from '@components/PopupModal';
|
|
|
|
import AboutIcon from '@icon/AboutIcon';
|
|
|
|
|
|
|
|
const AboutMenu = () => {
|
2023-03-11 18:40:26 +01:00
|
|
|
const { t } = useTranslation(['main', 'about']);
|
2023-03-06 12:53:20 +01:00
|
|
|
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<a
|
|
|
|
className='flex py-3 px-3 items-center gap-3 rounded-md hover:bg-gray-500/10 transition-colors duration-200 text-white cursor-pointer text-sm'
|
|
|
|
onClick={() => {
|
|
|
|
setIsModalOpen(true);
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<div>
|
|
|
|
<AboutIcon />
|
|
|
|
</div>
|
2023-03-11 18:40:26 +01:00
|
|
|
{t('about')}
|
2023-03-06 12:53:20 +01:00
|
|
|
</a>
|
|
|
|
{isModalOpen && (
|
|
|
|
<PopupModal
|
2023-03-11 19:34:10 +01:00
|
|
|
title={t('about') as string}
|
2023-03-06 12:53:20 +01:00
|
|
|
setIsModalOpen={setIsModalOpen}
|
|
|
|
cancelButton={false}
|
|
|
|
>
|
|
|
|
<div className='p-6 border-b border-gray-200 dark:border-gray-600'>
|
2023-03-11 19:34:10 +01:00
|
|
|
<div className='min-w-fit text-gray-900 dark:text-gray-300 text-sm flex flex-col gap-3 leading-relaxed'>
|
2023-03-11 18:40:26 +01:00
|
|
|
<p>{t('description', { ns: 'about' })}</p>
|
|
|
|
<p>
|
|
|
|
<Trans
|
2023-03-11 19:34:10 +01:00
|
|
|
i18nKey='sourceCode'
|
2023-03-11 18:40:26 +01:00
|
|
|
ns='about'
|
|
|
|
components={[
|
|
|
|
<a
|
2023-03-25 06:35:26 +01:00
|
|
|
href='https://github.com/ztjhz/BetterChatGPT'
|
2023-03-11 18:40:26 +01:00
|
|
|
target='_blank'
|
2023-03-11 19:34:10 +01:00
|
|
|
className='link'
|
2023-03-11 18:40:26 +01:00
|
|
|
/>,
|
|
|
|
]}
|
|
|
|
/>
|
|
|
|
</p>
|
2023-03-06 15:11:34 +01:00
|
|
|
|
2023-03-11 18:40:26 +01:00
|
|
|
<p>
|
|
|
|
<Trans
|
2023-03-11 19:34:10 +01:00
|
|
|
i18nKey='initiative.description'
|
2023-03-11 18:40:26 +01:00
|
|
|
ns='about'
|
|
|
|
components={[
|
|
|
|
<a
|
2023-03-11 19:44:57 +01:00
|
|
|
href={t('initiative.link', { ns: 'about' }) as string}
|
2023-03-11 18:40:26 +01:00
|
|
|
target='_blank'
|
|
|
|
className='link'
|
|
|
|
/>,
|
|
|
|
]}
|
|
|
|
/>
|
|
|
|
</p>
|
2023-03-11 19:34:10 +01:00
|
|
|
|
|
|
|
<>
|
|
|
|
<h2 className='text-lg font-bold'>
|
|
|
|
{t('support.title', { ns: 'about' })}
|
|
|
|
</h2>
|
|
|
|
<p>{t('support.paragraph1', { ns: 'about' })}</p>
|
|
|
|
<p>
|
|
|
|
<Trans
|
|
|
|
i18nKey='support.paragraph2'
|
|
|
|
ns='about'
|
|
|
|
components={[
|
|
|
|
<a
|
2023-03-25 06:35:26 +01:00
|
|
|
href='https://github.com/ztjhz/BetterChatGPT'
|
2023-03-11 19:34:10 +01:00
|
|
|
target='_blank'
|
|
|
|
className='link'
|
|
|
|
/>,
|
|
|
|
]}
|
2023-03-11 18:40:26 +01:00
|
|
|
/>
|
2023-03-11 19:34:10 +01:00
|
|
|
</p>
|
|
|
|
<p>{t('support.paragraph3', { ns: 'about' })}</p>
|
|
|
|
|
|
|
|
<div className='flex flex-col items-center gap-4 my-4'>
|
|
|
|
<a href='https://ko-fi.com/freechatgpt' target='_blank'>
|
2023-03-11 18:40:26 +01:00
|
|
|
<img
|
2023-03-11 19:34:10 +01:00
|
|
|
src='/kofi.svg'
|
|
|
|
alt='Support us through the Ko-fi platform.'
|
2023-03-11 18:40:26 +01:00
|
|
|
/>
|
2023-03-11 19:34:10 +01:00
|
|
|
</a>
|
|
|
|
<div className='flex gap-x-10 gap-y-4 flex-wrap justify-center'>
|
|
|
|
<div className='flex flex-col items-center justify-center gap-1'>
|
|
|
|
<div>{t('support.alipay', { ns: 'about' })} (Ayaka)</div>
|
|
|
|
<img
|
|
|
|
className='rounded-md w-32 h-32'
|
|
|
|
src='https://ayaka14732.github.io/sponsor/alipay.jpg'
|
|
|
|
alt='Support us through Alipay'
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className='flex flex-col items-center justify-center gap-1'>
|
|
|
|
<div>
|
|
|
|
{t('support.wechatPay', { ns: 'about' })} (Ayaka)
|
|
|
|
</div>
|
|
|
|
<img
|
|
|
|
className='rounded-md w-32 h-32'
|
|
|
|
src='https://ayaka14732.github.io/sponsor/wechat.png'
|
|
|
|
alt='Support us through WeChat Pay'
|
|
|
|
/>
|
|
|
|
</div>
|
2023-03-11 18:40:26 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-03-11 19:34:10 +01:00
|
|
|
<p>{t('support.paragraph4', { ns: 'about' })}</p>
|
|
|
|
</>
|
|
|
|
|
|
|
|
<h2 className='text-lg font-bold'>
|
|
|
|
{t('discordServer.title', { ns: 'about' })}
|
|
|
|
</h2>
|
|
|
|
<p>{t('discordServer.paragraph1', { ns: 'about' })}</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<Trans
|
|
|
|
i18nKey='discordServer.paragraph2'
|
|
|
|
ns='about'
|
|
|
|
components={[
|
|
|
|
<a
|
|
|
|
className='link'
|
|
|
|
href='https://discord.gg/g3Qnwy4V6A'
|
|
|
|
target='_blank'
|
|
|
|
/>,
|
|
|
|
]}
|
|
|
|
/>
|
2023-03-11 18:40:26 +01:00
|
|
|
</p>
|
2023-03-11 19:34:10 +01:00
|
|
|
|
|
|
|
<h2 className='text-lg font-bold'>
|
|
|
|
{t('privacyStatement.title', { ns: 'about' })}
|
|
|
|
</h2>
|
|
|
|
<p>{t('privacyStatement.paragraph1', { ns: 'about' })}</p>
|
|
|
|
|
|
|
|
<p>{t('privacyStatement.paragraph2', { ns: 'about' })}</p>
|
2023-03-06 12:53:20 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</PopupModal>
|
|
|
|
)}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default AboutMenu;
|