mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 19:40:30 +08:00
145 lines
3.4 KiB
TypeScript
145 lines
3.4 KiB
TypeScript
import { Modal, ModalCloseButton, ModalWrapper } from '@/ui/modal';
|
||
import {
|
||
LogoIcon,
|
||
DocIcon,
|
||
TwitterIcon,
|
||
GithubIcon,
|
||
DiscordIcon,
|
||
TelegramIcon,
|
||
RedditIcon,
|
||
LinkIcon,
|
||
} from './icons';
|
||
import logo from './affine-text-logo.png';
|
||
import {
|
||
StyledBigLink,
|
||
StyledSmallLink,
|
||
StyledSubTitle,
|
||
StyledLeftContainer,
|
||
StyledRightContainer,
|
||
StyledContent,
|
||
StyledLogo,
|
||
StyledModalHeader,
|
||
StyledModalHeaderLeft,
|
||
StyledModalFooter,
|
||
} from './style';
|
||
import bg from '@/components/contact-modal/bg.png';
|
||
|
||
const linkList = [
|
||
{
|
||
icon: <GithubIcon />,
|
||
title: 'GitHub',
|
||
link: 'https://github.com/toeverything/AFFiNE',
|
||
},
|
||
{
|
||
icon: <RedditIcon />,
|
||
title: 'Reddit',
|
||
link: 'https://www.reddit.com/r/Affine/',
|
||
},
|
||
{
|
||
icon: <TwitterIcon />,
|
||
title: 'Twitter',
|
||
link: 'https://twitter.com/AffineOfficial',
|
||
},
|
||
{
|
||
icon: <TelegramIcon />,
|
||
title: 'Telegram',
|
||
link: 'https://t.me/affineworkos',
|
||
},
|
||
{
|
||
icon: <DiscordIcon />,
|
||
title: 'Discord',
|
||
link: 'https://discord.gg/Arn7TqJBvG',
|
||
},
|
||
];
|
||
const rightLinkList = [
|
||
{
|
||
icon: <LogoIcon />,
|
||
title: 'Official Website ',
|
||
subTitle: 'AFFiNE.pro',
|
||
link: 'https://affine.pro',
|
||
},
|
||
{
|
||
icon: <DocIcon />,
|
||
title: 'Check Our Docs',
|
||
subTitle: 'docs.AFFiNE.pro',
|
||
link: 'https://docs.affine.pro',
|
||
},
|
||
];
|
||
|
||
type TransitionsModalProps = {
|
||
open: boolean;
|
||
onClose: () => void;
|
||
};
|
||
|
||
export const ContactModal = ({ open, onClose }: TransitionsModalProps) => {
|
||
return (
|
||
<Modal open={open} onClose={onClose}>
|
||
<ModalWrapper
|
||
width={860}
|
||
height={540}
|
||
style={{ backgroundImage: `url(${bg.src})` }}
|
||
>
|
||
<StyledModalHeader>
|
||
<StyledModalHeaderLeft>
|
||
<StyledLogo src={logo.src} alt="" />
|
||
<span>Alpha</span>
|
||
</StyledModalHeaderLeft>
|
||
<ModalCloseButton
|
||
top={6}
|
||
right={6}
|
||
onClick={() => {
|
||
onClose();
|
||
}}
|
||
/>
|
||
</StyledModalHeader>
|
||
|
||
<StyledContent>
|
||
<StyledLeftContainer>
|
||
{rightLinkList.map(({ icon, title, subTitle, link }) => {
|
||
return (
|
||
<StyledBigLink key={title} href={link} target="_blank">
|
||
{icon}
|
||
<p>{title}</p>
|
||
<p>
|
||
{subTitle}
|
||
<LinkIcon />
|
||
</p>
|
||
</StyledBigLink>
|
||
);
|
||
})}
|
||
</StyledLeftContainer>
|
||
<StyledRightContainer>
|
||
<StyledSubTitle>
|
||
Get in touch! <br />
|
||
Join our community.
|
||
</StyledSubTitle>
|
||
{linkList.map(({ icon, title, link }) => {
|
||
return (
|
||
<StyledSmallLink key={title} href={link} target="_blank">
|
||
{icon}
|
||
{title}
|
||
</StyledSmallLink>
|
||
);
|
||
})}
|
||
</StyledRightContainer>
|
||
</StyledContent>
|
||
|
||
<StyledModalFooter>
|
||
<p>
|
||
<a
|
||
href="https://affine.pro/content/blog/affine-alpha-is-coming/index"
|
||
target="_blank"
|
||
rel="noreferrer"
|
||
>
|
||
How is AFFiNE Alpha different?
|
||
</a>
|
||
</p>
|
||
<p>Copyright © 2022 Toeverything</p>
|
||
</StyledModalFooter>
|
||
</ModalWrapper>
|
||
</Modal>
|
||
);
|
||
};
|
||
|
||
export default ContactModal;
|