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
|
## Installation
|
||||||
|
|
||||||
- Clone Nitro
|
- Clone Nitro
|
||||||
- `git clone https://git.gurkengewuerz.de/nitro/nitro.git`
|
- `git clone https://git.gurkengewuerz.de/nitro/nitro.git`
|
||||||
- Install the dependencies
|
- Install the dependencies
|
||||||
- `npm install`
|
- `npm install`
|
||||||
- Rename a few files
|
- 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/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
|
- Rename `apps/frontend/public/ui-config.json.example` to `apps/frontend/public/ui-config.json` and edit it
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions.
|
- 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 [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.
|
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");
|
setMessage("Connection Error");
|
||||||
return;
|
return;
|
||||||
case NitroCommunicationDemoEvent.CONNECTION_CLOSED:
|
case NitroCommunicationDemoEvent.CONNECTION_CLOSED:
|
||||||
if(GetNitroInstance().roomEngine) GetNitroInstance().roomEngine.dispose();
|
if (GetNitroInstance().roomEngine) GetNitroInstance().roomEngine.dispose();
|
||||||
|
|
||||||
HabboWebTools.send(-1, "client.init.handshake.fail");
|
HabboWebTools.send(-1, "client.init.handshake.fail");
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,12 @@ const addGroupableFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen
|
||||||
|
|
||||||
break;
|
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)) {
|
if (item.stuffData.compare(groupItem.stuffData)) {
|
||||||
existingGroup = groupItem;
|
existingGroup = groupItem;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ export * from "./LayoutProgressBar";
|
||||||
export * from "./LayoutRarityLevelView";
|
export * from "./LayoutRarityLevelView";
|
||||||
export * from "./LayoutRoomPreviewerView";
|
export * from "./LayoutRoomPreviewerView";
|
||||||
export * from "./LayoutRoomThumbnailView";
|
export * from "./LayoutRoomThumbnailView";
|
||||||
export * from './LayoutSearchSavesView';
|
export * from "./LayoutSearchSavesView";
|
||||||
export * from "./LayoutTrophyView";
|
export * from "./LayoutTrophyView";
|
||||||
export * from "./limited-edition";
|
export * from "./limited-edition";
|
||||||
export * from "./UserProfileIconView";
|
export * from "./UserProfileIconView";
|
||||||
|
|
|
@ -107,7 +107,8 @@ export const GuideToolOngoingView: FC<GuideToolOngoingViewProps> = props => {
|
||||||
key={index}
|
key={index}
|
||||||
pointer={chat.roomId ? true : false}
|
pointer={chat.roomId ? true : false}
|
||||||
className={chat.roomId ? "text-break text-underline" : "text-break"}
|
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}
|
{chat.message}
|
||||||
</Base>
|
</Base>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -1,69 +1,69 @@
|
||||||
.nitro-inventory {
|
.nitro-inventory {
|
||||||
width: $inventory-width;
|
width: $inventory-width;
|
||||||
height: $inventory-height;
|
height: $inventory-height;
|
||||||
|
|
||||||
.empty-image {
|
.empty-image {
|
||||||
background: url('@/assets/images/inventory/empty.png');
|
background: url("@/assets/images/inventory/empty.png");
|
||||||
width: 129px;
|
width: 129px;
|
||||||
height: 181px;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.trade-button {
|
.empty-image {
|
||||||
min-height: 0;
|
background: url("@/assets/images/inventory/empty.png");
|
||||||
font-size: 8px;
|
background-repeat: no-repeat;
|
||||||
padding: 1px 2px;
|
width: 129px;
|
||||||
z-index: 5;
|
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_BOTS: string = "inventory.bots";
|
||||||
const TAB_PETS: string = "inventory.furni.tab.pets";
|
const TAB_PETS: string = "inventory.furni.tab.pets";
|
||||||
const TAB_BADGES: string = "inventory.badges";
|
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];
|
const UNSEEN_CATEGORIES = [UnseenItemCategory.FURNI, UnseenItemCategory.BOT, UnseenItemCategory.PET, UnseenItemCategory.BADGE];
|
||||||
|
|
||||||
export const InventoryView: FC<{}> = props => {
|
export const InventoryView: FC<{}> = props => {
|
||||||
|
|
|
@ -1,29 +1,33 @@
|
||||||
import { FC } from 'react';
|
import {FC} from "react";
|
||||||
import { Column, Grid, GridProps, Text } from '../../../common';
|
|
||||||
|
|
||||||
export interface InventoryCategoryEmptyViewProps extends GridProps
|
import {Column, Grid, GridProps, Text} from "../../../common";
|
||||||
{
|
|
||||||
title: string;
|
export interface InventoryCategoryEmptyViewProps extends GridProps {
|
||||||
desc: string;
|
title: string;
|
||||||
|
desc: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const InventoryCategoryEmptyView: FC<InventoryCategoryEmptyViewProps> = props =>
|
export const InventoryCategoryEmptyView: FC<InventoryCategoryEmptyViewProps> = props => {
|
||||||
{
|
const {title = "", desc = "", children = null, ...rest} = props;
|
||||||
const { title = '', desc = '', children = null, ...rest } = props;
|
|
||||||
|
return (
|
||||||
return (
|
<Grid {...rest}>
|
||||||
<Grid { ...rest }>
|
<Column justifyContent="start" center size={6} overflow="hidden">
|
||||||
<Column justifyContent="start" center size={ 6 } overflow="hidden">
|
<div className="empty-furniimage" />
|
||||||
<div className="empty-furniimage" />
|
</Column>
|
||||||
</Column>
|
<Column justifyContent="center" size={6} overflow="hidden">
|
||||||
<Column justifyContent="center" size={ 6 } overflow="hidden">
|
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
<Text fontSize={6} overflow="unset" truncate>
|
||||||
<Text fontSize={ 6 } overflow="unset" truncate>{ title }</Text>
|
{title}
|
||||||
<Text overflow="auto" fontSize={ 6 }> { desc }</Text>
|
</Text>
|
||||||
</div>
|
<Text overflow="auto" fontSize={6}>
|
||||||
<div className="empty-image" />
|
{" "}
|
||||||
</Column>
|
{desc}
|
||||||
{ children }
|
</Text>
|
||||||
</Grid>
|
</div>
|
||||||
);
|
<div className="empty-image" />
|
||||||
}
|
</Column>
|
||||||
|
{children}
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
|
@ -1,29 +1,33 @@
|
||||||
import { FC } from 'react';
|
import {FC} from "react";
|
||||||
import { Column, Grid, GridProps, Text } from '../../../common';
|
|
||||||
|
|
||||||
export interface InventoryCategoryEmptyViewBotsProps extends GridProps
|
import {Column, Grid, GridProps, Text} from "../../../common";
|
||||||
{
|
|
||||||
title: string;
|
export interface InventoryCategoryEmptyViewBotsProps extends GridProps {
|
||||||
desc: string;
|
title: string;
|
||||||
|
desc: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const InventoryCategoryEmptyViewBots: FC<InventoryCategoryEmptyViewBotsProps> = props =>
|
export const InventoryCategoryEmptyViewBots: FC<InventoryCategoryEmptyViewBotsProps> = props => {
|
||||||
{
|
const {title = "", desc = "", children = null, ...rest} = props;
|
||||||
const { title = '', desc = '', children = null, ...rest } = props;
|
|
||||||
|
return (
|
||||||
return (
|
<Grid {...rest}>
|
||||||
<Grid { ...rest }>
|
<Column justifyContent="start" center size={6} overflow="hidden">
|
||||||
<Column justifyContent="start" center size={ 6 } overflow="hidden">
|
<div className="empty-botsimage" />
|
||||||
<div className="empty-botsimage" />
|
</Column>
|
||||||
</Column>
|
<Column justifyContent="center" size={6} overflow="hidden">
|
||||||
<Column justifyContent="center" size={ 6 } overflow="hidden">
|
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
<Text fontSize={6} overflow="unset" truncate>
|
||||||
<Text fontSize={ 6 } overflow="unset" truncate>{ title }</Text>
|
{title}
|
||||||
<Text overflow="auto" fontSize={ 6 }> { desc }</Text>
|
</Text>
|
||||||
</div>
|
<Text overflow="auto" fontSize={6}>
|
||||||
<div className="empty-image" />
|
{" "}
|
||||||
</Column>
|
{desc}
|
||||||
{ children }
|
</Text>
|
||||||
</Grid>
|
</div>
|
||||||
);
|
<div className="empty-image" />
|
||||||
}
|
</Column>
|
||||||
|
{children}
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
|
@ -1,29 +1,33 @@
|
||||||
import { FC } from 'react';
|
import {FC} from "react";
|
||||||
import { Column, Grid, GridProps, Text } from '../../../common';
|
|
||||||
|
|
||||||
export interface InventoryCategoryEmptyViewFurniProps extends GridProps
|
import {Column, Grid, GridProps, Text} from "../../../common";
|
||||||
{
|
|
||||||
title: string;
|
export interface InventoryCategoryEmptyViewFurniProps extends GridProps {
|
||||||
desc: string;
|
title: string;
|
||||||
|
desc: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const InventoryCategoryEmptyViewFurni: FC<InventoryCategoryEmptyViewFurniProps> = props =>
|
export const InventoryCategoryEmptyViewFurni: FC<InventoryCategoryEmptyViewFurniProps> = props => {
|
||||||
{
|
const {title = "", desc = "", children = null, ...rest} = props;
|
||||||
const { title = '', desc = '', children = null, ...rest } = props;
|
|
||||||
|
return (
|
||||||
return (
|
<Grid {...rest}>
|
||||||
<Grid { ...rest }>
|
<Column justifyContent="start" center size={6} overflow="hidden">
|
||||||
<Column justifyContent="start" center size={ 6 } overflow="hidden">
|
<div className="empty-furniimage" />
|
||||||
<div className="empty-furniimage" />
|
</Column>
|
||||||
</Column>
|
<Column justifyContent="center" size={6} overflow="hidden">
|
||||||
<Column justifyContent="center" size={ 6 } overflow="hidden">
|
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
<Text fontSize={6} overflow="unset" truncate>
|
||||||
<Text fontSize={ 6 } overflow="unset" truncate>{ title }</Text>
|
{title}
|
||||||
<Text overflow="auto" fontSize={ 6 }> { desc }</Text>
|
</Text>
|
||||||
</div>
|
<Text overflow="auto" fontSize={6}>
|
||||||
<div className="empty-image" />
|
{" "}
|
||||||
</Column>
|
{desc}
|
||||||
{ children }
|
</Text>
|
||||||
</Grid>
|
</div>
|
||||||
);
|
<div className="empty-image" />
|
||||||
}
|
</Column>
|
||||||
|
{children}
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
|
@ -1,29 +1,33 @@
|
||||||
import { FC } from 'react';
|
import {FC} from "react";
|
||||||
import { Column, Grid, GridProps, Text } from '../../../common';
|
|
||||||
|
|
||||||
export interface InventoryCategoryEmptyViewPetsProps extends GridProps
|
import {Column, Grid, GridProps, Text} from "../../../common";
|
||||||
{
|
|
||||||
title: string;
|
export interface InventoryCategoryEmptyViewPetsProps extends GridProps {
|
||||||
desc: string;
|
title: string;
|
||||||
|
desc: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const InventoryCategoryEmptyViewPets: FC<InventoryCategoryEmptyViewPetsProps> = props =>
|
export const InventoryCategoryEmptyViewPets: FC<InventoryCategoryEmptyViewPetsProps> = props => {
|
||||||
{
|
const {title = "", desc = "", children = null, ...rest} = props;
|
||||||
const { title = '', desc = '', children = null, ...rest } = props;
|
|
||||||
|
return (
|
||||||
return (
|
<Grid {...rest}>
|
||||||
<Grid { ...rest }>
|
<Column justifyContent="start" center size={6} overflow="hidden">
|
||||||
<Column justifyContent="start" center size={ 6 } overflow="hidden">
|
<div className="empty-petsimage" />
|
||||||
<div className="empty-petsimage" />
|
</Column>
|
||||||
</Column>
|
<Column justifyContent="center" size={6} overflow="hidden">
|
||||||
<Column justifyContent="center" size={ 6 } overflow="hidden">
|
<div className="bubble-inventory bubble-inventory-bottom-left">
|
||||||
<div className="bubble-inventory bubble-inventory-bottom-left">
|
<Text fontSize={6} overflow="unset" truncate>
|
||||||
<Text fontSize={ 6 } overflow="unset" truncate>{ title }</Text>
|
{title}
|
||||||
<Text overflow="auto" fontSize={ 6 }> { desc }</Text>
|
</Text>
|
||||||
</div>
|
<Text overflow="auto" fontSize={6}>
|
||||||
<div className="empty-image" />
|
{" "}
|
||||||
</Column>
|
{desc}
|
||||||
{ children }
|
</Text>
|
||||||
</Grid>
|
</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 {GetRoomEngine, LocalizeText, UnseenItemCategory, attemptBotPlacement} from "../../../../api";
|
||||||
import {AutoGrid, Button, Column, Grid, LayoutRoomPreviewerView, Text} from "../../../../common";
|
import {AutoGrid, Button, Column, Grid, LayoutRoomPreviewerView, Text} from "../../../../common";
|
||||||
import {useInventoryBots, useInventoryUnseenTracker} from "../../../../hooks";
|
import {useInventoryBots, useInventoryUnseenTracker} from "../../../../hooks";
|
||||||
import { InventoryCategoryEmptyViewBots } from '../InventoryCategoryEmptyViewBots';
|
import {InventoryCategoryEmptyViewBots} from "../InventoryCategoryEmptyViewBots";
|
||||||
import {InventoryBotItemView} from "./InventoryBotItemView";
|
import {InventoryBotItemView} from "./InventoryBotItemView";
|
||||||
|
|
||||||
interface InventoryBotViewProps {
|
interface InventoryBotViewProps {
|
||||||
|
@ -59,7 +59,8 @@ export const InventoryBotView: FC<InventoryBotViewProps> = props => {
|
||||||
return () => setIsVisible(false);
|
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 (
|
return (
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|
|
@ -92,7 +92,7 @@ export const InventoryFurnitureView: FC<InventoryFurnitureViewProps> = props =>
|
||||||
resetItems(
|
resetItems(
|
||||||
UnseenItemCategory.FURNI,
|
UnseenItemCategory.FURNI,
|
||||||
selectedItem.items.map(item => item.id)
|
selectedItem.items.map(item => item.id)
|
||||||
)
|
);
|
||||||
|
|
||||||
selectedItem.hasUnseenItems = false;
|
selectedItem.hasUnseenItems = false;
|
||||||
}, [selectedItem, resetItems]);
|
}, [selectedItem, resetItems]);
|
||||||
|
@ -109,45 +109,55 @@ export const InventoryFurnitureView: FC<InventoryFurnitureViewProps> = props =>
|
||||||
setIsVisible(true);
|
setIsVisible(true);
|
||||||
|
|
||||||
return () => setIsVisible(false);
|
return () => setIsVisible(false);
|
||||||
}, [])
|
}, []);
|
||||||
|
|
||||||
if (!groupItems || !groupItems.length)
|
if (!groupItems || !groupItems.length)
|
||||||
return <InventoryCategoryEmptyView title={LocalizeText("inventory.empty.title")} desc={LocalizeText("inventory.empty.desc")} />;
|
return <InventoryCategoryEmptyView title={LocalizeText("inventory.empty.title")} desc={LocalizeText("inventory.empty.desc")} />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid>
|
<Grid>
|
||||||
<Column size={ 7 } overflow="hidden">
|
<Column size={7} overflow="hidden">
|
||||||
<InventoryFurnitureSearchView groupItems={ groupItems } setGroupItems={ setFilteredGroupItems } />
|
<InventoryFurnitureSearchView groupItems={groupItems} setGroupItems={setFilteredGroupItems} />
|
||||||
<AutoGrid columnCount={ 5 }>
|
<AutoGrid columnCount={5}>
|
||||||
{ filteredGroupItems && (filteredGroupItems.length > 0) && filteredGroupItems.map((item, index) => <InventoryFurnitureItemView key={ index } groupItem={ item } />) }
|
{filteredGroupItems &&
|
||||||
</AutoGrid>
|
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>
|
||||||
<Column size={ 5 } overflow="auto">
|
<Column gap={1}>
|
||||||
<Column overflow="hidden" position="relative">
|
{!!roomSession && (
|
||||||
<LayoutRoomPreviewerView roomPreviewer={ roomPreviewer } height={ 140 } />
|
<Button variant="success" onClick={event => attemptItemPlacement(selectedItem)}>
|
||||||
{ selectedItem && selectedItem.stuffData.isUnique &&
|
{LocalizeText("inventory.furni.placetoroom")}
|
||||||
<LayoutLimitedEditionCompactPlateView className="top-2 end-2" position="absolute" uniqueNumber={ selectedItem.stuffData.uniqueNumber } uniqueSeries={ selectedItem.stuffData.uniqueSeries } /> }
|
</Button>
|
||||||
{ (selectedItem && selectedItem.stuffData.rarityLevel > -1) &&
|
)}
|
||||||
<LayoutRarityLevelView className="top-2 end-2" position="absolute" level={ selectedItem.stuffData.rarityLevel } /> }
|
{selectedItem && selectedItem.isSellable && (
|
||||||
</Column>
|
<Button onClick={event => attemptPlaceMarketplaceOffer(selectedItem)}>{LocalizeText("inventory.marketplace.sell")}</Button>
|
||||||
{ 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>
|
</Column>
|
||||||
</Grid>
|
</Column>
|
||||||
);
|
)}
|
||||||
}
|
</Column>
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {FC, useEffect, useState} from "react";
|
||||||
import {GetRoomEngine, LocalizeText, UnseenItemCategory, attemptPetPlacement} from "../../../../api";
|
import {GetRoomEngine, LocalizeText, UnseenItemCategory, attemptPetPlacement} from "../../../../api";
|
||||||
import {AutoGrid, Button, Column, Grid, LayoutRoomPreviewerView, Text} from "../../../../common";
|
import {AutoGrid, Button, Column, Grid, LayoutRoomPreviewerView, Text} from "../../../../common";
|
||||||
import {useInventoryPets, useInventoryUnseenTracker} from "../../../../hooks";
|
import {useInventoryPets, useInventoryUnseenTracker} from "../../../../hooks";
|
||||||
import { InventoryCategoryEmptyViewPets } from '../InventoryCategoryEmptyViewPets';
|
import {InventoryCategoryEmptyViewPets} from "../InventoryCategoryEmptyViewPets";
|
||||||
import {InventoryPetItemView} from "./InventoryPetItemView";
|
import {InventoryPetItemView} from "./InventoryPetItemView";
|
||||||
|
|
||||||
interface InventoryPetViewProps {
|
interface InventoryPetViewProps {
|
||||||
|
@ -58,7 +58,8 @@ export const InventoryPetView: FC<InventoryPetViewProps> = props => {
|
||||||
return () => setIsVisible(false);
|
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 (
|
return (
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|
|
@ -37,7 +37,8 @@ export const NavigatorSearchSavesResultItemView: FC<NavigatorSearchSavesResultIt
|
||||||
pointer
|
pointer
|
||||||
variant="black"
|
variant="black"
|
||||||
title={LocalizeText("navigator.tooltip.open.saved.search")}
|
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 !== ""
|
{search.filter !== ""
|
||||||
? LocalizeText("navigator.searchcode.title.query") + ": " + (!search.filter.split(":")[1] ? search.filter : search.filter.split(":")[1])
|
? LocalizeText("navigator.searchcode.title.query") + ": " + (!search.filter.split(":")[1] ? search.filter : search.filter.split(":")[1])
|
||||||
: LocalizeText(`${search.code}`)}
|
: LocalizeText(`${search.code}`)}
|
||||||
|
|
|
@ -178,12 +178,7 @@ export const UserSettingsView: FC<{}> = props => {
|
||||||
<Text>{LocalizeText("memenu.settings.other.skip.purchase.confirmation")}</Text>
|
<Text>{LocalizeText("memenu.settings.other.skip.purchase.confirmation")}</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex alignItems="center" gap={1}>
|
<Flex alignItems="center" gap={1}>
|
||||||
<input
|
<input className="form-check-input" type="checkbox" checked={uiFPSCounter} onChange={event => setUiFPSCounter(event.target.checked)} />
|
||||||
className="form-check-input"
|
|
||||||
type="checkbox"
|
|
||||||
checked={uiFPSCounter}
|
|
||||||
onChange={event => setUiFPSCounter(event.target.checked)}
|
|
||||||
/>
|
|
||||||
<Text>{LocalizeText("memenu.settings.other.ui.show.fpscounter")}</Text>
|
<Text>{LocalizeText("memenu.settings.other.ui.show.fpscounter")}</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Column>
|
</Column>
|
||||||
|
|
|
@ -20,5 +20,5 @@
|
||||||
"noInterop": true
|
"noInterop": true
|
||||||
},
|
},
|
||||||
"sourceMaps": 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": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@nrwl/js:swc",
|
"executor": "@nrwl/js:swc",
|
||||||
"outputs": [
|
"outputs": ["{options.outputPath}"],
|
||||||
"{options.outputPath}"
|
|
||||||
],
|
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/libs/renderer",
|
"outputPath": "dist/libs/renderer",
|
||||||
"main": "libs/renderer/src/index.ts",
|
"main": "libs/renderer/src/index.ts",
|
||||||
"tsConfig": "libs/renderer/tsconfig.lib.json",
|
"tsConfig": "libs/renderer/tsconfig.lib.json",
|
||||||
"assets": [
|
"assets": ["libs/renderer/*.md"]
|
||||||
"libs/renderer/*.md"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nrwl/linter:eslint",
|
||||||
"outputs": [
|
"outputs": ["{options.outputFile}"],
|
||||||
"{options.outputFile}"
|
|
||||||
],
|
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": ["libs/renderer/**/*.ts"]
|
||||||
"libs/renderer/**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue