mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Merge branch 'dev' of https://git.krews.org/nitro/nitro-react into dev
This commit is contained in:
commit
de92fc97a9
@ -11,6 +11,7 @@
|
||||
"widget.dimmer.colorwheel": false,
|
||||
"avatar.wardrobe.max.slots": 10,
|
||||
"user.badges.max.slots": 5,
|
||||
"camera.publish.disabled": false,
|
||||
"hc.disabled": false,
|
||||
"hotelview": {
|
||||
"widgets": {
|
||||
|
@ -30,7 +30,7 @@ $catalog-height: 400px;
|
||||
$inventory-width: 528px;
|
||||
$inventory-height: 320px;
|
||||
|
||||
$navigator-width: 400px;
|
||||
$navigator-width: 430px;
|
||||
$navigator-height: 420px;
|
||||
|
||||
$chat-input-style-selector-widget-width: 210px;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, CameraStorageUrlMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useEffect, useState } from 'react';
|
||||
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { GetConfiguration, GetRoomEngine, LocalizeText, SendMessageComposer } from '../../../../api';
|
||||
import { Button, Column, Flex, LayoutCurrencyIcon, LayoutImage, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common';
|
||||
import { InventoryEvent } from '../../../../events';
|
||||
@ -23,6 +23,8 @@ export const CameraWidgetCheckoutView: FC<CameraWidgetCheckoutViewProps> = props
|
||||
const [ isWaiting, setIsWaiting ] = useState(false);
|
||||
const [ publishCooldown, setPublishCooldown ] = useState(0);
|
||||
|
||||
const publishDisabled = useMemo(() => GetConfiguration<boolean>('camera.publish.disabled', false), []);
|
||||
|
||||
const onCameraPurchaseOKMessageEvent = useCallback((event: CameraPurchaseOKMessageEvent) =>
|
||||
{
|
||||
BatchUpdates(() =>
|
||||
@ -105,7 +107,7 @@ export const CameraWidgetCheckoutView: FC<CameraWidgetCheckoutViewProps> = props
|
||||
</Flex> }
|
||||
</Flex>
|
||||
<Flex justifyContent="between" alignItems="center" className="bg-muted rounded p-2">
|
||||
<Column gap={ 1 }>
|
||||
<Column size={ publishDisabled ? 10 : 6 } gap={ 1 }>
|
||||
<Text bold>
|
||||
{ LocalizeText('camera.purchase.header') }
|
||||
</Text>
|
||||
@ -133,6 +135,7 @@ export const CameraWidgetCheckoutView: FC<CameraWidgetCheckoutViewProps> = props
|
||||
<Button variant="success" disabled={ isWaiting } onClick={ event => processAction('buy') }>{ LocalizeText(!picturesBought ? 'buy' : 'camera.buy.another.button.text') }</Button>
|
||||
</Flex>
|
||||
</Flex>
|
||||
{ !publishDisabled &&
|
||||
<Flex justifyContent="between" alignItems="center" className="bg-muted rounded p-2">
|
||||
<Column gap={ 1 }>
|
||||
<Text bold>
|
||||
@ -158,7 +161,7 @@ export const CameraWidgetCheckoutView: FC<CameraWidgetCheckoutViewProps> = props
|
||||
{ LocalizeText('camera.publish.button.text') }
|
||||
</Button>
|
||||
</Flex> }
|
||||
</Flex>
|
||||
</Flex> }
|
||||
<Text center>{ LocalizeText('camera.warning.disclaimer') }</Text>
|
||||
<Flex justifyContent="end">
|
||||
<Button onClick={ event => processAction('cancel') }>{ LocalizeText('generic.cancel') }</Button>
|
||||
|
Loading…
Reference in New Issue
Block a user