diff --git a/src/events/notification-center/NotificationCenterAddNotificationEvent.ts b/src/events/notification-center/NotificationCenterAddNotificationEvent.ts index 5ee1469c..200fda47 100644 --- a/src/events/notification-center/NotificationCenterAddNotificationEvent.ts +++ b/src/events/notification-center/NotificationCenterAddNotificationEvent.ts @@ -1,4 +1,4 @@ -import { NitroNotification } from '../../views/notification-center/utils/Notification'; +import { NitroNotification } from '../../views/notification-center/common/Notification'; import { NotificationCenterEvent } from './NotificationCenterEvent'; export class NotificationCenterAddNotificationEvent extends NotificationCenterEvent diff --git a/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx b/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx index d927791d..7282afbf 100644 --- a/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx +++ b/src/views/navigator/views/room-info/NavigatorRoomInfoView.tsx @@ -26,12 +26,19 @@ export const NavigatorRoomInfoView: FC = props => useEffect(() => { if(!roomInfoData || !roomInfoData.enteredGuestRoom) return; + + let thumbnailUrl: string = null; if(roomInfoData.enteredGuestRoom.officialRoomPicRef) { - setRoomThumbnail(GetConfiguration('image.library.url') + roomInfoData.enteredGuestRoom.officialRoomPicRef); + thumbnailUrl = (GetConfiguration('image.library.url') + roomInfoData.enteredGuestRoom.officialRoomPicRef); + } + else + { + thumbnailUrl = (GetConfiguration('thumbnails.url').replace('%thumbnail%', roomInfoData.enteredGuestRoom.roomId.toString())); } + setRoomThumbnail(thumbnailUrl); setIsRoomPicked(roomInfoData.enteredGuestRoom.roomPicker); setIsRoomMuted(roomInfoData.enteredGuestRoom.allInRoomMuted); }, [ roomInfoData ]); diff --git a/src/views/notification-center/NotificationCenterMessageHandler.tsx b/src/views/notification-center/NotificationCenterMessageHandler.tsx index b6a845c2..69e2cab7 100644 --- a/src/views/notification-center/NotificationCenterMessageHandler.tsx +++ b/src/views/notification-center/NotificationCenterMessageHandler.tsx @@ -3,11 +3,11 @@ import { FC, useCallback } from 'react'; import { NotificationCenterAlertEvent } from '../../events'; import { dispatchUiEvent } from '../../hooks/events'; import { CreateMessageHook } from '../../hooks/messages'; +import { DialogMessageNotification } from './common/DialogMessageNotification'; +import { HotelWillShutdownNotification } from './common/HotelWillShutdownNotification'; import { useNotificationCenterContext } from './context/NotificationCenterContext'; import { INotificationCenterMessageHandlerProps } from './NotificationCenterMessageHandler.types'; import { NotificationCenterActions } from './reducers/NotificationCenterReducer'; -import { DialogMessageNotification } from './utils/DialogMessageNotification'; -import { HotelWillShutdownNotification } from './utils/HotelWillShutdownNotification'; export const NotificationCenterMessageHandler: FC = props => { @@ -50,6 +50,8 @@ export const NotificationCenterMessageHandler: FC = props => { const [ alerts, setAlerts ] = useState([]); + + const onNotificationCenterAlertEvent = useCallback((event: NotificationCenterAlertEvent) => { setAlerts(prevValue => diff --git a/src/views/notification-center/utils/BroadcastMessageNotification.ts b/src/views/notification-center/common/BroadcastMessageNotification.ts similarity index 100% rename from src/views/notification-center/utils/BroadcastMessageNotification.ts rename to src/views/notification-center/common/BroadcastMessageNotification.ts diff --git a/src/views/notification-center/utils/DialogMessageNotification.ts b/src/views/notification-center/common/DialogMessageNotification.ts similarity index 100% rename from src/views/notification-center/utils/DialogMessageNotification.ts rename to src/views/notification-center/common/DialogMessageNotification.ts diff --git a/src/views/notification-center/utils/HotelWillShutdownNotification.ts b/src/views/notification-center/common/HotelWillShutdownNotification.ts similarity index 100% rename from src/views/notification-center/utils/HotelWillShutdownNotification.ts rename to src/views/notification-center/common/HotelWillShutdownNotification.ts diff --git a/src/views/notification-center/utils/MOTDNotification.ts b/src/views/notification-center/common/MOTDNotification.ts similarity index 100% rename from src/views/notification-center/utils/MOTDNotification.ts rename to src/views/notification-center/common/MOTDNotification.ts diff --git a/src/views/notification-center/utils/ModeratorMessageNotification.ts b/src/views/notification-center/common/ModeratorMessageNotification.ts similarity index 100% rename from src/views/notification-center/utils/ModeratorMessageNotification.ts rename to src/views/notification-center/common/ModeratorMessageNotification.ts diff --git a/src/views/notification-center/utils/Notification.ts b/src/views/notification-center/common/Notification.ts similarity index 100% rename from src/views/notification-center/utils/Notification.ts rename to src/views/notification-center/common/Notification.ts diff --git a/src/views/notification-center/reducers/NotificationCenterReducer.tsx b/src/views/notification-center/reducers/NotificationCenterReducer.tsx index 00c1e4fe..6962ccd5 100644 --- a/src/views/notification-center/reducers/NotificationCenterReducer.tsx +++ b/src/views/notification-center/reducers/NotificationCenterReducer.tsx @@ -1,5 +1,5 @@ import { Reducer } from 'react'; -import { NitroNotification } from '../utils/Notification'; +import { NitroNotification } from '../common/Notification'; export interface INotificationCenterState { @@ -23,7 +23,7 @@ export class NotificationCenterActions } export const initialNotificationCenter: INotificationCenterState = { - notifications: null + notifications: [] } export const NotificationCenterReducer: Reducer = (state, action) => @@ -35,9 +35,9 @@ export const NotificationCenterReducer: Reducer = props => { const { headerText = LocalizeText('mod.alert.title'), onClose = null, children = null } = props; diff --git a/src/views/notification-center/views/hotel-will-shutdown/HotelWillShutdownView.types.ts b/src/views/notification-center/views/hotel-will-shutdown/HotelWillShutdownView.types.ts index 44ef5415..89915153 100644 --- a/src/views/notification-center/views/hotel-will-shutdown/HotelWillShutdownView.types.ts +++ b/src/views/notification-center/views/hotel-will-shutdown/HotelWillShutdownView.types.ts @@ -1,5 +1,5 @@ +import { HotelWillShutdownNotification } from '../../common/HotelWillShutdownNotification'; import { NotificationViewProps } from '../../NotificationCenterView.types'; -import { HotelWillShutdownNotification } from './../../utils/HotelWillShutdownNotification'; export class HotelWillShutdownViewProps extends NotificationViewProps { diff --git a/src/views/notification-center/views/moderator-message/ModeratorMessageView.types.ts b/src/views/notification-center/views/moderator-message/ModeratorMessageView.types.ts index 94ee3789..2e7c63de 100644 --- a/src/views/notification-center/views/moderator-message/ModeratorMessageView.types.ts +++ b/src/views/notification-center/views/moderator-message/ModeratorMessageView.types.ts @@ -1,5 +1,5 @@ +import { ModeratorMessageNotification } from '../../common/ModeratorMessageNotification'; import { NotificationViewProps } from '../../NotificationCenterView.types'; -import { ModeratorMessageNotification } from './../../utils/ModeratorMessageNotification'; export class ModeratorMessageViewProps extends NotificationViewProps { diff --git a/src/views/notification-center/views/notification-bubble/NotificationBubbleView.tsx b/src/views/notification-center/views/notification-bubble/NotificationBubbleView.tsx new file mode 100644 index 00000000..1803bae9 --- /dev/null +++ b/src/views/notification-center/views/notification-bubble/NotificationBubbleView.tsx @@ -0,0 +1,7 @@ +import { FC } from 'react'; +import { NotificationBubbleViewProps } from './NotificationBubbleView.types'; + +export const NotificationBubbleView: FC = props => +{ + return null; +} diff --git a/src/views/notification-center/views/notification-bubble/NotificationBubbleView.types.ts b/src/views/notification-center/views/notification-bubble/NotificationBubbleView.types.ts new file mode 100644 index 00000000..f46fd92a --- /dev/null +++ b/src/views/notification-center/views/notification-bubble/NotificationBubbleView.types.ts @@ -0,0 +1,4 @@ +export interface NotificationBubbleViewProps +{ + +}