2022-09-07 10:00:28 +03:00
|
|
|
import { FC } from 'react';
|
2023-05-18 22:13:26 +03:00
|
|
|
import { useRecoilValue } from 'recoil';
|
2022-09-07 10:00:28 +03:00
|
|
|
import styles from './Footer.module.scss';
|
2023-05-18 22:13:26 +03:00
|
|
|
import { ServerStatus } from '../../../interfaces/server-status.model';
|
|
|
|
import { serverStatusState } from '../../stores/ClientConfigStore';
|
2022-04-28 19:54:33 +03:00
|
|
|
|
2022-09-07 10:00:28 +03:00
|
|
|
export type FooterProps = {
|
2023-05-18 22:13:26 +03:00
|
|
|
dynamicPaddingValue?: string;
|
2022-09-07 10:00:28 +03:00
|
|
|
};
|
2022-05-12 09:31:31 +03:00
|
|
|
|
2023-05-18 22:13:26 +03:00
|
|
|
export const Footer: FC<FooterProps> = ({ dynamicPaddingValue }) => {
|
|
|
|
const clientStatus = useRecoilValue<ServerStatus>(serverStatusState);
|
|
|
|
const { versionNumber } = clientStatus;
|
|
|
|
const dynamicPaddingStyle = dynamicPaddingValue
|
|
|
|
? { paddingRight: `calc(${dynamicPaddingValue} + var(--footer-padding-x)` }
|
|
|
|
: null;
|
|
|
|
return (
|
|
|
|
<footer className={styles.footer} id="footer" style={dynamicPaddingStyle}>
|
|
|
|
<span>
|
|
|
|
Powered by <a href="https://owncast.online">Owncast v{versionNumber}</a>
|
|
|
|
</span>
|
|
|
|
<span className={styles.links}>
|
|
|
|
<a href="https://owncast.online/docs" target="_blank" rel="noreferrer">
|
|
|
|
Documentation
|
|
|
|
</a>
|
|
|
|
<a href="https://owncast.online/help" target="_blank" rel="noreferrer">
|
|
|
|
Contribute
|
|
|
|
</a>
|
|
|
|
<a href="https://github.com/owncast/owncast" target="_blank" rel="noreferrer">
|
|
|
|
Source
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</footer>
|
|
|
|
);
|
|
|
|
};
|