mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Donations: Show confirmation toast on startup at INTENT_METHOD
Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
This commit is contained in:
47
ts/components/DonationInterruptedModal.tsx
Normal file
47
ts/components/DonationInterruptedModal.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
// Copyright 2025 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;
|
||||
onCancelDonation: () => unknown;
|
||||
onRetryDonation: () => unknown;
|
||||
};
|
||||
|
||||
export function DonationInterruptedModal(props: PropsType): JSX.Element {
|
||||
const { i18n, onCancelDonation, onRetryDonation } = props;
|
||||
|
||||
const footer = (
|
||||
<>
|
||||
<Button variant={ButtonVariant.Secondary} onClick={onCancelDonation}>
|
||||
{i18n('icu:cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
onRetryDonation();
|
||||
}}
|
||||
>
|
||||
{i18n('icu:Donations__DonationInterrupted__RetryButton')}
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
i18n={i18n}
|
||||
modalFooter={footer}
|
||||
moduleClassName="DonationInterruptedModal"
|
||||
modalName="DonationInterruptedModal"
|
||||
noMouseClose
|
||||
onClose={onCancelDonation}
|
||||
title={i18n('icu:Donations__DonationInterrupted')}
|
||||
>
|
||||
{i18n('icu:Donations__DonationInterrupted__Description')}
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user