mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-31 10:22:36 +01:00
Init Chat widget
This commit is contained in:
parent
0ffb6b0d47
commit
e5d81b7a53
@ -6,6 +6,7 @@ import { WindowResizeEvent } from '../../api/nitro/room/DispatchResizeEvent';
|
|||||||
import { DispatchTouchEvent } from '../../api/nitro/room/DispatchTouchEvent';
|
import { DispatchTouchEvent } from '../../api/nitro/room/DispatchTouchEvent';
|
||||||
import { GetRoomEngine } from '../../api/nitro/room/GetRoomEngine';
|
import { GetRoomEngine } from '../../api/nitro/room/GetRoomEngine';
|
||||||
import { RoomViewProps } from './RoomView.types';
|
import { RoomViewProps } from './RoomView.types';
|
||||||
|
import { ChatWidgetsView } from './widgets/chat/ChatWidgetsView';
|
||||||
import { FurnitureWidgetsView } from './widgets/furniture/FurnitureWidgetsView';
|
import { FurnitureWidgetsView } from './widgets/furniture/FurnitureWidgetsView';
|
||||||
|
|
||||||
export function RoomView(props: RoomViewProps): JSX.Element
|
export function RoomView(props: RoomViewProps): JSX.Element
|
||||||
@ -85,7 +86,10 @@ export function RoomView(props: RoomViewProps): JSX.Element
|
|||||||
{ roomSession && <div id="room-view" className="nitro-room-container"></div> }
|
{ roomSession && <div id="room-view" className="nitro-room-container"></div> }
|
||||||
{ roomSession && events && roomCanvas &&
|
{ roomSession && events && roomCanvas &&
|
||||||
createPortal(props.children, document.getElementById('room-view').appendChild(roomCanvas)) &&
|
createPortal(props.children, document.getElementById('room-view').appendChild(roomCanvas)) &&
|
||||||
<FurnitureWidgetsView events={ events } /> }
|
<>
|
||||||
|
<FurnitureWidgetsView events={ events } />
|
||||||
|
<ChatWidgetsView />
|
||||||
|
</> }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1 +1,2 @@
|
|||||||
|
@import './chat/ChatWidgetsView';
|
||||||
@import './furniture/FurnitureWidgets';
|
@import './furniture/FurnitureWidgets';
|
||||||
|
1
src/views/room/widgets/chat/ChatWidgetsView.scss
Normal file
1
src/views/room/widgets/chat/ChatWidgetsView.scss
Normal file
@ -0,0 +1 @@
|
|||||||
|
@import './form/ChatFormWidgetView';
|
15
src/views/room/widgets/chat/ChatWidgetsView.tsx
Normal file
15
src/views/room/widgets/chat/ChatWidgetsView.tsx
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { ChatWidgetsViewProps } from './ChatWidgetsView.types';
|
||||||
|
import { ChatFormWidgetView } from './form/ChatFormWidgetView';
|
||||||
|
import { ChatMessagesWidgetView } from './messages/ChatMessagesWidgetView';
|
||||||
|
|
||||||
|
export function ChatWidgetsView(props: ChatWidgetsViewProps): JSX.Element
|
||||||
|
{
|
||||||
|
const {} = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ChatMessagesWidgetView />
|
||||||
|
<ChatFormWidgetView />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
3
src/views/room/widgets/chat/ChatWidgetsView.types.ts
Normal file
3
src/views/room/widgets/chat/ChatWidgetsView.types.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
export interface ChatWidgetsViewProps
|
||||||
|
{}
|
16
src/views/room/widgets/chat/form/ChatFormWidgetView.scss
Normal file
16
src/views/room/widgets/chat/form/ChatFormWidgetView.scss
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
.nitro-chat-form-input {
|
||||||
|
display: inline-grid;
|
||||||
|
vertical-align: top;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
padding:0 10px;
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: auto;
|
||||||
|
height: 45px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid rgb(0, 0, 0);
|
||||||
|
background: #EDEDED;
|
||||||
|
}
|
||||||
|
}
|
15
src/views/room/widgets/chat/form/ChatFormWidgetView.tsx
Normal file
15
src/views/room/widgets/chat/form/ChatFormWidgetView.tsx
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { LocalizeText } from '../../../../../utils/LocalizeText';
|
||||||
|
import { ChatFormWidgetViewProps } from './ChatFormWidgetView.types';
|
||||||
|
|
||||||
|
export function ChatFormWidgetView(props: ChatFormWidgetViewProps): JSX.Element
|
||||||
|
{
|
||||||
|
const {} = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="nitro-chat-form fixed-bottom mb-4 d-flex justify-content-center">
|
||||||
|
<div className="nitro-chat-form-input">
|
||||||
|
<input type="text" className="form-control" placeholder={ LocalizeText('widgets.chatinput.default') } />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
export interface ChatFormWidgetViewProps
|
||||||
|
{}
|
@ -0,0 +1,10 @@
|
|||||||
|
import { ChatMessagesWidgetViewProps } from './ChatMessagesWidgetView.types';
|
||||||
|
|
||||||
|
export function ChatMessagesWidgetView(props: ChatMessagesWidgetViewProps): JSX.Element
|
||||||
|
{
|
||||||
|
const {} = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<></>
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
export interface ChatMessagesWidgetViewProps
|
||||||
|
{}
|
@ -0,0 +1,10 @@
|
|||||||
|
import { ChatMessageWidgetViewProps } from './ChatMessageWidgetView.types';
|
||||||
|
|
||||||
|
export function ChatMessageWidgetView(props: ChatMessageWidgetViewProps): JSX.Element
|
||||||
|
{
|
||||||
|
const {} = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<></>
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
export interface ChatMessageWidgetViewProps
|
||||||
|
{}
|
Loading…
x
Reference in New Issue
Block a user