upd
This commit is contained in:
@@ -10,6 +10,8 @@ import UserIcon from "../icons/UserIcon";
|
||||
import CloseIcon from "../icons/CloseIcon";
|
||||
import useStreamUserStore from "../../stores/useStreamUserStore";
|
||||
import { Trans } from "react-i18next";
|
||||
import MicroOffIcon from "../icons/MicroOffIcon";
|
||||
import MicroOnIcon from "../icons/MicroOnIcon";
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
interface UsersManagementModalProps {
|
||||
@@ -48,26 +50,46 @@ function UsersManagementModal({
|
||||
|
||||
<span className="text-sm">{user.city}</span>
|
||||
|
||||
{!user.admin && (
|
||||
{me && me.admin && (
|
||||
<>
|
||||
{!user.allowControl ? (
|
||||
<button
|
||||
onClick={() =>
|
||||
handleUpdate(user.id, { allowControl: true })
|
||||
}
|
||||
{!user.admin && (
|
||||
<>
|
||||
{!user.allowControl ? (
|
||||
<button
|
||||
onClick={() =>
|
||||
handleUpdate(user.id, { allowControl: true })
|
||||
}
|
||||
className="outline-none"
|
||||
>
|
||||
<HandOffIcon />
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
onClick={() =>
|
||||
handleUpdate(user.id, { allowControl: false })
|
||||
}
|
||||
className="outline-none"
|
||||
>
|
||||
<HandOnIcon />
|
||||
</button>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
{!user.muted ? (
|
||||
<p
|
||||
onClick={() => handleUpdate(user.id, { muted: true })}
|
||||
className="outline-none"
|
||||
>
|
||||
<HandOffIcon />
|
||||
</button>
|
||||
<MicroOnIcon />
|
||||
</p>
|
||||
) : (
|
||||
<button
|
||||
onClick={() =>
|
||||
handleUpdate(user.id, { allowControl: false })
|
||||
}
|
||||
<p
|
||||
onClick={() => handleUpdate(user.id, { muted: false })}
|
||||
className="outline-none"
|
||||
>
|
||||
<HandOnIcon />
|
||||
</button>
|
||||
<MicroOffIcon />
|
||||
</p>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
@@ -83,7 +105,9 @@ function UsersManagementModal({
|
||||
|
||||
<div>
|
||||
{me && me.id === user.id && (
|
||||
<span className="text-[#73788C] text-xs"><Trans i18nKey={"you"}>Вы</Trans></span>
|
||||
<span className="text-[#73788C] text-xs">
|
||||
<Trans i18nKey={"you"}>Вы</Trans>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user