mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
feat: update room control widgets and menus
This commit is contained in:
@@ -28,7 +28,7 @@ export const AvatarInfoWidgetAvatarView: FC<AvatarInfoWidgetAvatarViewProps> = p
|
||||
const [ mode, setMode ] = useState(MODE_NORMAL);
|
||||
const { canRequestFriend = null } = useFriends();
|
||||
const { report = null } = useHelp();
|
||||
const { roomSession = null } = useRoom();
|
||||
const { roomSession = null, isHandItemBlocked = false } = useRoom();
|
||||
const { userRespectRemaining = 0, respectUser = null } = useSessionInfo();
|
||||
const { openInspectionForUser, showInspectButton } = useWiredTools();
|
||||
|
||||
@@ -49,6 +49,8 @@ export const AvatarInfoWidgetAvatarView: FC<AvatarInfoWidgetAvatarViewProps> = p
|
||||
|
||||
const canGiveHandItem = useMemo(() =>
|
||||
{
|
||||
if(isHandItemBlocked) return false;
|
||||
|
||||
let flag = false;
|
||||
|
||||
const roomObject = GetOwnRoomObject();
|
||||
@@ -61,7 +63,7 @@ export const AvatarInfoWidgetAvatarView: FC<AvatarInfoWidgetAvatarViewProps> = p
|
||||
}
|
||||
|
||||
return flag;
|
||||
}, []);
|
||||
}, [ isHandItemBlocked ]);
|
||||
|
||||
const processAction = (name: string) =>
|
||||
{
|
||||
|
||||
@@ -21,11 +21,13 @@ export const AvatarInfoWidgetOwnPetView: FC<AvatarInfoWidgetOwnPetViewProps> = p
|
||||
{
|
||||
const { avatarInfo = null, onClose = null } = props;
|
||||
const [ mode, setMode ] = useState(MODE_NORMAL);
|
||||
const { roomSession = null } = useRoom();
|
||||
const { roomSession = null, isHandItemBlocked = false } = useRoom();
|
||||
const { petRespectRemaining = 0, respectPet = null } = useSessionInfo();
|
||||
|
||||
const canGiveHandItem = useMemo(() =>
|
||||
{
|
||||
if(isHandItemBlocked) return false;
|
||||
|
||||
let flag = false;
|
||||
|
||||
const roomObject = GetOwnRoomObject();
|
||||
@@ -38,7 +40,7 @@ export const AvatarInfoWidgetOwnPetView: FC<AvatarInfoWidgetOwnPetViewProps> = p
|
||||
}
|
||||
|
||||
return flag;
|
||||
}, []);
|
||||
}, [ isHandItemBlocked ]);
|
||||
|
||||
const processAction = (name: string) =>
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ export const AvatarInfoWidgetPetView: FC<AvatarInfoWidgetPetViewProps> = props =
|
||||
{
|
||||
const { avatarInfo = null, onClose = null } = props;
|
||||
const [ mode, setMode ] = useState(MODE_NORMAL);
|
||||
const { roomSession = null } = useRoom();
|
||||
const { roomSession = null, isHandItemBlocked = false } = useRoom();
|
||||
const { petRespectRemaining = 0, respectPet = null } = useSessionInfo();
|
||||
|
||||
const canPickUp = useMemo(() =>
|
||||
@@ -31,6 +31,8 @@ export const AvatarInfoWidgetPetView: FC<AvatarInfoWidgetPetViewProps> = props =
|
||||
|
||||
const canGiveHandItem = useMemo(() =>
|
||||
{
|
||||
if(isHandItemBlocked) return false;
|
||||
|
||||
let flag = false;
|
||||
|
||||
const roomObject = GetOwnRoomObject();
|
||||
@@ -43,7 +45,7 @@ export const AvatarInfoWidgetPetView: FC<AvatarInfoWidgetPetViewProps> = props =
|
||||
}
|
||||
|
||||
return flag;
|
||||
}, []);
|
||||
}, [ isHandItemBlocked ]);
|
||||
|
||||
const processAction = (name: string) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user