signal-desktop/ts/components/conversation/GroupV1DisabledActions.tsx

56 lines
1.6 KiB
TypeScript
Raw Normal View History

// Copyright 2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as React from 'react';
import { Intl } from '../Intl';
import type { LocalizerType } from '../../types/Util';
export type PropsType = {
2022-12-08 06:41:37 +00:00
conversationId: string;
i18n: LocalizerType;
2022-12-08 06:41:37 +00:00
showGV2MigrationDialog: (id: string) => unknown;
};
2022-11-18 00:45:19 +00:00
export function GroupV1DisabledActions({
2022-12-08 06:41:37 +00:00
conversationId,
i18n,
2022-12-08 06:41:37 +00:00
showGV2MigrationDialog,
2022-11-18 00:45:19 +00:00
}: PropsType): JSX.Element {
return (
<div className="module-group-v1-disabled-actions">
<p className="module-group-v1-disabled-actions__message">
<Intl
i18n={i18n}
2023-04-03 19:03:00 +00:00
id="icu:GroupV1--Migration--disabled--link"
components={{
2023-04-03 19:03:00 +00:00
// This is a render prop, not a component
// eslint-disable-next-line react/no-unstable-nested-components
learnMoreLink: (...parts) => {
return (
<a
href="https://support.signal.org/hc/articles/360007319331"
target="_blank"
rel="noreferrer"
className="module-group-v1-disabled-actions__message__learn-more"
>
{parts}
</a>
);
},
}}
/>
</p>
<div className="module-group-v1-disabled-actions__buttons">
<button
type="button"
2022-12-08 06:41:37 +00:00
onClick={() => showGV2MigrationDialog(conversationId)}
tabIndex={0}
className="module-group-v1-disabled-actions__buttons__button"
>
2023-03-30 00:03:25 +00:00
{i18n('icu:MessageRequests--continue')}
</button>
</div>
</div>
);
2022-11-18 00:45:19 +00:00
}