mirror of
https://github.com/duckietm/Nitro-Cool-UI.git
synced 2025-06-21 22:36:58 +00:00
Cleanup and Fix trading
This commit is contained in:
parent
4b0af81009
commit
38cf8dc7ac
Binary file not shown.
Before Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.8 KiB |
@ -143,7 +143,7 @@
|
||||
|
||||
.calc-wrapper {
|
||||
width: 96%;
|
||||
height: calc(100% - 90px);
|
||||
height: calc(100% - 100px);
|
||||
}
|
||||
|
||||
.size-list-badges {
|
||||
|
@ -1,26 +1,33 @@
|
||||
import { FC } from 'react';
|
||||
import { Column, Grid, GridProps, Text } from '../../../common';
|
||||
import { CreateLinkEvent, LocalizeText } from '../../../api';
|
||||
import { Button, Column, Flex, Grid, GridProps, Text } from '../../../common';
|
||||
|
||||
export interface InventoryCategoryEmptyViewProps extends GridProps
|
||||
{
|
||||
title: string;
|
||||
desc: string;
|
||||
isTrading?: boolean;
|
||||
}
|
||||
|
||||
export const InventoryCategoryEmptyView: FC<InventoryCategoryEmptyViewProps> = props =>
|
||||
{
|
||||
const { title = '', desc = '', children = null, ...rest } = props;
|
||||
const { title = '', desc = '', isTrading = false, children = null, ...rest } = props;
|
||||
|
||||
return (
|
||||
<Grid { ...rest }>
|
||||
<Column center size={ 5 } overflow="hidden">
|
||||
<div className="empty-image" />
|
||||
</Column>
|
||||
<Column justifyContent="center" size={ 7 } overflow="hidden">
|
||||
<Grid {...rest}>
|
||||
<Column center size={ 5 } overflow="hidden">
|
||||
<div className="empty-image" />
|
||||
{ !isTrading &&
|
||||
<Flex gap={ 2 } position="absolute" className="bottom-2">
|
||||
<Button className="py-1" onClick={ () => CreateLinkEvent('catalog/open') }>{ LocalizeText('inventory.open.catalog') }</Button>
|
||||
</Flex>
|
||||
}
|
||||
</Column>
|
||||
<Column justifyContent="center" size={ 7 } overflow="hidden">
|
||||
<Text fontWeight="bold" fontSize={ 5 } overflow="unset" truncate>{ title }</Text>
|
||||
<Text overflow="auto">{ desc }</Text>
|
||||
</Column>
|
||||
{ children }
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
{children}
|
||||
</Grid>
|
||||
);
|
||||
};
|
@ -95,11 +95,6 @@ export const InventoryCategoryFilterView: FC<InventoryCategoryFilterViewProps> =
|
||||
{ [ InventoryFilterType.EVERYTHING, InventoryFilterType.FLOOR, InventoryFilterType.WALL ].map((type, index) => <option key={ index } value={ type }>{ LocalizeText(type) }</option>) }
|
||||
</select>
|
||||
</Flex>
|
||||
<Flex alignItems="center" position="relative" className="ms-2">
|
||||
<select className="form-select form-select-sm" value={ filterPlace } onChange={ event => setFilterPlace(event.target.value) } disabled={ currentTab === TAB_FURNITURE }>
|
||||
{ [ InventoryFilterType.ANYWHERE, InventoryFilterType.IN_ROOM, InventoryFilterType.IN_INVENTORY ].map((type, index) => <option key={ index } value={ type }>{ LocalizeText(type) }</option>) }
|
||||
</select>
|
||||
</Flex>
|
||||
</>
|
||||
}
|
||||
</Flex>
|
||||
|
@ -40,7 +40,7 @@ export const InventoryBadgeView: FC<InventoryBadgeViewProps> = props =>
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="calc-wrapper mt-n2">
|
||||
<div className="badge-wrapper calc-wrapper mt-n2">
|
||||
<Grid gap={ 1 }>
|
||||
<Column overflow="hidden" className="size-list-badges mt-1">
|
||||
<AutoGrid gap={ 1 } columnCount={ 5 }>
|
||||
|
@ -64,7 +64,7 @@ export const InventoryPetView: FC<InventoryPetViewProps> = props =>
|
||||
return () => setIsVisible(false);
|
||||
}, []);
|
||||
|
||||
if(!petItems || !petItems.length) return <InventoryCategoryEmptyView title={ LocalizeText('inventory.empty.pets.title') } desc={ LocalizeText('inventory.empty.pets.desc') } />;
|
||||
if(!petItems || !petItems.length) return <InventoryCategoryEmptyView title={ LocalizeText('inventory.empty.pets.title') } desc={ LocalizeText('inventory.empty.pets.desc') } isTrading={ isTrading } />;
|
||||
|
||||
return (
|
||||
<Grid>
|
||||
|
Loading…
x
Reference in New Issue
Block a user