diff --git a/src/App.scss b/src/App.scss index 1699a227..05cc0cc0 100644 --- a/src/App.scss +++ b/src/App.scss @@ -78,6 +78,9 @@ $nitro-group-manager-height: 355px; $nitro-chooser-width: 200px; $nitro-chooser-height: 200px; +$nitro-doorbell-width: 300px; +$nitro-doorbell-height: 200px; + $nitro-guide-tool-width: 250px; .nitro-app { diff --git a/src/components/navigator/views/room-doorbell/NavigatorRoomDoorbellView.tsx b/src/components/navigator/views/room-doorbell/NavigatorRoomDoorbellView.tsx index b4a9e0e4..ec203034 100644 --- a/src/components/navigator/views/room-doorbell/NavigatorRoomDoorbellView.tsx +++ b/src/components/navigator/views/room-doorbell/NavigatorRoomDoorbellView.tsx @@ -48,13 +48,15 @@ export const NavigatorRoomDoorbellView: FC = pro { (state === UpdateDoorStateEvent.STATE_NO_ANSWER) && { LocalizeText('navigator.doorbell.no.answer') } } - { (state === UpdateDoorStateEvent.START_DOORBELL) && - } - + + { (state === UpdateDoorStateEvent.START_DOORBELL) && + } + + ); diff --git a/src/views/room/widgets/RoomWidgets.scss b/src/views/room/widgets/RoomWidgets.scss index 03b34a57..5ed221cc 100644 --- a/src/views/room/widgets/RoomWidgets.scss +++ b/src/views/room/widgets/RoomWidgets.scss @@ -94,6 +94,11 @@ width: 22px; } +.nitro-widget-doorbell { + width: $nitro-doorbell-width; + height: $nitro-doorbell-height; +} + @import './avatar-info/AvatarInfoWidgetView'; @import './chat/ChatWidgetView'; @import './chat-input/ChatInputView'; diff --git a/src/views/room/widgets/doorbell/DoorbellWidgetItemView.tsx b/src/views/room/widgets/doorbell/DoorbellWidgetItemView.tsx deleted file mode 100644 index 810cae5d..00000000 --- a/src/views/room/widgets/doorbell/DoorbellWidgetItemView.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { FC } from 'react'; -import { Button, ButtonGroup, Flex, Text } from '../../../../common'; - -interface DoorbellWidgetItemViewProps -{ - userName: string; - accept: () => void; - deny: () => void; -} - -export const DoorbellWidgetItemView: FC = props => -{ - const { userName = '', accept = null, deny = null } = props; - - return ( - - { userName } - - - - - - ); -} diff --git a/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx b/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx index a42ed47c..bebc1da6 100644 --- a/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx +++ b/src/views/room/widgets/doorbell/DoorbellWidgetView.tsx @@ -1,10 +1,9 @@ import { FC, useCallback, useState } from 'react'; import { LocalizeText, RoomWidgetDoorbellEvent, RoomWidgetLetUserInMessage } from '../../../../api'; -import { Column } from '../../../../common'; +import { Base, Button, Column, Flex, Grid } from '../../../../common'; import { BatchUpdates, CreateEventDispatcherHook } from '../../../../hooks'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; import { useRoomContext } from '../../context/RoomContext'; -import { DoorbellWidgetItemView } from './DoorbellWidgetItemView'; export const DoorbellWidgetView: FC<{}> = props => { @@ -68,9 +67,32 @@ export const DoorbellWidgetView: FC<{}> = props => return ( setIsVisible(false) } /> - - - { users && (users.length > 0) && users.map(userName => answer(userName, true) } deny={ () => answer(userName, false) } />) } + + + + Username + + + + + { users && (users.length > 0) && users.map(userName => + { + return ( + + { userName } + + + + + + + + ); + }) }