robosats/frontend/src/components/Dialogs/UpdateClient.tsx
Reckless_Satoshi 227610c84a
Add Nav Bar, Settings Page, large refactor (#308)
commit a5b63aed93
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com>
Date:   Sun Oct 30 10:46:05 2022 -0700

    Small fixes

commit d64adfc2bf
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com>
Date:   Sun Oct 30 06:02:06 2022 -0700

    wip work on federation settings

commit ca35d6b3d2
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com>
Date:   Sun Oct 30 04:05:33 2022 -0700

    Refactor confirmation Dialogs

commit c660a5b0d1
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 b9dc7f7c95
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com>
Date:   Fri Oct 28 09:54:38 2022 -0700

    Add size slider and settings widget

commit 20b2b3dcd6
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com>
Date:   Fri Oct 28 05:41:48 2022 -0700

    Add show more and Dialogs

commit da8b70091b
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com>
Date:   Thu Oct 27 16:26:07 2022 -0700

    Add sliding pages

commit 6dd90aa118
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com>
Date:   Thu Oct 27 06:34:58 2022 -0700

    Add settings forms

commit d3d0f3ee1a
Author: Reckless_Satoshi <reckless.satoshi@protonmail.com>
Date:   Wed Oct 26 04:16:06 2022 -0700

    Refactor utils
2022-10-30 12:13:01 -07:00

114 lines
3.1 KiB
TypeScript

import React from 'react';
import { useTranslation } from 'react-i18next';
import {
Dialog,
DialogContent,
DialogActions,
Button,
Divider,
List,
ListItemText,
ListItemIcon,
ListItemButton,
Typography,
} from '@mui/material';
import WebIcon from '@mui/icons-material/Web';
import AndroidIcon from '@mui/icons-material/Android';
import UpcomingIcon from '@mui/icons-material/Upcoming';
interface Props {
open: boolean;
clientVersion: string;
coordinatorVersion: string;
onClose: () => void;
}
const UpdateClientDialog = ({
open = false,
clientVersion,
coordinatorVersion,
onClose,
}: Props): JSX.Element => {
const { t } = useTranslation();
return (
<Dialog open={open} onClose={onClose}>
<DialogContent>
<Typography component='h5' variant='h5'>
{t('Update your RoboSats client')}
</Typography>
<br />
<Typography>
{t(
'The RoboSats coordinator is on version {{coordinatorVersion}}, but your client app is {{clientVersion}}. This version mismatch might lead to a bad user experience.',
{ coordinatorVersion, clientVersion },
)}
</Typography>
<List dense>
<ListItemButton
component='a'
target='_blank'
href={`https://github.com/Reckless-Satoshi/robosats/releases/tag/${coordinatorVersion}`}
rel='noreferrer'
>
<ListItemIcon>
<AndroidIcon color='primary' sx={{ height: 32, width: 32 }} />
</ListItemIcon>
<ListItemText
secondary={t('Download RoboSats {{coordinatorVersion}} APK from Github releases', {
coordinatorVersion,
})}
primary={t('On Android RoboSats app ')}
/>
</ListItemButton>
<Divider />
<ListItemButton
component='a'
target='_blank'
href={`https://hub.docker.com/r/recksato/robosats-client`}
rel='noreferrer'
>
<ListItemIcon>
<UpcomingIcon color='primary' sx={{ height: 32, width: 32 }} />
</ListItemIcon>
<ListItemText
secondary={t("Check your node's store or update the Docker image yourself")}
primary={t('On your own soverign node')}
/>
</ListItemButton>
<Divider />
<ListItemButton component='a' onClick={() => location.reload(true)}>
<ListItemIcon>
<WebIcon color='primary' sx={{ height: 32, width: 32 }} />
</ListItemIcon>
<ListItemText
secondary={t(
'On Tor Browser client simply refresh your tab (click here or press Ctrl+Shift+R)',
)}
primary={t('On remotely served browser client')}
/>
</ListItemButton>
<DialogActions>
<Button onClick={onClose}>{t('Go away!')}</Button>
</DialogActions>
</List>
</DialogContent>
</Dialog>
);
};
export default UpdateClientDialog;