mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Fix join group modal
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import React from 'react';
|
||||
import { render, unmountComponentAtNode } from 'react-dom';
|
||||
import { ConfirmationDialog } from '../components/ConfirmationDialog';
|
||||
import { FunDefaultEnglishEmojiLocalizationProvider } from '../components/fun/FunEmojiLocalizationProvider';
|
||||
|
||||
type ConfirmationDialogViewProps = {
|
||||
onTopOfEverything?: boolean;
|
||||
@@ -55,33 +56,37 @@ export function showConfirmationDialog(
|
||||
confirmationDialogPreviousFocus = document.activeElement as HTMLElement;
|
||||
|
||||
render(
|
||||
<ConfirmationDialog
|
||||
dialogName={options.dialogName}
|
||||
onTopOfEverything={options.onTopOfEverything}
|
||||
actions={[
|
||||
{
|
||||
action: () => {
|
||||
options.resolve();
|
||||
<FunDefaultEnglishEmojiLocalizationProvider>
|
||||
<ConfirmationDialog
|
||||
dialogName={options.dialogName}
|
||||
onTopOfEverything={options.onTopOfEverything}
|
||||
actions={[
|
||||
{
|
||||
action: () => {
|
||||
options.resolve();
|
||||
},
|
||||
style: options.confirmStyle,
|
||||
text: options.okText || window.i18n('icu:ok'),
|
||||
},
|
||||
style: options.confirmStyle,
|
||||
text: options.okText || window.i18n('icu:ok'),
|
||||
},
|
||||
]}
|
||||
cancelText={options.cancelText || window.i18n('icu:cancel')}
|
||||
i18n={window.i18n}
|
||||
onCancel={() => {
|
||||
if (options.reject) {
|
||||
options.reject(new Error('showConfirmationDialog: onCancel called'));
|
||||
}
|
||||
}}
|
||||
onClose={() => {
|
||||
removeConfirmationDialog();
|
||||
}}
|
||||
title={options.title}
|
||||
noMouseClose={options.noMouseClose}
|
||||
>
|
||||
{options.description}
|
||||
</ConfirmationDialog>,
|
||||
]}
|
||||
cancelText={options.cancelText || window.i18n('icu:cancel')}
|
||||
i18n={window.i18n}
|
||||
onCancel={() => {
|
||||
if (options.reject) {
|
||||
options.reject(
|
||||
new Error('showConfirmationDialog: onCancel called')
|
||||
);
|
||||
}
|
||||
}}
|
||||
onClose={() => {
|
||||
removeConfirmationDialog();
|
||||
}}
|
||||
title={options.title}
|
||||
noMouseClose={options.noMouseClose}
|
||||
>
|
||||
{options.description}
|
||||
</ConfirmationDialog>
|
||||
</FunDefaultEnglishEmojiLocalizationProvider>,
|
||||
confirmationDialogViewNode
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user