mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 16:33:16 +00:00
feat(notices): 5.2.0 release modal and Patreon for monthly support
The release modal now shows 5.2.0: booking mails that land in the trip, live flight status and the new trip PDF, each with its own drawn card, and links the 5.2.0 release notes. The maintainer note and the support block are rewritten, shorter and without the sponsor wording. Patreon joins Buy Me a Coffee and Ko-fi as the monthly way to support TREK: a full-width button in the release and thank-you notices (a new optional tertiaryCta on the notice contract), a tile in About and in the admin GitHub panel on desktop and phone, the README badges and FUNDING.yml. Like the other donation links it stays hidden inside the native apps.
This commit is contained in:
@@ -60,8 +60,9 @@ describe('AboutTab', () => {
|
||||
it('FE-COMP-ABOUT-009: all external links have rel="noopener noreferrer"', () => {
|
||||
render(<AboutTab appVersion="2.9.10" />);
|
||||
const links = document.querySelectorAll('a');
|
||||
// Six tiles, and the sponsor panel: its logo, its button and the name in its title and body.
|
||||
expect(links).toHaveLength(10);
|
||||
// Seven tiles, and the sponsor panel: its logo, its button and the name in its title and body.
|
||||
expect(links).toHaveLength(11);
|
||||
expect(document.querySelector('a[href="https://www.patreon.com/cw/mauriceboe"]')).not.toBeNull();
|
||||
links.forEach((link) => {
|
||||
expect(link).toHaveAttribute('rel', 'noopener noreferrer');
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@ import { useTranslation } from '../../i18n';
|
||||
import { useAuthStore } from '../../store/authStore';
|
||||
import { donationsShown } from '../../utils/donations';
|
||||
import { fs } from '../shared/DialogShell';
|
||||
import PatreonIcon, { PATREON_COLOR, PATREON_URL } from '../shared/PatreonIcon';
|
||||
import Section from './Section';
|
||||
import { StatusPill } from './settingsKit';
|
||||
|
||||
@@ -246,6 +247,13 @@ export default function AboutTab({ appVersion }: Props): React.ReactElement {
|
||||
{/* Not in the native apps, whose store rules allow no outside payment links. */}
|
||||
{donationsShown() && (
|
||||
<>
|
||||
<LinkTile
|
||||
href={PATREON_URL}
|
||||
color={PATREON_COLOR}
|
||||
icon={<PatreonIcon size={17} />}
|
||||
title="Patreon"
|
||||
hint={t('admin.github.supportMonthly')}
|
||||
/>
|
||||
<LinkTile
|
||||
href="https://ko-fi.com/mauriceboe"
|
||||
color={BRAND.kofi}
|
||||
|
||||
Reference in New Issue
Block a user