block user changes

This commit is contained in:
PhilReact 2025-06-11 15:15:24 +03:00
parent 2e59299689
commit a2b69628fc
3 changed files with 40 additions and 2 deletions

View File

@ -209,7 +209,7 @@ export const AdminSpaceInner = ({
fontSize: '14px',
}}
>
{t('auth:message.error.publishing_key', {
{t('auth:message.generic.publishing_key', {
postProcess: 'capitalizeFirstChar',
})}
</Typography>

View File

@ -6,6 +6,7 @@ import {
DialogContent,
DialogContentText,
DialogTitle,
IconButton,
TextField,
Typography,
useTheme,
@ -13,6 +14,8 @@ import {
import { useContext, useEffect, useState } from 'react';
import { getBaseApiReact, QORTAL_APP_CONTEXT } from '../../App';
import { Spacer } from '../../common/Spacer';
import CloseIcon from '@mui/icons-material/Close';
import {
executeEvent,
subscribeToEvent,
@ -397,7 +400,20 @@ export const BlockedUsersModal = () => {
postProcess: 'capitalizeAll',
})}
</DialogTitle>
<IconButton
aria-label={t('core:action.close', {
postProcess: 'capitalizeFirstChar',
})}
onClick={onCancel}
sx={{
position: 'absolute',
right: 8,
top: 8,
color: theme.palette.text.primary,
}}
>
<CloseIcon />
</IconButton>
<DialogContent>
<DialogContentText id="alert-dialog-description">
{t('auth:message.generic.blocking', {

View File

@ -16,6 +16,8 @@ import { base64ToUint8Array } from '../../qdn/encryption/group-encryption';
import { uint8ArrayToObject } from '../../encryption/encryption';
import { AddGroup } from './AddGroup';
import CreateIcon from '@mui/icons-material/Create';
import PersonOffIcon from '@mui/icons-material/PersonOff';
import {
AuthenticatedContainerInnerRight,
CustomButton,
@ -61,6 +63,7 @@ import {
groupsOwnerNamesAtom,
groupsPropertiesAtom,
isOpenBlockedModalAtom,
isRunningPublicNodeAtom,
memberGroupsAtom,
mutedGroupsAtom,
selectedGroupIdAtom,
@ -434,6 +437,7 @@ export const Group = ({
const [groupChatTimestamps, setGroupChatTimestamps] = useAtom(
groupChatTimestampsAtom
);
const [isRunningPublicNode] = useAtom(isRunningPublicNodeAtom);
const [appsMode, setAppsMode] = useState('home');
const [appsModeDev, setAppsModeDev] = useState('home');
@ -1846,6 +1850,7 @@ export const Group = ({
style={{
display: 'flex',
width: '100%',
gap: '10px',
justifyContent: 'center',
padding: '10px',
}}
@ -1866,6 +1871,23 @@ export const Group = ({
postProcess: 'capitalizeFirstChar',
})}
</CustomButton>
{!isRunningPublicNode && (
<CustomButton
onClick={() => {
setIsOpenBlockedUserModal(true);
}}
sx={{
minWidth: 'unset',
padding: '10px',
}}
>
<PersonOffIcon
sx={{
color: theme.palette.text.primary,
}}
/>
</CustomButton>
)}
</div>
</div>
);