mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-18 21:36:27 +01:00
Update dependencies, eslint, fix formatting, etc
This commit is contained in:
parent
2cd999b614
commit
0db9e4ad45
@ -7,7 +7,7 @@
|
||||
"start": "vite",
|
||||
"build": "vite build",
|
||||
"build:prod": "npx browserslist@latest --update-db && yarn build",
|
||||
"eslint": "eslint src --ext .ts,.tsx"
|
||||
"eslint": "eslint ./src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/react-virtual": "3.5.1",
|
||||
@ -16,6 +16,7 @@
|
||||
"react-dom": "^18.3.1",
|
||||
"react-icons": "^5.2.1",
|
||||
"react-slider": "^2.0.6",
|
||||
"react-transition-group": "^4.4.5",
|
||||
"react-youtube": "^7.13.1",
|
||||
"use-between": "^1.3.5"
|
||||
},
|
||||
|
@ -85,7 +85,7 @@ export const App: FC<{}> = props =>
|
||||
{
|
||||
NitroLogger.error(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
prepare(window.innerWidth, window.innerHeight);
|
||||
}, []);
|
||||
@ -98,4 +98,4 @@ export const App: FC<{}> = props =>
|
||||
<Base id="draggable-windows-container" />
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -14,4 +14,4 @@ export const AvatarEditorColorSorter = (a: IPartColor, b: IPartColor) =>
|
||||
if(a.index > b.index) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
@ -31,5 +31,5 @@ export const AvatarEditorPartSorter = (hcFirst: boolean) =>
|
||||
if(a.partSet.id > b.partSet.id) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -104,7 +104,7 @@ export class AvatarEditorThumbnailsHelper
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
};
|
||||
|
||||
return new Promise(async (resolve, reject) =>
|
||||
{
|
||||
@ -116,7 +116,7 @@ export class AvatarEditorThumbnailsHelper
|
||||
AvatarEditorThumbnailsHelper.THUMBNAIL_CACHE.set(thumbnailKey, imageUrl);
|
||||
|
||||
resolve(imageUrl);
|
||||
}
|
||||
};
|
||||
|
||||
const figureContainer = GetAvatarRenderManager().createFigureContainer(`${ setType }-${ part.partSet.id }`);
|
||||
|
||||
@ -168,7 +168,7 @@ export class AvatarEditorThumbnailsHelper
|
||||
AvatarEditorThumbnailsHelper.THUMBNAIL_CACHE.set(thumbnailKey, imageUrl);
|
||||
|
||||
resolve(imageUrl);
|
||||
}
|
||||
};
|
||||
|
||||
resetFigure(figureString);
|
||||
});
|
||||
|
@ -4,12 +4,12 @@ import { ICatalogNode } from './ICatalogNode';
|
||||
export const GetPixelEffectIcon = (id: number) =>
|
||||
{
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
export const GetSubscriptionProductIcon = (id: number) =>
|
||||
{
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
export const GetOfferNodes = (offerNodes: Map<number, ICatalogNode[]>, offerId: number) =>
|
||||
{
|
||||
@ -27,7 +27,7 @@ export const GetOfferNodes = (offerNodes: Map<number, ICatalogNode[]>, offerId:
|
||||
}
|
||||
|
||||
return allowedNodes;
|
||||
}
|
||||
};
|
||||
|
||||
export const FilterCatalogNode = (search: string, furniLines: string[], node: ICatalogNode, nodes: ICatalogNode[]) =>
|
||||
{
|
||||
@ -59,7 +59,7 @@ export const FilterCatalogNode = (search: string, furniLines: string[], node: IC
|
||||
}
|
||||
|
||||
for(const child of node.children) FilterCatalogNode(search, furniLines, child, nodes);
|
||||
}
|
||||
};
|
||||
|
||||
export function GetPetIndexFromLocalization(localization: string)
|
||||
{
|
||||
|
@ -16,4 +16,4 @@ export const GetImageIconUrlForProduct = (productType: string, productClassId: n
|
||||
}
|
||||
|
||||
return imageUrl;
|
||||
}
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ import { IPageLocalization } from './IPageLocalization';
|
||||
export class PageLocalization implements IPageLocalization
|
||||
{
|
||||
private _images: string[];
|
||||
private _texts: string[]
|
||||
private _texts: string[];
|
||||
|
||||
constructor(images: string[], texts: string[])
|
||||
{
|
||||
|
@ -3,4 +3,4 @@ export const ChatHistoryCurrentDate = () =>
|
||||
const currentTime = new Date();
|
||||
|
||||
return `${ currentTime.getHours().toString().padStart(2, '0') }:${ currentTime.getMinutes().toString().padStart(2, '0') }`;
|
||||
}
|
||||
};
|
||||
|
@ -3,4 +3,4 @@ export const MessengerHistoryCurrentDate = (secondsSinceNow: number = 0) =>
|
||||
const currentTime = secondsSinceNow ? new Date(Date.now() - secondsSinceNow * 1000) : new Date();
|
||||
|
||||
return `${ currentTime.getHours().toString().padStart(2, '0') }:${ currentTime.getMinutes().toString().padStart(2, '0') }`;
|
||||
}
|
||||
};
|
||||
|
@ -10,4 +10,4 @@ export const GetGroupChatData = (extraData: string) =>
|
||||
const userId = parseInt(splitData[2]);
|
||||
|
||||
return ({ username: username, figure: figure, userId: userId } as IGroupChatData);
|
||||
}
|
||||
};
|
||||
|
@ -4,4 +4,4 @@ import { SendMessageComposer } from '../nitro';
|
||||
export const ToggleFavoriteGroup = (group: HabboGroupEntryData) =>
|
||||
{
|
||||
SendMessageComposer(group.favourite ? new GroupUnfavoriteComposer(group.groupId) : new GroupFavoriteComposer(group.groupId));
|
||||
}
|
||||
};
|
||||
|
@ -8,4 +8,4 @@ export const GetClubBadge = (badgeCodes: string[]) =>
|
||||
BADGES.forEach(badge => ((badgeCodes.indexOf(badge) > -1) && (badgeCode = badge)));
|
||||
|
||||
return (badgeCode || DEFAULT_BADGE);
|
||||
}
|
||||
};
|
||||
|
@ -5,4 +5,4 @@ export const GetCloseReasonKey = (code: number) =>
|
||||
if(code === 2) return 'abusive';
|
||||
|
||||
return 'resolved';
|
||||
}
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ const addSingleFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen: b
|
||||
}
|
||||
|
||||
return groupItem;
|
||||
}
|
||||
};
|
||||
|
||||
const addGroupableFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen: boolean) =>
|
||||
{
|
||||
@ -108,7 +108,7 @@ const addGroupableFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen
|
||||
}
|
||||
|
||||
return existingGroup;
|
||||
}
|
||||
};
|
||||
|
||||
export const addFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen: boolean) =>
|
||||
{
|
||||
@ -120,7 +120,7 @@ export const addFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen:
|
||||
{
|
||||
addGroupableFurnitureItem(set, item, unseen);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const mergeFurniFragments = (fragment: Map<number, FurnitureListItemParser>, totalFragments: number, fragmentNumber: number, fragments: Map<number, FurnitureListItemParser>[]) =>
|
||||
{
|
||||
@ -145,7 +145,7 @@ export const mergeFurniFragments = (fragment: Map<number, FurnitureListItemParse
|
||||
fragments = null;
|
||||
|
||||
return merged;
|
||||
}
|
||||
};
|
||||
|
||||
export const getAllItemIds = (groupItems: GroupItem[]) =>
|
||||
{
|
||||
@ -168,4 +168,4 @@ export const getAllItemIds = (groupItems: GroupItem[]) =>
|
||||
}
|
||||
|
||||
return itemIds;
|
||||
}
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ export const cancelRoomObjectPlacement = () =>
|
||||
|
||||
setPlacingItemId(-1);
|
||||
setObjectMoverRequested(false);
|
||||
}
|
||||
};
|
||||
|
||||
export const attemptPetPlacement = (petItem: IPetItem, flag: boolean = false) =>
|
||||
{
|
||||
@ -47,7 +47,7 @@ export const attemptPetPlacement = (petItem: IPetItem, flag: boolean = false) =>
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
export const attemptItemPlacement = (groupItem: GroupItem, flag: boolean = false) =>
|
||||
{
|
||||
@ -92,7 +92,7 @@ export const attemptItemPlacement = (groupItem: GroupItem, flag: boolean = false
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export const attemptBotPlacement = (botItem: IBotItem, flag: boolean = false) =>
|
||||
@ -114,4 +114,4 @@ export const attemptBotPlacement = (botItem: IBotItem, flag: boolean = false) =>
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ export const addSinglePetItem = (petData: PetData, set: IPetItem[], unseen: bool
|
||||
}
|
||||
|
||||
return petItem;
|
||||
}
|
||||
};
|
||||
|
||||
export const removePetItemById = (id: number, set: IPetItem[]) =>
|
||||
{
|
||||
@ -49,7 +49,7 @@ export const removePetItemById = (id: number, set: IPetItem[]) =>
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export const processPetFragment = (set: IPetItem[], fragment: Map<number, PetData>, isUnseen: (category: number, itemId: number) => boolean) =>
|
||||
{
|
||||
@ -75,7 +75,7 @@ export const processPetFragment = (set: IPetItem[], fragment: Map<number, PetDat
|
||||
}
|
||||
|
||||
return set;
|
||||
}
|
||||
};
|
||||
|
||||
export const mergePetFragments = (fragment: Map<number, PetData>, totalFragments: number, fragmentNumber: number, fragments: Map<number, PetData>[]) =>
|
||||
{
|
||||
@ -100,4 +100,4 @@ export const mergePetFragments = (fragment: Map<number, PetData>, totalFragments
|
||||
fragments = null;
|
||||
|
||||
return merged;
|
||||
}
|
||||
};
|
||||
|
@ -49,7 +49,7 @@ export const parseTradeItems = (items: ItemDataStructure[]) =>
|
||||
}
|
||||
|
||||
return existingItems;
|
||||
}
|
||||
};
|
||||
|
||||
export const getGuildFurniType = (spriteId: number, stuffData: IObjectData) =>
|
||||
{
|
||||
@ -67,4 +67,4 @@ export const getGuildFurniType = (spriteId: number, stuffData: IObjectData) =>
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
};
|
||||
|
@ -32,4 +32,4 @@ export const GetIssueCategoryName = (categoryId: number) =>
|
||||
}
|
||||
|
||||
return 'Unknown';
|
||||
}
|
||||
};
|
||||
|
@ -5,6 +5,6 @@ const BuildMaxVisitorsList = () =>
|
||||
for(let i = 10; i <= 100; i = i + 10) list.push(i);
|
||||
|
||||
return list;
|
||||
}
|
||||
};
|
||||
|
||||
export const GetMaxVisitorsList = BuildMaxVisitorsList();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { GetConfiguration } from '@nitrots/nitro-renderer';
|
||||
|
||||
export function GetConfigurationValue<T>(key: string, value: T = null): T
|
||||
export function GetConfigurationValue<T = string>(key: string, value: T = null): T
|
||||
{
|
||||
return GetConfiguration().getValue(key, value);
|
||||
}
|
||||
|
@ -12,4 +12,4 @@ export const OpenUrl = (url: string) =>
|
||||
{
|
||||
CreateLinkEvent(url);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -51,4 +51,4 @@ export const DispatchMouseEvent = (event: MouseEvent, canvasId: number = 1) =>
|
||||
}
|
||||
|
||||
GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, event.altKey, (event.ctrlKey || event.metaKey), event.shiftKey, false);
|
||||
}
|
||||
};
|
||||
|
@ -78,4 +78,4 @@ export const DispatchTouchEvent = (event: TouchEvent, canvasId: number = 1, long
|
||||
}
|
||||
|
||||
GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, altKey, ctrlKey, shiftKey, false);
|
||||
}
|
||||
};
|
||||
|
@ -10,4 +10,4 @@ export const GetRoomObjectBounds = (roomId: number, objectId: number, category:
|
||||
rectangle.y = Math.round(rectangle.y);
|
||||
|
||||
return rectangle;
|
||||
}
|
||||
};
|
||||
|
@ -10,4 +10,4 @@ export const GetRoomObjectScreenLocation = (roomId: number, objectId: number, ca
|
||||
point.y = Math.round(point.y);
|
||||
|
||||
return point;
|
||||
}
|
||||
};
|
||||
|
@ -6,4 +6,4 @@ export const InitializeRoomInstanceRenderingCanvas = (width: number, height: num
|
||||
const roomId = roomEngine.activeRoomId;
|
||||
|
||||
roomEngine.initializeRoomInstanceRenderingCanvas(roomId, canvasId, width, height);
|
||||
}
|
||||
};
|
||||
|
@ -6,7 +6,7 @@ export function GetFurnitureDataForProductOffer(offer: CatalogPageMessageProduct
|
||||
|
||||
let furniData: IFurnitureData = null;
|
||||
|
||||
switch((offer.productType.toUpperCase()))
|
||||
switch(offer.productType)
|
||||
{
|
||||
case FurnitureType.FLOOR:
|
||||
furniData = GetSessionDataManager().getFloorItemData(offer.furniClassId);
|
||||
|
@ -8,4 +8,4 @@ export const VisitDesktop = () =>
|
||||
|
||||
GoToDesktop();
|
||||
GetRoomSessionManager().removeSession(-1);
|
||||
}
|
||||
};
|
||||
|
@ -398,7 +398,7 @@ export class AvatarInfoUtilities
|
||||
default:
|
||||
return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return this.isValidSetting(userInfo, checkSetting);
|
||||
}
|
||||
@ -416,7 +416,7 @@ export class AvatarInfoUtilities
|
||||
default:
|
||||
return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return this.isValidSetting(userInfo, checkSetting);
|
||||
}
|
||||
@ -432,7 +432,7 @@ export class AvatarInfoUtilities
|
||||
default:
|
||||
return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return this.isValidSetting(userInfo, checkSetting);
|
||||
}
|
||||
|
@ -3,5 +3,4 @@ import { ChatBubbleMessage } from './ChatBubbleMessage';
|
||||
export const DoChatsOverlap = (a: ChatBubbleMessage, b: ChatBubbleMessage, additionalBTop: number, padding: number = 0) =>
|
||||
{
|
||||
return !((((a.left + padding) + a.width) < (b.left + padding)) || ((a.left + padding) > ((b.left + padding) + b.width)) || ((a.top + a.height) < (b.top + additionalBTop)) || (a.top > ((b.top + additionalBTop) + b.height)));
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -34,4 +34,4 @@ export const GetDiskColor = (name: string) =>
|
||||
b = ((b % DISK_COLOR_BLUE_RANGE) + DISK_COLOR_BLUE_MIN);
|
||||
|
||||
return `rgb(${ r },${ g },${ b })`;
|
||||
}
|
||||
};
|
||||
|
@ -11,4 +11,4 @@ export const CloneObject = <T>(object: T): T =>
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ export class ColorUtils
|
||||
*/
|
||||
public static int_to_8BitVals(value: number): [number, number, number, number]
|
||||
{
|
||||
const val1 = ((value >> 24) & 0xFF)
|
||||
const val1 = ((value >> 24) & 0xFF);
|
||||
const val2 = ((value >> 16) & 0xFF);
|
||||
const val3 = ((value >> 8) & 0xFF);
|
||||
const val4 = (value & 0xFF);
|
||||
|
@ -6,4 +6,4 @@ export const ConvertSeconds = (seconds: number) =>
|
||||
let numSeconds = ((seconds % 86400) % 3600) % 60;
|
||||
|
||||
return numDays.toString().padStart(2, '0') + ':' + numHours.toString().padStart(2, '0') + ':' + numMinutes.toString().padStart(2, '0') + ':' + numSeconds.toString().padStart(2, '0');
|
||||
}
|
||||
};
|
||||
|
@ -2,10 +2,10 @@ export const GetLocalStorage = <T>(key: string) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
JSON.parse(window.localStorage.getItem(key)) as T ?? null
|
||||
JSON.parse(window.localStorage.getItem(key)) as T ?? null;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -7,4 +7,4 @@ export const LocalizeBadgeDescription = (key: string) =>
|
||||
if(!badgeDesc || !badgeDesc.length) badgeDesc = `badge_desc_${ key }`;
|
||||
|
||||
return badgeDesc;
|
||||
}
|
||||
};
|
||||
|
@ -7,4 +7,4 @@ export const LocalizeBadgeName = (key: string) =>
|
||||
if(!badgeName || !badgeName.length) badgeName = `badge_name_${ key }`;
|
||||
|
||||
return badgeName;
|
||||
}
|
||||
};
|
||||
|
@ -8,7 +8,7 @@ export const PlaySound = (sampleCode: string) =>
|
||||
if(!canPlaySound) return;
|
||||
|
||||
DispatchMainEvent(new NitroSoundEvent(NitroSoundEvent.PLAY_SOUND, sampleCode));
|
||||
}
|
||||
};
|
||||
|
||||
const eventTypes = [ MouseEventType.MOUSE_CLICK ];
|
||||
|
||||
@ -19,6 +19,6 @@ const startListening = () =>
|
||||
const onEvent = (event: Event) => ((canPlaySound = true) && stopListening());
|
||||
|
||||
eventTypes.forEach(type => window.addEventListener(type, onEvent));
|
||||
}
|
||||
};
|
||||
|
||||
startListening();
|
||||
|
@ -1,19 +1,19 @@
|
||||
import { CatalogPageMessageProductData, GetRoomEngine } from '@nitrots/nitro-renderer';
|
||||
import { FurnitureType, GetRoomEngine } from '@nitrots/nitro-renderer';
|
||||
import { FurniCategory } from '../inventory';
|
||||
|
||||
export class ProductImageUtility
|
||||
{
|
||||
public static getProductImageUrl(productType: string, furniClassId: number, extraParam: string): string
|
||||
public static getProductImageUrl(productType: FurnitureType, furniClassId: number, extraParam: string): string
|
||||
{
|
||||
let imageUrl: string = null;
|
||||
|
||||
switch(productType)
|
||||
{
|
||||
case CatalogPageMessageProductData.S:
|
||||
case FurnitureType.FLOOR:
|
||||
imageUrl = GetRoomEngine().getFurnitureFloorIconUrl(furniClassId);
|
||||
break;
|
||||
case CatalogPageMessageProductData.I:
|
||||
const productCategory = this.getProductCategory(CatalogPageMessageProductData.I, furniClassId);
|
||||
case FurnitureType.WALL:
|
||||
const productCategory = this.getProductCategory(FurnitureType.WALL, furniClassId);
|
||||
|
||||
if(productCategory === 1)
|
||||
{
|
||||
@ -32,7 +32,7 @@ export class ProductImageUtility
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CatalogPageMessageProductData.E:
|
||||
case FurnitureType.EFFECT:
|
||||
// fx_icon_furniClassId_png
|
||||
break;
|
||||
}
|
||||
@ -40,11 +40,11 @@ export class ProductImageUtility
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public static getProductCategory(productType: string, furniClassId: number): number
|
||||
public static getProductCategory(productType: FurnitureType, furniClassId: number): number
|
||||
{
|
||||
if(productType === CatalogPageMessageProductData.S) return 1;
|
||||
if(productType === FurnitureType.FLOOR) return 1;
|
||||
|
||||
if(productType === CatalogPageMessageProductData.I)
|
||||
if(productType === FurnitureType.WALL)
|
||||
{
|
||||
if(furniClassId === 3001) return FurniCategory.WALL_PAPER;
|
||||
|
||||
|
@ -35,7 +35,7 @@ const encodeHTML = (str: string) =>
|
||||
|
||||
return full;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const RoomChatFormatter = (content: string) =>
|
||||
{
|
||||
@ -72,4 +72,4 @@ export const RoomChatFormatter = (content: string) =>
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
@ -5,4 +5,4 @@ export const GetWiredTimeLocale = (value: number) =>
|
||||
if(!(value % 2)) return time.toString();
|
||||
|
||||
return (time + 0.5).toString();
|
||||
}
|
||||
};
|
||||
|
@ -25,4 +25,4 @@ export const AutoGrid: FC<AutoGridProps> = props =>
|
||||
}, [ columnMinWidth, columnMinHeight, columnCount, style ]);
|
||||
|
||||
return <Grid columnCount={ columnCount } fullHeight={ fullHeight } overflow={ overflow } style={ getStyle } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -81,4 +81,4 @@ export const Base: FC<BaseProps<HTMLDivElement>> = props =>
|
||||
{ children }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -32,4 +32,4 @@ export const Button: FC<ButtonProps> = props =>
|
||||
}, [ variant, size, active, disabled, classNames ]);
|
||||
|
||||
return <Flex center classNames={ getClassNames } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -19,4 +19,4 @@ export const ButtonGroup: FC<ButtonGroupProps> = props =>
|
||||
}, [ classNames ]);
|
||||
|
||||
return <Base classNames={ getClassNames } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -43,4 +43,4 @@ export const Column: FC<ColumnProps> = props =>
|
||||
}, [ size, offset, isCssGrid, classNames ]);
|
||||
|
||||
return <Flex classNames={ getClassNames } column={ column } gap={ gap } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -47,4 +47,4 @@ export const Flex: FC<FlexProps> = props =>
|
||||
}, [ column, reverse, gap, center, alignSelf, alignItems, justifyContent, classNames ]);
|
||||
|
||||
return <Base display={ display } classNames={ getClassNames } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -19,4 +19,4 @@ export const FormGroup: FC<FormGroupProps> = props =>
|
||||
}, [ classNames ]);
|
||||
|
||||
return <Flex classNames={ getClassNames } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -60,4 +60,4 @@ export const Grid: FC<GridProps> = props =>
|
||||
<Base fullHeight={ fullHeight } classNames={ getClassNames } style={ getStyle } { ...rest } />
|
||||
</GridContextProvider>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -11,7 +11,7 @@ const GridContext = createContext<IGridContext>({
|
||||
|
||||
export const GridContextProvider: FC<ProviderProps<IGridContext>> = props =>
|
||||
{
|
||||
return <GridContext.Provider value={ props.value }>{ props.children }</GridContext.Provider>
|
||||
}
|
||||
return <GridContext.Provider value={ props.value }>{ props.children }</GridContext.Provider>;
|
||||
};
|
||||
|
||||
export const useGridContext = () => useContext(GridContext);
|
||||
|
@ -35,4 +35,4 @@ export const HorizontalRule: FC<HorizontalRuleProps> = props =>
|
||||
}, [ height, style ]);
|
||||
|
||||
return <Base classNames={ getClassNames } style={ getStyle } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -81,4 +81,4 @@ export const InfiniteGrid: FC<InfiniteGridProps> = props =>
|
||||
</div>
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -52,4 +52,4 @@ export const InfiniteScroll: FC<InfiniteScrollProps> = props =>
|
||||
</div>
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -60,4 +60,4 @@ export const Text: FC<TextProps> = props =>
|
||||
}, [ variant, fontWeight, fontSize, align, bold, underline, italics, truncate, center, textEnd, small, wrap, noWrap, textBreak ]);
|
||||
|
||||
return <Base classNames={ getClassNames } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -15,4 +15,4 @@ export const NitroCardContentView: FC<ColumnProps> = props =>
|
||||
}, [ classNames ]);
|
||||
|
||||
return <Column classNames={ getClassNames } overflow={ overflow } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -11,7 +11,7 @@ const NitroCardContext = createContext<INitroCardContext>({
|
||||
|
||||
export const NitroCardContextProvider: FC<ProviderProps<INitroCardContext>> = props =>
|
||||
{
|
||||
return <NitroCardContext.Provider value={ props.value }>{ props.children }</NitroCardContext.Provider>
|
||||
}
|
||||
return <NitroCardContext.Provider value={ props.value }>{ props.children }</NitroCardContext.Provider>;
|
||||
};
|
||||
|
||||
export const useNitroCardContext = () => useContext(NitroCardContext);
|
||||
|
@ -28,7 +28,7 @@ export const NitroCardHeaderView: FC<NitroCardHeaderViewProps> = props =>
|
||||
{
|
||||
event.stopPropagation();
|
||||
event.nativeEvent.stopImmediatePropagation();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Column center position="relative" classNames={ getClassNames } { ...rest }>
|
||||
@ -45,4 +45,4 @@ export const NitroCardHeaderView: FC<NitroCardHeaderViewProps> = props =>
|
||||
</Flex>
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -20,4 +20,4 @@ export const NitroCardSubHeaderView: FC<NitroCardSubHeaderProps> = props =>
|
||||
}, [ classNames, variant ]);
|
||||
|
||||
return <Flex justifyContent={ justifyContent } classNames={ getClassNames } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -31,4 +31,4 @@ export const NitroCardView: FC<NitroCardViewProps> = props =>
|
||||
</DraggableWindow>
|
||||
</NitroCardContextProvider>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -16,6 +16,6 @@ const NitroCardAccordionContext = createContext<INitroCardAccordionContext>({
|
||||
export const NitroCardAccordionContextProvider: FC<ProviderProps<INitroCardAccordionContext>> = props =>
|
||||
{
|
||||
return <NitroCardAccordionContext.Provider { ...props } />;
|
||||
}
|
||||
};
|
||||
|
||||
export const useNitroCardAccordionContext = () => useContext(NitroCardAccordionContext);
|
||||
|
@ -15,4 +15,4 @@ export const NitroCardAccordionItemView: FC<NitroCardAccordionItemViewProps> = p
|
||||
{ children }
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ export const NitroCardAccordionSetView: FC<NitroCardAccordionSetViewProps> = pro
|
||||
closeAll();
|
||||
|
||||
setIsOpen(prevValue => !prevValue);
|
||||
}
|
||||
};
|
||||
|
||||
const onClose = useCallback(() => setIsOpen(false), []);
|
||||
|
||||
@ -65,7 +65,7 @@ export const NitroCardAccordionSetView: FC<NitroCardAccordionSetViewProps> = pro
|
||||
|
||||
return newClosers;
|
||||
});
|
||||
}
|
||||
};
|
||||
}, [ onClose, setClosers ]);
|
||||
|
||||
return (
|
||||
@ -81,4 +81,4 @@ export const NitroCardAccordionSetView: FC<NitroCardAccordionSetViewProps> = pro
|
||||
</Column> }
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -22,4 +22,4 @@ export const NitroCardAccordionView: FC<NitroCardAccordionViewProps> = props =>
|
||||
<Column gap={ 0 } { ...rest } />
|
||||
</NitroCardAccordionContextProvider>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -32,4 +32,4 @@ export const NitroCardTabsItemView: FC<NitroCardTabsItemViewProps> = props =>
|
||||
<LayoutItemCountView count={ count } /> }
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -19,4 +19,4 @@ export const NitroCardTabsView: FC<FlexProps> = props =>
|
||||
{ children }
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -170,7 +170,7 @@ export const DraggableWindow: FC<DraggableWindowProps> = props =>
|
||||
|
||||
if(!disableDrag)
|
||||
{
|
||||
const handle = (element.querySelector(handleSelector) as HTMLElement);
|
||||
const handle = (element.querySelector(handleSelector));
|
||||
|
||||
if(handle) setDragHandler(handle);
|
||||
}
|
||||
@ -202,7 +202,7 @@ export const DraggableWindow: FC<DraggableWindowProps> = props =>
|
||||
const index = CURRENT_WINDOWS.indexOf(element);
|
||||
|
||||
if(index >= 0) CURRENT_WINDOWS.splice(index, 1);
|
||||
}
|
||||
};
|
||||
}, [ handleSelector, windowPosition, uniqueKey, disableDrag, offsetLeft, offsetTop, bringToTop ]);
|
||||
|
||||
useEffect(() =>
|
||||
@ -228,7 +228,7 @@ export const DraggableWindow: FC<DraggableWindowProps> = props =>
|
||||
{
|
||||
dragHandler.removeEventListener(MouseEventType.MOUSE_DOWN, onDragMouseDown);
|
||||
dragHandler.removeEventListener(TouchEventType.TOUCH_START, onTouchDown);
|
||||
}
|
||||
};
|
||||
}, [ dragHandler, onDragMouseDown, onTouchDown ]);
|
||||
|
||||
useEffect(() =>
|
||||
@ -246,7 +246,7 @@ export const DraggableWindow: FC<DraggableWindowProps> = props =>
|
||||
document.removeEventListener(TouchEventType.TOUCH_END, onDragTouchUp);
|
||||
document.removeEventListener(MouseEventType.MOUSE_MOVE, onDragMouseMove);
|
||||
document.removeEventListener(TouchEventType.TOUCH_MOVE, onDragTouchMove);
|
||||
}
|
||||
};
|
||||
}, [ isDragging, onDragMouseUp, onDragMouseMove, onDragTouchUp, onDragTouchMove ]);
|
||||
|
||||
useEffect(() =>
|
||||
@ -267,4 +267,4 @@ export const DraggableWindow: FC<DraggableWindowProps> = props =>
|
||||
{ children }
|
||||
</Base>, document.getElementById('draggable-windows-container'))
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -80,8 +80,8 @@ export const LayoutAvatarImageView: FC<LayoutAvatarImageViewProps> = props =>
|
||||
setAvatarUrl(imageUrl);
|
||||
}
|
||||
|
||||
avatarImage.dispose(true);
|
||||
}
|
||||
avatarImage.dispose();
|
||||
};
|
||||
|
||||
resetFigure(figure);
|
||||
}
|
||||
@ -96,8 +96,8 @@ export const LayoutAvatarImageView: FC<LayoutAvatarImageViewProps> = props =>
|
||||
return () =>
|
||||
{
|
||||
isDisposed.current = true;
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
return <Base classNames={ getClassNames } style={ getStyle } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -20,4 +20,4 @@ export const LayoutBackgroundImage: FC<LayoutBackgroundImageProps> = props =>
|
||||
}, [ style, imageUrl ]);
|
||||
|
||||
return <Base fit={ fit } style={ getStyle } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -74,7 +74,7 @@ export const LayoutBadgeImageView: FC<LayoutBadgeImageViewProps> = props =>
|
||||
didSetBadge = true;
|
||||
|
||||
GetEventDispatcher().removeEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent);
|
||||
}
|
||||
};
|
||||
|
||||
GetEventDispatcher().addEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent);
|
||||
|
||||
@ -103,4 +103,4 @@ export const LayoutBadgeImageView: FC<LayoutBadgeImageViewProps> = props =>
|
||||
{ children }
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -40,4 +40,4 @@ export const LayoutCounterTimeView: FC<LayoutCounterTimeViewProps> = props =>
|
||||
{ children }
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -40,5 +40,5 @@ export const LayoutCurrencyIcon: FC<CurrencyIconProps> = props =>
|
||||
return newStyle;
|
||||
}, [ style, urlString ]);
|
||||
|
||||
return <Base classNames={ getClassNames } style={ getStyle } { ...rest } />
|
||||
}
|
||||
return <Base classNames={ getClassNames } style={ getStyle } { ...rest } />;
|
||||
};
|
||||
|
@ -14,4 +14,4 @@ export const LayoutFurniIconImageView: FC<LayoutFurniIconImageViewProps> = props
|
||||
const { productType = 's', productClassId = -1, extraData = '', ...rest } = props;
|
||||
|
||||
return <LayoutImage imageUrl={ GetImageIconUrlForProduct(productType, productClassId, extraData) } className="furni-image" { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -67,4 +67,4 @@ export const LayoutFurniImageView: FC<LayoutFurniImageViewProps> = props =>
|
||||
if(!imageElement) return null;
|
||||
|
||||
return <Base classNames={ [ 'furni-image' ] } style={ getStyle } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ export const LayoutGridItem: FC<LayoutGridItemProps> = props =>
|
||||
|
||||
if(itemHighlight) newClassNames.push('has-highlight');
|
||||
|
||||
if(disabled) newClassNames.push('disabled')
|
||||
if(disabled) newClassNames.push('disabled');
|
||||
|
||||
if(itemImage === null) newClassNames.push('icon', 'loading-icon');
|
||||
|
||||
@ -72,4 +72,4 @@ export const LayoutGridItem: FC<LayoutGridItemProps> = props =>
|
||||
{ children }
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -10,4 +10,4 @@ export const LayoutImage: FC<LayoutImageProps> = props =>
|
||||
const { imageUrl = null, className = '', ...rest } = props;
|
||||
|
||||
return <img src={ imageUrl } className={ 'no-select ' + className } alt="" { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -25,4 +25,4 @@ export const LayoutItemCountView: FC<LayoutItemCountViewProps> = props =>
|
||||
{ children }
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -12,4 +12,4 @@ export const LayoutLoadingSpinnerView: FC<BaseProps<HTMLDivElement>> = props =>
|
||||
<Base className="spinner" />
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -22,13 +22,13 @@ export const LayoutMiniCameraView: FC<LayoutMiniCameraViewProps> = props =>
|
||||
const frameBounds = elementRef.current.getBoundingClientRect();
|
||||
|
||||
return new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height));
|
||||
}
|
||||
};
|
||||
|
||||
const takePicture = () =>
|
||||
{
|
||||
PlaySound(SoundNames.CAMERA_SHUTTER);
|
||||
textureReceiver(GetRoomEngine().createTextureFromRoom(roomId, 1, getCameraBounds()));
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<DraggableWindow handleSelector=".nitro-room-thumbnail-camera">
|
||||
|
@ -32,4 +32,4 @@ export const LayoutNotificationAlertView: FC<LayoutNotificationAlertViewProps> =
|
||||
</NitroCardContentView>
|
||||
</NitroCardView>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -49,4 +49,4 @@ export const LayoutNotificationBubbleView: FC<LayoutNotificationBubbleViewProps>
|
||||
<Flex overflow={ overflow } classNames={ getClassNames } onClick={ onClose } { ...rest } />
|
||||
</TransitionAnimation>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -114,10 +114,10 @@ export const LayoutPetImageView: FC<LayoutPetImageViewProps> = props =>
|
||||
return () =>
|
||||
{
|
||||
isDisposed.current = true;
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
const url = `url('${ petUrl }')`;
|
||||
|
||||
return <Base classNames={ [ 'pet-image' ] } style={ getStyle } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -19,12 +19,12 @@ export const LayoutPrizeProductImageView: FC<LayoutPrizeProductImageViewProps> =
|
||||
{
|
||||
case ProductTypeEnum.WALL:
|
||||
case ProductTypeEnum.FLOOR:
|
||||
return <LayoutFurniImageView productType={ productType } productClassId={ classId } />
|
||||
return <LayoutFurniImageView productType={ productType } productClassId={ classId } />;
|
||||
case ProductTypeEnum.BADGE:
|
||||
return <LayoutBadgeImageView badgeCode={ extraParam }/>
|
||||
return <LayoutBadgeImageView badgeCode={ extraParam }/>;
|
||||
case ProductTypeEnum.HABBO_CLUB:
|
||||
return <LayoutCurrencyIcon type="hc" />
|
||||
return <LayoutCurrencyIcon type="hc" />;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
@ -31,4 +31,4 @@ export const LayoutProgressBar: FC<LayoutProgressBarProps> = props =>
|
||||
{ children }
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -25,4 +25,4 @@ export const LayoutRarityLevelView: FC<LayoutRarityLevelViewProps> = props =>
|
||||
{ children }
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -56,4 +56,4 @@ export const LayoutRoomObjectImageView: FC<LayoutRoomObjectImageViewProps> = pro
|
||||
if(!imageElement) return null;
|
||||
|
||||
return <Base classNames={ [ 'furni-image' ] } style={ getStyle } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -19,7 +19,7 @@ export const LayoutRoomPreviewerView: FC<LayoutRoomPreviewerViewProps> = props =
|
||||
|
||||
if(event.shiftKey) roomPreviewer.changeRoomObjectDirection();
|
||||
else roomPreviewer.changeRoomObjectState();
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() =>
|
||||
{
|
||||
@ -50,7 +50,7 @@ export const LayoutRoomPreviewerView: FC<LayoutRoomPreviewerViewProps> = props =
|
||||
canvas = null;
|
||||
|
||||
elementRef.current.style.backgroundImage = `url(${ base64 })`;
|
||||
}
|
||||
};
|
||||
|
||||
GetTicker().add(update);
|
||||
|
||||
@ -76,7 +76,7 @@ export const LayoutRoomPreviewerView: FC<LayoutRoomPreviewerViewProps> = props =
|
||||
resizeObserver.disconnect();
|
||||
|
||||
texture.destroy(true);
|
||||
}
|
||||
};
|
||||
}, [ roomPreviewer, elementRef, height ]);
|
||||
|
||||
return (
|
||||
@ -85,4 +85,4 @@ export const LayoutRoomPreviewerView: FC<LayoutRoomPreviewerViewProps> = props =
|
||||
{ children }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -34,4 +34,4 @@ export const LayoutRoomThumbnailView: FC<LayoutRoomThumbnailViewProps> = props =
|
||||
{ children }
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -39,4 +39,4 @@ export const LayoutTrophyView: FC<LayoutTrophyViewProps> = props =>
|
||||
</Column>
|
||||
</DraggableWindow>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -26,4 +26,4 @@ export const UserProfileIconView: FC<UserProfileIconViewProps> = props =>
|
||||
{ children }
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -32,4 +32,4 @@ export const LayoutLimitedEditionCompactPlateView: FC<LayoutLimitedEditionCompac
|
||||
{ children }
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -38,4 +38,4 @@ export const LayoutLimitedEditionCompletePlateView: FC<LayoutLimitedEditionCompl
|
||||
</Column>
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -15,4 +15,4 @@ export const LayoutLimitedEditionStyledNumberView: FC<LayoutLimitedEditionStyled
|
||||
{ numbers.map((number, index) => <i key={ index } className={ 'limited-edition-number n-' + number } />) }
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -2,16 +2,13 @@ import { FC, ReactNode, useEffect, useState } from 'react';
|
||||
import { Transition } from 'react-transition-group';
|
||||
import { getTransitionAnimationStyle } from './TransitionAnimationStyles';
|
||||
|
||||
interface TransitionAnimationProps
|
||||
{
|
||||
export const TransitionAnimation: FC<{
|
||||
type: string;
|
||||
inProp: boolean;
|
||||
timeout?: number;
|
||||
className?: string;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const TransitionAnimation: FC<TransitionAnimationProps> = props =>
|
||||
}> = props =>
|
||||
{
|
||||
const { type = null, inProp = false, timeout = 300, className = null, children = null } = props;
|
||||
|
||||
@ -37,7 +34,7 @@ export const TransitionAnimation: FC<TransitionAnimationProps> = props =>
|
||||
return () =>
|
||||
{
|
||||
if(timeoutData) clearTimeout(timeoutData);
|
||||
}
|
||||
};
|
||||
}, [ inProp, timeout ]);
|
||||
|
||||
return (
|
||||
@ -49,4 +46,4 @@ export const TransitionAnimation: FC<TransitionAnimationProps> = props =>
|
||||
) }
|
||||
</Transition>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -11,124 +11,124 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
|
||||
switch(transition)
|
||||
{
|
||||
default:
|
||||
return {}
|
||||
return {};
|
||||
case ENTERING:
|
||||
return {
|
||||
animationName: 'bounceIn',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
case EXITING:
|
||||
return {
|
||||
animationName: 'bounceOut',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
}
|
||||
case TransitionAnimationTypes.SLIDE_LEFT:
|
||||
switch(transition)
|
||||
{
|
||||
default:
|
||||
return {}
|
||||
return {};
|
||||
case ENTERING:
|
||||
return {
|
||||
animationName: 'slideInLeft',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
case EXITING:
|
||||
return {
|
||||
animationName: 'slideOutLeft',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
}
|
||||
case TransitionAnimationTypes.SLIDE_RIGHT:
|
||||
switch(transition)
|
||||
{
|
||||
default:
|
||||
return {}
|
||||
return {};
|
||||
case ENTERING:
|
||||
return {
|
||||
animationName: 'slideInRight',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
case EXITING:
|
||||
return {
|
||||
animationName: 'slideOutRight',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
}
|
||||
case TransitionAnimationTypes.FLIP_X:
|
||||
switch(transition)
|
||||
{
|
||||
default:
|
||||
return {}
|
||||
return {};
|
||||
case ENTERING:
|
||||
return {
|
||||
animationName: 'flipInX',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
case EXITING:
|
||||
return {
|
||||
animationName: 'flipOutX',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
}
|
||||
case TransitionAnimationTypes.FADE_UP:
|
||||
switch(transition)
|
||||
{
|
||||
default:
|
||||
return {}
|
||||
return {};
|
||||
case ENTERING:
|
||||
return {
|
||||
animationName: 'fadeInUp',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
case EXITING:
|
||||
return {
|
||||
animationName: 'fadeOutDown',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
}
|
||||
case TransitionAnimationTypes.FADE_IN:
|
||||
switch(transition)
|
||||
{
|
||||
default:
|
||||
return {}
|
||||
return {};
|
||||
case ENTERING:
|
||||
return {
|
||||
animationName: 'fadeIn',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
case EXITING:
|
||||
return {
|
||||
animationName: 'fadeOut',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
}
|
||||
case TransitionAnimationTypes.FADE_DOWN:
|
||||
switch(transition)
|
||||
{
|
||||
default:
|
||||
return {}
|
||||
return {};
|
||||
case ENTERING:
|
||||
return {
|
||||
animationName: 'fadeInDown',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
case EXITING:
|
||||
return {
|
||||
animationName: 'fadeOutUp',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
}
|
||||
case TransitionAnimationTypes.HEAD_SHAKE:
|
||||
switch(transition)
|
||||
{
|
||||
default:
|
||||
return {}
|
||||
return {};
|
||||
case ENTERING:
|
||||
return {
|
||||
animationName: 'headShake',
|
||||
animationDuration: `${ timeout }ms`
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,4 +10,4 @@ export const CreateTransitionToIcon = (image: HTMLImageElement, fromElement: HTM
|
||||
event.iconName = icon;
|
||||
|
||||
GetEventDispatcher().dispatchEvent(event);
|
||||
}
|
||||
};
|
||||
|
@ -25,4 +25,4 @@ export const FriendlyTimeView: FC<FriendlyTimeViewProps> = props =>
|
||||
const value = (Math.round(new Date().getSeconds()) - getStartSeconds);
|
||||
|
||||
return <Base { ...rest }>{ isShort ? FriendlyTime.shortFormat(value) : FriendlyTime.format(value) }</Base>;
|
||||
}
|
||||
};
|
||||
|
@ -16,4 +16,4 @@ export const AchievementBadgeView: FC<AchievementBadgeViewProps> = props =>
|
||||
if(!achievement) return null;
|
||||
|
||||
return <LayoutBadgeImageView badgeCode={ AchievementUtilities.getAchievementBadgeCode(achievement) } isGrayscale={ !AchievementUtilities.getAchievementHasStarted(achievement) } scale={ scale } { ...rest } />;
|
||||
}
|
||||
};
|
||||
|
@ -34,4 +34,4 @@ export const AchievementCategoryView: FC<AchievementCategoryViewProps> = props =
|
||||
<AchievementDetailsView achievement={ selectedAchievement } /> }
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -49,5 +49,5 @@ export const AchievementDetailsView: FC<AchievementDetailsViewProps> = props =>
|
||||
</Column> }
|
||||
</Column>
|
||||
</Flex>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user