chore: run prettier on all projects
This commit is contained in:
parent
61c1381c21
commit
3e24a23f90
18
README.md
18
README.md
|
@ -4,18 +4,18 @@ This is a fork of [billsonnn/nitro-react](https://github.com/billsonnn/nitro-rea
|
|||
|
||||
## Installation
|
||||
|
||||
- Clone Nitro
|
||||
- `git clone https://git.gurkengewuerz.de/nitro/nitro.git`
|
||||
- Install the dependencies
|
||||
- `npm install`
|
||||
- Rename a few files
|
||||
- Rename `apps/frontend/public/renderer-config.json.example` to `apps/frontend/public/renderer-config.json` and edit it
|
||||
- Rename `apps/frontend/public/ui-config.json.example` to `apps/frontend/public/ui-config.json` and edit it
|
||||
- Clone Nitro
|
||||
- `git clone https://git.gurkengewuerz.de/nitro/nitro.git`
|
||||
- Install the dependencies
|
||||
- `npm install`
|
||||
- Rename a few files
|
||||
- Rename `apps/frontend/public/renderer-config.json.example` to `apps/frontend/public/renderer-config.json` and edit it
|
||||
- Rename `apps/frontend/public/ui-config.json.example` to `apps/frontend/public/ui-config.json` and edit it
|
||||
|
||||
## Usage
|
||||
|
||||
- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions.
|
||||
- See [Morningstar Websockets](https://git.krews.org/nitro/ms-websockets) for instructions on configuring websockets on your server.
|
||||
- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions.
|
||||
- See [Morningstar Websockets](https://git.krews.org/nitro/ms-websockets) for instructions on configuring websockets on your server.
|
||||
|
||||
See [Gurkengewuerz/nitro-docker](https://git.gurkengewuerz.de/nitro/nitro-docker) for a complete setup.
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ export const App: FC<{}> = props => {
|
|||
setMessage("Connection Error");
|
||||
return;
|
||||
case NitroCommunicationDemoEvent.CONNECTION_CLOSED:
|
||||
if(GetNitroInstance().roomEngine) GetNitroInstance().roomEngine.dispose();
|
||||
if (GetNitroInstance().roomEngine) GetNitroInstance().roomEngine.dispose();
|
||||
|
||||
HabboWebTools.send(-1, "client.init.handshake.fail");
|
||||
|
||||
|
|
|
@ -45,7 +45,12 @@ const addGroupableFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen
|
|||
|
||||
break;
|
||||
}
|
||||
} else if (item.category === FurniCategory.GUILD_FURNI || item.category === FurniCategory.FLOOR || item.category === FurniCategory.WALL_PAPER || item.category === FurniCategory.LANDSCAPE) {
|
||||
} else if (
|
||||
item.category === FurniCategory.GUILD_FURNI ||
|
||||
item.category === FurniCategory.FLOOR ||
|
||||
item.category === FurniCategory.WALL_PAPER ||
|
||||
item.category === FurniCategory.LANDSCAPE
|
||||
) {
|
||||
if (item.stuffData.compare(groupItem.stuffData)) {
|
||||
existingGroup = groupItem;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ export * from "./LayoutProgressBar";
|
|||
export * from "./LayoutRarityLevelView";
|
||||
export * from "./LayoutRoomPreviewerView";
|
||||
export * from "./LayoutRoomThumbnailView";
|
||||
export * from './LayoutSearchSavesView';
|
||||
export * from "./LayoutSearchSavesView";
|
||||
export * from "./LayoutTrophyView";
|
||||
export * from "./limited-edition";
|
||||
export * from "./UserProfileIconView";
|
||||
|
|
|
@ -107,7 +107,8 @@ export const GuideToolOngoingView: FC<GuideToolOngoingViewProps> = props => {
|
|||
key={index}
|
||||
pointer={chat.roomId ? true : false}
|
||||
className={chat.roomId ? "text-break text-underline" : "text-break"}
|
||||
onClick={() => (chat.roomId ? TryVisitRoom(chat.roomId) : null)}>
|
||||
onClick={() => (chat.roomId ? TryVisitRoom(chat.roomId) : null)}
|
||||
>
|
||||
{chat.message}
|
||||
</Base>
|
||||
))}
|
||||
|
|
|
@ -1,69 +1,69 @@
|
|||
.nitro-inventory {
|
||||
width: $inventory-width;
|
||||
height: $inventory-height;
|
||||
width: $inventory-width;
|
||||
height: $inventory-height;
|
||||
|
||||
.empty-image {
|
||||
background: url('@/assets/images/inventory/empty.png');
|
||||
width: 129px;
|
||||
height: 181px;
|
||||
}
|
||||
|
||||
.empty-image {
|
||||
background: url('@/assets/images/inventory/empty.png');
|
||||
background-repeat: no-repeat;
|
||||
width: 129px;
|
||||
height: 181px;
|
||||
}
|
||||
.empty-petsimage {
|
||||
background: url('@/assets/images/inventory/petsempty.png');
|
||||
background-repeat: no-repeat;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
}
|
||||
.empty-furniimage {
|
||||
background: url('@/assets/images/inventory/furniempty.png');
|
||||
background-repeat: no-repeat;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
}
|
||||
.empty-botsimage {
|
||||
background: url('@/assets/images/inventory/botsempty.png');
|
||||
background-repeat: no-repeat;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
}
|
||||
|
||||
.bubble-inventory {
|
||||
position: relative;
|
||||
font-family: sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 5px;
|
||||
width: auto;
|
||||
background: #fff;
|
||||
border-radius: 15px;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
}
|
||||
.bubble-inventory-bottom-left:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 15%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 20px solid transparent;
|
||||
border-top-color: #fff;
|
||||
border-bottom: 0;
|
||||
border-right: 0;
|
||||
margin-left: -10px;
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
.empty-image {
|
||||
background: url("@/assets/images/inventory/empty.png");
|
||||
width: 129px;
|
||||
height: 181px;
|
||||
}
|
||||
|
||||
.trade-button {
|
||||
min-height: 0;
|
||||
font-size: 8px;
|
||||
padding: 1px 2px;
|
||||
z-index: 5;
|
||||
}
|
||||
.empty-image {
|
||||
background: url("@/assets/images/inventory/empty.png");
|
||||
background-repeat: no-repeat;
|
||||
width: 129px;
|
||||
height: 181px;
|
||||
}
|
||||
.empty-petsimage {
|
||||
background: url("@/assets/images/inventory/petsempty.png");
|
||||
background-repeat: no-repeat;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
}
|
||||
.empty-furniimage {
|
||||
background: url("@/assets/images/inventory/furniempty.png");
|
||||
background-repeat: no-repeat;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
}
|
||||
.empty-botsimage {
|
||||
background: url("@/assets/images/inventory/botsempty.png");
|
||||
background-repeat: no-repeat;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
}
|
||||
|
||||
.bubble-inventory {
|
||||
position: relative;
|
||||
font-family: sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 5px;
|
||||
width: auto;
|
||||
background: #fff;
|
||||
border-radius: 15px;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
}
|
||||
.bubble-inventory-bottom-left:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 15%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 20px solid transparent;
|
||||
border-top-color: #fff;
|
||||
border-bottom: 0;
|
||||
border-right: 0;
|
||||
margin-left: -10px;
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
|
||||
.trade-button {
|
||||
min-height: 0;
|
||||
font-size: 8px;
|
||||
padding: 1px 2px;
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ const TAB_FURNITURE: string = "inventory.furni";
|
|||
const TAB_BOTS: string = "inventory.bots";
|
||||
const TAB_PETS: string = "inventory.furni.tab.pets";
|
||||
const TAB_BADGES: string = "inventory.badges";
|
||||
const TABS = [ TAB_FURNITURE, TAB_PETS, TAB_BADGES, TAB_BOTS ];
|
||||
const TABS = [TAB_FURNITURE, TAB_PETS, TAB_BADGES, TAB_BOTS];
|
||||
const UNSEEN_CATEGORIES = [UnseenItemCategory.FURNI, UnseenItemCategory.BOT, UnseenItemCategory.PET, UnseenItemCategory.BADGE];
|
||||
|
||||
export const InventoryView: FC<{}> = props => {
|
||||
|
|
|
@ -1,29 +1,33 @@
|
|||
import { FC } from 'react';
|
||||
import { Column, Grid, GridProps, Text } from '../../../common';
|
||||
import {FC} from "react";
|
||||
|
||||
export interface InventoryCategoryEmptyViewProps extends GridProps
|
||||
{
|
||||
title: string;
|
||||
desc: string;
|
||||
import {Column, Grid, GridProps, Text} from "../../../common";
|
||||
|
||||
export interface InventoryCategoryEmptyViewProps extends GridProps {
|
||||
title: string;
|
||||
desc: string;
|
||||
}
|
||||
|
||||
export const InventoryCategoryEmptyView: FC<InventoryCategoryEmptyViewProps> = props =>
|
||||
{
|
||||
const { title = '', desc = '', children = null, ...rest } = props;
|
||||
|
||||
return (
|
||||
<Grid { ...rest }>
|
||||
<Column justifyContent="start" center size={ 6 } overflow="hidden">
|
||||
<div className="empty-furniimage" />
|
||||
</Column>
|
||||
<Column justifyContent="center" size={ 6 } overflow="hidden">
|
||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||
<Text fontSize={ 6 } overflow="unset" truncate>{ title }</Text>
|
||||
<Text overflow="auto" fontSize={ 6 }> { desc }</Text>
|
||||
</div>
|
||||
<div className="empty-image" />
|
||||
</Column>
|
||||
{ children }
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
export const InventoryCategoryEmptyView: FC<InventoryCategoryEmptyViewProps> = props => {
|
||||
const {title = "", desc = "", children = null, ...rest} = props;
|
||||
|
||||
return (
|
||||
<Grid {...rest}>
|
||||
<Column justifyContent="start" center size={6} overflow="hidden">
|
||||
<div className="empty-furniimage" />
|
||||
</Column>
|
||||
<Column justifyContent="center" size={6} overflow="hidden">
|
||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||
<Text fontSize={6} overflow="unset" truncate>
|
||||
{title}
|
||||
</Text>
|
||||
<Text overflow="auto" fontSize={6}>
|
||||
{" "}
|
||||
{desc}
|
||||
</Text>
|
||||
</div>
|
||||
<div className="empty-image" />
|
||||
</Column>
|
||||
{children}
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,29 +1,33 @@
|
|||
import { FC } from 'react';
|
||||
import { Column, Grid, GridProps, Text } from '../../../common';
|
||||
import {FC} from "react";
|
||||
|
||||
export interface InventoryCategoryEmptyViewBotsProps extends GridProps
|
||||
{
|
||||
title: string;
|
||||
desc: string;
|
||||
import {Column, Grid, GridProps, Text} from "../../../common";
|
||||
|
||||
export interface InventoryCategoryEmptyViewBotsProps extends GridProps {
|
||||
title: string;
|
||||
desc: string;
|
||||
}
|
||||
|
||||
export const InventoryCategoryEmptyViewBots: FC<InventoryCategoryEmptyViewBotsProps> = props =>
|
||||
{
|
||||
const { title = '', desc = '', children = null, ...rest } = props;
|
||||
|
||||
return (
|
||||
<Grid { ...rest }>
|
||||
<Column justifyContent="start" center size={ 6 } overflow="hidden">
|
||||
<div className="empty-botsimage" />
|
||||
</Column>
|
||||
<Column justifyContent="center" size={ 6 } overflow="hidden">
|
||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||
<Text fontSize={ 6 } overflow="unset" truncate>{ title }</Text>
|
||||
<Text overflow="auto" fontSize={ 6 }> { desc }</Text>
|
||||
</div>
|
||||
<div className="empty-image" />
|
||||
</Column>
|
||||
{ children }
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
export const InventoryCategoryEmptyViewBots: FC<InventoryCategoryEmptyViewBotsProps> = props => {
|
||||
const {title = "", desc = "", children = null, ...rest} = props;
|
||||
|
||||
return (
|
||||
<Grid {...rest}>
|
||||
<Column justifyContent="start" center size={6} overflow="hidden">
|
||||
<div className="empty-botsimage" />
|
||||
</Column>
|
||||
<Column justifyContent="center" size={6} overflow="hidden">
|
||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||
<Text fontSize={6} overflow="unset" truncate>
|
||||
{title}
|
||||
</Text>
|
||||
<Text overflow="auto" fontSize={6}>
|
||||
{" "}
|
||||
{desc}
|
||||
</Text>
|
||||
</div>
|
||||
<div className="empty-image" />
|
||||
</Column>
|
||||
{children}
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,29 +1,33 @@
|
|||
import { FC } from 'react';
|
||||
import { Column, Grid, GridProps, Text } from '../../../common';
|
||||
import {FC} from "react";
|
||||
|
||||
export interface InventoryCategoryEmptyViewFurniProps extends GridProps
|
||||
{
|
||||
title: string;
|
||||
desc: string;
|
||||
import {Column, Grid, GridProps, Text} from "../../../common";
|
||||
|
||||
export interface InventoryCategoryEmptyViewFurniProps extends GridProps {
|
||||
title: string;
|
||||
desc: string;
|
||||
}
|
||||
|
||||
export const InventoryCategoryEmptyViewFurni: FC<InventoryCategoryEmptyViewFurniProps> = props =>
|
||||
{
|
||||
const { title = '', desc = '', children = null, ...rest } = props;
|
||||
|
||||
return (
|
||||
<Grid { ...rest }>
|
||||
<Column justifyContent="start" center size={ 6 } overflow="hidden">
|
||||
<div className="empty-furniimage" />
|
||||
</Column>
|
||||
<Column justifyContent="center" size={ 6 } overflow="hidden">
|
||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||
<Text fontSize={ 6 } overflow="unset" truncate>{ title }</Text>
|
||||
<Text overflow="auto" fontSize={ 6 }> { desc }</Text>
|
||||
</div>
|
||||
<div className="empty-image" />
|
||||
</Column>
|
||||
{ children }
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
export const InventoryCategoryEmptyViewFurni: FC<InventoryCategoryEmptyViewFurniProps> = props => {
|
||||
const {title = "", desc = "", children = null, ...rest} = props;
|
||||
|
||||
return (
|
||||
<Grid {...rest}>
|
||||
<Column justifyContent="start" center size={6} overflow="hidden">
|
||||
<div className="empty-furniimage" />
|
||||
</Column>
|
||||
<Column justifyContent="center" size={6} overflow="hidden">
|
||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||
<Text fontSize={6} overflow="unset" truncate>
|
||||
{title}
|
||||
</Text>
|
||||
<Text overflow="auto" fontSize={6}>
|
||||
{" "}
|
||||
{desc}
|
||||
</Text>
|
||||
</div>
|
||||
<div className="empty-image" />
|
||||
</Column>
|
||||
{children}
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,29 +1,33 @@
|
|||
import { FC } from 'react';
|
||||
import { Column, Grid, GridProps, Text } from '../../../common';
|
||||
import {FC} from "react";
|
||||
|
||||
export interface InventoryCategoryEmptyViewPetsProps extends GridProps
|
||||
{
|
||||
title: string;
|
||||
desc: string;
|
||||
import {Column, Grid, GridProps, Text} from "../../../common";
|
||||
|
||||
export interface InventoryCategoryEmptyViewPetsProps extends GridProps {
|
||||
title: string;
|
||||
desc: string;
|
||||
}
|
||||
|
||||
export const InventoryCategoryEmptyViewPets: FC<InventoryCategoryEmptyViewPetsProps> = props =>
|
||||
{
|
||||
const { title = '', desc = '', children = null, ...rest } = props;
|
||||
|
||||
return (
|
||||
<Grid { ...rest }>
|
||||
<Column justifyContent="start" center size={ 6 } overflow="hidden">
|
||||
<div className="empty-petsimage" />
|
||||
</Column>
|
||||
<Column justifyContent="center" size={ 6 } overflow="hidden">
|
||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||
<Text fontSize={ 6 } overflow="unset" truncate>{ title }</Text>
|
||||
<Text overflow="auto" fontSize={ 6 }> { desc }</Text>
|
||||
</div>
|
||||
<div className="empty-image" />
|
||||
</Column>
|
||||
{ children }
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
export const InventoryCategoryEmptyViewPets: FC<InventoryCategoryEmptyViewPetsProps> = props => {
|
||||
const {title = "", desc = "", children = null, ...rest} = props;
|
||||
|
||||
return (
|
||||
<Grid {...rest}>
|
||||
<Column justifyContent="start" center size={6} overflow="hidden">
|
||||
<div className="empty-petsimage" />
|
||||
</Column>
|
||||
<Column justifyContent="center" size={6} overflow="hidden">
|
||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||
<Text fontSize={6} overflow="unset" truncate>
|
||||
{title}
|
||||
</Text>
|
||||
<Text overflow="auto" fontSize={6}>
|
||||
{" "}
|
||||
{desc}
|
||||
</Text>
|
||||
</div>
|
||||
<div className="empty-image" />
|
||||
</Column>
|
||||
{children}
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@ import {FC, useEffect, useState} from "react";
|
|||
import {GetRoomEngine, LocalizeText, UnseenItemCategory, attemptBotPlacement} from "../../../../api";
|
||||
import {AutoGrid, Button, Column, Grid, LayoutRoomPreviewerView, Text} from "../../../../common";
|
||||
import {useInventoryBots, useInventoryUnseenTracker} from "../../../../hooks";
|
||||
import { InventoryCategoryEmptyViewBots } from '../InventoryCategoryEmptyViewBots';
|
||||
import {InventoryCategoryEmptyViewBots} from "../InventoryCategoryEmptyViewBots";
|
||||
import {InventoryBotItemView} from "./InventoryBotItemView";
|
||||
|
||||
interface InventoryBotViewProps {
|
||||
|
@ -59,7 +59,8 @@ export const InventoryBotView: FC<InventoryBotViewProps> = props => {
|
|||
return () => setIsVisible(false);
|
||||
}, []);
|
||||
|
||||
if(!botItems || !botItems.length) return <InventoryCategoryEmptyViewBots title={ LocalizeText('inventory.empty.bots.title') } desc={ LocalizeText('inventory.empty.bots.desc') } />;
|
||||
if (!botItems || !botItems.length)
|
||||
return <InventoryCategoryEmptyViewBots title={LocalizeText("inventory.empty.bots.title")} desc={LocalizeText("inventory.empty.bots.desc")} />;
|
||||
|
||||
return (
|
||||
<Grid>
|
||||
|
|
|
@ -92,7 +92,7 @@ export const InventoryFurnitureView: FC<InventoryFurnitureViewProps> = props =>
|
|||
resetItems(
|
||||
UnseenItemCategory.FURNI,
|
||||
selectedItem.items.map(item => item.id)
|
||||
)
|
||||
);
|
||||
|
||||
selectedItem.hasUnseenItems = false;
|
||||
}, [selectedItem, resetItems]);
|
||||
|
@ -109,45 +109,55 @@ export const InventoryFurnitureView: FC<InventoryFurnitureViewProps> = props =>
|
|||
setIsVisible(true);
|
||||
|
||||
return () => setIsVisible(false);
|
||||
}, [])
|
||||
}, []);
|
||||
|
||||
if (!groupItems || !groupItems.length)
|
||||
return <InventoryCategoryEmptyView title={LocalizeText("inventory.empty.title")} desc={LocalizeText("inventory.empty.desc")} />;
|
||||
|
||||
return (
|
||||
<Grid>
|
||||
<Column size={ 7 } overflow="hidden">
|
||||
<InventoryFurnitureSearchView groupItems={ groupItems } setGroupItems={ setFilteredGroupItems } />
|
||||
<AutoGrid columnCount={ 5 }>
|
||||
{ filteredGroupItems && (filteredGroupItems.length > 0) && filteredGroupItems.map((item, index) => <InventoryFurnitureItemView key={ index } groupItem={ item } />) }
|
||||
</AutoGrid>
|
||||
<Grid>
|
||||
<Column size={7} overflow="hidden">
|
||||
<InventoryFurnitureSearchView groupItems={groupItems} setGroupItems={setFilteredGroupItems} />
|
||||
<AutoGrid columnCount={5}>
|
||||
{filteredGroupItems &&
|
||||
filteredGroupItems.length > 0 &&
|
||||
filteredGroupItems.map((item, index) => <InventoryFurnitureItemView key={index} groupItem={item} />)}
|
||||
</AutoGrid>
|
||||
</Column>
|
||||
<Column size={5} overflow="auto">
|
||||
<Column overflow="hidden" position="relative">
|
||||
<LayoutRoomPreviewerView roomPreviewer={roomPreviewer} height={140} />
|
||||
{selectedItem && selectedItem.stuffData.isUnique && (
|
||||
<LayoutLimitedEditionCompactPlateView
|
||||
className="top-2 end-2"
|
||||
position="absolute"
|
||||
uniqueNumber={selectedItem.stuffData.uniqueNumber}
|
||||
uniqueSeries={selectedItem.stuffData.uniqueSeries}
|
||||
/>
|
||||
)}
|
||||
{selectedItem && selectedItem.stuffData.rarityLevel > -1 && (
|
||||
<LayoutRarityLevelView className="top-2 end-2" position="absolute" level={selectedItem.stuffData.rarityLevel} />
|
||||
)}
|
||||
</Column>
|
||||
{selectedItem && (
|
||||
<Column grow justifyContent="between" gap={2}>
|
||||
<Column grow gap={1}>
|
||||
<Text bold>{selectedItem.name}</Text>
|
||||
<Text>{selectedItem.description}</Text>
|
||||
</Column>
|
||||
<Column size={ 5 } overflow="auto">
|
||||
<Column overflow="hidden" position="relative">
|
||||
<LayoutRoomPreviewerView roomPreviewer={ roomPreviewer } height={ 140 } />
|
||||
{ selectedItem && selectedItem.stuffData.isUnique &&
|
||||
<LayoutLimitedEditionCompactPlateView className="top-2 end-2" position="absolute" uniqueNumber={ selectedItem.stuffData.uniqueNumber } uniqueSeries={ selectedItem.stuffData.uniqueSeries } /> }
|
||||
{ (selectedItem && selectedItem.stuffData.rarityLevel > -1) &&
|
||||
<LayoutRarityLevelView className="top-2 end-2" position="absolute" level={ selectedItem.stuffData.rarityLevel } /> }
|
||||
</Column>
|
||||
{ selectedItem &&
|
||||
<Column grow justifyContent="between" gap={ 2 }>
|
||||
<Column grow gap={ 1 }>
|
||||
<Text bold>{ selectedItem.name }</Text>
|
||||
<Text>{ selectedItem.description }</Text>
|
||||
</Column>
|
||||
<Column gap={ 1 }>
|
||||
{ !!roomSession &&
|
||||
<Button variant="success" onClick={ event => attemptItemPlacement(selectedItem) }>
|
||||
{ LocalizeText('inventory.furni.placetoroom') }
|
||||
</Button> }
|
||||
{ (selectedItem && selectedItem.isSellable) &&
|
||||
<Button onClick={ event => attemptPlaceMarketplaceOffer(selectedItem) }>
|
||||
{ LocalizeText('inventory.marketplace.sell') }
|
||||
</Button> }
|
||||
</Column>
|
||||
</Column> }
|
||||
<Column gap={1}>
|
||||
{!!roomSession && (
|
||||
<Button variant="success" onClick={event => attemptItemPlacement(selectedItem)}>
|
||||
{LocalizeText("inventory.furni.placetoroom")}
|
||||
</Button>
|
||||
)}
|
||||
{selectedItem && selectedItem.isSellable && (
|
||||
<Button onClick={event => attemptPlaceMarketplaceOffer(selectedItem)}>{LocalizeText("inventory.marketplace.sell")}</Button>
|
||||
)}
|
||||
</Column>
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
</Column>
|
||||
)}
|
||||
</Column>
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@ import {FC, useEffect, useState} from "react";
|
|||
import {GetRoomEngine, LocalizeText, UnseenItemCategory, attemptPetPlacement} from "../../../../api";
|
||||
import {AutoGrid, Button, Column, Grid, LayoutRoomPreviewerView, Text} from "../../../../common";
|
||||
import {useInventoryPets, useInventoryUnseenTracker} from "../../../../hooks";
|
||||
import { InventoryCategoryEmptyViewPets } from '../InventoryCategoryEmptyViewPets';
|
||||
import {InventoryCategoryEmptyViewPets} from "../InventoryCategoryEmptyViewPets";
|
||||
import {InventoryPetItemView} from "./InventoryPetItemView";
|
||||
|
||||
interface InventoryPetViewProps {
|
||||
|
@ -58,7 +58,8 @@ export const InventoryPetView: FC<InventoryPetViewProps> = props => {
|
|||
return () => setIsVisible(false);
|
||||
}, []);
|
||||
|
||||
if(!petItems || !petItems.length) return <InventoryCategoryEmptyViewPets title={ LocalizeText('inventory.empty.pets.title') } desc={ LocalizeText('inventory.empty.pets.desc') } />;
|
||||
if (!petItems || !petItems.length)
|
||||
return <InventoryCategoryEmptyViewPets title={LocalizeText("inventory.empty.pets.title")} desc={LocalizeText("inventory.empty.pets.desc")} />;
|
||||
|
||||
return (
|
||||
<Grid>
|
||||
|
|
|
@ -37,7 +37,8 @@ export const NavigatorSearchSavesResultItemView: FC<NavigatorSearchSavesResultIt
|
|||
pointer
|
||||
variant="black"
|
||||
title={LocalizeText("navigator.tooltip.open.saved.search")}
|
||||
onClick={() => SendMessageComposer(new NavigatorSearchComposer(search.code.split(".").reverse()[0], search.filter))}>
|
||||
onClick={() => SendMessageComposer(new NavigatorSearchComposer(search.code.split(".").reverse()[0], search.filter))}
|
||||
>
|
||||
{search.filter !== ""
|
||||
? LocalizeText("navigator.searchcode.title.query") + ": " + (!search.filter.split(":")[1] ? search.filter : search.filter.split(":")[1])
|
||||
: LocalizeText(`${search.code}`)}
|
||||
|
|
|
@ -178,12 +178,7 @@ export const UserSettingsView: FC<{}> = props => {
|
|||
<Text>{LocalizeText("memenu.settings.other.skip.purchase.confirmation")}</Text>
|
||||
</Flex>
|
||||
<Flex alignItems="center" gap={1}>
|
||||
<input
|
||||
className="form-check-input"
|
||||
type="checkbox"
|
||||
checked={uiFPSCounter}
|
||||
onChange={event => setUiFPSCounter(event.target.checked)}
|
||||
/>
|
||||
<input className="form-check-input" type="checkbox" checked={uiFPSCounter} onChange={event => setUiFPSCounter(event.target.checked)} />
|
||||
<Text>{LocalizeText("memenu.settings.other.ui.show.fpscounter")}</Text>
|
||||
</Flex>
|
||||
</Column>
|
||||
|
|
|
@ -20,5 +20,5 @@
|
|||
"noInterop": true
|
||||
},
|
||||
"sourceMaps": true,
|
||||
"exclude": ["jest.config.ts",".*\\.spec.tsx?$",".*\\.test.tsx?$","./src/jest-setup.ts$","./**/jest-setup.ts$",".*.js$"]
|
||||
}
|
||||
"exclude": ["jest.config.ts", ".*\\.spec.tsx?$", ".*\\.test.tsx?$", "./src/jest-setup.ts$", "./**/jest-setup.ts$", ".*.js$"]
|
||||
}
|
||||
|
|
|
@ -6,27 +6,19 @@
|
|||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/js:swc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/renderer",
|
||||
"main": "libs/renderer/src/index.ts",
|
||||
"tsConfig": "libs/renderer/tsconfig.lib.json",
|
||||
"assets": [
|
||||
"libs/renderer/*.md"
|
||||
]
|
||||
"assets": ["libs/renderer/*.md"]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
],
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/renderer/**/*.ts"
|
||||
]
|
||||
"lintFilePatterns": ["libs/renderer/**/*.ts"]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue