Add shortcuts for forward/delete selected/targeted messages

This commit is contained in:
Jamie Kyle 2023-03-24 14:16:48 -07:00 committed by GitHub
parent dd16be13b0
commit d0f17a1398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 106 additions and 35 deletions

View file

@ -10,7 +10,8 @@ type ConfirmationDialogViewProps = {
dialogName: string;
cancelText?: string;
confirmStyle?: 'affirmative' | 'negative';
message: string;
title: string;
description?: string;
okText: string;
reject?: (error: Error) => void;
resolve: () => void;
@ -24,6 +25,8 @@ function removeConfirmationDialog() {
return;
}
window.reduxActions.globalModals.toggleConfirmationModal(false);
unmountComponentAtNode(confirmationDialogViewNode);
document.body.removeChild(confirmationDialogViewNode);
@ -43,6 +46,8 @@ export function showConfirmationDialog(
removeConfirmationDialog();
}
window.reduxActions.globalModals.toggleConfirmationModal(true);
confirmationDialogViewNode = document.createElement('div');
document.body.appendChild(confirmationDialogViewNode);
@ -71,8 +76,10 @@ export function showConfirmationDialog(
onClose={() => {
removeConfirmationDialog();
}}
title={options.message}
/>,
title={options.title}
>
{options.description}
</ConfirmationDialog>,
confirmationDialogViewNode
);
}