Display user favicon in deletion modal
This commit is contained in:
parent
75df329a26
commit
c44de0030c
|
@ -48,15 +48,24 @@ export function deleteUserModal(intl, accountId, afterConfirm = () => {}) {
|
|||
const state = getState();
|
||||
const acct = state.getIn(['accounts', accountId, 'acct']);
|
||||
const name = state.getIn(['accounts', accountId, 'username']);
|
||||
const favicon = state.getIn(['accounts', accountId, 'pleroma', 'favicon']);
|
||||
|
||||
const message = (<>
|
||||
<AccountContainer id={accountId} />
|
||||
{intl.formatMessage(messages.deleteUserPrompt, { acct })}
|
||||
</>);
|
||||
|
||||
const confirm = (<>
|
||||
{favicon &&
|
||||
<div className='submit__favicon'>
|
||||
<img src={favicon} alt='' />
|
||||
</div>}
|
||||
{intl.formatMessage(messages.deleteUserConfirm, { name })}
|
||||
</>);
|
||||
|
||||
dispatch(openModal('CONFIRM', {
|
||||
message,
|
||||
confirm: intl.formatMessage(messages.deleteUserConfirm, { name }),
|
||||
confirm,
|
||||
onConfirm: () => {
|
||||
dispatch(deleteUsers([acct])).then(() => {
|
||||
const message = intl.formatMessage(messages.userDeleted, { acct });
|
||||
|
|
|
@ -393,6 +393,23 @@
|
|||
|
||||
.button {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.submit__favicon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue