Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
bora-it
Commits
529e50de
Commit
529e50de
authored
Aug 02, 2021
by
seoyeon
Browse files
0802
parent
b00d28ed
Changes
12
Hide whitespace changes
Inline
Side-by-side
client/
sr
c/micbtn.png
→
client/
publi
c/micbtn.png
View file @
529e50de
File moved
client/
sr
c/micoffbtn.png
→
client/
publi
c/micoffbtn.png
View file @
529e50de
File moved
client/
sr
c/speakerbtn.png
→
client/
publi
c/speakerbtn.png
View file @
529e50de
File moved
client/
sr
c/speakeroffbtn.png
→
client/
publi
c/speakeroffbtn.png
View file @
529e50de
File moved
client/
sr
c/videobtn.png
→
client/
publi
c/videobtn.png
View file @
529e50de
File moved
client/
sr
c/videooffbtn.png
→
client/
publi
c/videooffbtn.png
View file @
529e50de
File moved
client/src/backward.png
deleted
100644 → 0
View file @
b00d28ed
11.7 KB
client/src/components/Room/Controller.js
View file @
529e50de
import
ScreenSelect
from
'
./ScreenSelect
'
import
video_btn
from
'
../../videobtn.png
'
import
speaker_btn
from
'
../../speakerbtn.png
'
import
mic_btn
from
'
../../micbtn.png
'
import
videooff_btn
from
'
../../videooffbtn.png
'
import
speakeroff_btn
from
'
../../speakeroffbtn.png
'
import
micoff_btn
from
'
../../micoffbtn.png
'
import
React
,
{
useState
}
from
'
react
'
;
const
Controller
=
()
=>
{
...
...
@@ -29,22 +23,22 @@ const Controller = () => {
{
mic
?
<
div
className
=
"
col d-flex justify-content-center
"
>
<
button
type
=
"
button
"
className
=
"
btn
"
onClick
=
{
micOn
}
>
<
img
src
=
{
micoff
_
btn
}
width
=
"
45
"
height
=
"
40
"
/>
<
img
src
=
"
/
micoffbtn
.png
"
width
=
"
45
"
height
=
"
40
"
/>
<
/button
>
<
/div
>
:
<
div
className
=
"
col d-flex justify-content-center
"
>
<
button
type
=
"
button
"
className
=
"
btn
"
onClick
=
{
micOff
}
>
<
img
src
=
{
mic
_
btn
}
width
=
"
45
"
height
=
"
40
"
/>
<
img
src
=
"
/
micbtn
.png
"
width
=
"
45
"
height
=
"
40
"
/>
<
/button
>
<
/div
>
}
{
speaker
?
<
div
className
=
"
col d-flex justify-content-center
"
>
<
button
type
=
"
button
"
className
=
"
btn
"
onClick
=
{
speakerOn
}
>
<
img
src
=
{
speakeroff
_
btn
}
width
=
"
45
"
/>
<
img
src
=
"
/
speakeroffbtn
.png
"
width
=
"
45
"
/>
<
/button
>
<
/div> : <div className="col d-flex justify-content-center"
>
<
button
type
=
"
button
"
className
=
"
btn
"
onClick
=
{
speakerOff
}
>
<
img
src
=
{
speaker
_
btn
}
width
=
"
45
"
/>
<
img
src
=
"
/
speakerbtn
.png
"
width
=
"
45
"
/>
<
/button
>
<
/div
>
}
...
...
@@ -57,12 +51,12 @@ const Controller = () => {
onClick
=
"
location.href='ScreenSelect.js'
"
onClick
=
{
videoOn
}
>
<
img
src
=
{
videooff
_
btn
}
width
=
"
45
"
/>
<
img
src
=
"
/
videooffbtn
.png
"
width
=
"
45
"
/>
<
/button
>
<
/div>
:
<
div
className
=
"
col d-flex justify-content-center
"
>
<
button
type
=
"
button
"
className
=
"
btn
"
onClick
=
{
videoOff
}
>
<
img
src
=
{
video
_
btn
}
width
=
"
45
"
/>
<
img
src
=
"
/
videobtn
.png
"
width
=
"
45
"
/>
<
/button
>
<
/div>
}
<
/div
>
...
...
client/src/components/Room/LeftHamburger.js
View file @
529e50de
import
backward
from
"
../../backward.png
"
;
import
ChannelSingle
from
"
./ChannelSingle
"
;
const
LeftHamberger
=
()
=>
{
...
...
client/src/components/SignUp.js
View file @
529e50de
...
...
@@ -2,12 +2,10 @@ import axios from "axios";
import
{
useEffect
,
useState
}
from
"
react
"
;
import
{
Redirect
}
from
"
react-router-dom
"
;
import
userApi
from
"
../apis/user.api
"
;
//
import catchErrors from "../context/catchError";
// import auth from "../context/auth_context"
import
catchErrors
from
"
../context/catchError
"
;
const
INIT_USER
=
{
name
:
""
,
idNumber1
:
""
,
idNumber2
:
""
,
email
:
""
,
password
:
""
,
checkpw
:
""
,
...
...
@@ -25,8 +23,6 @@ const Signup = () => {
setDisabled
(
!
(
user
.
name
&&
user
.
idNumber1
&&
user
.
idNumber2
&&
user
.
email
&&
user
.
password
&&
user
.
checkpw
...
...
@@ -41,31 +37,30 @@ const Signup = () => {
}
async
function
handleSubmit
()
{
console
.
log
(
'
회원가입
'
)
try
{
const
data
=
await
userApi
.
signup
(
user
)
// const data = await axios.post("https://localhost:8080/api/room/1/1",user)
setLoading
(
true
);
setError
(
""
);
// const success = await login(user.email, user.password);
// const data = await axios.post("/api/room/1/1",user)
console
.
log
(
data
);
setSuccess
(
true
);
}
catch
(
error
)
{
//
catchErrors(error, setError);
catchErrors
(
error
,
setError
);
}
finally
{
setLoading
(
false
);
}
}
if
(
success
)
{
alert
(
'
회원가입 되었습니다.
'
)
return
<
Redirect
to
=
"
/
"
/>
;
}
const
{
name
,
idNumber1
,
idNumber2
,
id
,
password
,
checkpw
,
phone
}
=
user
;
const
{
name
,
id
,
password
,
checkpw
,
phone
}
=
user
;
return
(
<
div
className
=
"
modal-content
"
>
{
error
&&
<
div
className
=
"
alert alert-danger
"
>
{
error
}
<
/div>
}
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"
modal-header
"
>
<
h5
className
=
"
modal-title
"
id
=
"
loginModalLabel
"
>
...
...
@@ -91,38 +86,6 @@ const Signup = () => {
onChange
=
{
handleChange
}
/
>
<
/div
>
<
div
className
=
"
p-2
"
>
<
label
className
=
"
p-1
"
>
주민등록번호
<
/label
>
<
div
className
=
"
d-flex text-center
"
>
<
div
className
=
"
col-4
"
>
<
input
className
=
"
mt-2 form-control
"
id
=
"
idNumber1
"
type
=
"
text
"
name
=
"
idNumber1
"
placeholder
=
"
●●●●●●
"
maxLength
=
'
6
'
value
=
{
idNumber1
}
onChange
=
{
handleChange
}
/
>
<
/div
>
<
div
className
=
"
col-1 pt-3 ps-2
"
>
ㅡ
<
/div
>
<
div
className
=
"
col-1
"
>
<
input
className
=
"
mt-2 ms-2 form-control
"
id
=
"
idNumber2
"
type
=
"
text
"
style
=
{{
width
:
'
35px
'
}}
name
=
"
idNumber2
"
placeholder
=
"
●
"
value
=
{
idNumber2
}
onChange
=
{
handleChange
}
maxLength
=
'
1
'
/>
<
/div
>
<
div
className
=
"
pt-3 ps-4
"
>*
*
*
*
*
*<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"
p-2
"
>
<
label
className
=
"
p-1
"
>
아이디
<
/label
>
<
input
...
...
@@ -160,7 +123,7 @@ const Signup = () => {
/
>
<
/div
>
<
div
className
=
"
p-2
"
>
<
label
className
=
"
p-1
"
>
전화번호
(
선택
)
<
/label
>
<
label
className
=
"
p-1
"
>
전화번호
<
/label
>
<
input
className
=
"
form-control
"
id
=
"
phone
"
...
...
@@ -178,7 +141,7 @@ const Signup = () => {
회원가입
<
/button
>
<
/div
>
<
/form
>
<
/form>
<
/div
>
);
};
...
...
controllers/user.controller.js
View file @
529e50de
...
...
@@ -85,8 +85,8 @@ const signup = async (req, res) => {
if
(
user
)
return
res
.
status
(
422
).
send
(
`
${
email
}
이미 존재하는 사용자입니다.`
);
if
(
!
isLength
(
name
,
{
min
:
3
,
max
:
10
}))
{
return
res
.
status
(
422
).
send
(
"
이름은
3
-10자 사이입니다
"
);
if
(
!
isLength
(
name
,
{
min
:
2
,
max
:
10
}))
{
return
res
.
status
(
422
).
send
(
"
이름은
2
-10자 사이입니다
"
);
}
else
if
(
!
isLength
(
password
,
{
min
:
6
}))
{
return
res
.
status
(
422
).
send
(
"
비밀번호는 6자이상 입니다
"
);
}
else
if
(
!
isLength
(
email
,
{
min
:
3
,
max
:
10
}))
{
...
...
@@ -97,7 +97,6 @@ const signup = async (req, res) => {
name
:
name
,
email
:
email
,
password
:
password
,
gender
:
gender
,
phone
:
phone
,
})
}
catch
(
error
)
{
...
...
models/user.model.js
View file @
529e50de
...
...
@@ -19,9 +19,6 @@ const UserModel = (sequelize) => {
password
:
{
type
:
DataTypes
.
STRING
,
},
gender
:
{
type
:
DataTypes
.
INTEGER
,
},
phone
:
{
type
:
DataTypes
.
STRING
,
},
...
...
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