mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Update some maps
This commit is contained in:
parent
5ca61ece5e
commit
28060820b5
@ -93,10 +93,10 @@ export const CatalogView: FC<CatalogViewProps> = props =>
|
|||||||
<NitroCardView className="nitro-catalog">
|
<NitroCardView className="nitro-catalog">
|
||||||
<NitroCardHeaderView headerText={ LocalizeText('catalog.title') } onCloseClick={ event => setIsVisible(false) } />
|
<NitroCardHeaderView headerText={ LocalizeText('catalog.title') } onCloseClick={ event => setIsVisible(false) } />
|
||||||
<NitroCardTabsView>
|
<NitroCardTabsView>
|
||||||
{ root && root.children.length && root.children.map((page, index) =>
|
{ root && root.children.length && root.children.map(page =>
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
<NitroCardTabsItemView key={ index } isActive={ (currentTab === page) } onClick={ event => setCurrentTab(page) }>
|
<NitroCardTabsItemView key={ page.pageId } isActive={ (currentTab === page) } onClick={ event => setCurrentTab(page) }>
|
||||||
{ page.localization }
|
{ page.localization }
|
||||||
</NitroCardTabsItemView>
|
</NitroCardTabsItemView>
|
||||||
);
|
);
|
||||||
|
@ -35,11 +35,11 @@ export const CatalogNavigationSetView: FC<CatalogNavigationSetViewProps> = props
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="row row-cols-1 g-0 catalog-navigation-set-container w-100">
|
<div className="row row-cols-1 g-0 catalog-navigation-set-container w-100">
|
||||||
{ page && (page.children.length > 0) && page.children.map((page, index) =>
|
{ page && (page.children.length > 0) && page.children.map(page =>
|
||||||
{
|
{
|
||||||
if(!page.visible) return null;
|
if(!page.visible) return null;
|
||||||
|
|
||||||
return <CatalogNavigationItemView key={ index } page={ page } isActive={ (activeChild === page) } setActiveChild={ setActiveChild } />
|
return <CatalogNavigationItemView key={ page.pageId } page={ page } isActive={ (activeChild === page) } setActiveChild={ setActiveChild } />
|
||||||
}) }
|
}) }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -8,9 +8,9 @@ export const InventoryActiveBadgeResultsView: FC<InventoryActiveBadgeResultsView
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="row row-cols-3 align-content-start g-0">
|
<div className="row row-cols-3 align-content-start g-0">
|
||||||
{ badges && (badges.length > 0) && badges.map((code, index) =>
|
{ badges && (badges.length > 0) && badges.map(code =>
|
||||||
{
|
{
|
||||||
return <InventoryBadgeItemView key={ index } badge={ code } />
|
return <InventoryBadgeItemView key={ code } badge={ code } />
|
||||||
}) }
|
}) }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -9,11 +9,11 @@ export const InventoryBadgeResultsView: FC<InventoryBadgeResultsViewProps> = pro
|
|||||||
return (
|
return (
|
||||||
<div className="h-100 overflow-hidden">
|
<div className="h-100 overflow-hidden">
|
||||||
<div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto">
|
<div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto">
|
||||||
{ badges && (badges.length > 0) && badges.map((code, index) =>
|
{ badges && (badges.length > 0) && badges.map(code =>
|
||||||
{
|
{
|
||||||
if(activeBadges.indexOf(code) >= 0) return null;
|
if(activeBadges.indexOf(code) >= 0) return null;
|
||||||
|
|
||||||
return <InventoryBadgeItemView key={ index } badge={ code } />
|
return <InventoryBadgeItemView key={ code } badge={ code } />
|
||||||
}) }
|
}) }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,9 +9,9 @@ export const InventoryBotResultsView: FC<InventoryBotResultsViewProps> = props =
|
|||||||
return (
|
return (
|
||||||
<div className="h-100 overflow-hidden">
|
<div className="h-100 overflow-hidden">
|
||||||
<div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto">
|
<div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto">
|
||||||
{ botItems && (botItems.length > 0) && botItems.map((item, index) =>
|
{ botItems && (botItems.length > 0) && botItems.map(item =>
|
||||||
{
|
{
|
||||||
return <InventoryBotItemView key={ index } botItem={ item } />
|
return <InventoryBotItemView key={ item.id } botItem={ item } />
|
||||||
}) }
|
}) }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,9 +9,9 @@ export const InventoryPetResultsView: FC<InventoryPetResultsViewProps> = props =
|
|||||||
return (
|
return (
|
||||||
<div className="h-100 overflow-hidden">
|
<div className="h-100 overflow-hidden">
|
||||||
<div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto">
|
<div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto">
|
||||||
{ petItems && (petItems.length > 0) && petItems.map((item, index) =>
|
{ petItems && (petItems.length > 0) && petItems.map(item =>
|
||||||
{
|
{
|
||||||
return <InventoryPetItemView key={ index } petItem={ item } />
|
return <InventoryPetItemView key={ item.id } petItem={ item } />
|
||||||
}) }
|
}) }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -122,9 +122,9 @@ export const FurnitureStickieView: FC<FurnitureStickieViewProps> = props =>
|
|||||||
{ stickieData.canModify &&
|
{ stickieData.canModify &&
|
||||||
<>
|
<>
|
||||||
<div className="nitro-stickie-image stickie-trash header-trash" onClick={ event => processAction('trash') }></div>
|
<div className="nitro-stickie-image stickie-trash header-trash" onClick={ event => processAction('trash') }></div>
|
||||||
{ STICKIE_COLORS.map((color, index) =>
|
{ STICKIE_COLORS.map(color =>
|
||||||
{
|
{
|
||||||
return <div className="stickie-color ms-1" key={ index } onClick={ event => processAction('changeColor', color) } style={ {backgroundColor: ColorUtils.makeColorHex(color) } } />
|
return <div key={ color } className="stickie-color ms-1" onClick={ event => processAction('changeColor', color) } style={ {backgroundColor: ColorUtils.makeColorHex(color) } } />
|
||||||
})}
|
})}
|
||||||
</> }
|
</> }
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,9 +24,9 @@ export const InfoStandWidgetBotView: FC<InfoStandWidgetBotViewProps> = props =>
|
|||||||
<AvatarImageView figure={ botData.figure } direction={ 4 } />
|
<AvatarImageView figure={ botData.figure } direction={ 4 } />
|
||||||
</div>
|
</div>
|
||||||
<div className="w-100 d-flex justify-content-center align-items-center">
|
<div className="w-100 d-flex justify-content-center align-items-center">
|
||||||
{ (botData.badges.length > 0) && botData.badges.map((result, index) =>
|
{ (botData.badges.length > 0) && botData.badges.map(result =>
|
||||||
{
|
{
|
||||||
return <BadgeImageView key={ index } badgeCode={ result } />;
|
return <BadgeImageView key={ result } badgeCode={ result } />;
|
||||||
}) }
|
}) }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,9 +36,9 @@ export const InfoStandWidgetRentableBotView: FC<InfoStandWidgetRentableBotViewPr
|
|||||||
<AvatarImageView figure={ rentableBotData.figure } direction={ 4 } />
|
<AvatarImageView figure={ rentableBotData.figure } direction={ 4 } />
|
||||||
</div>
|
</div>
|
||||||
<div className="w-100 d-flex justify-content-center align-items-center">
|
<div className="w-100 d-flex justify-content-center align-items-center">
|
||||||
{ (rentableBotData.badges.length > 0) && rentableBotData.badges.map((result, index) =>
|
{ (rentableBotData.badges.length > 0) && rentableBotData.badges.map(result =>
|
||||||
{
|
{
|
||||||
return <BadgeImageView key={ index } badgeCode={ result } />;
|
return <BadgeImageView key={ result } badgeCode={ result } />;
|
||||||
}) }
|
}) }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,9 +26,9 @@ export const WiredConditionActorHasHandItemView: FC<{}> = props =>
|
|||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label className="fw-bold">{ LocalizeText('wiredfurni.params.handitem') }</label>
|
<label className="fw-bold">{ LocalizeText('wiredfurni.params.handitem') }</label>
|
||||||
<select className="form-select form-select-sm" value={ handItemId } onChange={ event => setHandItemId(parseInt(event.target.value)) }>
|
<select className="form-select form-select-sm" value={ handItemId } onChange={ event => setHandItemId(parseInt(event.target.value)) }>
|
||||||
{ allowedHanditemIds.map((value, index) =>
|
{ allowedHanditemIds.map(value =>
|
||||||
{
|
{
|
||||||
return <option key={ index } value={ value }>{ LocalizeText(`handitem${ value }`) }</option>
|
return <option key={ value } value={ value }>{ LocalizeText(`handitem${ value }`) }</option>
|
||||||
}) }
|
}) }
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,10 +25,10 @@ export const WiredConditionActorIsTeamMemberView: FC<{}> = props =>
|
|||||||
<WiredConditionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
|
<WiredConditionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label className="fw-bold">{ LocalizeText('wiredfurni.params.team') }</label>
|
<label className="fw-bold">{ LocalizeText('wiredfurni.params.team') }</label>
|
||||||
{ teamIds.map((value, index) =>
|
{ teamIds.map(value =>
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
<div key={ index } className="form-check">
|
<div key={ value } className="form-check">
|
||||||
<input className="form-check-input" type="radio" name="selectedTeam" id={ `selectedTeam${ value }` } checked={ (selectedTeam === value) } onChange={ event => setSelectedTeam(value) } />
|
<input className="form-check-input" type="radio" name="selectedTeam" id={ `selectedTeam${ value }` } checked={ (selectedTeam === value) } onChange={ event => setSelectedTeam(value) } />
|
||||||
<label className="form-check-label" htmlFor={ `selectedTeam${ value }` }>
|
<label className="form-check-label" htmlFor={ `selectedTeam${ value }` }>
|
||||||
{ LocalizeText(`wiredfurni.params.team.${ value }`) }
|
{ LocalizeText(`wiredfurni.params.team.${ value }`) }
|
||||||
|
Loading…
Reference in New Issue
Block a user