Config options for description and location

This commit is contained in:
hotellidev
2026-06-08 00:21:11 +03:00
parent 9e21cf5be4
commit 0daa2aea66
2 changed files with 7 additions and 4 deletions
+2
View File
@@ -15,6 +15,8 @@
"camera.publish.disabled": false,
"hc.disabled": false,
"badge.descriptions.enabled": true,
"furni.descriptions.enabled": false,
"furni.location.enabled": true,
"motto.max.length": 38,
"bot.name.max.length": 15,
"pet.package.name.max.length": 15,
@@ -2,7 +2,7 @@ import { CrackableDataType, CreateLinkEvent, FurnitureFloorUpdateEvent, GetRoomE
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
import { FaCrosshairs, FaTimes } from 'react-icons/fa';
import { GrFormNextLink, GrRotateLeft, GrRotateRight } from 'react-icons/gr';
import { AvatarInfoFurni, GetGroupInformation, LocalizeText, SendMessageComposer } from '../../../../../api';
import { AvatarInfoFurni, GetGroupInformation, LocalizeText, SendMessageComposer, GetConfigurationValue } from '../../../../../api';
import { Button, Column, Flex, LayoutBadgeImageView, LayoutCurrencyIcon, LayoutLimitedEditionCompactPlateView, LayoutRarityLevelView, LayoutRoomObjectImageView, Text, UserProfileIconView } from '../../../../../common';
import { useHasPermission, useMessageEvent, useNitroEvent, useRareValues, useRoom, useWiredTools } from '../../../../../hooks';
import { NitroInput } from '../../../../../layout';
@@ -76,7 +76,8 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
const isModerator = useHasPermission('acc_anyroomowner');
const { getValue: getRareValue } = useRareValues();
const rareValue = useMemo(() => (avatarInfo ? getRareValue(avatarInfo.spriteId) : null), [ avatarInfo, getRareValue ]);
const descriptionsEnabled = GetConfigurationValue<boolean>('furni.descriptions.enabled', true);
const itemLocationEnabled = GetConfigurationValue<boolean>('furni.location.enabled', true);
const [ pickupMode, setPickupMode ] = useState(0);
const [ canMove, setCanMove ] = useState(false);
const [ canRotate, setCanRotate ] = useState(false);
@@ -551,7 +552,7 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
<hr className="m-0 bg-[#0003] border-0 opacity-[.5] h-px" />
</div>
}
{ avatarInfo.description &&
{ (avatarInfo.description && descriptionsEnabled) &&
<Column gap={ 1 }>
<Text fullWidth wrap textBreak variant="white" small>{ avatarInfo.description }</Text>
<hr className="m-0 bg-[#0003] border-0 opacity-[.5] h-px" />
@@ -606,7 +607,7 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
<Text underline variant="white">{ groupName }</Text>
</Flex>
</> }
{ (itemLocation.x > -1) &&
{ ((itemLocation.x > -1) && itemLocationEnabled) &&
<>
<hr className="m-0 bg-[#0003] border-0 opacity-[.5] h-px" />
<div className="flex items-center gap-1 min-w-0">