feat: update room control widgets and menus

This commit is contained in:
Lorenzune
2026-04-03 12:09:16 +02:00
parent 60f0355a13
commit e4b1f14fa2
8 changed files with 82 additions and 29 deletions
@@ -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) =>
{