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

40 lines
983 B
TypeScript
Raw Normal View History

2022-10-03 16:44:28 +00:00
import {PrivacyLink} from '@holllo/preact-components';
2022-03-05 13:10:45 +00:00
import {html} from 'htm/preact';
import {Component} from 'preact';
2022-09-27 10:49:00 +00:00
import type {Settings} from '../../settings/settings.js';
2022-03-05 13:10:45 +00:00
type Props = {
settings: Settings;
};
export class PageFooter extends Component<Props> {
render() {
const {settings} = this.props;
const version = settings.manifest.version;
2022-10-03 16:48:14 +00:00
const donateAttributes = {
href: 'https://liberapay.com/Holllo',
};
const donateLink = html`
<${PrivacyLink} attributes="${donateAttributes}">Donate<//>
`;
2022-09-27 10:49:00 +00:00
const versionAttributes = {
href: `https://git.bauke.xyz/Holllo/queue/releases/tag/${version}`,
};
2022-03-05 13:10:45 +00:00
const versionLink = html`
2022-09-27 10:49:00 +00:00
<${PrivacyLink} attributes="${versionAttributes}">v${version}<//>
2022-03-05 13:10:45 +00:00
`;
return html`
<footer class="page-footer">
2022-10-03 16:48:14 +00:00
<p>
${donateLink} 💖 ${versionLink} © Holllo Free and open-source,
forever.
</p>
2022-03-05 13:10:45 +00:00
</footer>
`;
}
}