diff --git a/public/ui-config.json.example b/public/ui-config.json.example index 3410db79..61210521 100644 --- a/public/ui-config.json.example +++ b/public/ui-config.json.example @@ -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": { diff --git a/src/App.scss b/src/App.scss index ec47b77c..791873ef 100644 --- a/src/App.scss +++ b/src/App.scss @@ -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; diff --git a/src/components/camera/views/checkout/CameraWidgetCheckoutView.tsx b/src/components/camera/views/checkout/CameraWidgetCheckoutView.tsx index bbde7e98..fd460c9c 100644 --- a/src/components/camera/views/checkout/CameraWidgetCheckoutView.tsx +++ b/src/components/camera/views/checkout/CameraWidgetCheckoutView.tsx @@ -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 = props const [ isWaiting, setIsWaiting ] = useState(false); const [ publishCooldown, setPublishCooldown ] = useState(0); + const publishDisabled = useMemo(() => GetConfiguration('camera.publish.disabled', false), []); + const onCameraPurchaseOKMessageEvent = useCallback((event: CameraPurchaseOKMessageEvent) => { BatchUpdates(() => @@ -105,7 +107,7 @@ export const CameraWidgetCheckoutView: FC = props } - + { LocalizeText('camera.purchase.header') } @@ -133,6 +135,7 @@ export const CameraWidgetCheckoutView: FC = props + { !publishDisabled && @@ -158,7 +161,7 @@ export const CameraWidgetCheckoutView: FC = props { LocalizeText('camera.publish.button.text') } } - + } { LocalizeText('camera.warning.disclaimer') }