Add badge.descriptions.enabled

This commit is contained in:
Bill 2022-03-21 02:54:12 -04:00
parent 826fe4ac26
commit c853d5a415
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@
"user.badges.max.slots": 5,
"camera.publish.disabled": false,
"hc.disabled": false,
"badge.descriptions.enabled": true,
"hotelview": {
"show.avatar": true,
"widgets": {

View File

@ -1,6 +1,6 @@
import { BadgeImageReadyEvent, NitroSprite, TextureUtils } from '@nitrots/nitro-renderer';
import { CSSProperties, FC, useEffect, useMemo, useState } from 'react';
import { GetSessionDataManager, LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from '../../api';
import { GetConfiguration, GetSessionDataManager, LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from '../../api';
import { Base, BaseProps } from '../Base';
export interface LayoutBadgeImageViewProps extends BaseProps<HTMLDivElement>
@ -89,6 +89,8 @@ export const LayoutBadgeImageView: FC<LayoutBadgeImageViewProps> = props =>
{
const { title = null, description = null } = props;
if(!GetConfiguration('badge.descriptions.enabled', true)) return null;
return (
<Base className="badge-information text-black py-1 px-2 small">
<div className="fw-bold mb-1">{ title }</div>