From 26f5445971697ccadd15df072823f24b0e27e7ad Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 2 May 2021 00:16:03 -0400 Subject: [PATCH] Inventory updates --- src/views/inventory/InventoryView.tsx | 31 ++++++------------- .../views/badge/InventoryBadgeView.tsx | 2 +- .../inventory/views/bot/InventoryBotView.tsx | 2 +- .../furniture/InventoryFurnitureView.tsx | 4 +-- .../inventory/views/pet/InventoryPetView.tsx | 2 +- 5 files changed, 15 insertions(+), 26 deletions(-) diff --git a/src/views/inventory/InventoryView.tsx b/src/views/inventory/InventoryView.tsx index 630abf4a..87f39996 100644 --- a/src/views/inventory/InventoryView.tsx +++ b/src/views/inventory/InventoryView.tsx @@ -1,12 +1,11 @@ -import classNames from 'classnames'; import { IRoomSession, RoomEngineObjectEvent, RoomEngineObjectPlacedEvent, RoomPreviewer, RoomSessionEvent } from 'nitro-renderer'; import { FC, useCallback, useEffect, useReducer, useState } from 'react'; import { GetRoomEngine } from '../../api'; import { InventoryEvent } from '../../events'; -import { DraggableWindow } from '../../hooks/draggable-window/DraggableWindow'; import { useRoomEngineEvent } from '../../hooks/events/nitro/room/room-engine-event'; import { useRoomSessionManagerEvent } from '../../hooks/events/nitro/session/room-session-manager-event'; import { useUiEvent } from '../../hooks/events/ui/ui-event'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../layout'; import { LocalizeText } from '../../utils/LocalizeText'; import { InventoryContextProvider } from './context/InventoryContext'; import { InventoryMessageHandler } from './InventoryMessageHandler'; @@ -100,25 +99,16 @@ export const InventoryView: FC = props => return ( - { isVisible && -
-
-
-
{ LocalizeText('inventory.title') }
-
-
setIsVisible(false) }> - -
-
-
    + { isVisible && + + setIsVisible(false) } /> + { tabs.map((name, index) => { - return
  • setCurrentTab(name) } > - { LocalizeText(name) } -
  • ; + return setCurrentTab(name) } /> }) } -
-
+ + { (currentTab === InventoryTabs.FURNITURE ) && } { (currentTab === InventoryTabs.BOTS ) && @@ -127,9 +117,8 @@ export const InventoryView: FC = props => } { (currentTab === InventoryTabs.BADGES ) && } -
-
-
} + + }
); } diff --git a/src/views/inventory/views/badge/InventoryBadgeView.tsx b/src/views/inventory/views/badge/InventoryBadgeView.tsx index 4f0eeaf4..b5509284 100644 --- a/src/views/inventory/views/badge/InventoryBadgeView.tsx +++ b/src/views/inventory/views/badge/InventoryBadgeView.tsx @@ -80,7 +80,7 @@ export const InventoryBadgeView: FC = props =>
-
+

{ LocalizeText('inventory.badges.activebadges') }

diff --git a/src/views/inventory/views/bot/InventoryBotView.tsx b/src/views/inventory/views/bot/InventoryBotView.tsx index 09600141..bfcb5589 100644 --- a/src/views/inventory/views/bot/InventoryBotView.tsx +++ b/src/views/inventory/views/bot/InventoryBotView.tsx @@ -85,7 +85,7 @@ export const InventoryBotView: FC = props =>
-
+
{ botItem &&

{ botItem.botData.name }

diff --git a/src/views/inventory/views/furniture/InventoryFurnitureView.tsx b/src/views/inventory/views/furniture/InventoryFurnitureView.tsx index 487e9027..67609c41 100644 --- a/src/views/inventory/views/furniture/InventoryFurnitureView.tsx +++ b/src/views/inventory/views/furniture/InventoryFurnitureView.tsx @@ -116,11 +116,11 @@ export const InventoryFurnitureView: FC = props => return (
-
+
-
+
{ groupItem &&

{ groupItem.name }

diff --git a/src/views/inventory/views/pet/InventoryPetView.tsx b/src/views/inventory/views/pet/InventoryPetView.tsx index 8e5fa8af..036bb532 100644 --- a/src/views/inventory/views/pet/InventoryPetView.tsx +++ b/src/views/inventory/views/pet/InventoryPetView.tsx @@ -85,7 +85,7 @@ export const InventoryPetView: FC = props =>
-
+
{ petItem &&

{ petItem.petData.name }