Display user account in deletion modal

jsnes
Alex Gleason 2021-03-15 18:44:48 -05:00
rodzic 6ed87aaf89
commit 75df329a26
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -1,7 +1,9 @@
import React from 'react';
import { defineMessages } from 'react-intl';
import { openModal } from 'soapbox/actions/modal';
import { deactivateUsers, deleteUsers, deleteStatus, toggleStatusSensitivity } from 'soapbox/actions/admin';
import snackbar from 'soapbox/actions/snackbar';
import AccountContainer from 'soapbox/containers/account_container';
const messages = defineMessages({
deactivateUserPrompt: { id: 'confirmations.admin.deactivate_user.message', defaultMessage: 'You are about to deactivate @{acct}. Deactivating a user is a reversible action.' },
@ -47,8 +49,13 @@ export function deleteUserModal(intl, accountId, afterConfirm = () => {}) {
const acct = state.getIn(['accounts', accountId, 'acct']);
const name = state.getIn(['accounts', accountId, 'username']);
const message = (<>
<AccountContainer id={accountId} />
{intl.formatMessage(messages.deleteUserPrompt, { acct })}
</>);
dispatch(openModal('CONFIRM', {
message: intl.formatMessage(messages.deleteUserPrompt, { acct }),
message,
confirm: intl.formatMessage(messages.deleteUserConfirm, { name }),
onConfirm: () => {
dispatch(deleteUsers([acct])).then(() => {

Wyświetl plik

@ -604,6 +604,13 @@
}
}
}
.account {
text-align: left;
background-color: var(--background-color);
border-radius: 4px;
margin-bottom: 16px;
}
}
.report-modal__target {