Random updates

This commit is contained in:
Bill 2021-11-17 03:48:41 -05:00
parent e7dfb381ff
commit 7aafbfba4c
11 changed files with 45 additions and 47 deletions

View File

@ -10,9 +10,9 @@ $infostand-zindex: 30;
$chat-zindex: 20;
$highscore-zindex: 19;
$grid-bg-color: #CDD3D9;
$grid-bg-color: #cdd3d9;
$grid-border-color: $muted;
$grid-active-bg-color: #ECECEC;
$grid-active-bg-color: #ececec;
$grid-active-border-color: $white;
$toolbar-height: 55px;
@ -44,10 +44,16 @@ $nitro-widget-custom-stack-height-height: 220px;
$nitro-widget-exchange-credit-width: 375px;
$nitro-widget-exchange-credit-height: 150px;
$chat-history-width: 300px;
$chat-history-height: 300px;
$friends-list-width: 250px;
$friends-list-height: 300px;
.nitro-app {
width: 100%;
height: 100%;
}
@import './layout/Layout';
@import './views/Styles';
@import "./layout/Layout";
@import "./views/Styles";

View File

@ -24,9 +24,9 @@ export const CatalogNavigationView: FC<CatalogNavigationViewProps> = props =>
}, [ page ]);
return (
<NitroLayoutFlexColumn gap={ 2 } overflow="auto">
<NitroLayoutFlexColumn className="h-100" gap={ 2 } overflow="auto">
<CatalogSearchView />
<NitroLayoutFlexColumn className="nitro-catalog-navigation-grid-container p-1" overflow="hidden">
<NitroLayoutFlexColumn className="nitro-catalog-navigation-grid-container p-1 h-100" overflow="hidden">
<NitroCardGridView columns={ 1 } gap={ 1 }>
<CatalogNavigationSetView page={ page } isFirstSet={ true } pendingTree={ pendingTree } setPendingTree={ setPendingTree } />
</NitroCardGridView>

View File

@ -1,6 +1,6 @@
import { EventDispatcher, NitroRectangle, RoomGeometry, RoomVariableEnum, Vector3d } from '@nitrots/nitro-renderer';
import { FC, useEffect, useRef, useState } from 'react';
import { DispatchMouseEvent, DispatchTouchEvent, DoorbellWidgetHandler, FurniChooserWidgetHandler, FurnitureContextMenuWidgetHandler, FurnitureCreditWidgetHandler, FurnitureCustomStackHeightWidgetHandler, FurnitureDimmerWidgetHandler, FurnitureExternalImageWidgetHandler, FurnitureMannequinWidgetHandler, FurniturePresentWidgetHandler, GetNitroInstance, GetRoomEngine, InitializeRoomInstanceRenderingCanvas, IRoomWidgetHandlerManager, RoomWidgetAvatarInfoHandler, RoomWidgetChatHandler, RoomWidgetChatInputHandler, RoomWidgetHandlerManager, RoomWidgetInfostandHandler, RoomWidgetRoomToolsHandler, RoomWidgetUpdateRoomViewEvent, UserChooserWidgetHandler } from '../../api';
import { DispatchMouseEvent, DispatchTouchEvent, DoorbellWidgetHandler, FriendRequestHandler, FurniChooserWidgetHandler, FurnitureContextMenuWidgetHandler, FurnitureCreditWidgetHandler, FurnitureCustomStackHeightWidgetHandler, FurnitureDimmerWidgetHandler, FurnitureExternalImageWidgetHandler, FurnitureMannequinWidgetHandler, FurniturePresentWidgetHandler, GetNitroInstance, GetRoomEngine, InitializeRoomInstanceRenderingCanvas, IRoomWidgetHandlerManager, RoomWidgetAvatarInfoHandler, RoomWidgetChatHandler, RoomWidgetChatInputHandler, RoomWidgetHandlerManager, RoomWidgetInfostandHandler, RoomWidgetRoomToolsHandler, RoomWidgetUpdateRoomViewEvent, UserChooserWidgetHandler } from '../../api';
import { FurnitureYoutubeDisplayWidgetHandler } from '../../api/nitro/room/widgets/handlers/FurnitureYoutubeDisplayWidgetHandler';
import { RoomContextProvider } from './context/RoomContext';
import { RoomColorView } from './RoomColorView';
@ -37,6 +37,7 @@ export const RoomView: FC<RoomViewProps> = props =>
widgetHandlerManager.registerHandler(new RoomWidgetChatHandler());
widgetHandlerManager.registerHandler(new UserChooserWidgetHandler());
widgetHandlerManager.registerHandler(new DoorbellWidgetHandler());
widgetHandlerManager.registerHandler(new FriendRequestHandler());
widgetHandlerManager.registerHandler(new FurniChooserWidgetHandler());
widgetHandlerManager.registerHandler(new FurnitureContextMenuWidgetHandler());

View File

@ -1,2 +0,0 @@
export interface RoomWidgetViewProps
{}

View File

@ -15,8 +15,8 @@ import { FurnitureWidgetsView } from './furniture/FurnitureWidgetsView';
import { InfoStandWidgetView } from './infostand/InfoStandWidgetView';
import { RoomThumbnailWidgetView } from './room-thumbnail/RoomThumbnailWidgetView';
import { RoomToolsWidgetView } from './room-tools/RoomToolsWidgetView';
import { RoomWidgetViewProps } from './RoomWidgets.types';
export const RoomWidgetsView: FC<RoomWidgetViewProps> = props =>
export const RoomWidgetsView: FC<{}> = props =>
{
const { roomSession = null, eventDispatcher = null, widgetHandler = null } = useRoomContext();

View File

@ -16,7 +16,6 @@ import { AvatarInfoUseProductView } from './views/use-product/AvatarInfoUseProdu
export const AvatarInfoWidgetView: FC<{}> = props =>
{
const { roomSession = null, eventDispatcher = null, widgetHandler = null } = useRoomContext();
const [ name, setName ] = useState<RoomWidgetObjectNameEvent>(null);
const [ nameBubbles, setNameBubbles ] = useState<RoomWidgetObjectNameEvent[]>([]);
const [ productBubbles, setProductBubbles ] = useState<UseProductItem[]>([]);
@ -26,6 +25,7 @@ export const AvatarInfoWidgetView: FC<{}> = props =>
const [ isDancing, setIsDancing ] = useState(false);
const [ isDecorating, setIsDecorating ] = useState(false);
const [ rentableBotChatEvent, setRentableBotChatEvent ] = useState<RoomWidgetUpdateRentableBotChatEvent>(null);
const { roomSession = null, eventDispatcher = null, widgetHandler = null } = useRoomContext();
const removeNameBubble = useCallback((index: number) =>
{

View File

@ -1,7 +1,6 @@
import { RoomControllerLevel, RoomObjectCategory, RoomObjectVariable, UserProfileComposer } from '@nitrots/nitro-renderer';
import { RoomControllerLevel, RoomObjectCategory, RoomObjectVariable } from '@nitrots/nitro-renderer';
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
import { GetOwnRoomObject, LocalizeText, RoomWidgetMessage, RoomWidgetUserActionMessage } from '../../../../../../api';
import { SendMessageHook } from '../../../../../../hooks';
import { GetOwnRoomObject, GetUserProfile, LocalizeText, RoomWidgetMessage, RoomWidgetUserActionMessage } from '../../../../../../api';
import { useRoomContext } from '../../../../context/RoomContext';
import { ContextMenuView } from '../../../context-menu/ContextMenuView';
import { ContextMenuHeaderView } from '../../../context-menu/views/header/ContextMenuHeaderView';
@ -192,14 +191,9 @@ export const AvatarInfoWidgetAvatarView: FC<AvatarInfoWidgetAvatarViewProps> = p
return flag;
}, []);
const openProfile = useCallback(() =>
{
SendMessageHook(new UserProfileComposer(userData.webID));
}, [ userData ]);
return (
<ContextMenuView objectId={ userData.roomIndex } category={ RoomObjectCategory.UNIT } userType={ userData.userType } close={ close }>
<ContextMenuHeaderView className="cursor-pointer" onClick={ () => openProfile() }>
<ContextMenuHeaderView className="cursor-pointer" onClick={ event => GetUserProfile(userData.webID) }>
{ userData.name }
</ContextMenuHeaderView>
{ (mode === MODE_NORMAL) &&

View File

@ -1,8 +1,8 @@
import { AvatarAction, AvatarExpressionEnum, RoomControllerLevel, RoomObjectCategory, UserProfileComposer } from '@nitrots/nitro-renderer';
import { AvatarAction, AvatarExpressionEnum, RoomControllerLevel, RoomObjectCategory } from '@nitrots/nitro-renderer';
import { FC, useCallback, useMemo, useState } from 'react';
import { GetCanStandUp, GetCanUseExpression, GetOwnPosture, HasHabboClub, HasHabboVip, IsRidingHorse, LocalizeText, RoomWidgetAvatarExpressionMessage, RoomWidgetChangePostureMessage, RoomWidgetDanceMessage, RoomWidgetMessage, RoomWidgetUpdateDecorateModeEvent, RoomWidgetUserActionMessage } from '../../../../../../api';
import { GetCanStandUp, GetCanUseExpression, GetOwnPosture, GetUserProfile, HasHabboClub, HasHabboVip, IsRidingHorse, LocalizeText, RoomWidgetAvatarExpressionMessage, RoomWidgetChangePostureMessage, RoomWidgetDanceMessage, RoomWidgetMessage, RoomWidgetUpdateDecorateModeEvent, RoomWidgetUserActionMessage } from '../../../../../../api';
import { AvatarEditorEvent } from '../../../../../../events';
import { dispatchUiEvent, SendMessageHook } from '../../../../../../hooks';
import { dispatchUiEvent } from '../../../../../../hooks';
import { CurrencyIcon } from '../../../../../shared/currency-icon/CurrencyIcon';
import { useRoomContext } from '../../../../context/RoomContext';
import { ContextMenuView } from '../../../context-menu/ContextMenuView';
@ -103,11 +103,6 @@ export const AvatarInfoWidgetOwnAvatarView: FC<AvatarInfoWidgetOwnAvatarViewProp
if(hideMenu) close();
}, [ roomSession, eventDispatcher, widgetHandler, userData, close ]);
const openProfile = useCallback(() =>
{
SendMessageHook(new UserProfileComposer(userData.webID));
}, [ userData ]);
const isShowDecorate = useMemo(() =>
{
return (userData.amIOwner || userData.amIAnyRoomController || (userData.roomControllerLevel > RoomControllerLevel.GUEST));
@ -117,7 +112,7 @@ export const AvatarInfoWidgetOwnAvatarView: FC<AvatarInfoWidgetOwnAvatarViewProp
return (
<ContextMenuView objectId={ userData.roomIndex } category={ RoomObjectCategory.UNIT } userType={ userData.userType } close={ close }>
<ContextMenuHeaderView className="cursor-pointer" onClick={ () => openProfile() }>
<ContextMenuHeaderView className="cursor-pointer" onClick={ event => GetUserProfile(userData.webID) }>
{ userData.name }
</ContextMenuHeaderView>
{ (mode === MODE_NORMAL) &&

View File

@ -1,8 +1,9 @@
@import './avatar-image/AvatarImage';
@import './badge-image/BadgeImage';
@import './currency-icon/CurrencyIcon';
@import './furni-image/FurniImageView';
@import './limited-edition/LimitedEdition';
@import './pet-image/PetImage';
@import './rarity-level/RarityLevelView';
@import './room-previewer/RoomPreviewerView';
@import "./avatar-image/AvatarImage";
@import "./badge-image/BadgeImage";
@import "./currency-icon/CurrencyIcon";
@import "./furni-image/FurniImageView";
@import "./limited-edition/LimitedEdition";
@import "./pet-image/PetImage";
@import "./rarity-level/RarityLevelView";
@import "./room-previewer/RoomPreviewerView";
@import "./item-count/ItemCountView";

View File

@ -1,6 +1,6 @@
import { RelationshipStatusInfoEvent, RelationshipStatusInfoMessageParser, UserCurrentBadgesComposer, UserCurrentBadgesEvent, UserProfileComposer, UserProfileEvent, UserProfileParser, UserRelationshipsComposer } from '@nitrots/nitro-renderer';
import { RelationshipStatusInfoEvent, RelationshipStatusInfoMessageParser, UserCurrentBadgesComposer, UserCurrentBadgesEvent, UserProfileEvent, UserProfileParser, UserRelationshipsComposer } from '@nitrots/nitro-renderer';
import { FC, useCallback, useState } from 'react';
import { GetSessionDataManager, LocalizeText } from '../../api';
import { GetSessionDataManager, GetUserProfile, LocalizeText } from '../../api';
import { CreateMessageHook, SendMessageHook } from '../../hooks';
import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../layout';
import { BadgesContainerView } from './views/badges-container/BadgesContainerView';
@ -23,7 +23,10 @@ export const UserProfileView: FC = props =>
const onLeaveGroup = useCallback(() =>
{
if(userProfile && userProfile.id === GetSessionDataManager().userId) SendMessageHook(new UserProfileComposer(userProfile.id));
if(userProfile && userProfile.id === GetSessionDataManager().userId)
{
GetUserProfile(userProfile.id);
}
}, [ userProfile ]);
const OnUserCurrentBadgesEvent = useCallback((event: UserCurrentBadgesEvent) =>

View File

@ -1,7 +1,6 @@
import { RelationshipStatusEnum, RelationshipStatusInfo, UserProfileComposer } from '@nitrots/nitro-renderer';
import { RelationshipStatusEnum, RelationshipStatusInfo } from '@nitrots/nitro-renderer';
import { FC, useCallback } from 'react';
import { LocalizeText } from '../../../../api';
import { SendMessageHook } from '../../../../hooks';
import { GetUserProfile, LocalizeText } from '../../../../api';
import { AvatarImageView } from '../../../shared/avatar-image/AvatarImageView';
import { RelationshipsContainerViewProps } from './RelationshipsContainerView.types';
@ -11,8 +10,9 @@ export const RelationshipsContainerView: FC<RelationshipsContainerViewProps> = p
const OnUserClick = useCallback((user: RelationshipStatusInfo) =>
{
if(user)
SendMessageHook(new UserProfileComposer(user.randomFriendId));
if(!user) return;
GetUserProfile(user.randomFriendId);
}, []);
const RelationshipComponent = useCallback(({ type }) =>
@ -28,7 +28,7 @@ export const RelationshipsContainerView: FC<RelationshipsContainerViewProps> = p
<i className={`icon icon-relationship-${relationshipName} flex-shrink-0 align-self-baseline mt-2`} />
<div className="w-100 d-flex flex-column">
<span className={'relationship mx-2' + (!simple ? ' advanced' : '')}>
<span className="cursor-pointer relationship-text" onClick={() => OnUserClick(relationshipInfo)}>
<span className="cursor-pointer relationship-text" onClick={ event => OnUserClick(relationshipInfo)}>
{
(relationshipInfo && relationshipInfo.friendCount > 0) ? relationshipInfo.randomFriendName : LocalizeText('extendedprofile.add.friends')
}