Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fatton139 committed Oct 27, 2020
2 parents 5d4e8ee + b9a321d commit ccbdb2a
Show file tree
Hide file tree
Showing 34 changed files with 966 additions and 394 deletions.
2 changes: 2 additions & 0 deletions debug.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[1022/141204.980:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)

[1009/090500.006:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5)
[1009/090500.011:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5)
[1009/090500.012:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5)
Expand Down
2 changes: 1 addition & 1 deletion src/client/canvas/DrawingCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export const DrawingCanvas: React.FunctionComponent<Props> = (props: Props) => {
<canvas
ref={canvasRefCallback}
width={1000}
height={800}
height={700}
onMouseDown={onMouseDown}
onMouseUp={onMouseUp}
onMouseMove={(e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/client/chat/Chat.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.chat-container {
.chat-log-container {
height: 300px;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
.message-container {
Expand Down
6 changes: 3 additions & 3 deletions src/client/chat/ChatContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ export const ChatContainer: React.FunctionComponent<Props> = (props: Props) => {
<Row>
<ChatLog messages={data || []} currentUser={props.username} />
</Row>
<Row className="d-flex m-1 p-1 ">
<Row className="d-flex m-1 p-1 justify-content-center">
<Form onSubmit={onSubmit}>
<Form.Row className="d-flex justify-content-center flex-nowrap align-content-start ">
<Form.Row className="d-flex justify-content-center flex-nowrap align-content-start">
<Col>
<Form.Control
className="send-chat"
Expand All @@ -113,7 +113,7 @@ export const ChatContainer: React.FunctionComponent<Props> = (props: Props) => {
/>
</Col>
<Col xs="auto">
<Button type="submit" className="mr-2 ">
<Button type="submit" className="mr-2" size="sm">
Send
</Button>
</Col>
Expand Down
6 changes: 5 additions & 1 deletion src/client/chat/ChatLog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export const ChatLog: React.FunctionComponent<Props> = (props: Props) => {
const scrollAnchorRef = React.useRef<HTMLDivElement | null>(null);

React.useEffect(() => {
scrollAnchorRef.current?.scrollIntoView({ behavior: "smooth" });
scrollAnchorRef.current?.scrollIntoView({
behavior: "smooth",
block: "nearest",
inline: "start",
});
}, [messages]);

return (
Expand Down
6 changes: 5 additions & 1 deletion src/client/chat/ChatSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ export const ChatSession: React.FunctionComponent<Props> = (props: Props) => {
/>
</Col>
<Col xs="auto">
<Button type="submit" className="mb-2">
<Button
type="submit"
className="mb-2"
size="sm"
>
Send
</Button>
</Col>
Expand Down
20 changes: 5 additions & 15 deletions src/client/filehandler/FileModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,20 @@ type Props = {
}>;
roomType: RoomType;
isLoading?: boolean;
size?: "sm" | "lg";
setShowModal: Function;
showModal: boolean;
};

/**
* Similar to the file container but is rendered in an file modal.
*/
export const FileModal = (props: Props) => {
const [showModal, setShowModal] = React.useState<boolean>(false);

return (
<div>
<Button
className="file-modal"
size={props.size}
onClick={() => {
setShowModal(true);
}}
>
Files
</Button>
<Modal
show={showModal}
show={props.showModal}
onHide={() => {
setShowModal(false);
props.setShowModal(false);
}}
size="xl"
scrollable={true}
Expand All @@ -67,7 +57,7 @@ export const FileModal = (props: Props) => {
<Button
variant="primary"
onClick={() => {
setShowModal(false);
props.setShowModal(false);
}}
>
Close
Expand Down
2 changes: 1 addition & 1 deletion src/client/hooks/useScreenSharing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const useScreenSharing = (
setScreenStream(stream);
} catch (e) {
console.log("Error getting screen from user", e);
return;
return Promise.reject(e);
}

// Create new peer
Expand Down
Loading

0 comments on commit ccbdb2a

Please sign in to comment.