2022-03-16 20:55:54 +00:00
|
|
|
import {PrivacyLink} from '@holllo/gram';
|
2022-03-14 09:58:47 +00:00
|
|
|
import {html} from 'htm/preact';
|
|
|
|
import {Component} from 'preact';
|
|
|
|
import 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;
|
|
|
|
|
2022-03-17 18:55:54 +00:00
|
|
|
const donateLinkAttributes = {
|
|
|
|
href: 'https://github.com/sponsors/Bauke',
|
|
|
|
};
|
2022-03-14 09:58:47 +00:00
|
|
|
const donateLink = html`
|
2022-03-17 18:55:54 +00:00
|
|
|
<${PrivacyLink} attributes=${donateLinkAttributes}>Donate<//>
|
2022-03-14 09:58:47 +00:00
|
|
|
`;
|
|
|
|
|
2022-03-17 18:55:54 +00:00
|
|
|
const versionLinkAttributes = {
|
|
|
|
href: `https://github.com/Holllo/fangs/releases/tag/${version}`,
|
|
|
|
};
|
2022-03-14 09:58:47 +00:00
|
|
|
const versionLink = html`
|
2022-03-17 18:55:54 +00:00
|
|
|
<${PrivacyLink} attributes=${versionLinkAttributes}>v${version}<//>
|
2022-03-14 09:58:47 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
return html`
|
|
|
|
<footer class="page-footer">
|
|
|
|
<p>
|
|
|
|
${donateLink} 💖 ${versionLink} © Holllo — Free and open-source,
|
|
|
|
forever.
|
|
|
|
</p>
|
|
|
|
</footer>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
}
|