2021-11-11 14:45:58 +01:00
|
|
|
import { Fragment } from 'react';
|
2022-01-08 14:03:10 +01:00
|
|
|
|
|
|
|
// UI
|
2021-11-11 14:45:58 +01:00
|
|
|
import { Button, SettingsHeadline } from '../../UI';
|
2022-01-08 14:03:10 +01:00
|
|
|
import { AuthForm } from './AuthForm/AuthForm';
|
2021-06-15 12:36:23 +02:00
|
|
|
import classes from './AppDetails.module.css';
|
2022-01-08 14:03:10 +01:00
|
|
|
|
|
|
|
// Store
|
|
|
|
import { useSelector } from 'react-redux';
|
|
|
|
import { State } from '../../../store/reducers';
|
|
|
|
|
|
|
|
// Other
|
2021-06-15 12:36:23 +02:00
|
|
|
import { checkVersion } from '../../../utility';
|
|
|
|
|
2021-11-09 14:33:51 +01:00
|
|
|
export const AppDetails = (): JSX.Element => {
|
2022-01-08 14:03:10 +01:00
|
|
|
const { isAuthenticated } = useSelector((state: State) => state.auth);
|
|
|
|
|
2021-06-15 12:36:23 +02:00
|
|
|
return (
|
|
|
|
<Fragment>
|
2021-11-10 13:53:28 +01:00
|
|
|
<SettingsHeadline text="Authentication" />
|
2021-11-11 14:45:58 +01:00
|
|
|
<AuthForm />
|
2021-11-10 13:53:28 +01:00
|
|
|
|
2022-01-08 14:03:10 +01:00
|
|
|
{isAuthenticated && (
|
|
|
|
<Fragment>
|
|
|
|
<hr className={classes.separator} />
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<SettingsHeadline text="App version" />
|
|
|
|
<p className={classes.text}>
|
|
|
|
<a
|
|
|
|
href="https://github.com/pawelmalak/flame"
|
|
|
|
target="_blank"
|
|
|
|
rel="noreferrer"
|
|
|
|
>
|
|
|
|
Flame
|
|
|
|
</a>{' '}
|
|
|
|
version {process.env.REACT_APP_VERSION}
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p className={classes.text}>
|
|
|
|
See changelog{' '}
|
|
|
|
<a
|
|
|
|
href="https://github.com/pawelmalak/flame/blob/master/CHANGELOG.md"
|
|
|
|
target="_blank"
|
|
|
|
rel="noreferrer"
|
|
|
|
>
|
|
|
|
here
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<Button click={() => checkVersion(true)}>Check for updates</Button>
|
|
|
|
</div>
|
|
|
|
</Fragment>
|
|
|
|
)}
|
2021-06-15 12:36:23 +02:00
|
|
|
</Fragment>
|
2021-11-09 14:33:51 +01:00
|
|
|
);
|
|
|
|
};
|