2022-10-03 16:19:27 +00:00
|
|
|
import {PrivacyLink} from '@holllo/preact-components';
|
2022-03-14 09:58:47 +00:00
|
|
|
import {html} from 'htm/preact';
|
|
|
|
import {Component} from 'preact';
|
2022-09-28 17:56:43 +00:00
|
|
|
import type browser from 'webextension-polyfill';
|
2022-03-14 09:58:47 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
manifest: browser.Manifest.ManifestBase;
|
|
|
|
};
|
|
|
|
|
|
|
|
export class PageFooter extends Component<Props> {
|
|
|
|
render() {
|
|
|
|
const {manifest} = this.props;
|
|
|
|
const version = manifest.version;
|
|
|
|
|
2022-10-03 16:50:52 +00:00
|
|
|
const donateAttributes = {
|
|
|
|
href: 'https://liberapay.com/Holllo',
|
|
|
|
};
|
|
|
|
const donateLink = html`
|
|
|
|
<${PrivacyLink} attributes="${donateAttributes}">Donate<//>
|
|
|
|
`;
|
|
|
|
|
2022-03-17 18:55:54 +00:00
|
|
|
const versionLinkAttributes = {
|
2022-09-30 10:24:33 +00:00
|
|
|
href: `https://git.bauke.xyz/Holllo/fangs/releases/tag/${version}`,
|
2022-03-17 18:55:54 +00:00
|
|
|
};
|
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">
|
2022-10-03 16:50:52 +00:00
|
|
|
<p>
|
|
|
|
${donateLink} 💖 ${versionLink} © Holllo — Free and open-source,
|
|
|
|
forever.
|
|
|
|
</p>
|
2022-03-14 09:58:47 +00:00
|
|
|
</footer>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
}
|