From 6010103b90be51a1d0b115ba3cdcce3aebf808b7 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 14 Apr 2024 15:04:09 -0400 Subject: [PATCH] Layout changes --- src/assets/images/ui/ubuntu-close-buttons.png | Bin 0 -> 1964 bytes src/common/Flex.tsx | 4 +- src/common/InfiniteGrid.tsx | 83 ------------------ src/common/index.ts | 2 +- .../views/AchievementDetailsView.tsx | 4 +- .../AvatarEditorFigurePreviewView.tsx | 2 +- .../avatar-editor/AvatarEditorModelView.tsx | 6 +- .../avatar-editor/AvatarEditorView.tsx | 6 +- .../camera/views/CameraWidgetCheckoutView.tsx | 2 +- src/components/campaign/CalendarView.tsx | 2 +- .../catalog/views/gift/CatalogGiftView.tsx | 4 +- .../layout/CatalogLayoutColorGroupingView.tsx | 2 +- .../page/layout/CatalogLayoutDefaultView.tsx | 2 +- .../layout/CatalogLayoutInfoLoyaltyView.tsx | 2 +- .../page/layout/CatalogLayoutRoomAdsView.tsx | 8 +- .../layout/CatalogLayoutRoomBundleView.tsx | 2 +- .../layout/CatalogLayoutSingleBundleView.tsx | 2 +- .../layout/CatalogLayoutSoundMachineView.tsx | 2 +- .../page/layout/CatalogLayoutVipBuyView.tsx | 2 +- .../CatalogLayoutMarketplaceItemView.tsx | 2 +- ...CatalogLayoutMarketplaceSearchFormView.tsx | 2 +- .../views/FloorplanOptionsView.tsx | 2 +- .../friends-list/FriendsListSearchView.tsx | 2 +- .../views/messenger/FriendsMessengerView.tsx | 2 +- .../groups/views/GroupInformationView.tsx | 10 +-- .../groups/views/GroupMembersView.tsx | 2 +- .../groups/views/GroupRoomInformationView.tsx | 2 +- .../tabs/GroupTabCreatorConfirmationView.tsx | 4 +- .../views/tabs/GroupTabIdentityView.tsx | 2 +- .../views/tabs/GroupTabSettingsView.tsx | 8 +- .../guide-tool/views/GuideToolAcceptView.tsx | 6 +- .../guide-tool/views/GuideToolMenuView.tsx | 6 +- .../guide-tool/views/GuideToolOngoingView.tsx | 2 +- .../views/GuideToolUserCreateRequestView.tsx | 2 +- .../views/GuideToolUserFeedbackView.tsx | 6 +- .../views/GuideToolUserNoHelpersView.tsx | 2 +- .../views/GuideToolUserPendingView.tsx | 4 +- .../views/GuideToolUserSomethingWrogView.tsx | 2 +- .../views/GuideToolUserThanksView.tsx | 2 +- src/components/hc-center/HcCenterView.tsx | 4 +- .../help/views/DescribeReportView.tsx | 2 +- src/components/help/views/HelpIndexView.tsx | 4 +- .../help/views/ReportSummaryView.tsx | 2 +- .../help/views/SelectReportedChatsView.tsx | 2 +- .../help/views/SelectReportedUserView.tsx | 2 +- src/components/help/views/SelectTopicView.tsx | 2 +- .../NameChangeConfirmationView.tsx | 4 +- .../views/name-change/NameChangeInitView.tsx | 2 +- .../views/name-change/NameChangeInputView.tsx | 4 +- src/components/hotel-view/HotelView.tsx | 2 +- .../promo-article/PromoArticleWidgetView.tsx | 2 +- .../widget-container/WidgetContainerView.tsx | 2 +- src/components/inventory/InventoryView.tsx | 32 ++++--- .../furniture/InventoryFurnitureView.tsx | 34 +++---- .../mod-tools/views/room/ModToolsRoomView.tsx | 2 +- .../views/user/ModToolsUserModActionView.tsx | 2 +- src/components/navigator/NavigatorView.tsx | 34 +++---- .../views/NavigatorDoorStateView.tsx | 8 +- .../views/NavigatorRoomCreatorView.tsx | 16 ++-- .../navigator/views/NavigatorRoomInfoView.tsx | 2 +- .../navigator/views/NavigatorRoomLinkView.tsx | 2 +- .../NavigatorRoomSettingsAccessTabView.tsx | 8 +- .../NavigatorRoomSettingsModTabView.tsx | 6 +- .../NavigatorRoomSettingsVipChatTabView.tsx | 2 +- .../NavigatorSearchResultItemInfoView.tsx | 15 ++-- .../search/NavigatorSearchResultItemView.tsx | 4 +- .../search/NavigatorSearchResultView.tsx | 2 +- .../views/search/NavigatorSearchView.tsx | 21 ++--- .../NotificationCenterView.tsx | 2 +- .../NotificationDefaultAlertView.tsx | 2 +- .../NotificationClubGiftBubbleView.tsx | 2 +- .../AvatarInfoRentableBotChatView.tsx | 4 +- .../AvatarInfoUseProductConfirmView.tsx | 2 +- .../infostand/InfoStandWidgetBotView.tsx | 6 +- .../infostand/InfoStandWidgetFurniView.tsx | 16 ++-- .../infostand/InfoStandWidgetPetView.tsx | 12 +-- .../InfoStandWidgetRentableBotView.tsx | 14 +-- .../infostand/InfoStandWidgetUserView.tsx | 10 +-- .../FriendRequestDialogView.tsx | 2 +- .../FurnitureBackgroundColorView.tsx | 4 +- .../furniture/FurnitureCraftingView.tsx | 14 +-- .../widgets/furniture/FurnitureDimmerView.tsx | 4 +- .../furniture/FurnitureExchangeCreditView.tsx | 4 +- .../furniture/FurnitureFriendFurniView.tsx | 4 +- .../furniture/FurnitureHighScoreView.tsx | 2 +- .../furniture/FurnitureMannequinView.tsx | 8 +- .../FurnitureMysteryTrophyOpenDialogView.tsx | 2 +- .../furniture/FurnitureStackHeightView.tsx | 2 +- .../furniture/FurnitureYoutubeDisplayView.tsx | 2 +- .../MonsterPlantSeedConfirmView.tsx | 4 +- .../PurchasableClothingConfirmView.tsx | 4 +- .../FurniturePlaylistEditorWidgetView.tsx | 4 +- .../playlist-editor/SongPlaylistView.tsx | 4 +- .../mysterybox/MysteryBoxExtensionView.tsx | 2 +- .../pet-package/PetPackageWidgetView.tsx | 2 +- .../room-promotes/RoomPromotesWidgetView.tsx | 2 +- .../views/RoomPromoteEditWidgetView.tsx | 6 +- .../room-tools/RoomToolsWidgetView.tsx | 10 +-- .../word-quiz/WordQuizQuestionView.tsx | 2 +- .../views/FriendsContainerView.tsx | 4 +- .../views/RelationshipsContainerView.tsx | 2 +- .../user-profile/views/UserContainerView.tsx | 8 +- .../user-settings/UserSettingsView.tsx | 10 +-- src/components/wired/views/WiredBaseView.tsx | 2 +- .../wired/views/WiredFurniSelectorView.tsx | 2 +- .../views/actions/WiredActionBaseView.tsx | 2 +- .../WiredActionBotChangeFigureView.tsx | 2 +- .../WiredActionBotFollowAvatarView.tsx | 4 +- .../WiredActionBotGiveHandItemView.tsx | 4 +- .../views/actions/WiredActionBotMoveView.tsx | 2 +- .../WiredActionBotTalkToAvatarView.tsx | 6 +- .../views/actions/WiredActionBotTalkView.tsx | 6 +- .../actions/WiredActionBotTeleportView.tsx | 2 +- .../views/actions/WiredActionChatView.tsx | 2 +- .../actions/WiredActionGiveRewardView.tsx | 4 +- ...redActionGiveScoreToPredefinedTeamView.tsx | 6 +- .../actions/WiredActionGiveScoreView.tsx | 4 +- .../views/actions/WiredActionJoinTeamView.tsx | 2 +- .../actions/WiredActionKickFromRoomView.tsx | 2 +- .../WiredActionMoveAndRotateFurniView.tsx | 4 +- .../actions/WiredActionMoveFurniToView.tsx | 4 +- .../actions/WiredActionMoveFurniView.tsx | 4 +- .../views/actions/WiredActionMuteUserView.tsx | 4 +- .../WiredActionSetFurniStateToView.tsx | 2 +- .../WiredConditionActorHasHandItem.tsx | 2 +- .../WiredConditionActorIsTeamMemberView.tsx | 2 +- .../WiredConditionActorIsWearingBadgeView.tsx | 2 +- ...WiredConditionActorIsWearingEffectView.tsx | 2 +- .../WiredConditionDateRangeView.tsx | 4 +- .../WiredConditionFurniHasFurniOnView.tsx | 2 +- .../WiredConditionFurniHasNotFurniOnView.tsx | 2 +- ...WiredConditionFurniMatchesSnapshotView.tsx | 2 +- .../WiredConditionTimeElapsedLessView.tsx | 2 +- .../WiredConditionTimeElapsedMoreView.tsx | 2 +- .../WiredConditionUserCountInRoomView.tsx | 4 +- .../WiredTriggerAvatarEnterRoomView.tsx | 2 +- .../WiredTriggerAvatarSaysSomethingView.tsx | 4 +- .../WiredTriggerBotReachedAvatarView.tsx | 2 +- .../WiredTriggerBotReachedStuffView.tsx | 2 +- .../triggers/WiredTriggerExecuteOnceView.tsx | 2 +- ...iredTriggerExecutePeriodicallyLongView.tsx | 2 +- .../WiredTriggerExecutePeriodicallyView.tsx | 2 +- .../WiredTriggerScoreAchievedView.tsx | 2 +- src/index.css | 13 +++ src/layout/InfiniteGrid.tsx | 70 +++++++++++++++ src/layout/NitroCard.tsx | 70 +++++++-------- src/layout/index.ts | 1 + tailwind.config.js | 20 +++-- 148 files changed, 453 insertions(+), 448 deletions(-) create mode 100644 src/assets/images/ui/ubuntu-close-buttons.png delete mode 100644 src/common/InfiniteGrid.tsx create mode 100644 src/layout/InfiniteGrid.tsx diff --git a/src/assets/images/ui/ubuntu-close-buttons.png b/src/assets/images/ui/ubuntu-close-buttons.png new file mode 100644 index 0000000000000000000000000000000000000000..d6a79a6732eefeba4ef654180b0aa09758594629 GIT binary patch literal 1964 zcmcIlZEO@p7+wr*ptMS)6090GOO3X$w;%Vhw`&h*@7mr0+tzZzRYPPtGuPX2`_bKP z?^+Tfe*6FxTR=mQ7$hc&nEIm_0>qDCf{g;k4}?HMj3_Dnqp4966VciB?raP+{o^LP zGduIl^FHr8@4U0Kqph{7qNakPsH#Lf)=65KywwZJ$ycg>O()GlE8gW$)S@NcJC8bW za2Z9F-PDpPH>IvupsD)+GP|)auUiC7Q4Oo}7Jyr^OLyZQ&4@6+oce^JH56es1yx?P zqBx_)2W`Azuq_D(w?Y{)t5?wtd4&+@*adW6&l--Bk1$ib3h8^p979h*+^rF&(KAS= z)DAjo+L#XdLM#*lVOo-XLMXudLn~>K7i5kPbAq4c1%(eOL5VIr46$aTw9*-CDcB-^ z5hmlhmcntlT+WyC`%Jrs6J(iih@2?01i?B3h70nn;VdsQ#IOTx&2lxQld5nu4yMtGh5uK zjv@;!60hmUQ~))@w4G;!~Cu+Iyiw|+WtkqHS$DMkuFayk$SLso=PX2SyEmHpjmHtd&zlE@I3BlEJVf$`~RTW@rSJv}x;rWQwMP9?V%r4@3W} zCTeC)TQw1hxqs$(A{yL7v+2w)4QQCle z3%#sHPvxfqpm!`H4D|8=Bc?E{-6qU)b7-12m%)T|mMocuIcD0;0UI~=kS&=*9&&e* z?|}Z<#m_BA{#WsZ(83HbdN8T89OJpec@=4TW4QnB+0@*O>Q#i3lIV3ywV3>rsyQ|Y zwM}YuOH0>PikjD$h&3itpPjoTjGX2x%eQPSuU)!y>FZLYyyb=c@?FP4{@T+g%5y*5 z`{1)Xx6K#cj$O}9Ug=x0a-etJudRENKpbeD7>>52p1HC8(#a*2%PyoQmi(OGJbLl3 zGY6>yyI(r-_?NwQ!>zy1*1ctHS$M9Uk+$9HIypIcYU0cnpI$Na^OX-(-YDC>>+Fs- zP-eQ5^`rTXy8a`mxK^>EW9A(b2K*Uv2*&5xO7g6{GQWyLTPCekjf*4>p}12JZ|V z`VE;sElM%ZpWj>e = props => if(column) { - if(reverse) newClassNames.push('flex-column-reverse'); - else newClassNames.push('flex-column'); + if(reverse) newClassNames.push('flex-col-reverse'); + else newClassNames.push('flex-col'); } else { diff --git a/src/common/InfiniteGrid.tsx b/src/common/InfiniteGrid.tsx deleted file mode 100644 index 7cd24771..00000000 --- a/src/common/InfiniteGrid.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import { useVirtualizer } from '@tanstack/react-virtual'; -import { FC, Fragment, ReactElement, useEffect, useRef } from 'react'; -import { Flex } from './Flex'; - -interface InfiniteGridProps -{ - rows: T[]; - columnCount: number; - overscan?: number; - estimateSize?: number; - itemRender?: (item: T, index?: number) => ReactElement; -} - -export const InfiniteGrid: FC = props => -{ - const { rows = [], columnCount = 4, overscan = 5, estimateSize = 45, itemRender = null } = props; - const parentRef = useRef(null); - - const virtualizer = useVirtualizer({ - count: Math.ceil(rows.length / columnCount), - overscan, - getScrollElement: () => parentRef.current, - estimateSize: () => estimateSize - }); - - useEffect(() => - { - if(!rows || !rows.length) return; - - virtualizer.scrollToIndex(0); - }, [ rows, virtualizer ]); - - const items = virtualizer.getVirtualItems(); - - return ( -
-
- - { items.map(virtualRow => ( -
- { Array.from(Array(columnCount)).map((e,i) => - { - const item = rows[i + (virtualRow.index * columnCount)]; - - if(!item) return ; - - return ( - - { itemRender(item, i) } - - ); - }) } -
- )) } -
-
-
- ); -} diff --git a/src/common/index.ts b/src/common/index.ts index 4fdb8ff8..a2c1a090 100644 --- a/src/common/index.ts +++ b/src/common/index.ts @@ -1,3 +1,4 @@ +export * from '../layout/InfiniteGrid'; export * from './AutoGrid'; export * from './Base'; export * from './Button'; @@ -7,7 +8,6 @@ export * from './FormGroup'; export * from './Grid'; export * from './GridContext'; export * from './HorizontalRule'; -export * from './InfiniteGrid'; export * from './InfiniteScroll'; export * from './Text'; export * from './card'; diff --git a/src/components/achievements/views/AchievementDetailsView.tsx b/src/components/achievements/views/AchievementDetailsView.tsx index c7eb3082..3037ae84 100644 --- a/src/components/achievements/views/AchievementDetailsView.tsx +++ b/src/components/achievements/views/AchievementDetailsView.tsx @@ -24,7 +24,7 @@ export const AchievementDetailsView: FC = props => -
+
{ LocalizeBadgeName(AchievementUtilities.getAchievementBadgeCode(achievement)) } @@ -33,7 +33,7 @@ export const AchievementDetailsView: FC = props =>
{ ((achievement.levelRewardPoints > 0) || (achievement.scoreLimit > 0)) && -
+
{ (achievement.levelRewardPoints > 0) &&
diff --git a/src/components/avatar-editor/AvatarEditorFigurePreviewView.tsx b/src/components/avatar-editor/AvatarEditorFigurePreviewView.tsx index 0c0c0090..f856c3c1 100644 --- a/src/components/avatar-editor/AvatarEditorFigurePreviewView.tsx +++ b/src/components/avatar-editor/AvatarEditorFigurePreviewView.tsx @@ -27,7 +27,7 @@ export const AvatarEditorFigurePreviewView: FC<{}> = props => } return ( -
+
diff --git a/src/components/avatar-editor/AvatarEditorModelView.tsx b/src/components/avatar-editor/AvatarEditorModelView.tsx index 0575d995..8315ba4e 100644 --- a/src/components/avatar-editor/AvatarEditorModelView.tsx +++ b/src/components/avatar-editor/AvatarEditorModelView.tsx @@ -47,7 +47,7 @@ export const AvatarEditorModelView: FC<{ return (
-
+
{ (name === AvatarEditorFigureCategory.GENERIC) && <>
setGender(AvatarFigurePartType.MALE) }> @@ -66,10 +66,10 @@ export const AvatarEditorModelView: FC<{ ); }) }
-
+
-
+
{ (maxPaletteCount >= 1) && } { (maxPaletteCount === 2) && diff --git a/src/components/avatar-editor/AvatarEditorView.tsx b/src/components/avatar-editor/AvatarEditorView.tsx index 727c0114..b2bc82c1 100644 --- a/src/components/avatar-editor/AvatarEditorView.tsx +++ b/src/components/avatar-editor/AvatarEditorView.tsx @@ -90,15 +90,15 @@ export const AvatarEditorView: FC<{}> = props =>
-
+
{ ((activeModelKey.length > 0) && (activeModelKey !== AvatarEditorFigureCategory.WARDROBE)) && } { (activeModelKey === AvatarEditorFigureCategory.WARDROBE) && }
-
+
-
+
{ !publishDisabled &&
-
+
{ LocalizeText(wasPicturePublished ? 'camera.publish.successful' : 'camera.publish.explanation') } diff --git a/src/components/campaign/CalendarView.tsx b/src/components/campaign/CalendarView.tsx index 7aa1239f..5a649e01 100644 --- a/src/components/campaign/CalendarView.tsx +++ b/src/components/campaign/CalendarView.tsx @@ -104,7 +104,7 @@ export const CalendarView: FC = props =>
-
+
{ LocalizeText('campaign.calendar.heading.day', [ 'number' ], [ (selectedDay + 1).toString() ]) } { dayMessage(selectedDay) }
diff --git a/src/components/catalog/views/gift/CatalogGiftView.tsx b/src/components/catalog/views/gift/CatalogGiftView.tsx index 64d30ece..283689f8 100644 --- a/src/components/catalog/views/gift/CatalogGiftView.tsx +++ b/src/components/catalog/views/gift/CatalogGiftView.tsx @@ -236,7 +236,7 @@ export const CatalogGiftView: FC<{}> = props =>
} -
+
-
+
{ LocalizeText(boxName) }
{ LocalizeText(priceText, [ 'price' ], [ giftConfiguration.price.toString() ]) } diff --git a/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx index 156cd994..cbb2c4f7 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx @@ -162,7 +162,7 @@ export const CatalogLayoutColorGroupingView : FC { currentOffer.localizationName }
-
+
diff --git a/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx index 24ad7edc..3198acf6 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx @@ -46,7 +46,7 @@ export const CatalogLayoutDefaultView: FC = props => { currentOffer.localizationName }
-
+
diff --git a/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx index ff948819..82342c8c 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx @@ -7,7 +7,7 @@ export const CatalogLayoutInfoLoyaltyView: FC = props => return (
-
+
diff --git a/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx index a99238aa..9e6a7141 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx @@ -82,22 +82,22 @@ export const CatalogLayoutRoomAdsView: FC = props => { categories && categories.map((cat, index) => ) } -
+
{ LocalizeText('roomad.catalog_name') } setEventName(event.target.value) } />
-
+
{ LocalizeText('roomad.catalog_description') } diff --git a/src/components/guide-tool/views/GuideToolUserFeedbackView.tsx b/src/components/guide-tool/views/GuideToolUserFeedbackView.tsx index 6dc2ade1..e76b669b 100644 --- a/src/components/guide-tool/views/GuideToolUserFeedbackView.tsx +++ b/src/components/guide-tool/views/GuideToolUserFeedbackView.tsx @@ -15,7 +15,7 @@ export const GuideToolUserFeedbackView: FC = pro const giveFeedback = (recommend: boolean) => SendMessageComposer(new GuideSessionFeedbackMessageComposer(recommend)); return ( -
+
{ userName } @@ -23,14 +23,14 @@ export const GuideToolUserFeedbackView: FC = pro -
+
{ LocalizeText('guide.help.request.user.feedback.closed.title') } { LocalizeText('guide.help.request.user.feedback.closed.desc') }
{ userName && (userName.length > 0) && <>
-
+
{ LocalizeText('guide.help.request.user.feedback.question') }
diff --git a/src/components/guide-tool/views/GuideToolUserNoHelpersView.tsx b/src/components/guide-tool/views/GuideToolUserNoHelpersView.tsx index 032c794c..9469e783 100644 --- a/src/components/guide-tool/views/GuideToolUserNoHelpersView.tsx +++ b/src/components/guide-tool/views/GuideToolUserNoHelpersView.tsx @@ -5,7 +5,7 @@ import { Text } from '../../../common'; export const GuideToolUserNoHelpersView: FC<{}> = props => { return ( -
+
{ LocalizeText('guide.help.request.no_tour_guides.title') } { LocalizeText('guide.help.request.no_tour_guides.message') }
diff --git a/src/components/guide-tool/views/GuideToolUserPendingView.tsx b/src/components/guide-tool/views/GuideToolUserPendingView.tsx index a4a8fd4f..d897ced9 100644 --- a/src/components/guide-tool/views/GuideToolUserPendingView.tsx +++ b/src/components/guide-tool/views/GuideToolUserPendingView.tsx @@ -16,13 +16,13 @@ export const GuideToolUserPendingView: FC = props const cancelRequest = () => SendMessageComposer(new GuideSessionRequesterCancelsMessageComposer()); return ( -
+
{ LocalizeText('guide.help.request.guide.accept.request.title') } { LocalizeText('guide.help.request.type.1') } { helpRequestDescription } -
+
{ LocalizeText('guide.help.request.user.pending.info.title') } { LocalizeText('guide.help.request.user.pending.info.message') } { LocalizeText('guide.help.request.user.pending.info.waiting', [ 'waitingtime' ], [ helpRequestAverageTime.toString() ]) } diff --git a/src/components/guide-tool/views/GuideToolUserSomethingWrogView.tsx b/src/components/guide-tool/views/GuideToolUserSomethingWrogView.tsx index 1c2d5c81..69433790 100644 --- a/src/components/guide-tool/views/GuideToolUserSomethingWrogView.tsx +++ b/src/components/guide-tool/views/GuideToolUserSomethingWrogView.tsx @@ -5,7 +5,7 @@ import { Text } from '../../../common'; export const GuideToolUserSomethingWrogView: FC<{}> = props => { return ( -
+
{ LocalizeText('guide.help.request.user.guide.disconnected.error.desc') }
); diff --git a/src/components/guide-tool/views/GuideToolUserThanksView.tsx b/src/components/guide-tool/views/GuideToolUserThanksView.tsx index b8e398a0..cc749251 100644 --- a/src/components/guide-tool/views/GuideToolUserThanksView.tsx +++ b/src/components/guide-tool/views/GuideToolUserThanksView.tsx @@ -5,7 +5,7 @@ import { Text } from '../../../common'; export const GuideToolUserThanksView: FC<{}> = props => { return ( -
+
{ LocalizeText('guide.help.request.user.thanks.info.title') } { LocalizeText('guide.help.request.user.thanks.info.desc') }
diff --git a/src/components/hc-center/HcCenterView.tsx b/src/components/hc-center/HcCenterView.tsx index 88793aed..b741f38d 100644 --- a/src/components/hc-center/HcCenterView.tsx +++ b/src/components/hc-center/HcCenterView.tsx @@ -132,7 +132,7 @@ export const HcCenterView: FC<{}> = props => setIsVisible(false) } /> -
+
diff --git a/src/components/help/views/ReportSummaryView.tsx b/src/components/help/views/ReportSummaryView.tsx index 74914cc1..e93b86d0 100644 --- a/src/components/help/views/ReportSummaryView.tsx +++ b/src/components/help/views/ReportSummaryView.tsx @@ -45,7 +45,7 @@ export const ReportSummaryView: FC<{}> = props => return ( <> -
+
{ LocalizeText('help.cfh.button.send') } { LocalizeText('help.main.summary') }
diff --git a/src/components/help/views/SelectReportedChatsView.tsx b/src/components/help/views/SelectReportedChatsView.tsx index 2702a8a1..03f11570 100644 --- a/src/components/help/views/SelectReportedChatsView.tsx +++ b/src/components/help/views/SelectReportedChatsView.tsx @@ -58,7 +58,7 @@ export const SelectReportedChatsView: FC<{}> = props => return ( <> -
+
{ LocalizeText('help.emergency.chat_report.subtitle') } { LocalizeText('help.emergency.chat_report.description') }
diff --git a/src/components/help/views/SelectReportedUserView.tsx b/src/components/help/views/SelectReportedUserView.tsx index 258f604d..b5b0fc4d 100644 --- a/src/components/help/views/SelectReportedUserView.tsx +++ b/src/components/help/views/SelectReportedUserView.tsx @@ -52,7 +52,7 @@ export const SelectReportedUserView: FC<{}> = props => return ( <> -
+
{ LocalizeText('help.emergency.main.step.two.title') } { (availableUsers.length > 0) && { LocalizeText('report.user.pick.user') } } diff --git a/src/components/help/views/SelectTopicView.tsx b/src/components/help/views/SelectTopicView.tsx index 88fc54e0..a80def59 100644 --- a/src/components/help/views/SelectTopicView.tsx +++ b/src/components/help/views/SelectTopicView.tsx @@ -30,7 +30,7 @@ export const SelectTopicView: FC<{}> = props => return ( <> -
+
{ LocalizeText('help.emergency.chat_report.subtitle') } { LocalizeText('help.cfh.pick.topic') }
diff --git a/src/components/help/views/name-change/NameChangeConfirmationView.tsx b/src/components/help/views/name-change/NameChangeConfirmationView.tsx index ab1ada20..64d1925d 100644 --- a/src/components/help/views/name-change/NameChangeConfirmationView.tsx +++ b/src/components/help/views/name-change/NameChangeConfirmationView.tsx @@ -29,9 +29,9 @@ export const NameChangeConfirmationView:FC = props => }); return ( -
+
{ LocalizeText('tutorial.name_change.info.confirm') }
-
+
{ LocalizeText('tutorial.name_change.confirm') }
{ username }
diff --git a/src/components/help/views/name-change/NameChangeInitView.tsx b/src/components/help/views/name-change/NameChangeInitView.tsx index 42666704..82f78f57 100644 --- a/src/components/help/views/name-change/NameChangeInitView.tsx +++ b/src/components/help/views/name-change/NameChangeInitView.tsx @@ -8,7 +8,7 @@ export const NameChangeInitView:FC = props => const { onAction = null } = props; return ( -
+
{ LocalizeText('tutorial.name_change.info.main') }
{ LocalizeText('tutorial.name_change.current', [ 'name' ], [ GetSessionDataManager().userName ]) }
diff --git a/src/components/help/views/name-change/NameChangeInputView.tsx b/src/components/help/views/name-change/NameChangeInputView.tsx index 51501d23..2aa342f9 100644 --- a/src/components/help/views/name-change/NameChangeInputView.tsx +++ b/src/components/help/views/name-change/NameChangeInputView.tsx @@ -72,7 +72,7 @@ export const NameChangeInputView:FC = props => }); return ( -
+
{ LocalizeText('tutorial.name_change.info.select') }
handleUsernameChange(event.target.value) } /> @@ -85,7 +85,7 @@ export const NameChangeInputView:FC = props => { canProceed &&
{ LocalizeText('help.tutorial.name.available', [ 'name' ], [ newUsername ]) }
} { suggestions && -
+
{ suggestions.map((suggestion, index) =>
handleUsernameChange(suggestion) }>{ suggestion }
) }
}
diff --git a/src/components/hotel-view/HotelView.tsx b/src/components/hotel-view/HotelView.tsx index 44f83290..2afc0c13 100644 --- a/src/components/hotel-view/HotelView.tsx +++ b/src/components/hotel-view/HotelView.tsx @@ -41,7 +41,7 @@ export const HotelView: FC<{}> = props =>
-
+
= props => { articles && articles[index] &&
-
+

{ articles[index].title }

{ articles[index].bodyText } diff --git a/src/components/hotel-view/views/widgets/widget-container/WidgetContainerView.tsx b/src/components/hotel-view/views/widgets/widget-container/WidgetContainerView.tsx index 199309be..24093344 100644 --- a/src/components/hotel-view/views/widgets/widget-container/WidgetContainerView.tsx +++ b/src/components/hotel-view/views/widgets/widget-container/WidgetContainerView.tsx @@ -29,7 +29,7 @@ export const WidgetContainerView: FC = props => return (
-
+

{ LocalizeText(`landing.view.${ getOption('texts') }.header`) }

{ LocalizeText(`landing.view.${ getOption('texts') }.body`) } diff --git a/src/components/inventory/InventoryView.tsx b/src/components/inventory/InventoryView.tsx index b01fa960..e11918e2 100644 --- a/src/components/inventory/InventoryView.tsx +++ b/src/components/inventory/InventoryView.tsx @@ -1,7 +1,7 @@ +import { NitroCard } from '@layout/NitroCard'; import { AddLinkEventTracker, BadgePointLimitsEvent, GetLocalizationManager, GetRoomEngine, ILinkEventTracker, IRoomSession, RemoveLinkEventTracker, RoomEngineObjectEvent, RoomEngineObjectPlacedEvent, RoomPreviewer, RoomSessionEvent } from '@nitrots/nitro-renderer'; import { FC, useEffect, useState } from 'react'; import { LocalizeText, UnseenItemCategory, isObjectMoverRequested, setObjectMoverRequested } from '../../api'; -import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common'; import { useInventoryTrade, useInventoryUnseenTracker, useMessageEvent, useNitroEvent } from '../../hooks'; import { InventoryBadgeView } from './views/badge/InventoryBadgeView'; import { InventoryBotView } from './views/bot/InventoryBotView'; @@ -118,21 +118,29 @@ export const InventoryView: FC<{}> = props => if(!isVisible) return null; return ( - - + + { !isTrading && <> - + { TABS.map((name, index) => { return ( - setCurrentTab(name) }> + setCurrentTab(name) }> { LocalizeText(name) } - + ); }) } - - + + { (currentTab === TAB_FURNITURE ) && } { (currentTab === TAB_BOTS ) && @@ -141,12 +149,12 @@ export const InventoryView: FC<{}> = props => } { (currentTab === TAB_BADGES ) && } - + } { isTrading && - + - } - + } + ); } diff --git a/src/components/inventory/views/furniture/InventoryFurnitureView.tsx b/src/components/inventory/views/furniture/InventoryFurnitureView.tsx index 904200ee..8b9385db 100644 --- a/src/components/inventory/views/furniture/InventoryFurnitureView.tsx +++ b/src/components/inventory/views/furniture/InventoryFurnitureView.tsx @@ -1,7 +1,8 @@ +import { InfiniteGrid } from '@layout/InfiniteGrid'; import { GetRoomEngine, GetSessionDataManager, IRoomSession, RoomObjectVariable, RoomPreviewer, Vector3d } from '@nitrots/nitro-renderer'; import { FC, useEffect, useState } from 'react'; import { DispatchUiEvent, FurniCategory, GroupItem, LocalizeText, UnseenItemCategory, attemptItemPlacement } from '../../../../api'; -import { AutoGrid, Button, Column, Grid, LayoutLimitedEditionCompactPlateView, LayoutRarityLevelView, LayoutRoomPreviewerView, Text } from '../../../../common'; +import { Button, LayoutLimitedEditionCompactPlateView, LayoutRarityLevelView, LayoutRoomPreviewerView } from '../../../../common'; import { CatalogPostMarketplaceOfferEvent } from '../../../../events'; import { useInventoryFurni, useInventoryUnseenTracker } from '../../../../hooks'; import { InventoryCategoryEmptyView } from '../InventoryCategoryEmptyView'; @@ -111,25 +112,26 @@ export const InventoryFurnitureView: FC = props => if(!groupItems || !groupItems.length) return ; return ( - - +
+
- - { filteredGroupItems && (filteredGroupItems.length > 0) && filteredGroupItems.map((item, index) => ) } - - - - + + columnCount={ 5 } + itemRender={ item => } + items={ filteredGroupItems } /> +
+
+
{ selectedItem && selectedItem.stuffData.isUnique && } { (selectedItem && selectedItem.stuffData.rarityLevel > -1) && } - +
{ selectedItem && - - { selectedItem.name } -
+
+ { selectedItem.name } +
{ !!roomSession && }
- } - - +
} +
+
); } diff --git a/src/components/mod-tools/views/room/ModToolsRoomView.tsx b/src/components/mod-tools/views/room/ModToolsRoomView.tsx index 96e358cf..04092a18 100644 --- a/src/components/mod-tools/views/room/ModToolsRoomView.tsx +++ b/src/components/mod-tools/views/room/ModToolsRoomView.tsx @@ -87,7 +87,7 @@ export const ModToolsRoomView: FC = props => { ownerInRoom ? 'Yes' : 'No' }
-
+
diff --git a/src/components/mod-tools/views/user/ModToolsUserModActionView.tsx b/src/components/mod-tools/views/user/ModToolsUserModActionView.tsx index 4502cc2e..95073e96 100644 --- a/src/components/mod-tools/views/user/ModToolsUserModActionView.tsx +++ b/src/components/mod-tools/views/user/ModToolsUserModActionView.tsx @@ -162,7 +162,7 @@ export const ModToolsUserModActionView: FC = pro { MOD_ACTION_DEFINITIONS.map((action, index) => ) } -
+
Optional message type, overrides default
-
+
diff --git a/src/components/room/widgets/room-tools/RoomToolsWidgetView.tsx b/src/components/room/widgets/room-tools/RoomToolsWidgetView.tsx index 5ebc803e..d245312c 100644 --- a/src/components/room/widgets/room-tools/RoomToolsWidgetView.tsx +++ b/src/components/room/widgets/room-tools/RoomToolsWidgetView.tsx @@ -72,18 +72,18 @@ export const RoomToolsWidgetView: FC<{}> = props => return (
-
+
handleToolClick('settings') } />
handleToolClick('zoom') } />
handleToolClick('chat_history') } /> { navigatorData.canRate &&
handleToolClick('like_room') } /> }
-
+
-
-
-
+
+
+
{ roomName } { roomOwner }
diff --git a/src/components/room/widgets/word-quiz/WordQuizQuestionView.tsx b/src/components/room/widgets/word-quiz/WordQuizQuestionView.tsx index 5f54d49f..3c30b067 100644 --- a/src/components/room/widgets/word-quiz/WordQuizQuestionView.tsx +++ b/src/components/room/widgets/word-quiz/WordQuizQuestionView.tsx @@ -28,7 +28,7 @@ export const WordQuizQuestionView: FC = props =>
} { canVote && -
+
{ question }
vote(VALUE_KEY_DISLIKE) }> diff --git a/src/components/user-profile/views/FriendsContainerView.tsx b/src/components/user-profile/views/FriendsContainerView.tsx index 315385c1..23dd7eee 100644 --- a/src/components/user-profile/views/FriendsContainerView.tsx +++ b/src/components/user-profile/views/FriendsContainerView.tsx @@ -15,12 +15,12 @@ export const FriendsContainerView: FC = props => const { relationships = null, friendsCount = null } = props; return ( -
+
{ LocalizeText('extendedprofile.friends.count') } { friendsCount } { LocalizeText('extendedprofile.relstatus') } -
+
diff --git a/src/components/user-profile/views/RelationshipsContainerView.tsx b/src/components/user-profile/views/RelationshipsContainerView.tsx index 12ce0acb..5eade994 100644 --- a/src/components/user-profile/views/RelationshipsContainerView.tsx +++ b/src/components/user-profile/views/RelationshipsContainerView.tsx @@ -27,7 +27,7 @@ export const RelationshipsContainerView: FC = p -
+
(relationshipInfo && (relationshipInfo.randomFriendId >= 1) && GetUserProfile(relationshipInfo.randomFriendId)) }> { (!relationshipInfo || (relationshipInfo.friendCount === 0)) && diff --git a/src/components/user-profile/views/UserContainerView.tsx b/src/components/user-profile/views/UserContainerView.tsx index c3c94a1d..60c964c4 100644 --- a/src/components/user-profile/views/UserContainerView.tsx +++ b/src/components/user-profile/views/UserContainerView.tsx @@ -29,15 +29,15 @@ export const UserContainerView: FC = props => return (
-
+
-
-
+
+
{ userProfile.username } { userProfile.motto } 
-
+
{ LocalizeText('extendedprofile.created') } { userProfile.registration } diff --git a/src/components/user-settings/UserSettingsView.tsx b/src/components/user-settings/UserSettingsView.tsx index 38f2d32f..c3b45238 100644 --- a/src/components/user-settings/UserSettingsView.tsx +++ b/src/components/user-settings/UserSettingsView.tsx @@ -129,7 +129,7 @@ export const UserSettingsView: FC<{}> = props => processAction('close_view') } /> -
+
processAction('oldchat', event.target.checked) } /> { LocalizeText('memenu.settings.chat.prefer.old.chat') } @@ -151,9 +151,9 @@ export const UserSettingsView: FC<{}> = props => { LocalizeText('memenu.settings.other.skip.purchase.confirmation') }
-
+
{ LocalizeText('widget.memenu.settings.volume') } -
+
{ LocalizeText('widget.memenu.settings.volume.ui') }
{ (userSettings.volumeSystem === 0) && = 50) && 'text-muted', 'fa-icon') } /> } @@ -162,7 +162,7 @@ export const UserSettingsView: FC<{}> = props =>
-
+
{ LocalizeText('widget.memenu.settings.volume.furni') }
{ (userSettings.volumeFurni === 0) && = 50) && 'text-muted', 'fa-icon') } /> } @@ -171,7 +171,7 @@ export const UserSettingsView: FC<{}> = props =>
-
+
{ LocalizeText('widget.memenu.settings.volume.trax') }
{ (userSettings.volumeTrax === 0) && = 50) && 'text-muted', 'fa-icon') } /> } diff --git a/src/components/wired/views/WiredBaseView.tsx b/src/components/wired/views/WiredBaseView.tsx index 6b9d9c34..53acf49c 100644 --- a/src/components/wired/views/WiredBaseView.tsx +++ b/src/components/wired/views/WiredBaseView.tsx @@ -90,7 +90,7 @@ export const WiredBaseView: FC> = props => -
+
{ wiredName } diff --git a/src/components/wired/views/WiredFurniSelectorView.tsx b/src/components/wired/views/WiredFurniSelectorView.tsx index b6daa0f1..4f8ad37a 100644 --- a/src/components/wired/views/WiredFurniSelectorView.tsx +++ b/src/components/wired/views/WiredFurniSelectorView.tsx @@ -8,7 +8,7 @@ export const WiredFurniSelectorView: FC<{}> = props => const { trigger = null, furniIds = [] } = useWired(); return ( -
+
{ LocalizeText('wiredfurni.pickfurnis.caption', [ 'count', 'limit' ], [ furniIds.length.toString(), trigger.maximumItemSelectionCount.toString() ]) } { LocalizeText('wiredfurni.pickfurnis.desc') }
diff --git a/src/components/wired/views/actions/WiredActionBaseView.tsx b/src/components/wired/views/actions/WiredActionBaseView.tsx index 3a25677b..eeb3ec72 100644 --- a/src/components/wired/views/actions/WiredActionBaseView.tsx +++ b/src/components/wired/views/actions/WiredActionBaseView.tsx @@ -27,7 +27,7 @@ export const WiredActionBaseView: FC { children } { !!children &&
} -
+
{ LocalizeText('wiredfurni.params.delay', [ 'seconds' ], [ GetWiredTimeLocale(actionDelay) ]) } = props => return ( -
+
{ LocalizeText('wiredfurni.params.bot.name') } setBotName(event.target.value) } />
diff --git a/src/components/wired/views/actions/WiredActionBotFollowAvatarView.tsx b/src/components/wired/views/actions/WiredActionBotFollowAvatarView.tsx index 2d9589e6..596fd2dc 100644 --- a/src/components/wired/views/actions/WiredActionBotFollowAvatarView.tsx +++ b/src/components/wired/views/actions/WiredActionBotFollowAvatarView.tsx @@ -24,11 +24,11 @@ export const WiredActionBotFollowAvatarView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.bot.name') } setBotName(event.target.value) } />
-
+
setFollowMode(1) } /> { LocalizeText('wiredfurni.params.start.following') } diff --git a/src/components/wired/views/actions/WiredActionBotGiveHandItemView.tsx b/src/components/wired/views/actions/WiredActionBotGiveHandItemView.tsx index cd3f12e3..a9067235 100644 --- a/src/components/wired/views/actions/WiredActionBotGiveHandItemView.tsx +++ b/src/components/wired/views/actions/WiredActionBotGiveHandItemView.tsx @@ -26,11 +26,11 @@ export const WiredActionBotGiveHandItemView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.bot.name') } setBotName(event.target.value) } />
-
+
{ LocalizeText('wiredfurni.params.handitem') } setBotName(event.target.value) } />
diff --git a/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx b/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx index d03616d0..d5fbd084 100644 --- a/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx +++ b/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx @@ -29,15 +29,15 @@ export const WiredActionBotTalkToAvatarView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.bot.name') } setBotName(event.target.value) } />
-
+
{ LocalizeText('wiredfurni.params.message') } ('wired.action.bot.talk.to.avatar.max.length', 64) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } />
-
+
setTalkMode(0) } /> { LocalizeText('wiredfurni.params.talk') } diff --git a/src/components/wired/views/actions/WiredActionBotTalkView.tsx b/src/components/wired/views/actions/WiredActionBotTalkView.tsx index 2c55a125..cb75e1d0 100644 --- a/src/components/wired/views/actions/WiredActionBotTalkView.tsx +++ b/src/components/wired/views/actions/WiredActionBotTalkView.tsx @@ -29,15 +29,15 @@ export const WiredActionBotTalkView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.bot.name') } setBotName(event.target.value) } />
-
+
{ LocalizeText('wiredfurni.params.message') } ('wired.action.bot.talk.max.length', 64) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } />
-
+
setTalkMode(0) } /> { LocalizeText('wiredfurni.params.talk') } diff --git a/src/components/wired/views/actions/WiredActionBotTeleportView.tsx b/src/components/wired/views/actions/WiredActionBotTeleportView.tsx index e0086af2..baf78eb4 100644 --- a/src/components/wired/views/actions/WiredActionBotTeleportView.tsx +++ b/src/components/wired/views/actions/WiredActionBotTeleportView.tsx @@ -18,7 +18,7 @@ export const WiredActionBotTeleportView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.bot.name') } setBotName(event.target.value) } />
diff --git a/src/components/wired/views/actions/WiredActionChatView.tsx b/src/components/wired/views/actions/WiredActionChatView.tsx index 1f4b6364..e29e7903 100644 --- a/src/components/wired/views/actions/WiredActionChatView.tsx +++ b/src/components/wired/views/actions/WiredActionChatView.tsx @@ -18,7 +18,7 @@ export const WiredActionChatView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.message') } ('wired.action.chat.max.length', 100) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } />
diff --git a/src/components/wired/views/actions/WiredActionGiveRewardView.tsx b/src/components/wired/views/actions/WiredActionGiveRewardView.tsx index eaee66b1..3d86897d 100644 --- a/src/components/wired/views/actions/WiredActionGiveRewardView.tsx +++ b/src/components/wired/views/actions/WiredActionGiveRewardView.tsx @@ -109,7 +109,7 @@ export const WiredActionGiveRewardView: FC<{}> = props => value={ rewardsLimit } onChange={ event => setRewardsLimit(event) } /> }
-
+
How often can a user be rewarded?
('wired.action.kick.from.room.max.length', 100) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } />
diff --git a/src/components/wired/views/actions/WiredActionMoveAndRotateFurniView.tsx b/src/components/wired/views/actions/WiredActionMoveAndRotateFurniView.tsx index 5bea5631..761fe0aa 100644 --- a/src/components/wired/views/actions/WiredActionMoveAndRotateFurniView.tsx +++ b/src/components/wired/views/actions/WiredActionMoveAndRotateFurniView.tsx @@ -49,7 +49,7 @@ export const WiredActionMoveAndRotateFurniView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.startdir') }
{ directionOptions.map(option => @@ -65,7 +65,7 @@ export const WiredActionMoveAndRotateFurniView: FC<{}> = props => }) }
-
+
{ LocalizeText('wiredfurni.params.turn') } { rotationOptions.map(option => { diff --git a/src/components/wired/views/actions/WiredActionMoveFurniToView.tsx b/src/components/wired/views/actions/WiredActionMoveFurniToView.tsx index 71961250..53f468fa 100644 --- a/src/components/wired/views/actions/WiredActionMoveFurniToView.tsx +++ b/src/components/wired/views/actions/WiredActionMoveFurniToView.tsx @@ -48,7 +48,7 @@ export const WiredActionMoveFurniToView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.emptytiles', [ 'tiles' ], [ spacing.toString() ]) } = props => value={ spacing } onChange={ event => setSpacing(event) } />
-
+
{ LocalizeText('wiredfurni.params.startdir') }
{ directionOptions.map(value => diff --git a/src/components/wired/views/actions/WiredActionMoveFurniView.tsx b/src/components/wired/views/actions/WiredActionMoveFurniView.tsx index 0785253c..6092ae64 100644 --- a/src/components/wired/views/actions/WiredActionMoveFurniView.tsx +++ b/src/components/wired/views/actions/WiredActionMoveFurniView.tsx @@ -61,7 +61,7 @@ export const WiredActionMoveFurniView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.movefurni') }
setMovement(0) } /> @@ -80,7 +80,7 @@ export const WiredActionMoveFurniView: FC<{}> = props =>
-
+
{ LocalizeText('wiredfurni.params.rotatefurni') } { rotationOptions.map(option => { diff --git a/src/components/wired/views/actions/WiredActionMuteUserView.tsx b/src/components/wired/views/actions/WiredActionMuteUserView.tsx index 3f9e91e2..f42aa966 100644 --- a/src/components/wired/views/actions/WiredActionMuteUserView.tsx +++ b/src/components/wired/views/actions/WiredActionMuteUserView.tsx @@ -25,7 +25,7 @@ export const WiredActionMuteUserView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.length.minutes', [ 'minutes' ], [ time.toString() ]) } = props => value={ time } onChange={ event => setTime(event) } />
-
+
{ LocalizeText('wiredfurni.params.message') } ('wired.action.mute.user.max.length', 100) } type="text" value={ message } onChange={ event => setMessage(event.target.value) } />
diff --git a/src/components/wired/views/actions/WiredActionSetFurniStateToView.tsx b/src/components/wired/views/actions/WiredActionSetFurniStateToView.tsx index 7de91f0a..e807578f 100644 --- a/src/components/wired/views/actions/WiredActionSetFurniStateToView.tsx +++ b/src/components/wired/views/actions/WiredActionSetFurniStateToView.tsx @@ -22,7 +22,7 @@ export const WiredActionSetFurniStateToView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.conditions') }
setStateFlag(event.target.checked ? 1 : 0) } /> diff --git a/src/components/wired/views/conditions/WiredConditionActorHasHandItem.tsx b/src/components/wired/views/conditions/WiredConditionActorHasHandItem.tsx index 401452c8..a51834f9 100644 --- a/src/components/wired/views/conditions/WiredConditionActorHasHandItem.tsx +++ b/src/components/wired/views/conditions/WiredConditionActorHasHandItem.tsx @@ -20,7 +20,7 @@ export const WiredConditionActorHasHandItemView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.handitem') } setBadge(event.target.value) } />
diff --git a/src/components/wired/views/conditions/WiredConditionActorIsWearingEffectView.tsx b/src/components/wired/views/conditions/WiredConditionActorIsWearingEffectView.tsx index 7c36fccd..d4c6d439 100644 --- a/src/components/wired/views/conditions/WiredConditionActorIsWearingEffectView.tsx +++ b/src/components/wired/views/conditions/WiredConditionActorIsWearingEffectView.tsx @@ -18,7 +18,7 @@ export const WiredConditionActorIsWearingEffectView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.tooltip.effectid') } setEffect(parseInt(event.target.value)) } />
diff --git a/src/components/wired/views/conditions/WiredConditionDateRangeView.tsx b/src/components/wired/views/conditions/WiredConditionDateRangeView.tsx index 61c3ce0d..bc19ecac 100644 --- a/src/components/wired/views/conditions/WiredConditionDateRangeView.tsx +++ b/src/components/wired/views/conditions/WiredConditionDateRangeView.tsx @@ -45,11 +45,11 @@ export const WiredConditionDateRangeView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.startdate') } setStartDate(e.target.value) } />
-
+
{ LocalizeText('wiredfurni.params.enddate') } setEndDate(e.target.value) } />
diff --git a/src/components/wired/views/conditions/WiredConditionFurniHasFurniOnView.tsx b/src/components/wired/views/conditions/WiredConditionFurniHasFurniOnView.tsx index 989b777f..ce4272df 100644 --- a/src/components/wired/views/conditions/WiredConditionFurniHasFurniOnView.tsx +++ b/src/components/wired/views/conditions/WiredConditionFurniHasFurniOnView.tsx @@ -18,7 +18,7 @@ export const WiredConditionFurniHasFurniOnView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.requireall') } { [ 0, 1 ].map(value => { diff --git a/src/components/wired/views/conditions/WiredConditionFurniHasNotFurniOnView.tsx b/src/components/wired/views/conditions/WiredConditionFurniHasNotFurniOnView.tsx index a7c37216..ab15bf67 100644 --- a/src/components/wired/views/conditions/WiredConditionFurniHasNotFurniOnView.tsx +++ b/src/components/wired/views/conditions/WiredConditionFurniHasNotFurniOnView.tsx @@ -18,7 +18,7 @@ export const WiredConditionFurniHasNotFurniOnView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.not_requireall') } { [ 0, 1 ].map(value => { diff --git a/src/components/wired/views/conditions/WiredConditionFurniMatchesSnapshotView.tsx b/src/components/wired/views/conditions/WiredConditionFurniMatchesSnapshotView.tsx index 2f50c44a..154d3d37 100644 --- a/src/components/wired/views/conditions/WiredConditionFurniMatchesSnapshotView.tsx +++ b/src/components/wired/views/conditions/WiredConditionFurniMatchesSnapshotView.tsx @@ -22,7 +22,7 @@ export const WiredConditionFurniMatchesSnapshotView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.conditions') }
setStateFlag(event.target.checked ? 1 : 0) } /> diff --git a/src/components/wired/views/conditions/WiredConditionTimeElapsedLessView.tsx b/src/components/wired/views/conditions/WiredConditionTimeElapsedLessView.tsx index 9aa1019f..df31b424 100644 --- a/src/components/wired/views/conditions/WiredConditionTimeElapsedLessView.tsx +++ b/src/components/wired/views/conditions/WiredConditionTimeElapsedLessView.tsx @@ -19,7 +19,7 @@ export const WiredConditionTimeElapsedLessView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.allowbefore', [ 'seconds' ], [ GetWiredTimeLocale(time) ]) } = props => return ( -
+
{ LocalizeText('wiredfurni.params.allowafter', [ 'seconds' ], [ GetWiredTimeLocale(time) ]) } = props => return ( -
+
{ LocalizeText('wiredfurni.params.usercountmin', [ 'value' ], [ min.toString() ]) } = props => value={ min } onChange={ event => setMin(event) } />
-
+
{ LocalizeText('wiredfurni.params.usercountmax', [ 'value' ], [ max.toString() ]) } = props => return ( -
+
{ LocalizeText('wiredfurni.params.picktriggerer') }
setAvatarMode(0) } /> diff --git a/src/components/wired/views/triggers/WiredTriggerAvatarSaysSomethingView.tsx b/src/components/wired/views/triggers/WiredTriggerAvatarSaysSomethingView.tsx index f74da788..3e632d71 100644 --- a/src/components/wired/views/triggers/WiredTriggerAvatarSaysSomethingView.tsx +++ b/src/components/wired/views/triggers/WiredTriggerAvatarSaysSomethingView.tsx @@ -25,11 +25,11 @@ export const WiredTriggerAvatarSaysSomethingView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.whatissaid') } setMessage(event.target.value) } />
-
+
{ LocalizeText('wiredfurni.params.picktriggerer') }
setTriggererAvatar(0) } /> diff --git a/src/components/wired/views/triggers/WiredTriggerBotReachedAvatarView.tsx b/src/components/wired/views/triggers/WiredTriggerBotReachedAvatarView.tsx index 13a3dbd2..e1a66486 100644 --- a/src/components/wired/views/triggers/WiredTriggerBotReachedAvatarView.tsx +++ b/src/components/wired/views/triggers/WiredTriggerBotReachedAvatarView.tsx @@ -18,7 +18,7 @@ export const WiredTriggerBotReachedAvatarView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.bot.name') } setBotName(event.target.value) } />
diff --git a/src/components/wired/views/triggers/WiredTriggerBotReachedStuffView.tsx b/src/components/wired/views/triggers/WiredTriggerBotReachedStuffView.tsx index d4a76597..200310d2 100644 --- a/src/components/wired/views/triggers/WiredTriggerBotReachedStuffView.tsx +++ b/src/components/wired/views/triggers/WiredTriggerBotReachedStuffView.tsx @@ -18,7 +18,7 @@ export const WiredTriggerBotReachedStuffView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.bot.name') } setBotName(event.target.value) } />
diff --git a/src/components/wired/views/triggers/WiredTriggerExecuteOnceView.tsx b/src/components/wired/views/triggers/WiredTriggerExecuteOnceView.tsx index 00511c01..b9f69fde 100644 --- a/src/components/wired/views/triggers/WiredTriggerExecuteOnceView.tsx +++ b/src/components/wired/views/triggers/WiredTriggerExecuteOnceView.tsx @@ -19,7 +19,7 @@ export const WiredTriggeExecuteOnceView: FC<{}> = props => return ( -
+
{ LocalizeText('wiredfurni.params.settime', [ 'seconds' ], [ GetWiredTimeLocale(time) ]) } = props => return ( -
+
{ LocalizeText('wiredfurni.params.setlongtime', [ 'time' ], [ FriendlyTime.format(time * 5).toString() ]) } = props => return ( -
+
{ LocalizeText('wiredfurni.params.settime', [ 'seconds' ], [ GetWiredTimeLocale(time) ]) } = props => return ( -
+
{ LocalizeText('wiredfurni.params.setscore', [ 'points' ], [ points.toString() ]) } = { + items: T[]; + columnCount: number; + overscan?: number; + estimateSize?: number; + itemRender?: (item: T, index?: number) => ReactElement; +} + +export const InfiniteGrid = (props: Props) => +{ + const { items = [], columnCount = 4, overscan = 5, estimateSize = 45, itemRender = null } = props; + const parentRef = useRef(null); + + const virtualizer = useVirtualizer({ + count: Math.ceil(items.length / columnCount), + overscan, + getScrollElement: () => parentRef.current, + estimateSize: () => estimateSize + }); + + useEffect(() => + { + if(!items || !items.length) return; + + virtualizer.scrollToIndex(0); + }, [ items, virtualizer ]); + + const virtualItems = virtualizer.getVirtualItems(); + + return ( +
+
+ { virtualItems.map(virtualRow => ( +
+ { Array.from(Array(columnCount)).map((e,i) => + { + const item = items[i + (virtualRow.index * columnCount)]; + + if(!item) return ; + + return ( + + { itemRender(item, i) } + + ); + }) } +
+ )) } +
+
+ ); +} diff --git a/src/layout/NitroCard.tsx b/src/layout/NitroCard.tsx index 48be3bb8..2cf7746f 100644 --- a/src/layout/NitroCard.tsx +++ b/src/layout/NitroCard.tsx @@ -1,28 +1,18 @@ import { DetailedHTMLProps, forwardRef, HTMLAttributes, MouseEvent, PropsWithChildren } from 'react'; -import { FaTimes } from 'react-icons/fa'; import { classNames, DraggableWindow, DraggableWindowPosition, DraggableWindowProps } from '../common'; import { NitroItemCountBadge } from './NitroItemCountBadge'; -const classes = { - base: 'flex flex-col rounded shadow', - themes: { - 'primary': 'border' - } -} - -const NitroCardMain = forwardRef & DetailedHTMLProps, HTMLDivElement>>((props, ref) => { - const { theme = 'primary', uniqueKey = null, handleSelector = '.drag-handler', windowPosition = DraggableWindowPosition.CENTER, disableDrag = false, className = null, ...rest } = props; + const { uniqueKey = null, handleSelector = '.drag-handler', windowPosition = DraggableWindowPosition.CENTER, disableDrag = false, className = null, ...rest } = props; return (
@@ -30,7 +20,7 @@ const NitroCardMain = forwardRef -
- { headerText } -
- -
+
+
+ { headerText } +
) @@ -59,24 +47,30 @@ const NitroCardHeader = forwardRef, HTMLDivElement>>((props, ref) => +const NitroCardContent = forwardRef, HTMLDivElement>>((props, ref) => { - const { className = null, ...rest } = props; + const { isLoading = false, className = null, children = null, ...rest } = props; return (
+ { ...rest }> + { isLoading && +
} + { children } +
); }); NitroCardContent.displayName = 'NitroCardContent'; -const NitroCardTabsMain = forwardRef, HTMLDivElement>>((props, ref) => { const { className = null, ...rest } = props; @@ -85,16 +79,16 @@ const NitroCardTabsMain = forwardRef ) }); -NitroCardTabsMain.displayName = 'NitroCardTabsMain'; +NitroCardTabs.displayName = 'NitroCardTabs'; -const NitroCardTabsItem = forwardRef, HTMLDivElement>>((props, ref) => @@ -105,8 +99,8 @@ const NitroCardTabsItem = forwardRef @@ -119,15 +113,11 @@ const NitroCardTabsItem = forwardRef