Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
students
messenger
Commits
1464d40d
Commit
1464d40d
authored
Jan 29, 2021
by
Soo Hyun Kim
Browse files
0129 머지완
parent
e851bc83
Changes
6
Hide whitespace changes
Inline
Side-by-side
client/src/Components/Chat.js
View file @
1464d40d
...
@@ -160,7 +160,7 @@ function Chat(props) {
...
@@ -160,7 +160,7 @@ function Chat(props) {
<
Col
className
=
"
ml-2
"
>
<
Col
className
=
"
ml-2
"
>
<
Row
><
strong
>
{
value
.
sender
}
<
/strong></
Row
>
<
Row
><
strong
>
{
value
.
sender
}
<
/strong></
Row
>
<
Row
xs
=
"
auto
"
className
=
'
d-flex flex-wrap-nowrap
'
>
<
Row
xs
=
"
auto
"
className
=
'
d-flex flex-wrap-nowrap
'
>
<
Row
style
=
{{
width
:
'
max-content
'
,
maxWidth
:
'
80%
'
,
height
:
'
auto
'
,
paddingLeft
:
'
15px
'
,
paddingRight
:
'
15px
'
,
background
:
'
#f1ebf7
'
,
borderRadius
:
'
5px
'
,
fontSize
:
'
x-large
'
}}
>
{
value
.
msg
}
<
/Row
>
<
Row
style
=
{{
width
:
'
max-content
'
,
maxWidth
:
'
300px
'
,
height
:
'
auto
'
,
paddingLeft
:
'
15px
'
,
paddingRight
:
'
15px
'
,
background
:
'
#f1ebf7
'
,
borderRadius
:
'
5px
'
,
fontSize
:
'
x-large
'
}}
>
{
value
.
msg
}
<
/Row
>
<
Col
className
=
"
ml-1
"
>
{
value
.
time
}
<
/Col
>
<
Col
className
=
"
ml-1
"
>
{
value
.
time
}
<
/Col
>
<
/Row
>
<
/Row
>
<
/Col
>
<
/Col
>
...
...
client/src/Components/Menu.js
View file @
1464d40d
...
@@ -11,26 +11,28 @@ function Menu(props) {
...
@@ -11,26 +11,28 @@ function Menu(props) {
return
(
return
(
<
div
className
=
"
container-fluid
"
style
=
{{
display
:
"
flex
"
,
flexDirection
:
"
row
"
,
backgroundColor
:
"
#61477a
"
,
heigth
:
"
100%
"
,
position
:
"
relative
"
}}
>
<
div
className
=
"
container-fluid
"
style
=
{{
display
:
"
flex
"
,
flexDirection
:
"
row
"
,
backgroundColor
:
"
#61477a
"
,
heigth
:
"
100%
"
,
position
:
"
relative
"
}}
>
<
p
className
=
"
navbar-brand
"
href
=
"
/home
"
style
=
{{
color
:
'
white
'
,
alignItems
:
"
center
"
}}
>
YDK
Messenger
<
/
p
>
<
a
href
=
"
/
"
className
=
"
navbar-brand
"
href
=
"
/home
"
style
=
{{
color
:
'
white
'
,
alignItems
:
"
center
"
}}
>
{
'
YDK Messenger
'
}
<
/
a
>
{
name
?
{
name
?
<>
<>
<
div
className
=
"
nav navbar-nav mr-auto
"
style
=
{{
color
:
'
white
'
,
display
:
"
flex
"
,
flexDirection
:
"
row
"
,
alignItems
:
"
center
"
}}
>
<
div
className
=
"
nav navbar-nav mr-auto
"
style
=
{{
color
:
'
white
'
,
display
:
"
flex
"
,
flexDirection
:
"
row
"
,
alignItems
:
"
center
"
}}
>
<
p
className
=
"
mt-2 mr-4
"
>
{
name
}
님
환영합니다
<
/p
>
<
p
className
=
"
mt-2 mr-4
"
>
{
`
${
name
}
님 환영합니다
`
}
<
/p
>
<
div
className
=
"
showText
"
>
<
div
className
=
"
showText
"
>
<
a
href
=
"
/profile
"
style
=
{{
color
:
"
#FFFFFF
"
,
marginRight
:
"
15px
"
}}
>
{
'
Profile
'
}
<
/a
>
<
a
href
=
"
/profile
"
style
=
{{
color
:
"
#FFFFFF
"
,
marginRight
:
"
15px
"
}}
>
{
'
Profile
'
}
<
/a
>
<
a
onClick
=
{()
=>
handleLogout
()}
href
=
"
/login
"
style
=
{{
color
:
"
#FFFFFF
"
}}
>
{
'
logout
'
}
<
/a
>
<
a
onClick
=
{()
=>
handleLogout
()}
href
=
"
/login
"
style
=
{{
color
:
"
#FFFFFF
"
}}
>
{
'
logout
'
}
<
/a
>
<
/div
>
<
/div
>
<
div
className
=
"
showIcon
"
>
<
div
className
=
"
showIcon
"
>
<
a
href
=
"
/profile
"
style
=
{{
marginRight
:
"
15px
"
}}
><
BsPeopleCircle
size
=
"
25
"
color
=
"
#FFFFFF
"
/><
/a
>
<
a
href
=
"
/profile
"
style
=
{{
marginRight
:
"
15px
"
}}
><
BsPeopleCircle
size
=
"
25
"
color
=
"
#FFFFFF
"
/><
/a
>
<
a
href
=
"
/login
"
onClick
=
{()
=>
handleLogout
()}
><
AiOutlineLogout
size
=
"
25
"
color
=
"
#FFFFFF
"
/><
/a
>
<
a
href
=
"
/login
"
onClick
=
{()
=>
handleLogout
()}
><
AiOutlineLogout
size
=
"
25
"
color
=
"
#FFFFFF
"
/><
/a
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/
>
<
/
>
:
<>
:
<>
<
Nav
className
=
"
nav navbar-nav
"
>
<
div
className
=
"
nav navbar-nav
"
style
=
{{
display
:
"
flex
"
,
flexDirection
:
"
row
"
,
alignItems
:
"
center
"
}}
>
<
Nav
.
Link
href
=
"
/login
"
>
Login
<
/Nav.Link
>
<
div
className
=
"
showTextBFLogin
"
>
<
Nav
.
Link
href
=
"
/signup
"
>
Signup
<
/Nav.Link
>
<
a
href
=
"
/login
"
style
=
{{
color
:
"
#FFFFFF
"
,
marginRight
:
"
15px
"
}}
>
{
'
Login
'
}
<
/a
>
<
/Nav
>
<
a
href
=
"
/signup
"
style
=
{{
color
:
"
#FFFFFF
"
}}
>
{
'
Signup
'
}
<
/a
>
<
/div
>
<
/div
>
<
/>
}
<
/>
}
<
/div
>
<
/div
>
)
)
...
...
client/src/Pages/HomePage.js
View file @
1464d40d
...
@@ -178,7 +178,7 @@ function Home() {
...
@@ -178,7 +178,7 @@ function Home() {
<
Menu
style
=
{{
weight
:
"
100%
"
,
height
:
"
10%
"
}}
/
>
<
Menu
style
=
{{
weight
:
"
100%
"
,
height
:
"
10%
"
}}
/
>
<
Row
className
=
"
mr-0
"
style
=
{{
weight
:
"
100%
"
,
height
:
"
80%
"
}}
>
<
Row
className
=
"
mr-0
"
style
=
{{
weight
:
"
100%
"
,
height
:
"
80%
"
}}
>
<
Col
className
=
"
list
"
md
=
{
5
}
>
<
Col
className
=
"
list
"
md
=
{
5
}
>
<
Sdiv
chat
=
{
chat
}
>
<
Sdiv
chat
=
{
chat
}
open
=
{
open
}
>
<
Tabs
defaultActiveKey
=
"
closed
"
id
=
"
uncontrolled-tab-example
"
>
<
Tabs
defaultActiveKey
=
"
closed
"
id
=
"
uncontrolled-tab-example
"
>
<
Tab
eventKey
=
"
closed
"
title
=
"
내 채팅
"
onClick
=
{
handleChato
}
>
<
Tab
eventKey
=
"
closed
"
title
=
"
내 채팅
"
onClick
=
{
handleChato
}
>
<
ClosedList
closedlist
=
{
closedlist
}
singleChat
=
{
singleChat
}
recievedMsg
=
{
recievedMsg
}
leaveInfo
=
{
leaveInfo
}
setLeaveInfo
=
{
setLeaveInfo
}
enterChatRoom
=
{
enterChatRoom
}
setRoomCode
=
{
setRoomCode
}
setRoomName
=
{
setRoomName
}
roomCode
=
{
roomCode
}
closeChatRoom
=
{
closeChatRoom
}
/
>
<
ClosedList
closedlist
=
{
closedlist
}
singleChat
=
{
singleChat
}
recievedMsg
=
{
recievedMsg
}
leaveInfo
=
{
leaveInfo
}
setLeaveInfo
=
{
setLeaveInfo
}
enterChatRoom
=
{
enterChatRoom
}
setRoomCode
=
{
setRoomCode
}
setRoomName
=
{
setRoomName
}
roomCode
=
{
roomCode
}
closeChatRoom
=
{
closeChatRoom
}
/
>
...
@@ -224,8 +224,8 @@ function Home() {
...
@@ -224,8 +224,8 @@ function Home() {
const
Sdiv
=
styled
.
div
`
const
Sdiv
=
styled
.
div
`
@media screen and (max-width: 768px) {
@media screen and (max-width: 768px) {
display:
${({
chat
})
=>
{
display:
${({
chat
,
open
})
=>
{
return
chat
===
false
?
'
block
'
:
'
none
'
return
(
chat
||
open
)
?
'
none
'
:
'
block
'
}}
}}
}
}
`
`
...
...
client/src/Pages/LogInPage.js
View file @
1464d40d
...
@@ -54,7 +54,7 @@ function LogIn() {
...
@@ -54,7 +54,7 @@ function LogIn() {
return
(
return
(
<>
<>
<
Menu
/>
<
Menu
/>
<
Form
onSubmit
=
{
handleSubmit
}
className
=
'
vh-
100
flex-column align-items-center justify-content-center mt-2
'
>
<
Form
onSubmit
=
{
handleSubmit
}
className
=
'
vh-
85
flex-column align-items-center justify-content-center mt-2
'
>
<
Container
className
=
"
d-flex justify-content-center
"
>
<
Container
className
=
"
d-flex justify-content-center
"
>
<
div
className
=
"
mt-5 p-5 shadow w-75
"
>
<
div
className
=
"
mt-5 p-5 shadow w-75
"
>
<
h2
className
=
"
text-center
"
>
로그인
<
/h2
>
<
h2
className
=
"
text-center
"
>
로그인
<
/h2
>
...
...
client/src/Pages/ProfilePage.js
View file @
1464d40d
import
React
,
{
useState
,
useEffect
}
from
'
react
'
import
React
,
{
useState
,
useEffect
}
from
'
react
'
import
Menu
from
'
../Components/Menu
'
;
import
Menu
from
'
../Components/Menu
'
;
import
styled
from
'
styled-components
'
;
import
{
Image
,
Button
,
Container
,
Form
,
Row
,
Col
}
from
'
react-bootstrap
'
;
import
{
Image
,
Button
,
Container
,
Form
,
Row
,
Col
}
from
'
react-bootstrap
'
;
import
{
BrowserRouter
as
Link
}
from
'
react-router-dom
'
;
import
axios
from
'
axios
'
import
axios
from
'
axios
'
import
catchErrors
from
'
../utils/catchErrors
'
import
catchErrors
from
'
../utils/catchErrors
'
import
{
isAuthenticated
}
from
'
../utils/auth
'
;
import
{
isAuthenticated
}
from
'
../utils/auth
'
;
...
@@ -125,9 +123,7 @@ function ProfilePage() {
...
@@ -125,9 +123,7 @@ function ProfilePage() {
<
Row
className
=
'
m-3 justify-content-center
'
>
<
Row
className
=
'
m-3 justify-content-center
'
>
<
Form
onSubmit
=
{
handleSubmit
}
>
<
Form
onSubmit
=
{
handleSubmit
}
>
<
Button
size
=
"
sm
"
className
=
"
mr-4
"
type
=
'
submit
'
variant
=
"
outline
"
style
=
{{
border
:
"
3px solid
"
,
borderColor
:
"
#9174ad
"
,
background
:
'
white
'
}}
>
저장
<
/Button
>
<
Button
size
=
"
sm
"
className
=
"
mr-4
"
type
=
'
submit
'
variant
=
"
outline
"
style
=
{{
border
:
"
3px solid
"
,
borderColor
:
"
#9174ad
"
,
background
:
'
white
'
}}
>
저장
<
/Button
>
<
Link
to
=
'
/
'
>
<
Button
href
=
"
/
"
size
=
"
sm
"
className
=
"
ml-4
"
variant
=
"
outline
"
style
=
{{
border
:
"
3px solid
"
,
borderColor
:
"
#9174ad
"
,
background
:
'
white
'
}}
>
홈
화면으로
<
/Button
>
<
Button
size
=
"
sm
"
className
=
"
ml-4
"
variant
=
"
outline
"
style
=
{{
border
:
"
3px solid
"
,
borderColor
:
"
#9174ad
"
,
background
:
'
white
'
}}
>
홈
화면으로
<
/Button
>
<
/Link
>
<
/Form
>
<
/Form
>
<
/Row
>
<
/Row
>
<
/Col
>
<
/Col
>
...
...
client/src/menu.css
View file @
1464d40d
...
@@ -7,6 +7,15 @@
...
@@ -7,6 +7,15 @@
right
:
0
;
right
:
0
;
}
}
.showTextBFLogin
{
display
:
flex
;
flex-direction
:
row
;
margin-right
:
5px
;
margin-left
:
5px
;
position
:
absolute
;
right
:
0
;
}
.showIcon
{
.showIcon
{
display
:
none
;
display
:
none
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment