mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-14 23:18:54 +00:00
Update copy highlighting nonprofit status
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React, { useCallback } from 'react';
|
||||
import { Modal } from './Modal.dom.js';
|
||||
import { Button, ButtonSize } from './Button.dom.js';
|
||||
import { I18n } from './I18n.dom.js';
|
||||
import type { LocalizerType } from '../types/Util.std.js';
|
||||
import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js';
|
||||
import { AxoDialog } from '../axo/AxoDialog.dom.js';
|
||||
import { I18n } from './I18n.dom.js';
|
||||
import { tw } from '../axo/tw.dom.js';
|
||||
|
||||
export type DonationPrivacyInformationModalProps = {
|
||||
i18n: LocalizerType;
|
||||
@@ -23,43 +23,56 @@ export function DonationPrivacyInformationModal({
|
||||
);
|
||||
};
|
||||
|
||||
const modalFooter = (
|
||||
<div className="DonationPrivacyInformationModal__footer">
|
||||
<button
|
||||
type="button"
|
||||
className="DonationPrivacyInformationModal__faqs-link"
|
||||
onClick={handleDonationFAQsClick}
|
||||
>
|
||||
{i18n('icu:PreferencesDonations__faqs')}
|
||||
</button>
|
||||
<Button onClick={onClose} size={ButtonSize.Small}>
|
||||
{i18n('icu:PreferencesDonations__privacy-modal-ok')}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
|
||||
const paragraphComponent = useCallback(
|
||||
(parts: Array<string | React.JSX.Element>) => <p>{parts}</p>,
|
||||
[]
|
||||
);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
modalName="DonationPrivacyInformationModal"
|
||||
moduleClassName="DonationPrivacyInformationModal"
|
||||
i18n={i18n}
|
||||
title={i18n('icu:PreferencesDonations__privacy-modal-title')}
|
||||
onClose={onClose}
|
||||
modalFooter={modalFooter}
|
||||
padded={false}
|
||||
<AxoDialog.Root
|
||||
open
|
||||
onOpenChange={open => {
|
||||
if (!open) {
|
||||
onClose();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<I18n
|
||||
components={{
|
||||
paragraph: paragraphComponent,
|
||||
}}
|
||||
i18n={i18n}
|
||||
id="icu:PreferencesDonations__privacy-modal-content"
|
||||
/>
|
||||
</Modal>
|
||||
<AxoDialog.Content
|
||||
size="sm"
|
||||
escape="cancel-is-noop"
|
||||
disableMissingAriaDescriptionWarning
|
||||
>
|
||||
<AxoDialog.Header>
|
||||
<AxoDialog.Title>
|
||||
{i18n('icu:PreferencesDonations__privacy-modal-title')}
|
||||
</AxoDialog.Title>
|
||||
<AxoDialog.Close aria-label={i18n('icu:PinMessageDialog__Close')} />
|
||||
</AxoDialog.Header>
|
||||
<AxoDialog.Body>
|
||||
<div className={tw('flex flex-col gap-4 pt-1.5 pb-4')}>
|
||||
<I18n
|
||||
components={{
|
||||
paragraph: paragraphComponent,
|
||||
}}
|
||||
i18n={i18n}
|
||||
id="icu:PreferencesDonations__privacy-modal-content"
|
||||
/>
|
||||
</div>
|
||||
</AxoDialog.Body>
|
||||
<AxoDialog.Footer>
|
||||
<AxoDialog.Actions>
|
||||
<AxoDialog.Action
|
||||
variant="secondary"
|
||||
onClick={handleDonationFAQsClick}
|
||||
>
|
||||
{i18n('icu:PreferencesDonations__faqs')}
|
||||
</AxoDialog.Action>
|
||||
<AxoDialog.Action variant="primary" onClick={onClose}>
|
||||
{i18n('icu:PreferencesDonations__privacy-modal-ok')}
|
||||
</AxoDialog.Action>
|
||||
</AxoDialog.Actions>
|
||||
</AxoDialog.Footer>
|
||||
</AxoDialog.Content>
|
||||
</AxoDialog.Root>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user