ESLint updates

This commit is contained in:
Bill 2021-08-16 02:00:31 -04:00
parent 9fb1f6dd15
commit 785ef17c40
70 changed files with 319 additions and 164 deletions

87
package-lock.json generated
View File

@ -4200,18 +4200,85 @@
"integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA=="
},
"@typescript-eslint/eslint-plugin": {
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz",
"integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==",
"version": "4.29.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.1.tgz",
"integrity": "sha512-AHqIU+SqZZgBEiWOrtN94ldR3ZUABV5dUG94j8Nms9rQnHFc8fvDOue/58K4CFz6r8OtDDc35Pw9NQPWo0Ayrw==",
"requires": {
"@typescript-eslint/experimental-utils": "4.22.0",
"@typescript-eslint/scope-manager": "4.22.0",
"debug": "^4.1.1",
"@typescript-eslint/experimental-utils": "4.29.1",
"@typescript-eslint/scope-manager": "4.29.1",
"debug": "^4.3.1",
"functional-red-black-tree": "^1.0.1",
"lodash": "^4.17.15",
"regexpp": "^3.0.0",
"semver": "^7.3.2",
"tsutils": "^3.17.1"
"regexpp": "^3.1.0",
"semver": "^7.3.5",
"tsutils": "^3.21.0"
},
"dependencies": {
"@typescript-eslint/experimental-utils": {
"version": "4.29.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.1.tgz",
"integrity": "sha512-kl6QG6qpzZthfd2bzPNSJB2YcZpNOrP6r9jueXupcZHnL74WiuSjaft7WSu17J9+ae9zTlk0KJMXPUj0daBxMw==",
"requires": {
"@types/json-schema": "^7.0.7",
"@typescript-eslint/scope-manager": "4.29.1",
"@typescript-eslint/types": "4.29.1",
"@typescript-eslint/typescript-estree": "4.29.1",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
}
},
"@typescript-eslint/scope-manager": {
"version": "4.29.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.1.tgz",
"integrity": "sha512-Hzv/uZOa9zrD/W5mftZa54Jd5Fed3tL6b4HeaOpwVSabJK8CJ+2MkDasnX/XK4rqP5ZTWngK1ZDeCi6EnxPQ7A==",
"requires": {
"@typescript-eslint/types": "4.29.1",
"@typescript-eslint/visitor-keys": "4.29.1"
}
},
"@typescript-eslint/types": {
"version": "4.29.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.1.tgz",
"integrity": "sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA=="
},
"@typescript-eslint/typescript-estree": {
"version": "4.29.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz",
"integrity": "sha512-lIkkrR9E4lwZkzPiRDNq0xdC3f2iVCUjw/7WPJ4S2Sl6C3nRWkeE1YXCQ0+KsiaQRbpY16jNaokdWnm9aUIsfw==",
"requires": {
"@typescript-eslint/types": "4.29.1",
"@typescript-eslint/visitor-keys": "4.29.1",
"debug": "^4.3.1",
"globby": "^11.0.3",
"is-glob": "^4.0.1",
"semver": "^7.3.5",
"tsutils": "^3.21.0"
}
},
"@typescript-eslint/visitor-keys": {
"version": "4.29.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz",
"integrity": "sha512-zLqtjMoXvgdZY/PG6gqA73V8BjqPs4af1v2kiiETBObp+uC6gRYnJLmJHxC0QyUrrHDLJPIWNYxoBV3wbcRlag==",
"requires": {
"@typescript-eslint/types": "4.29.1",
"eslint-visitor-keys": "^2.0.0"
}
},
"eslint-utils": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
"integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
"requires": {
"eslint-visitor-keys": "^2.0.0"
}
},
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"requires": {
"lru-cache": "^6.0.0"
}
}
}
},
"@typescript-eslint/experimental-utils": {

View File

@ -29,6 +29,87 @@
"react-app/jest"
],
"rules": {
"linebreak-style": [
"off"
],
"quotes": [
"error",
"single"
],
"brace-style": [
"error",
"allman",
{
"allowSingleLine": true
}
],
"object-curly-spacing": [
"error",
"always"
],
"keyword-spacing": [
"error",
{
"overrides":
{
"if":
{
"after": false
},
"for":
{
"after": false
},
"while":
{
"after": false
},
"switch":
{
"after": false
}
}
}
],
"@typescript-eslint/no-explicit-any": [
"off"
],
"@typescript-eslint/ban-ts-comment": [
"off"
],
"@typescript-eslint/no-empty-function": [
"error",
{
"allow": [
"functions",
"arrowFunctions",
"generatorFunctions",
"methods",
"generatorMethods",
"constructors"
]
}
],
"@typescript-eslint/no-unused-vars": [
"off"
],
"@typescript-eslint/ban-types": [
"error",
{
"types":
{
"String": true,
"Boolean": true,
"Number": true,
"Symbol": true,
"{}": false,
"Object": false,
"object": false,
"Function": false
},
"extendDefaults": true
}
],
"no-switch-case-fall-through": [
"off"
]
@ -56,6 +137,7 @@
"@types/react-dom": "^17.0.9",
"@types/react-slider": "^1.3.1",
"@types/react-transition-group": "^4.4.2",
"@types/react-virtualized": "^9.21.13"
"@types/react-virtualized": "^9.21.13",
"@typescript-eslint/eslint-plugin": "^4.29.1"
}
}

View File

@ -6,7 +6,7 @@ export const NitroCardAccordionView: FC<NitroCardAccordionViewProps> = props =>
const { className = '' } = props;
return (
<div className={ "nitro-card-accordion bg-light text-black " + className }>
<div className={ 'nitro-card-accordion bg-light text-black ' + className }>
{ props.children }
</div>
);

View File

@ -141,7 +141,7 @@ export const DraggableWindow: FC<DraggableWindowProps> = props =>
}
}
setDelta({ x: 0, y: 0});
setDelta({ x: 0, y: 0 });
setOffset({ x: offsetX, y: offsetY });
return () =>

View File

@ -35,7 +35,7 @@ export const TransitionAnimation: FC<TransitionAnimationProps> = props =>
return (
<Transition in={ inProp } timeout={ timeout }>
{ state => (
<div className={ (className ?? '') + " animate__animated" } style={ { ...getTransitionAnimationStyle(type, state, timeout) } }>
<div className={ (className ?? '') + ' animate__animated' } style={ { ...getTransitionAnimationStyle(type, state, timeout) } }>
{ isChildrenVisible && children }
</div>
)}

View File

@ -14,12 +14,12 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
return {}
case ENTERING:
return {
animationName: `bounceIn`,
animationName: 'bounceIn',
animationDuration: `${ timeout }ms`
}
case EXITING:
return {
animationName: `bounceOut`,
animationName: 'bounceOut',
animationDuration: `${ timeout }ms`
}
}
@ -30,12 +30,12 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
return {}
case ENTERING:
return {
animationName: `slideInLeft`,
animationName: 'slideInLeft',
animationDuration: `${ timeout }ms`
}
case EXITING:
return {
animationName: `slideOutLeft`,
animationName: 'slideOutLeft',
animationDuration: `${ timeout }ms`
}
}
@ -46,12 +46,12 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
return {}
case ENTERING:
return {
animationName: `slideInRight`,
animationName: 'slideInRight',
animationDuration: `${ timeout }ms`
}
case EXITING:
return {
animationName: `slideOutRight`,
animationName: 'slideOutRight',
animationDuration: `${ timeout }ms`
}
}
@ -62,12 +62,12 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
return {}
case ENTERING:
return {
animationName: `flipInX`,
animationName: 'flipInX',
animationDuration: `${ timeout }ms`
}
case EXITING:
return {
animationName: `flipOutX`,
animationName: 'flipOutX',
animationDuration: `${ timeout }ms`
}
}
@ -78,12 +78,12 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
return {}
case ENTERING:
return {
animationName: `fadeInUp`,
animationName: 'fadeInUp',
animationDuration: `${ timeout }ms`
}
case EXITING:
return {
animationName: `fadeOutDown`,
animationName: 'fadeOutDown',
animationDuration: `${ timeout }ms`
}
}
@ -94,12 +94,12 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
return {}
case ENTERING:
return {
animationName: `fadeIn`,
animationName: 'fadeIn',
animationDuration: `${ timeout }ms`
}
case EXITING:
return {
animationName: `fadeOut`,
animationName: 'fadeOut',
animationDuration: `${ timeout }ms`
}
}
@ -110,12 +110,12 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
return {}
case ENTERING:
return {
animationName: `fadeInDown`,
animationName: 'fadeInDown',
animationDuration: `${ timeout }ms`
}
case EXITING:
return {
animationName: `fadeOutUp`,
animationName: 'fadeOutUp',
animationDuration: `${ timeout }ms`
}
}
@ -126,7 +126,7 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
return {}
case ENTERING:
return {
animationName: `headShake`,
animationName: 'headShake',
animationDuration: `${ timeout }ms`
}
}

View File

@ -69,7 +69,7 @@ export const AchievementCategoryView: FC<AchievementCategoryViewProps> = props =
{
return (
<div key={ index } className="col mb-3">
<div className={'achievement border border-2 rounded d-flex flex-column justify-content-center align-items-center p-2' + classNames({' active': selectedAchievementId === achievement.achievementId, ' gray': achievement.progress === 0})} onClick={() => selectAchievement(achievement.achievementId)}>
<div className={'achievement border border-2 rounded d-flex flex-column justify-content-center align-items-center p-2' + classNames({ ' active': selectedAchievementId === achievement.achievementId, ' gray': achievement.progress === 0 })} onClick={() => selectAchievement(achievement.achievementId)}>
<BadgeImageView badgeCode={ getAchievementImage(achievement) } />
</div>
</div>

View File

@ -290,7 +290,7 @@ export const AvatarEditorView: FC<AvatarEditorViewProps> = props =>
);
})}
<NitroCardTabsItemView isActive={ isWardrobeVisible } onClick={ event => setIsWardrobeVisible(true) }>
{ LocalizeText(`avatareditor.category.wardrobe`) }
{ LocalizeText('avatareditor.category.wardrobe') }
</NitroCardTabsItemView>
</NitroCardTabsView>
<NitroCardContentView>

View File

@ -1,4 +1,4 @@
import { ColorConverter, IPartColor } from '@nitrots/nitro-renderer';
import { ColorConverter, IPartColor } from '@nitrots/nitro-renderer';
export class AvatarEditorGridColorItem
{

View File

@ -1,4 +1,4 @@
import { AvatarFigurePartType, IAvatarImageListener, IAvatarRenderManager, IFigurePart, IFigurePartSet, IGraphicAsset, IPartColor, NitroContainer, NitroSprite, TextureUtils } from '@nitrots/nitro-renderer';
import { AvatarFigurePartType, IAvatarImageListener, IAvatarRenderManager, IFigurePart, IFigurePartSet, IGraphicAsset, IPartColor, NitroContainer, NitroSprite, TextureUtils } from '@nitrots/nitro-renderer';
import { GetAvatarRenderManager } from '../../../api';
import { FigureData } from './FigureData';

View File

@ -1,4 +1,4 @@
import { AvatarEditorUtilities } from './AvatarEditorUtilities';
import { AvatarEditorUtilities } from './AvatarEditorUtilities';
import { CategoryData } from './CategoryData';
import { IAvatarEditorCategoryModel } from './IAvatarEditorCategoryModel';

View File

@ -1,4 +1,4 @@
import { IPartColor } from '@nitrots/nitro-renderer';
import { IPartColor } from '@nitrots/nitro-renderer';
import { AvatarEditorGridColorItem } from './AvatarEditorGridColorItem';
import { AvatarEditorGridPartItem } from './AvatarEditorGridPartItem';

View File

@ -1,4 +1,4 @@
import { AvatarEditorUtilities } from './AvatarEditorUtilities';
import { AvatarEditorUtilities } from './AvatarEditorUtilities';
export class FigureData
{

View File

@ -1,4 +1,4 @@
import { CategoryData } from './CategoryData';
import { CategoryData } from './CategoryData';
export interface IAvatarEditorCategoryModel
{

View File

@ -23,7 +23,7 @@ export const CatalogView: FC<CatalogViewProps> = props =>
const [ pendingOpenTree, setPendingOpenTree ] = useState<ICatalogPageData[]>(null);
const [ catalogState, dispatchCatalogState ] = useReducer(CatalogReducer, initialCatalog);
const [ currentTab, setCurrentTab ] = useState<ICatalogPageData>(null);
const { root = null, pageParser = null, activeOffer = null, searchResult = null} = catalogState;
const { root = null, pageParser = null, activeOffer = null, searchResult = null } = catalogState;
const saveActivePages = useCallback(() =>
{

View File

@ -1,4 +1,4 @@
export class FurniCategory
export class FurniCategory
{
public static DEFAULT: number = 1;
public static WALL_PAPER: number = 2;

View File

@ -1,4 +1,4 @@
export class ProductTypeEnum
export class ProductTypeEnum
{
public static WALL: string = 'i';
public static FLOOR: string = 's';

View File

@ -31,21 +31,21 @@ export const CatalogLayoutFrontpage4View: FC<CatalogLayoutFrontpage4ViewProps> =
<div className="row h-100 nitro-catalog-layout-frontpage4">
<div className="col-4">
{ pageParser.frontPageItems[0] &&
<div className="front-page-item h-100" style={ { backgroundImage: `url('${ imageLibraryUrl }${ pageParser.frontPageItems[0].itemPromoImage }')`}} onClick={ event => selectItem(pageParser.frontPageItems[0]) }>
<div className="front-page-item h-100" style={ { backgroundImage: `url('${ imageLibraryUrl }${ pageParser.frontPageItems[0].itemPromoImage }')` }} onClick={ event => selectItem(pageParser.frontPageItems[0]) }>
<div className="front-page-item-caption">{ pageParser.frontPageItems[0].itemName }</div>
</div> }
</div>
<div className="d-flex col-8 flex-column">
{ pageParser.frontPageItems[1] &&
<div className="front-page-item h-100 mb-2" style={ { backgroundImage: `url('${ imageLibraryUrl }${ pageParser.frontPageItems[1].itemPromoImage }')`}} onClick={ event => selectItem(pageParser.frontPageItems[1]) }>
<div className="front-page-item h-100 mb-2" style={ { backgroundImage: `url('${ imageLibraryUrl }${ pageParser.frontPageItems[1].itemPromoImage }')` }} onClick={ event => selectItem(pageParser.frontPageItems[1]) }>
<div className="front-page-item-caption">{ pageParser.frontPageItems[1].itemName }</div>
</div> }
{ pageParser.frontPageItems[2] &&
<div className="front-page-item h-100 mb-2" style={ { backgroundImage: `url('${ imageLibraryUrl }${ pageParser.frontPageItems[2].itemPromoImage }')`}} onClick={ event => selectItem(pageParser.frontPageItems[2]) }>
<div className="front-page-item h-100 mb-2" style={ { backgroundImage: `url('${ imageLibraryUrl }${ pageParser.frontPageItems[2].itemPromoImage }')` }} onClick={ event => selectItem(pageParser.frontPageItems[2]) }>
<div className="front-page-item-caption">{ pageParser.frontPageItems[2].itemName }</div>
</div> }
{ pageParser.frontPageItems[3] &&
<div className="front-page-item h-100" style={ { backgroundImage: `url('${ imageLibraryUrl }${ pageParser.frontPageItems[3].itemPromoImage }')`}} onClick={ event => selectItem(pageParser.frontPageItems[3]) }>
<div className="front-page-item h-100" style={ { backgroundImage: `url('${ imageLibraryUrl }${ pageParser.frontPageItems[3].itemPromoImage }')` }} onClick={ event => selectItem(pageParser.frontPageItems[3]) }>
<div className="front-page-item-caption">{ pageParser.frontPageItems[3].itemName }</div>
</div> }
</div>

View File

@ -34,7 +34,7 @@ export const CatalogLayouGuildForumView: FC<CatalogLayoutGuildForumViewProps> =
return (
<div className="row h-100 nitro-catalog-layout-guild-custom-furni">
<div className="col-7 overflow-auto h-100 d-flex flex-column bg-muted rounded py-1 px-2 text-black">
<div dangerouslySetInnerHTML={ {__html: GetCatalogPageText(pageParser, 1) } } />
<div dangerouslySetInnerHTML={ { __html: GetCatalogPageText(pageParser, 1) } } />
</div>
<div className="col position-relative d-flex flex-column justify-content-center">
{ groups.length === 0 && <div className="bg-muted text-center rounded p-1 text-black">

View File

@ -9,7 +9,7 @@ export const CatalogLayoutInfoLoyaltyView: FC<CatalogLayoutInfoLoyaltyViewProps>
return (
<div className="h-100 nitro-catalog-layout-info-loyalty text-black d-flex flex-row">
<div className="overflow-auto h-100 d-flex flex-column info-loyalty-content">
<div dangerouslySetInnerHTML={ {__html: GetCatalogPageText(pageParser, 0) } } />
<div dangerouslySetInnerHTML={ { __html: GetCatalogPageText(pageParser, 0) } } />
</div>
</div>
);

View File

@ -15,7 +15,7 @@ export const CatalogLayoutPets2View: FC<CatalogLayoutPets2ViewProps> = props =>
</div>
<h6 className="align-self-center">{ GetCatalogPageText(pageParser, 1) }</h6>
</div>
<div dangerouslySetInnerHTML={ {__html: GetCatalogPageText(pageParser, 2) } } />
<div dangerouslySetInnerHTML={ { __html: GetCatalogPageText(pageParser, 2) } } />
{GetCatalogPageText(pageParser, 3) && <div className="mt-auto bg-secondary text-white rounded p-1 text-center" dangerouslySetInnerHTML={{ __html: GetCatalogPageText(pageParser, 3) }} />}
</div>
</div>

View File

@ -15,7 +15,7 @@ export const CatalogLayoutPets3View: FC<CatalogLayoutPets3ViewProps> = props =>
</div>
<h6 className="align-self-center">{ GetCatalogPageText(pageParser, 1) }</h6>
</div>
<div dangerouslySetInnerHTML={ {__html: GetCatalogPageText(pageParser, 2) } } />
<div dangerouslySetInnerHTML={ { __html: GetCatalogPageText(pageParser, 2) } } />
{GetCatalogPageText(pageParser, 3) && <div className="mt-auto bg-secondary text-white rounded p-1 text-center" dangerouslySetInnerHTML={{ __html: GetCatalogPageText(pageParser, 3) }} />}
</div>
</div>

View File

@ -180,7 +180,7 @@ export const CatalogLayoutVipBuyView: FC<CatalogLayoutVipBuyViewProps> = props =
<div className="d-block mb-2">
<img alt="" src={ GetCatalogPageImage(pageParser, 1) } />
</div>
<div className="fs-6 text-center text-black lh-sm overflow-hidden" dangerouslySetInnerHTML={ {__html: getSubscriptionDetails } }></div>
<div className="fs-6 text-center text-black lh-sm overflow-hidden" dangerouslySetInnerHTML={ { __html: getSubscriptionDetails } }></div>
</div>
</div>
</>

View File

@ -46,13 +46,13 @@ export const FriendBarItemView: FC<FriendBarItemViewProps> = props =>
return (
<div ref={ elementRef } className="btn btn-primary friend-bar-item friend-bar-search">
<div className="friend-bar-item-head position-absolute"/>
<div className="text-truncate">{ LocalizeText("friend.bar.find.title") }</div>
<div className="text-truncate">{ LocalizeText('friend.bar.find.title') }</div>
</div>
);
}
return (
<div ref={ elementRef } className={"btn btn-success friend-bar-item " + (isVisible ? "friend-bar-item-active" : "")} onClick={ event => setVisible(prevValue => !prevValue) }>
<div ref={ elementRef } className={'btn btn-success friend-bar-item ' + (isVisible ? 'friend-bar-item-active' : '')} onClick={ event => setVisible(prevValue => !prevValue) }>
<div className="friend-bar-item-head position-absolute">
<AvatarImageView headOnly={ true } figure={ friend.figure } direction={ 2 } />
</div>

View File

@ -12,7 +12,7 @@ export const HotelView: FC<HotelViewProps> = props =>
const onRoomSessionEvent = useCallback((event: RoomSessionEvent) =>
{
switch (event.type)
switch(event.type)
{
case RoomSessionEvent.CREATED:
setIsVisible(false);
@ -26,7 +26,7 @@ export const HotelView: FC<HotelViewProps> = props =>
useRoomSessionManagerEvent(RoomSessionEvent.CREATED, onRoomSessionEvent);
useRoomSessionManagerEvent(RoomSessionEvent.ENDED, onRoomSessionEvent);
if (!isVisible) return null;
if(!isVisible) return null;
const backgroundColor = GetConfiguration('hotelview')['images']['background.colour'];
const background = GetConfigurationManager().interpolate(GetConfiguration('hotelview')['images']['background']);

View File

@ -7,15 +7,15 @@ import { WidgetContainerView } from './widgetcontainer/WIdgetContainerView';
export const GetWidgetLayout: FC<GetWidgetLayoutProps> = props =>
{
switch (props.widgetType)
switch(props.widgetType)
{
case "promoarticle":
case 'promoarticle':
return <PromoArticleWidgetView />;
case "achievementcompetition_hall_of_fame":
case 'achievementcompetition_hall_of_fame':
return <HallOfFameWidgetView slot={props.slot} conf={props.widgetConf} />;
case "bonusrare":
case 'bonusrare':
return <BonusRareWidgetView />;
case "widgetcontainer":
case 'widgetcontainer':
return <WidgetContainerView conf={props.widgetConf} />
default:
return null;

View File

@ -27,7 +27,7 @@ export const PromoArticleWidgetView: FC<PromoArticleWidgetViewProps> = props =>
SendMessageHook(new GetPromoArticlesComposer());
}, []);
if (!articles) return null;
if(!articles) return null;
return (
<div className="promo-articles widget mb-2">
@ -37,12 +37,12 @@ export const PromoArticleWidgetView: FC<PromoArticleWidgetViewProps> = props =>
</div>
<div className="d-flex flex-row mb-1">
{articles && (articles.length > 0) && articles.map((article, ind) =>
<div className={`promo-articles-bullet cursor-pointer ` + (article === articles[index] ? 'promo-articles-bullet-active' : '')} key={article.id} onClick={event => handleSelect(ind)} />
<div className={'promo-articles-bullet cursor-pointer ' + (article === articles[index] ? 'promo-articles-bullet-active' : '')} key={article.id} onClick={event => handleSelect(ind)} />
)}
</div>
{articles && articles[index] &&
<div className="promo-article d-flex flex-row row mx-0">
<div className="promo-article-image" style={ {backgroundImage: `url(${articles[index].imageUrl})`} }/>
<div className="promo-article-image" style={ { backgroundImage: `url(${articles[index].imageUrl})` } }/>
<div className="col-3 d-flex flex-column h-100">
<h3 className="my-0">{articles[index].title}</h3>
<b>{ articles[index].bodyText }</b>

View File

@ -13,7 +13,7 @@ export const WidgetContainerView: FC<WidgetContainerViewProps> = props =>
if(!conf || !conf.length) return config;
let options = conf.split(",");
let options = conf.split(',');
options.forEach(option =>
{

View File

@ -1,4 +1,4 @@
export class FurniCategory
export class FurniCategory
{
public static DEFAULT: number = 1;
public static _Str_3639: number = 2;

View File

@ -1,4 +1,4 @@
import { IFurnitureItemData, IObjectData } from '@nitrots/nitro-renderer';
import { IFurnitureItemData, IObjectData } from '@nitrots/nitro-renderer';
import { GetNitroInstance } from '../../../api';
import { IFurnitureItem } from './IFurnitureItem';

View File

@ -1,4 +1,4 @@
import { IObjectData } from '@nitrots/nitro-renderer';
import { IObjectData } from '@nitrots/nitro-renderer';
export interface IFurnitureItem
{

View File

@ -1,4 +1,4 @@
export interface IUnseenItemTracker
export interface IUnseenItemTracker
{
dispose(): void;
resetCategory(category: number): boolean;

View File

@ -1,4 +1,4 @@
export class UnseenItemCategory
export class UnseenItemCategory
{
public static FURNI: number = 1;
public static RENTABLE: number = 2;

View File

@ -162,7 +162,7 @@ export const ModToolsView: FC<ModToolsViewProps> = props =>
<ModToolsContextProvider value={ { modToolsState, dispatchModToolsState } }>
{ isVisible &&
<NitroCardView uniqueKey="mod-tools" className="nitro-mod-tools" simple={ true }>
<NitroCardHeaderView headerText={ "Mod Tools" } onCloseClick={ event => setIsVisible(false) } />
<NitroCardHeaderView headerText={ 'Mod Tools' } onCloseClick={ event => setIsVisible(false) } />
<NitroCardContentView className="text-black">
<button className="btn btn-primary w-100 mb-2" onClick={ () => handleClick('toggle_room') } disabled={ !currentRoomId }><i className="fas fa-home"></i> Room Tool</button>
<button className="btn btn-primary w-100 mb-2" onClick={ () => {} } disabled={ !currentRoomId }><i className="fas fa-comments"></i> Chatlog Tool</button>

View File

@ -6,7 +6,7 @@ export const ModToolsTicketsView: FC<ModToolsTicketsViewProps> = props =>
{
return (
<NitroCardView className="nitro-mod-tools-tickets" simple={ true }>
<NitroCardHeaderView headerText={ "Tickets" } onCloseClick={ event => {} } />
<NitroCardHeaderView headerText={ 'Tickets' } onCloseClick={ event => {} } />
<NitroCardContentView className="text-black">
</NitroCardContentView>

View File

@ -6,7 +6,7 @@ export const ModToolsUserView: FC<ModToolsUserViewProps> = props =>
{
return (
<NitroCardView className="nitro-mod-tools-user" simple={ true }>
<NitroCardHeaderView headerText={ "User Info" } onCloseClick={ event => {} } />
<NitroCardHeaderView headerText={ 'User Info' } onCloseClick={ event => {} } />
<NitroCardContentView className="text-black">
</NitroCardContentView>

View File

@ -116,7 +116,7 @@ export const NavigatorRoomCreatorView: FC<NavigatorRoomCreatorViewProps> = props
{
NAVIGATOR_ROOM_MODELS.map(model =>
{
return (<div key={ model.name } onClick={ () => selectModel(model.name) } className={ 'h-100 cursor-pointer d-flex flex-column justify-content-center align-items-center p-1 me-2 rounded border border-2' + classNames({' active': selectedModelName === model.name, ' disabled': GetSessionDataManager().clubLevel < model.clubLevel}) }>
return (<div key={ model.name } onClick={ () => selectModel(model.name) } className={ 'h-100 cursor-pointer d-flex flex-column justify-content-center align-items-center p-1 me-2 rounded border border-2' + classNames({ ' active': selectedModelName === model.name, ' disabled': GetSessionDataManager().clubLevel < model.clubLevel }) }>
<img alt="" src={ getRoomModelImage(model.name) } />
<div>{ model.tileSize } { LocalizeText('navigator.createroom.tilesize') }</div>
{ model.clubLevel > HabboClubLevelEnum.NO_CLUB && <CurrencyIcon type="hc" /> }

View File

@ -6,39 +6,39 @@ export interface NavigatorRoomCreatorViewProps
}
export const NAVIGATOR_ROOM_MODELS: { clubLevel: number, tileSize: number, name: string }[] = [
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 104, name: 'a'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 94, name: 'b'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 36, name: 'c'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 84, name: 'd'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 80, name: 'e'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 80, name: 'f'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 416, name: 'i'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 320, name: 'j'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 448, name: 'k'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 352, name: 'l'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 384, name: 'm'},
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 372, name: 'n'},
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 80, name: 'g'},
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 74, name: 'h'},
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 416, name: 'o'},
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 352, name: 'p'},
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 304, name: 'q'},
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 336, name: 'r'},
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 748, name: 'u'},
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 438, name: 'v'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 540, name: 't'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 512, name: 'w'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 396, name: 'x'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 440, name: 'y'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 456, name: 'z'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 208, name: '0'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 1009, name: '1'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 1044, name: '2'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 183, name: '3'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 254, name: '4'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 1024, name: '5'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 801, name: '6'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 354, name: '7'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 888, name: '8'},
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 926, name: '9'}
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 104, name: 'a' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 94, name: 'b' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 36, name: 'c' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 84, name: 'd' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 80, name: 'e' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 80, name: 'f' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 416, name: 'i' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 320, name: 'j' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 448, name: 'k' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 352, name: 'l' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 384, name: 'm' },
{ clubLevel: HabboClubLevelEnum.NO_CLUB, tileSize: 372, name: 'n' },
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 80, name: 'g' },
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 74, name: 'h' },
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 416, name: 'o' },
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 352, name: 'p' },
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 304, name: 'q' },
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 336, name: 'r' },
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 748, name: 'u' },
{ clubLevel: HabboClubLevelEnum.CLUB, tileSize: 438, name: 'v' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 540, name: 't' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 512, name: 'w' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 396, name: 'x' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 440, name: 'y' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 456, name: 'z' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 208, name: '0' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 1009, name: '1' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 1044, name: '2' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 183, name: '3' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 254, name: '4' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 1024, name: '5' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 801, name: '6' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 354, name: '7' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 888, name: '8' },
{ clubLevel: HabboClubLevelEnum.VIP, tileSize: 926, name: '9' }
];

View File

@ -105,7 +105,7 @@ export const NavigatorRoomInfoView: FC<NavigatorRoomInfoViewProps> = props =>
<div className="fw-bold">
{ roomInfoData.enteredGuestRoom.roomName }
</div>
<i onClick={ () => processAction('set_home_room') } className={ 'icon icon-house-small cursor-pointer' + classNames({' gray': homeRoomId !== roomInfoData.enteredGuestRoom.roomId }) } />
<i onClick={ () => processAction('set_home_room') } className={ 'icon icon-house-small cursor-pointer' + classNames({ ' gray': homeRoomId !== roomInfoData.enteredGuestRoom.roomId }) } />
</div>
<div className="d-flex align-items-center">
{ roomInfoData.enteredGuestRoom.showOwner && <>

View File

@ -9,7 +9,7 @@ export const NavigatorRoomSettingsAccessTabView: FC<NavigatorRoomSettingsTabView
const handleChange = useCallback((field: string, value: string | number | boolean) =>
{
const roomSettings = ({...roomSettingsData} as RoomSettingsData);
const roomSettings = ({ ...roomSettingsData } as RoomSettingsData);
let save = true;
switch(field)

View File

@ -81,7 +81,7 @@ export const NavigatorSearchResultItemView: FC<NavigatorSearchResultItemViewProp
<i className="fas fa-info-circle text-secondary" onClick={ openInfo }></i>
{ roomData.habboGroupId > 0 && <i className="fas fa-users mr-2"></i> }
{ roomData.doorMode !== RoomDataParser.OPEN_STATE &&
<i className={ 'me-2 fas ' + classNames( {'fa-lock': roomData.doorMode === RoomDataParser.DOORBELL_STATE, 'fa-key': roomData.doorMode === RoomDataParser.PASSWORD_STATE })}></i>
<i className={ 'me-2 fas ' + classNames( { 'fa-lock': roomData.doorMode === RoomDataParser.DOORBELL_STATE, 'fa-key': roomData.doorMode === RoomDataParser.PASSWORD_STATE })}></i>
}
</div>
</div>

View File

@ -53,7 +53,7 @@ export const NotificationCenterReducer: Reducer<INotificationCenterState, INotif
notifications.splice(notificationIndex, 1);
return {...state, notifications};
return { ...state, notifications };
}
case NotificationCenterActions.DISMISS_NOTIFICATION: {
const id = (action.payload.id || null);
@ -69,7 +69,7 @@ export const NotificationCenterReducer: Reducer<INotificationCenterState, INotif
notifications[notificationIndex].dismiss();
return {...state, notifications};
return { ...state, notifications };
}
default:
return state;

View File

@ -21,7 +21,7 @@ export const NotificationCenterBroadcastMessageView: FC<NotificationCenterBroadc
return (
<NotificationCenterAlertBase onClose={ onClose }>
<div dangerouslySetInnerHTML={ {__html: message } } />
<div dangerouslySetInnerHTML={ { __html: message } } />
<div className="d-flex justify-content-center align-items-center">
<button type="button" className="btn btn-primary" onClick={ onClose }>{ LocalizeText('generic.close') }</button>
</div>

View File

@ -11,7 +11,7 @@ export const ModeratorMessageView: FC<ModeratorMessageViewProps> = props =>
if(!notification) return null;
const content = <>
<div dangerouslySetInnerHTML={ {__html: notification.message } } />
<div dangerouslySetInnerHTML={ { __html: notification.message } } />
<div className="fw-bold text-center">
<a href={ notification.link } rel="noreferrer" target="_blank" onClick={ () => onButtonClick('dismiss_notification') }>{ LocalizeText('mod.alert.link') }</a>
</div>

View File

@ -151,7 +151,7 @@ export class Purse implements IPurse
{
if(((this.clubDays === 0) && (this.clubPeriods === 0))) return HabboClubLevelEnum.NO_CLUB;
if (this.isVip) return HabboClubLevelEnum.VIP;
if(this.isVip) return HabboClubLevelEnum.VIP;
return HabboClubLevelEnum.CLUB;
}

View File

@ -1,4 +1,4 @@
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
export class RoomWidgetAvatarInfoEvent extends RoomWidgetUpdateEvent
{

View File

@ -1,4 +1,4 @@
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
export class RoomWidgetFloodControlEvent extends RoomWidgetUpdateEvent
{

View File

@ -1,4 +1,4 @@
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
export class RoomWidgetUpdateChatInputContentEvent extends RoomWidgetUpdateEvent
{

View File

@ -1,4 +1,4 @@
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
export class RoomWidgetUpdateUserDataEvent extends RoomWidgetUpdateEvent
{

View File

@ -1,4 +1,4 @@
import { AvatarExpressionEnum } from '@nitrots/nitro-renderer';
import { AvatarExpressionEnum } from '@nitrots/nitro-renderer';
import { RoomWidgetMessage } from './RoomWidgetMessage';
export class RoomWidgetAvatarExpressionMessage extends RoomWidgetMessage

View File

@ -1,4 +1,4 @@
import { RoomWidgetMessage } from './RoomWidgetMessage';
import { RoomWidgetMessage } from './RoomWidgetMessage';
export class RoomWidgetChangePostureMessage extends RoomWidgetMessage
{

View File

@ -1,4 +1,4 @@
import { RoomWidgetMessage } from './RoomWidgetMessage';
import { RoomWidgetMessage } from './RoomWidgetMessage';
export class RoomWidgetDanceMessage extends RoomWidgetMessage
{

View File

@ -1,4 +1,4 @@
import { RoomWidgetMessage } from './RoomWidgetMessage';
import { RoomWidgetMessage } from './RoomWidgetMessage';
export class RoomWidgetRequestWidgetMessage extends RoomWidgetMessage
{

View File

@ -1,4 +1,4 @@
export class BotSkillsEnum
export class BotSkillsEnum
{
public static _Str_19584: number = 0;
public static DRESS_UP: number = 1;

View File

@ -76,8 +76,8 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
const newCustomParts: PetCustomPart[] = [];
const _local_6 = customParts[1].split(',').map(piece => parseInt(piece));
const _local_7 = customParts[2].split(",").map(piece => parseInt(piece));
const _local_8 = customParts[3].split(",").map(piece => parseInt(piece));
const _local_7 = customParts[2].split(',').map(piece => parseInt(piece));
const _local_8 = customParts[3].split(',').map(piece => parseInt(piece));
let _local_10 = 0;
@ -88,7 +88,7 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
let _local_12 = _local_8[_local_10];
if (_local_15 != null) _local_12 = _local_15.paletteId;
if(_local_15 != null) _local_12 = _local_15.paletteId;
newCustomParts.push(new PetCustomPart(_local_13, _local_7[_local_10], _local_12));
@ -102,8 +102,8 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
const newCustomParts: PetCustomPart[] = [];
const _local_6 = customParts[1].split(",").map(piece => parseInt(piece));
const _local_8 = customParts[2].split(",").map(piece => parseInt(piece));
const _local_6 = customParts[1].split(',').map(piece => parseInt(piece));
const _local_8 = customParts[2].split(',').map(piece => parseInt(piece));
let _local_10 = 0;
@ -129,8 +129,8 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
const newCustomParts: PetCustomPart[] = [];
const _local_6 = customParts[1].split(',').map(piece => parseInt(piece));
const _local_7 = customParts[2].split(",").map(piece => parseInt(piece));
const _local_8 = customParts[3].split(",").map(piece => parseInt(piece));
const _local_7 = customParts[2].split(',').map(piece => parseInt(piece));
const _local_8 = customParts[3].split(',').map(piece => parseInt(piece));
let _local_10 = 0;

View File

@ -67,7 +67,7 @@ export const ChatWidgetMessageView: FC<ChatWidgetMessageViewProps> = props =>
{ (chat.imageUrl && (chat.imageUrl !== '')) && <div className="user-image" style={ { backgroundImage: 'url(' + chat.imageUrl + ')' } } /> }
</div>
<div className="chat-content">
<b className="username mr-1" dangerouslySetInnerHTML={ {__html: `${ chat.username }: ` } } />
<b className="username mr-1" dangerouslySetInnerHTML={ { __html: `${ chat.username }: ` } } />
<span className="message">{ chat.text }</span>
</div>
<div className="pointer"></div>

View File

@ -24,7 +24,8 @@ export class ChatBubbleMessage
public styleId: number = 0,
public imageUrl: string = null,
public color: string = null
) {
)
{
this.id = ++ChatBubbleMessage.BUBBLE_COUNTER;
}

View File

@ -6,7 +6,7 @@ export const ContextMenuListView: FC<ContextMenuListViewProps> = props =>
const { columns = 1, children = null } = props;
return (
<div className={ `d-flex flex-column menu-list` }>
<div className={ 'd-flex flex-column menu-list' }>
{ children }
</div>
);

View File

@ -33,7 +33,7 @@ export const FurnitureExternalImageView: FC<{}> = props =>
if((objectId === -1) || !photoData) return null;
return(
return (
<NitroCardView className="nitro-external-image-widget">
<NitroCardHeaderView headerText={ '' } onCloseClick={ close } />
<NitroCardContentView>

View File

@ -110,7 +110,7 @@ export const FurnitureFriendFurniView: FC<{}> = props =>
{ LocalizeText('friend.furniture.confirm.lock.subtitle') }
</h5>
<div className="d-flex justify-content-center mb-2">
<div className={ "engraving-lock-stage-" + engravingStage }></div>
<div className={ 'engraving-lock-stage-' + engravingStage }></div>
</div>
{ engravingStage === 2 && <div className="text-small text-black text-center mb-2">{ LocalizeText('friend.furniture.confirm.lock.other.locked') }</div> }
<div className="d-flex">
@ -120,7 +120,7 @@ export const FurnitureFriendFurniView: FC<{}> = props =>
</NitroCardContentView>
</NitroCardView> }
{ engravingLockData && engravingLockData.usernames.length > 0 && <DraggableWindow handleSelector=".nitro-engraving-lock-view">
<div className={ "nitro-engraving-lock-view engraving-lock-" + engravingLockData.type }>
<div className={ 'nitro-engraving-lock-view engraving-lock-' + engravingLockData.type }>
<div className="engraving-lock-close" onClick={ event => processAction('close_view') }></div>
<div className="d-flex justify-content-center">
<div className="engraving-lock-avatar">

View File

@ -116,7 +116,7 @@ export const FurnitureStickieView: FC<{}> = props =>
return (
<DraggableWindow handleSelector=".drag-handler" position={ DraggableWindowPosition.NOTHING }>
<div className={ "nitro-stickie nitro-stickie-image stickie-" + getStickieColorName(stickieData.color) }>
<div className={ 'nitro-stickie nitro-stickie-image stickie-' + getStickieColorName(stickieData.color) }>
<div className="d-flex align-items-center stickie-header drag-handler">
<div className="d-flex align-items-center flex-grow-1 h-100">
{ stickieData.canModify &&
@ -124,7 +124,7 @@ export const FurnitureStickieView: FC<{}> = props =>
<div className="nitro-stickie-image stickie-trash header-trash" onClick={ event => processAction('trash') }></div>
{ STICKIE_COLORS.map(color =>
{
return <div key={ color } className="stickie-color ms-1" onClick={ event => processAction('changeColor', color) } style={ {backgroundColor: ColorUtils.makeColorHex(color) } } />
return <div key={ color } className="stickie-color ms-1" onClick={ event => processAction('changeColor', color) } style={ { backgroundColor: ColorUtils.makeColorHex(color) } } />
})}
</> }
</div>

View File

@ -57,7 +57,7 @@ export const InfoStandWidgetUserView: FC<InfoStandWidgetUserViewProps> = props =
{
const parser = event.getParser();
if (userData && userData.webID === parser.userId)
if(userData && userData.webID === parser.userId)
setUserRelationships(parser);
}, [userData]);
@ -70,7 +70,8 @@ export const InfoStandWidgetUserView: FC<InfoStandWidgetUserViewProps> = props =
setMotto(userData.motto);
SendMessageHook(new UserRelationshipsComposer(userData.webID));
return () => {
return () =>
{
setBadges([]);
setUserRelationships(null);
}

View File

@ -5,7 +5,7 @@ import { ObjectLocationViewProps } from './ObjectLocationView.types';
export const ObjectLocationView: FC<ObjectLocationViewProps> = props =>
{
const { objectId = -1, category = -1, noFollow = false, children = null } = props;
const [ pos, setPos ] = useState<{ x: number, y: number }>({ x: -1, y: -1});
const [ pos, setPos ] = useState<{ x: number, y: number }>({ x: -1, y: -1 });
const elementRef = useRef<HTMLDivElement>();
const getObjectLocation = useCallback(() =>

View File

@ -42,18 +42,18 @@ export const RoomToolsWidgetView: FC<{}> = props =>
}, [ isZoomedIn, isLiked, widgetHandler ]);
return (
<div className={'nitro-room-tools ps-3 d-flex' + classNames({' open': isExpended})}>
<div className={'nitro-room-tools ps-3 d-flex' + classNames({ ' open': isExpended })}>
<div className="list-group list-group-flush w-100 me-1">
<div className="list-group-item" onClick={ () => handleToolClick('settings') }>
<i className="fas fa-cog me-2" />{ LocalizeText('room.settings.button.text') }
</div>
<div className="list-group-item" onClick={ () => handleToolClick('zoom') }>
<i className={ 'fas me-2 ' +classNames({'fa-search-minus': !isZoomedIn, 'fa-search-plus': isZoomedIn}) } />{ LocalizeText('room.zoom.button.text') }
<i className={ 'fas me-2 ' +classNames({ 'fa-search-minus': !isZoomedIn, 'fa-search-plus': isZoomedIn }) } />{ LocalizeText('room.zoom.button.text') }
</div>
<div className="list-group-item" onClick={ () => handleToolClick('chat_history') }>
<i className="fas fa-comment-alt me-2" />{ LocalizeText('room.chathistory.button.text') }
</div>
<div className={ 'list-group-item' + classNames({' disabled': isLiked})} onClick={ () => handleToolClick('like_room') }>
<div className={ 'list-group-item' + classNames({ ' disabled': isLiked })} onClick={ () => handleToolClick('like_room') }>
<i className="fas fa-heart me-2" />{ LocalizeText('room.like.button.text') }
</div>
<div className="list-group-item" onClick={ () => handleToolClick('toggle_room_link') }>
@ -61,7 +61,7 @@ export const RoomToolsWidgetView: FC<{}> = props =>
</div>
</div>
<div className="cursor-pointer d-flex align-items-center px-2" onClick={() => setIsExpanded(value => !value)}>
<i className={ 'fas ' + classNames({'fa-chevron-left': isExpended, 'fa-chevron-right': !isExpended}) } />
<i className={ 'fas ' + classNames({ 'fa-chevron-left': isExpended, 'fa-chevron-right': !isExpended }) } />
</div>
</div>
);

View File

@ -13,7 +13,8 @@ export const AvatarImageView: FC<AvatarImageViewProps> = props =>
useEffect(() =>
{
const avatarImage = GetAvatarRenderManager().createAvatarImage(figure, AvatarScaleType.LARGE, gender, {
resetFigure: figure => {
resetFigure: figure =>
{
if(isDisposed.current) return;
setRandomValue(Math.random());

View File

@ -24,7 +24,7 @@ export const UserProfileView: FC = props =>
{
const parser = event.getParser();
if (userProfile && parser.userId === userProfile.id)
if(userProfile && parser.userId === userProfile.id)
setUserBadges(parser.badges);
}, [userProfile, setUserBadges]);
@ -34,7 +34,7 @@ export const UserProfileView: FC = props =>
{
const parser = event.getParser();
if (userProfile && parser.userId === userProfile.id)
if(userProfile && parser.userId === userProfile.id)
setUserRelationships(parser);
}, [userProfile, setUserRelationships]);
@ -57,7 +57,7 @@ export const UserProfileView: FC = props =>
CreateMessageHook(UserProfileEvent, OnUserProfileEvent);
if (!userProfile) return null;
if(!userProfile) return null;
return (
<div className="user-profile">

View File

@ -4,14 +4,15 @@ import { BadgesContainerViewProps } from './BadgesContainerView.types';
export const BadgesContainerView: FC<BadgesContainerViewProps> = props =>
{
const {badges = null} = props;
const { badges = null } = props;
return (
<div className="row badge-container d-flex">
<div className="nitro-card-grid theme-default">
<div className="row row-cols-5 align-content-start">
{
badges.map( (badge, index) => {
badges.map( (badge, index) =>
{
return (
<div className="grid-item-container" key={index}>
<BadgeImageView badgeCode={badge}/>

View File

@ -11,7 +11,7 @@ export const RelationshipsContainerView: FC<RelationshipsContainerViewProps> = p
const OnUserClick = useCallback((user: RelationshipStatusInfo) =>
{
if (user)
if(user)
SendMessageHook(new UserProfileComposer(user.randomFriendId));
}, []);
@ -19,7 +19,7 @@ export const RelationshipsContainerView: FC<RelationshipsContainerViewProps> = p
{
const relationshipInfo = (relationships && relationships.relationshipStatusMap.hasKey(type)) ? relationships.relationshipStatusMap.getValue(type) : null;
if (simple && !relationshipInfo) return null;
if(simple && !relationshipInfo) return null;
const relationshipName = RelationshipStatusEnum.RELATIONSHIP_NAMES[type].toLocaleLowerCase();

View File

@ -7,14 +7,16 @@ import { UserContainerViewProps } from './UserContainerView.types';
export const UserContainerView: FC<UserContainerViewProps> = props =>
{
const {figure = null, username = null, motto = null, creation = null, secondsSinceLastLogin = null, achievementScore, isFriend = null, isOnline = null, id = null, requestSent = null} = props;
const { figure = null, username = null, motto = null, creation = null, secondsSinceLastLogin = null, achievementScore, isFriend = null, isOnline = null, id = null, requestSent = null } = props;
const OnlineIcon = useCallback(() => {
const OnlineIcon = useCallback(() =>
{
if(isOnline) return (<i className="icon icon-pf-online" />);
else return (<i className="icon icon-pf-offline" />);
}, [isOnline]);
const FriendRequestComponent = useCallback(() => {
const FriendRequestComponent = useCallback(() =>
{
if(id === GetSessionDataManager().userId) return (<span><i className="icon icon-pf-tick" />{LocalizeText('extendedprofile.me')}</span> );
if(isFriend) return (<span><i className="icon icon-pf-tick" />{LocalizeText('extendedprofile.friend')}</span>);

View File

@ -13,7 +13,7 @@ export const UserSettingsView: FC<{}> = props =>
const onUserSettingsUIEvent = useCallback((event: UserSettingsUIEvent) =>
{
switch (event.type)
switch(event.type)
{
case UserSettingsUIEvent.SHOW_USER_SETTINGS:
setIsVisible(true);
@ -56,7 +56,7 @@ export const UserSettingsView: FC<{}> = props =>
const clone = userSettings.clone();
switch (type)
switch(type)
{
case 'close_view':
setIsVisible(false);
@ -91,7 +91,7 @@ export const UserSettingsView: FC<{}> = props =>
break;
}
if (doUpdate) setUserSettings(clone);
if(doUpdate) setUserSettings(clone);
}, [userSettings]);
const saveRangeSlider = useCallback((type: string) =>
@ -106,12 +106,12 @@ export const UserSettingsView: FC<{}> = props =>
useEffect(() =>
{
if (!userSettings) return;
if(!userSettings) return;
dispatchMainEvent(userSettings);
}, [userSettings]);
if (!isVisible) return null;
if(!isVisible) return null;
return (
<NitroCardView uniqueKey="user-settings" className="user-settings-window">
@ -134,7 +134,7 @@ export const UserSettingsView: FC<{}> = props =>
<label>{ LocalizeText('widget.memenu.settings.volume.ui') }</label>
<div className={ 'd-flex align-items-center justify-content-center' }>
<i className={ 'fas' + ((userSettings.volumeSystem === 0) ? ' fa-volume-mute' : '') + ((userSettings.volumeSystem > 0) ? ' fa-volume-down' : '') + ((userSettings.volumeSystem >= 50) ? ' text-muted' : '') } />
<input type="range" className="custom-range ms-2 me-2 w-100" min="0" max="100" step="1" id="volumeSystem" value={ userSettings.volumeSystem } onChange={ event => processAction("system_volume", event.target.value) } onMouseUp={ () => saveRangeSlider("volume") }/>
<input type="range" className="custom-range ms-2 me-2 w-100" min="0" max="100" step="1" id="volumeSystem" value={ userSettings.volumeSystem } onChange={ event => processAction('system_volume', event.target.value) } onMouseUp={ () => saveRangeSlider('volume') }/>
<i className={ 'fas fa-volume-up' + ((userSettings.volumeSystem < 50) ? ' text-muted': '') } />
</div>
</div>
@ -142,7 +142,7 @@ export const UserSettingsView: FC<{}> = props =>
<label>{ LocalizeText('widget.memenu.settings.volume.furni') }</label>
<div className={ 'd-flex align-items-center justify-content-center' }>
<i className={ 'fas' + ((userSettings.volumeFurni === 0) ? ' fa-volume-mute' : '') + ((userSettings.volumeFurni > 0) ? ' fa-volume-down' : '') + ((userSettings.volumeFurni >= 50) ? ' text-muted' : '') } />
<input type="range" className="custom-range ms-2 me-2 w-100" min="0" max="100" step="1" id="volumeFurni" value={ userSettings.volumeFurni } onChange={ event => processAction("furni_volume", event.target.value) } onMouseUp={ () => saveRangeSlider("volume") }/>
<input type="range" className="custom-range ms-2 me-2 w-100" min="0" max="100" step="1" id="volumeFurni" value={ userSettings.volumeFurni } onChange={ event => processAction('furni_volume', event.target.value) } onMouseUp={ () => saveRangeSlider('volume') }/>
<i className={ 'fas fa-volume-up' + ((userSettings.volumeFurni < 50) ? ' text-muted': '') } />
</div>
</div>
@ -150,7 +150,7 @@ export const UserSettingsView: FC<{}> = props =>
<label>{ LocalizeText('widget.memenu.settings.volume.trax') }</label>
<div className={ 'd-flex align-items-center justify-content-center' }>
<i className={ 'fas' + ((userSettings.volumeTrax === 0) ? ' fa-volume-mute' : '') + ((userSettings.volumeTrax > 0) ? ' fa-volume-down' : '') + ((userSettings.volumeTrax >= 50) ? ' text-muted' : '') } />
<input type="range" className="custom-range ms-2 me-2 w-100" min="0" max="100" step="1" id="volumeTrax" value={ userSettings.volumeTrax } onChange={ event => processAction("trax_volume", event.target.value) } onMouseUp={ () => saveRangeSlider("volume") }/>
<input type="range" className="custom-range ms-2 me-2 w-100" min="0" max="100" step="1" id="volumeTrax" value={ userSettings.volumeTrax } onChange={ event => processAction('trax_volume', event.target.value) } onMouseUp={ () => saveRangeSlider('volume') }/>
<i className={ 'fas fa-volume-up' + ((userSettings.volumeTrax < 50) ? ' text-muted': '') } />
</div>
</div>