mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
Config options for description and location
This commit is contained in:
@@ -15,6 +15,8 @@
|
|||||||
"camera.publish.disabled": false,
|
"camera.publish.disabled": false,
|
||||||
"hc.disabled": false,
|
"hc.disabled": false,
|
||||||
"badge.descriptions.enabled": true,
|
"badge.descriptions.enabled": true,
|
||||||
|
"furni.descriptions.enabled": false,
|
||||||
|
"furni.location.enabled": true,
|
||||||
"motto.max.length": 38,
|
"motto.max.length": 38,
|
||||||
"bot.name.max.length": 15,
|
"bot.name.max.length": 15,
|
||||||
"pet.package.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 { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { FaCrosshairs, FaTimes } from 'react-icons/fa';
|
import { FaCrosshairs, FaTimes } from 'react-icons/fa';
|
||||||
import { GrFormNextLink, GrRotateLeft, GrRotateRight } from 'react-icons/gr';
|
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 { Button, Column, Flex, LayoutBadgeImageView, LayoutCurrencyIcon, LayoutLimitedEditionCompactPlateView, LayoutRarityLevelView, LayoutRoomObjectImageView, Text, UserProfileIconView } from '../../../../../common';
|
||||||
import { useHasPermission, useMessageEvent, useNitroEvent, useRareValues, useRoom, useWiredTools } from '../../../../../hooks';
|
import { useHasPermission, useMessageEvent, useNitroEvent, useRareValues, useRoom, useWiredTools } from '../../../../../hooks';
|
||||||
import { NitroInput } from '../../../../../layout';
|
import { NitroInput } from '../../../../../layout';
|
||||||
@@ -76,7 +76,8 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
|
|||||||
const isModerator = useHasPermission('acc_anyroomowner');
|
const isModerator = useHasPermission('acc_anyroomowner');
|
||||||
const { getValue: getRareValue } = useRareValues();
|
const { getValue: getRareValue } = useRareValues();
|
||||||
const rareValue = useMemo(() => (avatarInfo ? getRareValue(avatarInfo.spriteId) : null), [ avatarInfo, getRareValue ]);
|
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 [ pickupMode, setPickupMode ] = useState(0);
|
||||||
const [ canMove, setCanMove ] = useState(false);
|
const [ canMove, setCanMove ] = useState(false);
|
||||||
const [ canRotate, setCanRotate ] = 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" />
|
<hr className="m-0 bg-[#0003] border-0 opacity-[.5] h-px" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{ avatarInfo.description &&
|
{ (avatarInfo.description && descriptionsEnabled) &&
|
||||||
<Column gap={ 1 }>
|
<Column gap={ 1 }>
|
||||||
<Text fullWidth wrap textBreak variant="white" small>{ avatarInfo.description }</Text>
|
<Text fullWidth wrap textBreak variant="white" small>{ avatarInfo.description }</Text>
|
||||||
<hr className="m-0 bg-[#0003] border-0 opacity-[.5] h-px" />
|
<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>
|
<Text underline variant="white">{ groupName }</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
</> }
|
</> }
|
||||||
{ (itemLocation.x > -1) &&
|
{ ((itemLocation.x > -1) && itemLocationEnabled) &&
|
||||||
<>
|
<>
|
||||||
<hr className="m-0 bg-[#0003] border-0 opacity-[.5] h-px" />
|
<hr className="m-0 bg-[#0003] border-0 opacity-[.5] h-px" />
|
||||||
<div className="flex items-center gap-1 min-w-0">
|
<div className="flex items-center gap-1 min-w-0">
|
||||||
|
|||||||
Reference in New Issue
Block a user