Add new overview landing page setting (#39074)
This commit is contained in:
1 parent
f6d1795da5
commit
07d099cbf7
15 files changed
+483
-17
No files matched your search
@@ -0,0 +1,39 @@
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { fetchServer } from 'mastodon/actions/server';
|
||||
import { useAppDispatch, useAppSelector } from 'mastodon/store';
|
||||
|
||||
import classes from '../styles.module.scss';
|
||||
|
||||
export const Footer = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const server = useAppSelector((state) => state.server.server);
|
||||
const email = server.item?.contact.email ?? '';
|
||||
|
||||
useEffect(() => {
|
||||
void dispatch(fetchServer());
|
||||
}, [dispatch]);
|
||||
|
||||
return (
|
||||
<footer className={classes.minimalFooter}>
|
||||
<div className={classes.contact}>
|
||||
<FormattedMessage
|
||||
id='custom_homepage.contact'
|
||||
defaultMessage='Contact:'
|
||||
/>
|
||||
<a href={`mailto:${email}`}>{email}</a>
|
||||
</div>
|
||||
|
||||
<Link to='/privacy-policy' rel='privacy-policy'>
|
||||
<FormattedMessage
|
||||
id='footer.privacy_policy'
|
||||
defaultMessage='Privacy policy'
|
||||
/>
|
||||
</Link>
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { domain, sso_redirect } from 'mastodon/initial_state';
|
||||
|
||||
import classes from '../styles.module.scss';
|
||||
|
||||
export const Header = () => (
|
||||
<div className={classes.minimalHeader}>
|
||||
<div className={classes.leftSide}>
|
||||
<Link to='/overview'>{domain}</Link>
|
||||
</div>
|
||||
|
||||
<div className={classes.rightSide}>
|
||||
<a
|
||||
href={sso_redirect ?? '/auth/sign_in'}
|
||||
data-method={sso_redirect ? 'post' : undefined}
|
||||
className='button button-secondary'
|
||||
>
|
||||
<FormattedMessage id='sign_in_banner.sign_in' defaultMessage='Login' />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
Reference in new issue
Block a user