More updates

This commit is contained in:
Bill 2022-03-01 04:12:27 -05:00
parent 26c047b295
commit f67943f364
12 changed files with 37 additions and 35 deletions

View File

@ -11,6 +11,7 @@
"chat.viewer.height.percentage": 0.40, "chat.viewer.height.percentage": 0.40,
"widget.dimmer.colorwheel": false, "widget.dimmer.colorwheel": false,
"avatar.wardrobe.max.slots": 10, "avatar.wardrobe.max.slots": 10,
"user.badges.max.slots": 5,
"hotelview": { "hotelview": {
"widgets": { "widgets": {
"slot.1.widget": "promoarticle", "slot.1.widget": "promoarticle",

View File

@ -32,7 +32,7 @@ $inventory-height: 320px;
$navigator-width: 400px; $navigator-width: 400px;
$navigator-height: 420px; $navigator-height: 420px;
$chat-input-style-selector-widget-width: 200px; $chat-input-style-selector-widget-width: 210px;
$chat-input-style-selector-widget-height: 200px; $chat-input-style-selector-widget-height: 200px;
$user-profile-width: 560px; $user-profile-width: 560px;

View File

@ -114,3 +114,7 @@ ul {
transform: scale(1); transform: scale(1);
} }
} }
.btn {
pointer-events: all;
}

View File

@ -1,8 +1,4 @@
.nitro-chat-history { .nitro-chat-history {
width: $chat-history-width; width: $chat-history-width;
height: $chat-history-height; height: $chat-history-height;
.content-area {
min-height: 200px;
}
} }

View File

@ -1,6 +1,6 @@
import { RequestBadgesComposer } from '@nitrots/nitro-renderer'; import { RequestBadgesComposer } from '@nitrots/nitro-renderer';
import { FC, useEffect } from 'react'; import { FC, useEffect } from 'react';
import { LocalizeBadgeName, LocalizeText } from '../../../../api'; import { GetConfiguration, LocalizeBadgeName, LocalizeText } from '../../../../api';
import { AutoGrid } from '../../../../common/AutoGrid'; import { AutoGrid } from '../../../../common/AutoGrid';
import { Button } from '../../../../common/Button'; import { Button } from '../../../../common/Button';
import { Column } from '../../../../common/Column'; import { Column } from '../../../../common/Column';
@ -22,9 +22,10 @@ export const InventoryBadgeView: FC<InventoryBadgeViewProps> = props =>
const { badgeState = null, dispatchBadgeState = null } = useInventoryContext(); const { badgeState = null, dispatchBadgeState = null } = useInventoryContext();
const { needsBadgeUpdate = false, badge = null, badges = [], activeBadges = [] } = badgeState; 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 = () => const toggleBadge = () =>
{ {

View File

@ -4,8 +4,8 @@ import { useNitroCardContext } from '../context';
export const NitroCardContentView: FC<ColumnProps> = props => export const NitroCardContentView: FC<ColumnProps> = props =>
{ {
const { classNames = [], ...rest } = props; const { overflow = 'auto', classNames = [], ...rest } = props;
const { theme = 'primary', simple = false } = useNitroCardContext(); const { simple = false } = useNitroCardContext();
const getClassNames = useMemo(() => const getClassNames = useMemo(() =>
{ {
@ -18,5 +18,5 @@ export const NitroCardContentView: FC<ColumnProps> = props =>
return newClassNames; return newClassNames;
}, [ simple, classNames ]); }, [ simple, classNames ]);
return <Column classNames={ getClassNames } overflow="auto" { ...rest } />; return <Column classNames={ getClassNames } overflow={ overflow } { ...rest } />;
} }

View File

@ -2,7 +2,15 @@ import { FC, useCallback } from 'react';
import { GetRoomEngine, GetSessionDataManager } from '../../../../api'; import { GetRoomEngine, GetSessionDataManager } from '../../../../api';
import { NitroLayoutFlexColumn } from '../../../../layout'; import { NitroLayoutFlexColumn } from '../../../../layout';
import { CalendarItemState } from '../../common/CalendarItemState'; 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 => export const CalendarItemView: FC<CalendarItemViewProps> = props =>
{ {

View File

@ -1,8 +0,0 @@
export interface CalendarItemViewProps
{
id: number;
productName?: string;
state: number;
active?: boolean;
onClick(itemId: number): void;
}

View File

@ -4,7 +4,18 @@ import { NitroCardContentView, NitroCardHeaderView, NitroCardView, NitroLayoutFl
import { CalendarItemState } from '../../common/CalendarItemState'; import { CalendarItemState } from '../../common/CalendarItemState';
import { getNumItemsDisplayed } from '../../common/Utils'; import { getNumItemsDisplayed } from '../../common/Utils';
import { CalendarItemView } from '../calendar-item/CalendarItemView'; 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 => export const CalendarView: FC<CalendarViewProps> = props =>
{ {

View File

@ -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[];
}

View File

@ -6,9 +6,9 @@ import { TryJoinGroup } from '../../../../../api/groups/TryJoinGroup';
import { BatchUpdates, CreateMessageHook } from '../../../../../hooks'; import { BatchUpdates, CreateMessageHook } from '../../../../../hooks';
import { useRoomEngineEvent } from '../../../../../hooks/events'; import { useRoomEngineEvent } from '../../../../../hooks/events';
import { useRoomContext } from '../../../context/RoomContext'; import { useRoomContext } from '../../../context/RoomContext';
import { ContextMenuHeaderView } from '../../context-menu/ContextMenuHeaderView';
import { ContextMenuListItemView } from '../../context-menu/ContextMenuListItemView';
import { ContextMenuView } from '../../context-menu/ContextMenuView'; 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 { EffectBoxConfirmView } from './EffectBoxConfirmView';
import { MonsterPlantSeedConfirmView } from './MonsterPlantSeedConfirmView'; import { MonsterPlantSeedConfirmView } from './MonsterPlantSeedConfirmView';
import { PurchasableClothingConfirmView } from './PurchasableClothingConfirmView'; import { PurchasableClothingConfirmView } from './PurchasableClothingConfirmView';

View File

@ -14,12 +14,12 @@ export const RoomToolsWidgetView: FC<{}> = props =>
{ {
const [ isZoomedIn, setIsZoomedIn ] = useState(false); const [ isZoomedIn, setIsZoomedIn ] = useState(false);
const [ isLiked, setIsLiked ] = useState(false); const [ isLiked, setIsLiked ] = useState(false);
const { widgetHandler = null } = useRoomContext();
const [ roomName, setRoomName ] = useState(null); const [ roomName, setRoomName ] = useState(null);
const [ roomOwner, setRoomOwner ] = useState(null); const [ roomOwner, setRoomOwner ] = useState(null);
const [ roomTags, setRoomTags ] = useState(null); const [ roomTags, setRoomTags ] = useState(null);
const [ roomInfoDisplay, setRoomInfoDisplay ] = useState(false); const [ roomInfoDisplay, setRoomInfoDisplay ] = useState(false);
const [ isOpen, setIsOpen ] = useState(false); const [ isOpen, setIsOpen ] = useState(false);
const { widgetHandler = null } = useRoomContext();
const handleToolClick = (action: string) => const handleToolClick = (action: string) =>
{ {