Introduce new DonationVerificationModal to kick off 3ds verification

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
automated-signal 2025-07-14 09:29:14 -05:00 committed by GitHub
parent b3a56caa58
commit d306cb688e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 95 additions and 0 deletions

View file

@ -8882,6 +8882,18 @@
"messageformat": "Thank you for supporting Signal. Your contribution helps fuel the mission of protecting free expression and enabling secure global communication for millions around the world, through open source privacy technology. If youre a resident of the United States, please retain this receipt for your tax records. Signal Technology Foundation is a tax-exempt nonprofit organization in the United States under section 501c3 of the Internal Revenue Code. Our Federal Tax ID is 82-4506840.",
"description": "Footer text shown on donation receipts explaining tax deductibility and Signal's mission"
},
"icu:Donations__3dsValidationNeeded": {
"messageformat": "Additional verification required",
"description": "Title of the dialog shown when the user's payment method requires a redirect to a verification website"
},
"icu:Donations__3dsValidationNeeded__Description": {
"messageformat": "Your credit card issuer requires an additional verification step in a web browser.",
"description": "An explanation for the 'verification required' dialog"
},
"icu:Donations__3dsValidationNeeded__OpenBrowser": {
"messageformat": "Open browser",
"description": "When external payment method validation is required, this button will open that external verification website"
},
"icu:WhatsNew__bugfixes": {
"messageformat": "This version contains a number of small tweaks and bug fixes to keep Signal running smoothly.",
"description": "Release notes for releases that only include bug fixes",

View file

@ -0,0 +1,13 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
@use '../mixins';
.DonationVerificationModal__width-container {
max-width: 420px;
}
// We include both for specificity
.module-Modal__title.DonationVerificationModal__title {
@include mixins.font-title-medium;
}

View file

@ -96,6 +96,7 @@
@use 'components/DeleteMessagesModal.scss';
@use 'components/DisappearingTimeDialog.scss';
@use 'components/DisappearingTimerSelect.scss';
@use 'components/DonationVerificationModal.scss';
@use 'components/DraftGifMessageSendModal.scss';
@use 'components/EditConversationAttributesModal.scss';
@use 'components/EditHistoryMessagesModal.scss';

View file

@ -0,0 +1,26 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
import type { PropsType } from './DonationVerificationModal';
import { DonationVerificationModal } from './DonationVerificationModal';
const { i18n } = window.SignalContext;
export default {
title: 'Components/DonationVerificationModal',
} satisfies Meta<PropsType>;
const defaultProps = {
i18n,
onCancel: action('onCancel'),
onOpenBrowser: action('onOpenBrowser'),
};
export function Default(): JSX.Element {
return <DonationVerificationModal {...defaultProps} />;
}

View file

@ -0,0 +1,43 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import type { LocalizerType } from '../types/Util';
import { Modal } from './Modal';
import { Button, ButtonVariant } from './Button';
export type PropsType = {
i18n: LocalizerType;
onCancel: () => unknown;
onOpenBrowser: () => unknown;
};
export function DonationVerificationModal(props: PropsType): JSX.Element {
const { i18n, onCancel, onOpenBrowser } = props;
const footer = (
<>
<Button variant={ButtonVariant.Secondary} onClick={onCancel}>
{i18n('icu:confirmation-dialog--Cancel')}
</Button>
<Button onClick={onOpenBrowser}>
{i18n('icu:Donations__3dsValidationNeeded__OpenBrowser')}
</Button>
</>
);
return (
<Modal
hasXButton
i18n={i18n}
modalFooter={footer}
moduleClassName="DonationVerificationModal"
modalName="DonationVerificationModal"
onClose={onCancel}
title={i18n('icu:Donations__3dsValidationNeeded')}
>
{i18n('icu:Donations__3dsValidationNeeded__Description')}
</Modal>
);
}