robosats/frontend/src/components/Dialogs/Community.tsx

185 lines
5.3 KiB
TypeScript
Raw Normal View History

2022-09-09 17:18:04 +00:00
import React from 'react';
import { useTranslation } from 'react-i18next';
2022-05-06 10:30:10 +00:00
import {
Dialog,
DialogContent,
Divider,
IconButton,
List,
ListItemText,
ListItem,
ListItemIcon,
ListItemButton,
Tooltip,
Typography,
2022-09-09 17:18:04 +00:00
} from '@mui/material';
2022-05-06 10:30:10 +00:00
import SendIcon from '@mui/icons-material/Send';
import GitHubIcon from '@mui/icons-material/GitHub';
2022-05-13 15:47:54 +00:00
import TwitterIcon from '@mui/icons-material/Twitter';
2022-05-31 16:29:23 +00:00
import RedditIcon from '@mui/icons-material/Reddit';
2022-09-09 17:18:04 +00:00
import Flags from 'country-flag-icons/react/3x2';
2022-05-06 10:30:10 +00:00
interface Props {
open: boolean;
Add Nav Bar, Settings Page, large refactor (#308) commit a5b63aed93e084fae19d9e444e06238a52f24f3a Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 10:46:05 2022 -0700 Small fixes commit d64adfc2bf9b9c31dca47ab113c06a1268c347c6 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 06:02:06 2022 -0700 wip work on federation settings commit ca35d6b3d2776812b07109e197d2e1d46f9f4e81 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 04:05:33 2022 -0700 Refactor confirmation Dialogs commit c660a5b0d1345d4996efb10cb8999987689bede9 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sat Oct 29 13:36:59 2022 -0700 refactor login (clean separation robot/info. Style navbar. commit b9dc7f7c95a683e3aca024ec6d7857176b4e3a25 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Fri Oct 28 09:54:38 2022 -0700 Add size slider and settings widget commit 20b2b3dcd6838b129741705f1c65d445271e231d Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Fri Oct 28 05:41:48 2022 -0700 Add show more and Dialogs commit da8b70091b5f28139cdec1a8895f4563d64d8e88 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Thu Oct 27 16:26:07 2022 -0700 Add sliding pages commit 6dd90aa1182a7a5e0f0189d1467ba474b68c28c2 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Thu Oct 27 06:34:58 2022 -0700 Add settings forms commit d3d0f3ee1a52bbf1829714050cc798d2542af8f6 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Wed Oct 26 04:16:06 2022 -0700 Refactor utils
2022-10-30 19:13:01 +00:00
onClose: () => void;
}
2022-05-06 10:30:10 +00:00
Add Nav Bar, Settings Page, large refactor (#308) commit a5b63aed93e084fae19d9e444e06238a52f24f3a Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 10:46:05 2022 -0700 Small fixes commit d64adfc2bf9b9c31dca47ab113c06a1268c347c6 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 06:02:06 2022 -0700 wip work on federation settings commit ca35d6b3d2776812b07109e197d2e1d46f9f4e81 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 04:05:33 2022 -0700 Refactor confirmation Dialogs commit c660a5b0d1345d4996efb10cb8999987689bede9 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sat Oct 29 13:36:59 2022 -0700 refactor login (clean separation robot/info. Style navbar. commit b9dc7f7c95a683e3aca024ec6d7857176b4e3a25 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Fri Oct 28 09:54:38 2022 -0700 Add size slider and settings widget commit 20b2b3dcd6838b129741705f1c65d445271e231d Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Fri Oct 28 05:41:48 2022 -0700 Add show more and Dialogs commit da8b70091b5f28139cdec1a8895f4563d64d8e88 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Thu Oct 27 16:26:07 2022 -0700 Add sliding pages commit 6dd90aa1182a7a5e0f0189d1467ba474b68c28c2 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Thu Oct 27 06:34:58 2022 -0700 Add settings forms commit d3d0f3ee1a52bbf1829714050cc798d2542af8f6 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Wed Oct 26 04:16:06 2022 -0700 Refactor utils
2022-10-30 19:13:01 +00:00
const CommunityDialog = ({ open = false, onClose }: Props): JSX.Element => {
2022-05-06 10:30:10 +00:00
const { t } = useTranslation();
const flagProps = {
width: 30,
height: 30,
2022-05-13 15:47:54 +00:00
opacity: 0.85,
2022-05-06 10:30:10 +00:00
style: {
2022-09-09 17:18:04 +00:00
filter: 'drop-shadow(2px 2px 2px #444444)',
2022-05-06 10:30:10 +00:00
},
};
return (
<Dialog
open={open}
Add Nav Bar, Settings Page, large refactor (#308) commit a5b63aed93e084fae19d9e444e06238a52f24f3a Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 10:46:05 2022 -0700 Small fixes commit d64adfc2bf9b9c31dca47ab113c06a1268c347c6 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 06:02:06 2022 -0700 wip work on federation settings commit ca35d6b3d2776812b07109e197d2e1d46f9f4e81 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sun Oct 30 04:05:33 2022 -0700 Refactor confirmation Dialogs commit c660a5b0d1345d4996efb10cb8999987689bede9 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Sat Oct 29 13:36:59 2022 -0700 refactor login (clean separation robot/info. Style navbar. commit b9dc7f7c95a683e3aca024ec6d7857176b4e3a25 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Fri Oct 28 09:54:38 2022 -0700 Add size slider and settings widget commit 20b2b3dcd6838b129741705f1c65d445271e231d Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Fri Oct 28 05:41:48 2022 -0700 Add show more and Dialogs commit da8b70091b5f28139cdec1a8895f4563d64d8e88 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Thu Oct 27 16:26:07 2022 -0700 Add sliding pages commit 6dd90aa1182a7a5e0f0189d1467ba474b68c28c2 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Thu Oct 27 06:34:58 2022 -0700 Add settings forms commit d3d0f3ee1a52bbf1829714050cc798d2542af8f6 Author: Reckless_Satoshi <reckless.satoshi@protonmail.com> Date: Wed Oct 26 04:16:06 2022 -0700 Refactor utils
2022-10-30 19:13:01 +00:00
onClose={onClose}
2022-09-09 17:18:04 +00:00
aria-labelledby='community-dialog-title'
aria-describedby='community-description'
2022-05-06 10:30:10 +00:00
>
<DialogContent>
2022-09-09 17:18:04 +00:00
<Typography component='h5' variant='h5'>
{t('Community')}
2022-05-06 10:30:10 +00:00
</Typography>
2022-09-09 17:18:04 +00:00
<Typography component='div' variant='body2'>
<p>
{t(
'Support is only offered via public channels. Join our Telegram community if you have questions or want to hang out with other cool robots. Please, use our Github Issues if you find a bug or want to see new features!',
)}
</p>
2022-05-06 10:30:10 +00:00
</Typography>
2022-05-31 16:29:23 +00:00
<List dense>
2022-09-09 17:18:04 +00:00
<Divider />
2022-05-06 10:30:10 +00:00
<ListItemButton
2022-09-09 17:18:04 +00:00
component='a'
target='_blank'
href='https://twitter.com/robosats'
rel='noreferrer'
2022-05-06 10:30:10 +00:00
>
<ListItemIcon>
2022-09-09 17:18:04 +00:00
<TwitterIcon color='primary' sx={{ height: 32, width: 32 }} />
2022-05-06 10:30:10 +00:00
</ListItemIcon>
<ListItemText
2022-09-09 17:18:04 +00:00
primary={t('Follow RoboSats in Twitter')}
secondary={t('Twitter Official Account')}
2022-05-06 10:30:10 +00:00
/>
</ListItemButton>
2022-09-09 17:18:04 +00:00
<Divider />
2022-05-06 10:30:10 +00:00
2022-05-31 16:29:23 +00:00
<ListItemButton
2022-09-09 17:18:04 +00:00
component='a'
target='_blank'
href='https://reddit.com/r/robosats'
rel='noreferrer'
2022-05-31 16:29:23 +00:00
>
<ListItemIcon>
2022-09-09 17:18:04 +00:00
<RedditIcon color='primary' sx={{ height: 35, width: 35 }} />
2022-05-31 16:29:23 +00:00
</ListItemIcon>
<ListItemText
primary={t("Join RoboSats' Subreddit")}
2022-09-09 17:18:04 +00:00
secondary={t('RoboSats in Reddit')}
2022-05-31 16:29:23 +00:00
/>
</ListItemButton>
2022-09-09 17:18:04 +00:00
<Divider />
2022-05-31 16:29:23 +00:00
2022-05-06 10:30:10 +00:00
<ListItem>
<ListItemIcon>
2022-09-09 17:18:04 +00:00
<SendIcon color='primary' sx={{ height: 32, width: 32 }} />
2022-05-06 10:30:10 +00:00
</ListItemIcon>
2022-09-09 17:18:04 +00:00
<ListItemText secondary={t('RoboSats Telegram Communities')}>
<Tooltip title={t('Join RoboSats Spanish speaking community!') || ''}>
2022-05-06 10:30:10 +00:00
<IconButton
2022-09-09 17:18:04 +00:00
component='a'
target='_blank'
href='https://t.me/robosats_es'
rel='noreferrer'
2022-05-06 10:30:10 +00:00
>
<Flags.ES {...flagProps} />
</IconButton>
</Tooltip>
2022-09-09 17:18:04 +00:00
<Tooltip title={t('Join RoboSats Russian speaking community!') || ''}>
2022-05-06 10:30:10 +00:00
<IconButton
2022-09-09 17:18:04 +00:00
component='a'
target='_blank'
href='https://t.me/robosats_ru'
rel='noreferrer'
2022-05-06 10:30:10 +00:00
>
<Flags.RU {...flagProps} />
</IconButton>
</Tooltip>
2022-09-09 17:18:04 +00:00
<Tooltip title={t('Join RoboSats Chinese speaking community!') || ''}>
2022-05-06 10:30:10 +00:00
<IconButton
2022-09-09 17:18:04 +00:00
component='a'
target='_blank'
href='https://t.me/robosats_cn'
rel='noreferrer'
2022-05-06 10:30:10 +00:00
>
<Flags.CN {...flagProps} />
</IconButton>
</Tooltip>
2022-09-09 17:18:04 +00:00
<Tooltip title={t('Join RoboSats English speaking community!') || ''}>
2022-05-06 10:30:10 +00:00
<IconButton
2022-09-09 17:18:04 +00:00
component='a'
target='_blank'
href='https://t.me/robosats'
rel='noreferrer'
2022-05-06 10:30:10 +00:00
>
<Flags.US {...flagProps} />
</IconButton>
</Tooltip>
2022-09-09 17:18:04 +00:00
<Tooltip title={t('Join RoboSats Portuguese speaking community!') || ''}>
<IconButton
2022-09-09 17:18:04 +00:00
component='a'
target='_blank'
href='https://t.me/robosats_pt'
rel='noreferrer'
>
<Flags.BR {...flagProps} />
</IconButton>
</Tooltip>
2022-05-06 10:30:10 +00:00
</ListItemText>
</ListItem>
2022-09-09 17:18:04 +00:00
<Divider />
2022-05-06 10:30:10 +00:00
<ListItemButton
2022-09-09 17:18:04 +00:00
component='a'
target='_blank'
href='https://github.com/Reckless-Satoshi/robosats/issues'
rel='noreferrer'
>
2022-05-06 10:30:10 +00:00
<ListItemIcon>
2022-09-09 17:18:04 +00:00
<GitHubIcon color='primary' sx={{ height: 32, width: 32 }} />
2022-05-06 10:30:10 +00:00
</ListItemIcon>
<ListItemText
2022-09-09 17:18:04 +00:00
primary={t('Tell us about a new feature or a bug')}
secondary={t('Github Issues - The Robotic Satoshis Open Source Project')}
2022-05-06 10:30:10 +00:00
/>
</ListItemButton>
</List>
</DialogContent>
</Dialog>
);
};
export default CommunityDialog;