nas/app/javascript/mastodon/features/ui/components/link_footer.tsx
2025-06-15 01:33:05 -04:00

63 lines
2 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { FormattedMessage } from 'react-intl';
import { Link } from 'react-router-dom';
import {
domain,
source_url,
statusPageUrl,
termsOfServiceEnabled,
} from 'mastodon/initial_state';
const DividingCircle: React.FC = () => <span aria-hidden={true}>{' · '}</span>;
export const LinkFooter: React.FC<{ multiColumn: boolean }> = ({ multiColumn }) => {
return (
<footer className='link-footer' role='contentinfo'>
<p>
<strong>{domain}</strong>:{' '}
<Link to='/about' target={multiColumn ? '_blank' : undefined}>
<FormattedMessage id='footer.about' defaultMessage='About' />
</Link>
{statusPageUrl && (
<>
<DividingCircle />
<a href={statusPageUrl} target='_blank' rel='noopener noreferrer'>
<FormattedMessage id='footer.status' defaultMessage='Status' />
</a>
</>
)}
<DividingCircle />
<Link to='/privacy-policy' target={multiColumn ? '_blank' : undefined}>
<FormattedMessage id='footer.privacy_policy' defaultMessage='Privacy policy' />
</Link>
{termsOfServiceEnabled && (
<>
<DividingCircle />
<Link to='/terms-of-service' target={multiColumn ? '_blank' : undefined}>
<FormattedMessage id='footer.terms_of_service' defaultMessage='Terms of service' />
</Link>
</>
)}
<DividingCircle />
<Link to='/keyboard-shortcuts'>
<FormattedMessage id='footer.keyboard_shortcuts' defaultMessage='Keyboard shortcuts' />
</Link>
<DividingCircle />
<a href={source_url} rel='noopener noreferrer' target='_blank'>
<FormattedMessage id='footer.source_code' defaultMessage='View source code' />
</a>
</p>
<p>
<span title="Crafted with love for the fediverse">
Made with <span aria-label='heart' role='img'></span>
</span>
</p>
</footer>
);
};