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==" "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA=="
}, },
"@typescript-eslint/eslint-plugin": { "@typescript-eslint/eslint-plugin": {
"version": "4.22.0", "version": "4.29.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.1.tgz",
"integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==", "integrity": "sha512-AHqIU+SqZZgBEiWOrtN94ldR3ZUABV5dUG94j8Nms9rQnHFc8fvDOue/58K4CFz6r8OtDDc35Pw9NQPWo0Ayrw==",
"requires": { "requires": {
"@typescript-eslint/experimental-utils": "4.22.0", "@typescript-eslint/experimental-utils": "4.29.1",
"@typescript-eslint/scope-manager": "4.22.0", "@typescript-eslint/scope-manager": "4.29.1",
"debug": "^4.1.1", "debug": "^4.3.1",
"functional-red-black-tree": "^1.0.1", "functional-red-black-tree": "^1.0.1",
"lodash": "^4.17.15", "regexpp": "^3.1.0",
"regexpp": "^3.0.0", "semver": "^7.3.5",
"semver": "^7.3.2", "tsutils": "^3.21.0"
"tsutils": "^3.17.1" },
"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": { "@typescript-eslint/experimental-utils": {

View File

@ -29,6 +29,87 @@
"react-app/jest" "react-app/jest"
], ],
"rules": { "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": [ "no-switch-case-fall-through": [
"off" "off"
] ]
@ -56,6 +137,7 @@
"@types/react-dom": "^17.0.9", "@types/react-dom": "^17.0.9",
"@types/react-slider": "^1.3.1", "@types/react-slider": "^1.3.1",
"@types/react-transition-group": "^4.4.2", "@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; const { className = '' } = props;
return ( return (
<div className={ "nitro-card-accordion bg-light text-black " + className }> <div className={ 'nitro-card-accordion bg-light text-black ' + className }>
{ props.children } { props.children }
</div> </div>
); );

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
import { ColorConverter, IPartColor } from '@nitrots/nitro-renderer'; import { ColorConverter, IPartColor } from '@nitrots/nitro-renderer';
export class AvatarEditorGridColorItem 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 { GetAvatarRenderManager } from '../../../api';
import { FigureData } from './FigureData'; import { FigureData } from './FigureData';

View File

@ -1,4 +1,4 @@
import { AvatarEditorUtilities } from './AvatarEditorUtilities'; import { AvatarEditorUtilities } from './AvatarEditorUtilities';
import { CategoryData } from './CategoryData'; import { CategoryData } from './CategoryData';
import { IAvatarEditorCategoryModel } from './IAvatarEditorCategoryModel'; 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 { AvatarEditorGridColorItem } from './AvatarEditorGridColorItem';
import { AvatarEditorGridPartItem } from './AvatarEditorGridPartItem'; import { AvatarEditorGridPartItem } from './AvatarEditorGridPartItem';

View File

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

View File

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

View File

@ -1,4 +1,4 @@
export class FurniCategory export class FurniCategory
{ {
public static DEFAULT: number = 1; public static DEFAULT: number = 1;
public static WALL_PAPER: number = 2; 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 WALL: string = 'i';
public static FLOOR: string = 's'; public static FLOOR: string = 's';

View File

@ -46,13 +46,13 @@ export const FriendBarItemView: FC<FriendBarItemViewProps> = props =>
return ( return (
<div ref={ elementRef } className="btn btn-primary friend-bar-item friend-bar-search"> <div ref={ elementRef } className="btn btn-primary friend-bar-item friend-bar-search">
<div className="friend-bar-item-head position-absolute"/> <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> </div>
); );
} }
return ( 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"> <div className="friend-bar-item-head position-absolute">
<AvatarImageView headOnly={ true } figure={ friend.figure } direction={ 2 } /> <AvatarImageView headOnly={ true } figure={ friend.figure } direction={ 2 } />
</div> </div>

View File

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

View File

@ -37,7 +37,7 @@ export const PromoArticleWidgetView: FC<PromoArticleWidgetViewProps> = props =>
</div> </div>
<div className="d-flex flex-row mb-1"> <div className="d-flex flex-row mb-1">
{articles && (articles.length > 0) && articles.map((article, ind) => {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> </div>
{articles && articles[index] && {articles && articles[index] &&

View File

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

View File

@ -1,4 +1,4 @@
export class FurniCategory export class FurniCategory
{ {
public static DEFAULT: number = 1; public static DEFAULT: number = 1;
public static _Str_3639: number = 2; 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 { GetNitroInstance } from '../../../api';
import { IFurnitureItem } from './IFurnitureItem'; 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 export interface IFurnitureItem
{ {

View File

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

View File

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

View File

@ -162,7 +162,7 @@ export const ModToolsView: FC<ModToolsViewProps> = props =>
<ModToolsContextProvider value={ { modToolsState, dispatchModToolsState } }> <ModToolsContextProvider value={ { modToolsState, dispatchModToolsState } }>
{ isVisible && { isVisible &&
<NitroCardView uniqueKey="mod-tools" className="nitro-mod-tools" simple={ true }> <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"> <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={ () => 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> <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 ( return (
<NitroCardView className="nitro-mod-tools-tickets" simple={ true }> <NitroCardView className="nitro-mod-tools-tickets" simple={ true }>
<NitroCardHeaderView headerText={ "Tickets" } onCloseClick={ event => {} } /> <NitroCardHeaderView headerText={ 'Tickets' } onCloseClick={ event => {} } />
<NitroCardContentView className="text-black"> <NitroCardContentView className="text-black">
</NitroCardContentView> </NitroCardContentView>

View File

@ -6,7 +6,7 @@ export const ModToolsUserView: FC<ModToolsUserViewProps> = props =>
{ {
return ( return (
<NitroCardView className="nitro-mod-tools-user" simple={ true }> <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 className="text-black">
</NitroCardContentView> </NitroCardContentView>

View File

@ -1,4 +1,4 @@
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
export class RoomWidgetAvatarInfoEvent extends 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 export class RoomWidgetFloodControlEvent extends RoomWidgetUpdateEvent
{ {

View File

@ -1,4 +1,4 @@
import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent';
export class RoomWidgetUpdateChatInputContentEvent extends 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 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'; import { RoomWidgetMessage } from './RoomWidgetMessage';
export class RoomWidgetAvatarExpressionMessage extends 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 export class RoomWidgetChangePostureMessage extends RoomWidgetMessage
{ {

View File

@ -1,4 +1,4 @@
import { RoomWidgetMessage } from './RoomWidgetMessage'; import { RoomWidgetMessage } from './RoomWidgetMessage';
export class RoomWidgetDanceMessage extends 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 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 _Str_19584: number = 0;
public static DRESS_UP: number = 1; public static DRESS_UP: number = 1;

View File

@ -76,8 +76,8 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
const newCustomParts: PetCustomPart[] = []; const newCustomParts: PetCustomPart[] = [];
const _local_6 = customParts[1].split(',').map(piece => parseInt(piece)); const _local_6 = customParts[1].split(',').map(piece => parseInt(piece));
const _local_7 = customParts[2].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_8 = customParts[3].split(',').map(piece => parseInt(piece));
let _local_10 = 0; let _local_10 = 0;
@ -102,8 +102,8 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
const newCustomParts: PetCustomPart[] = []; const newCustomParts: PetCustomPart[] = [];
const _local_6 = customParts[1].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)); const _local_8 = customParts[2].split(',').map(piece => parseInt(piece));
let _local_10 = 0; let _local_10 = 0;
@ -129,8 +129,8 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
const newCustomParts: PetCustomPart[] = []; const newCustomParts: PetCustomPart[] = [];
const _local_6 = customParts[1].split(',').map(piece => parseInt(piece)); const _local_6 = customParts[1].split(',').map(piece => parseInt(piece));
const _local_7 = customParts[2].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_8 = customParts[3].split(',').map(piece => parseInt(piece));
let _local_10 = 0; let _local_10 = 0;

View File

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

View File

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

View File

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

View File

@ -116,7 +116,7 @@ export const FurnitureStickieView: FC<{}> = props =>
return ( return (
<DraggableWindow handleSelector=".drag-handler" position={ DraggableWindowPosition.NOTHING }> <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 stickie-header drag-handler">
<div className="d-flex align-items-center flex-grow-1 h-100"> <div className="d-flex align-items-center flex-grow-1 h-100">
{ stickieData.canModify && { stickieData.canModify &&

View File

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

View File

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

View File

@ -11,7 +11,8 @@ export const BadgesContainerView: FC<BadgesContainerViewProps> = props =>
<div className="nitro-card-grid theme-default"> <div className="nitro-card-grid theme-default">
<div className="row row-cols-5 align-content-start"> <div className="row row-cols-5 align-content-start">
{ {
badges.map( (badge, index) => { badges.map( (badge, index) =>
{
return ( return (
<div className="grid-item-container" key={index}> <div className="grid-item-container" key={index}>
<BadgeImageView badgeCode={badge}/> <BadgeImageView badgeCode={badge}/>

View File

@ -9,12 +9,14 @@ 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" />); if(isOnline) return (<i className="icon icon-pf-online" />);
else return (<i className="icon icon-pf-offline" />); else return (<i className="icon icon-pf-offline" />);
}, [isOnline]); }, [isOnline]);
const FriendRequestComponent = useCallback(() => { const FriendRequestComponent = useCallback(() =>
{
if(id === GetSessionDataManager().userId) return (<span><i className="icon icon-pf-tick" />{LocalizeText('extendedprofile.me')}</span> ); 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>); if(isFriend) return (<span><i className="icon icon-pf-tick" />{LocalizeText('extendedprofile.friend')}</span>);

View File

@ -134,7 +134,7 @@ export const UserSettingsView: FC<{}> = props =>
<label>{ LocalizeText('widget.memenu.settings.volume.ui') }</label> <label>{ LocalizeText('widget.memenu.settings.volume.ui') }</label>
<div className={ 'd-flex align-items-center justify-content-center' }> <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' : '') } /> <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': '') } /> <i className={ 'fas fa-volume-up' + ((userSettings.volumeSystem < 50) ? ' text-muted': '') } />
</div> </div>
</div> </div>
@ -142,7 +142,7 @@ export const UserSettingsView: FC<{}> = props =>
<label>{ LocalizeText('widget.memenu.settings.volume.furni') }</label> <label>{ LocalizeText('widget.memenu.settings.volume.furni') }</label>
<div className={ 'd-flex align-items-center justify-content-center' }> <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' : '') } /> <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': '') } /> <i className={ 'fas fa-volume-up' + ((userSettings.volumeFurni < 50) ? ' text-muted': '') } />
</div> </div>
</div> </div>
@ -150,7 +150,7 @@ export const UserSettingsView: FC<{}> = props =>
<label>{ LocalizeText('widget.memenu.settings.volume.trax') }</label> <label>{ LocalizeText('widget.memenu.settings.volume.trax') }</label>
<div className={ 'd-flex align-items-center justify-content-center' }> <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' : '') } /> <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': '') } /> <i className={ 'fas fa-volume-up' + ((userSettings.volumeTrax < 50) ? ' text-muted': '') } />
</div> </div>
</div> </div>