fangs/source/options/components/page-footer.ts

29 lines
763 B
TypeScript

import {PrivacyLink} from '@holllo/preact-components';
import {html} from 'htm/preact';
import {Component} from 'preact';
import type browser from 'webextension-polyfill';
type Props = {
manifest: browser.Manifest.ManifestBase;
};
export class PageFooter extends Component<Props> {
render() {
const {manifest} = this.props;
const version = manifest.version;
const versionLinkAttributes = {
href: `https://git.bauke.xyz/Holllo/fangs/releases/tag/${version}`,
};
const versionLink = html`
<${PrivacyLink} attributes=${versionLinkAttributes}>v${version}<//>
`;
return html`
<footer class="page-footer">
<p>💖 ${versionLink} © Holllo — Free and open-source, forever.</p>
</footer>
`;
}
}