mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
More updates
This commit is contained in:
parent
26c047b295
commit
f67943f364
@ -11,6 +11,7 @@
|
||||
"chat.viewer.height.percentage": 0.40,
|
||||
"widget.dimmer.colorwheel": false,
|
||||
"avatar.wardrobe.max.slots": 10,
|
||||
"user.badges.max.slots": 5,
|
||||
"hotelview": {
|
||||
"widgets": {
|
||||
"slot.1.widget": "promoarticle",
|
||||
|
@ -32,7 +32,7 @@ $inventory-height: 320px;
|
||||
$navigator-width: 400px;
|
||||
$navigator-height: 420px;
|
||||
|
||||
$chat-input-style-selector-widget-width: 200px;
|
||||
$chat-input-style-selector-widget-width: 210px;
|
||||
$chat-input-style-selector-widget-height: 200px;
|
||||
|
||||
$user-profile-width: 560px;
|
||||
|
@ -114,3 +114,7 @@ ul {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
@ -1,8 +1,4 @@
|
||||
.nitro-chat-history {
|
||||
width: $chat-history-width;
|
||||
height: $chat-history-height;
|
||||
|
||||
.content-area {
|
||||
min-height: 200px;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { RequestBadgesComposer } from '@nitrots/nitro-renderer';
|
||||
import { FC, useEffect } from 'react';
|
||||
import { LocalizeBadgeName, LocalizeText } from '../../../../api';
|
||||
import { GetConfiguration, LocalizeBadgeName, LocalizeText } from '../../../../api';
|
||||
import { AutoGrid } from '../../../../common/AutoGrid';
|
||||
import { Button } from '../../../../common/Button';
|
||||
import { Column } from '../../../../common/Column';
|
||||
@ -22,9 +22,10 @@ export const InventoryBadgeView: FC<InventoryBadgeViewProps> = props =>
|
||||
const { badgeState = null, dispatchBadgeState = null } = useInventoryContext();
|
||||
const { needsBadgeUpdate = false, badge = null, badges = [], activeBadges = [] } = badgeState;
|
||||
|
||||
const isWearingBadge = (badgeCode: string) => (activeBadges.indexOf(badgeCode) >= 0);
|
||||
const maxBadgeCount = GetConfiguration<number>('user.badges.max.slots', 5);
|
||||
|
||||
const canWearBadges = () => (activeBadges.length < 5);
|
||||
const isWearingBadge = (badgeCode: string) => (activeBadges.indexOf(badgeCode) >= 0);
|
||||
const canWearBadges = () => (activeBadges.length < maxBadgeCount);
|
||||
|
||||
const toggleBadge = () =>
|
||||
{
|
||||
|
@ -4,8 +4,8 @@ import { useNitroCardContext } from '../context';
|
||||
|
||||
export const NitroCardContentView: FC<ColumnProps> = props =>
|
||||
{
|
||||
const { classNames = [], ...rest } = props;
|
||||
const { theme = 'primary', simple = false } = useNitroCardContext();
|
||||
const { overflow = 'auto', classNames = [], ...rest } = props;
|
||||
const { simple = false } = useNitroCardContext();
|
||||
|
||||
const getClassNames = useMemo(() =>
|
||||
{
|
||||
@ -18,5 +18,5 @@ export const NitroCardContentView: FC<ColumnProps> = props =>
|
||||
return newClassNames;
|
||||
}, [ simple, classNames ]);
|
||||
|
||||
return <Column classNames={ getClassNames } overflow="auto" { ...rest } />;
|
||||
return <Column classNames={ getClassNames } overflow={ overflow } { ...rest } />;
|
||||
}
|
||||
|
@ -2,7 +2,15 @@ import { FC, useCallback } from 'react';
|
||||
import { GetRoomEngine, GetSessionDataManager } from '../../../../api';
|
||||
import { NitroLayoutFlexColumn } from '../../../../layout';
|
||||
import { CalendarItemState } from '../../common/CalendarItemState';
|
||||
import { CalendarItemViewProps } from './CalendarItemView.types';
|
||||
|
||||
interface CalendarItemViewProps
|
||||
{
|
||||
id: number;
|
||||
productName?: string;
|
||||
state: number;
|
||||
active?: boolean;
|
||||
onClick(itemId: number): void;
|
||||
}
|
||||
|
||||
export const CalendarItemView: FC<CalendarItemViewProps> = props =>
|
||||
{
|
||||
|
@ -1,8 +0,0 @@
|
||||
export interface CalendarItemViewProps
|
||||
{
|
||||
id: number;
|
||||
productName?: string;
|
||||
state: number;
|
||||
active?: boolean;
|
||||
onClick(itemId: number): void;
|
||||
}
|
@ -4,7 +4,18 @@ import { NitroCardContentView, NitroCardHeaderView, NitroCardView, NitroLayoutFl
|
||||
import { CalendarItemState } from '../../common/CalendarItemState';
|
||||
import { getNumItemsDisplayed } from '../../common/Utils';
|
||||
import { CalendarItemView } from '../calendar-item/CalendarItemView';
|
||||
import { CalendarViewProps } from './CalendarView.types';
|
||||
|
||||
interface CalendarViewProps
|
||||
{
|
||||
close(): void;
|
||||
openPackage(id: number, asStaff: boolean): void;
|
||||
receivedProducts: Map<number, string>;
|
||||
campaignName: string;
|
||||
currentDay: number;
|
||||
numDays: number;
|
||||
openedDays: number[];
|
||||
missedDays: number[];
|
||||
}
|
||||
|
||||
export const CalendarView: FC<CalendarViewProps> = props =>
|
||||
{
|
||||
|
@ -1,11 +0,0 @@
|
||||
export interface CalendarViewProps
|
||||
{
|
||||
close(): void;
|
||||
openPackage(id: number, asStaff: boolean): void;
|
||||
receivedProducts: Map<number, string>;
|
||||
campaignName: string;
|
||||
currentDay: number;
|
||||
numDays: number;
|
||||
openedDays: number[];
|
||||
missedDays: number[];
|
||||
}
|
@ -6,9 +6,9 @@ import { TryJoinGroup } from '../../../../../api/groups/TryJoinGroup';
|
||||
import { BatchUpdates, CreateMessageHook } from '../../../../../hooks';
|
||||
import { useRoomEngineEvent } from '../../../../../hooks/events';
|
||||
import { useRoomContext } from '../../../context/RoomContext';
|
||||
import { ContextMenuHeaderView } from '../../context-menu/ContextMenuHeaderView';
|
||||
import { ContextMenuListItemView } from '../../context-menu/ContextMenuListItemView';
|
||||
import { ContextMenuView } from '../../context-menu/ContextMenuView';
|
||||
import { ContextMenuHeaderView } from '../../context-menu/views/header/ContextMenuHeaderView';
|
||||
import { ContextMenuListItemView } from '../../context-menu/views/list-item/ContextMenuListItemView';
|
||||
import { EffectBoxConfirmView } from './EffectBoxConfirmView';
|
||||
import { MonsterPlantSeedConfirmView } from './MonsterPlantSeedConfirmView';
|
||||
import { PurchasableClothingConfirmView } from './PurchasableClothingConfirmView';
|
||||
|
@ -14,12 +14,12 @@ export const RoomToolsWidgetView: FC<{}> = props =>
|
||||
{
|
||||
const [ isZoomedIn, setIsZoomedIn ] = useState(false);
|
||||
const [ isLiked, setIsLiked ] = useState(false);
|
||||
const { widgetHandler = null } = useRoomContext();
|
||||
const [ roomName, setRoomName ] = useState(null);
|
||||
const [ roomOwner, setRoomOwner ] = useState(null);
|
||||
const [ roomTags, setRoomTags ] = useState(null);
|
||||
const [ roomInfoDisplay, setRoomInfoDisplay ] = useState(false);
|
||||
const [ isOpen, setIsOpen ] = useState(false);
|
||||
const { widgetHandler = null } = useRoomContext();
|
||||
|
||||
const handleToolClick = (action: string) =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user