From ca676fbe8acf20b6ab37a7d89b8630004cd32578 Mon Sep 17 00:00:00 2001 From: Xena123kiki Date: Sat, 27 Nov 2021 13:52:48 +0900 Subject: [PATCH] #141 feature/css (#141) * fix: setting * fix: test errors * fix: updated secrets * fix: mypage, myreportedlogs page, myreportinglogs page axios code * fix: apology api get axios * fix: frontend test code upgrade * fix: search page css and others * fix: api key * fix: front test upgrade * fix: css searchpage reportauth page * fix: testing enhancement * fix: front src test 50 to 60 * fix: test error solve * fix: frontend test error * fix: report auth page css * fix: login page css * fix: signup and change password css * fix: finduserinfo css * fix: report action css(not done) --- .../ChangePassword/ChangePassword.css | 116 +++++ .../ChangePassword/ChangePassword.js | 146 +++--- .../Component/FindUserInfo/FindUserInfo.css | 129 +++++ .../Component/FindUserInfo/FindUserInfo.js | 19 +- .../Component/ReportAction/ReportAction.css | 482 ++++++++++-------- .../Component/ReportAction/ReportAction.js | 6 + .../ReportAction/ReportAction.test.js | 7 - .../src/Component/ReportAuth/ReportAuth.css | 130 +++-- .../src/Component/ReportAuth/ReportAuth.js | 6 +- .../Component/ReportAuth/ReportAuth.test.js | 5 +- .../gaejosim/src/Component/Signup/Signup.css | 147 ++++++ .../gaejosim/src/Component/Signup/Signup.js | 227 +++++---- .../gaejosim/src/Container/Login/Login.css | 125 +++++ .../gaejosim/src/Container/Login/Login.js | 132 ++--- 14 files changed, 1193 insertions(+), 484 deletions(-) create mode 100644 frontend/gaejosim/src/Component/ChangePassword/ChangePassword.css create mode 100644 frontend/gaejosim/src/Component/FindUserInfo/FindUserInfo.css create mode 100644 frontend/gaejosim/src/Component/Signup/Signup.css create mode 100644 frontend/gaejosim/src/Container/Login/Login.css diff --git a/frontend/gaejosim/src/Component/ChangePassword/ChangePassword.css b/frontend/gaejosim/src/Component/ChangePassword/ChangePassword.css new file mode 100644 index 0000000..2e5ca7d --- /dev/null +++ b/frontend/gaejosim/src/Component/ChangePassword/ChangePassword.css @@ -0,0 +1,116 @@ +.ChangePWTitle { + position: absolute; + /* width: 67px; */ + /* height: 36px; */ + left: 35.4%; + top: 30.6%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 25px; + line-height: 36px; + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.ChangePW_inputField1 { + position: absolute; + width: 30.6%; + height: 6.5%; + left: 35.1%; + top: 36.5%; + + background: #ffffff; + border: 1px solid #fc0174; + box-sizing: border-box; + border-radius: 12px; +} + +.ChangePW_inputField2 { + position: absolute; + width: 30.6%; + height: 6.5%; + left: 35.1%; + top: 43.9%; + + background: #ffffff; + border: 1px solid #fc0174; + box-sizing: border-box; + border-radius: 12px; +} + +.ChangePW_inputField3 { + position: absolute; + width: 30.6%; + height: 6.5%; + left: 35.1%; + top: 51.3%; + + background: #ffffff; + border: 1px solid #fc0174; + box-sizing: border-box; + border-radius: 12px; +} + +.ChangePW_Login_text { + position: absolute; + /* width: 53px; */ + /* height: 22px; */ + left: 35.4%; + top: 59%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 15px; + line-height: 22px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.ChangePW_Finduserinfo_text { + position: absolute; + /* width: 53px; */ + /* height: 22px; */ + right: 34.5%; + top: 59%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 15px; + line-height: 22px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.ChangePWButton { + position: absolute; + width: 120px; + height: 39.81px; + left: 50%; + transform: translateX(-50%); + /* left: 45.8%; */ + top: 78%; + background: #fc0174; + border-radius: 40px; + color: white; + font-weight: bold; + + outline: 0; + border: 0; +} diff --git a/frontend/gaejosim/src/Component/ChangePassword/ChangePassword.js b/frontend/gaejosim/src/Component/ChangePassword/ChangePassword.js index 0eb87c0..3c99e65 100644 --- a/frontend/gaejosim/src/Component/ChangePassword/ChangePassword.js +++ b/frontend/gaejosim/src/Component/ChangePassword/ChangePassword.js @@ -1,78 +1,96 @@ import React, { Component } from "react"; // import { connect } from 'react-redux'; -import { NavLink, withRouter } from 'react-router-dom' -import axios from 'axios'; +import { NavLink, withRouter } from "react-router-dom"; +import axios from "axios"; + +import "./ChangePassword.css"; // TODO: post 요청을 put으로 back에서 바꾸면 axios 코드 변경 class ChangePassword extends Component { - state = { - oldPW : '', - newPW : '', - newPWConfirm : '', - } + state = { + oldPW: "", + newPW: "", + newPWConfirm: "", + }; - putChangePWData = async () => { - console.log("postchangePWData") + putChangePWData = async () => { + console.log("postchangePWData"); - axios.defaults.xsrfCookieName = 'csrftoken'; - axios.defaults.xsrfHeaderName = 'X-CSRFToken'; + axios.defaults.xsrfCookieName = "csrftoken"; + axios.defaults.xsrfHeaderName = "X-CSRFToken"; - axios.get('/api/token/').then() - - const response = await axios.post('/api/change/password/', { - "old_password" : this.state.oldPW, - "new_password" : this.state.newPW, - "password_confirm" : this.state.newPWConfirm, - }) - .then((response) => { - alert(response.data.message) - this.props.history.push('/login') - }) - .catch((error) => { - alert(error.response.data.error) - if(error.response.status === 401) this.props.history.push('/login') - }) - } + axios.get("/api/token/").then(); - // TODO: password confirm을 back에서 수행하므로 해당 if 문 삭제 필요? - onClickChangePWButton = () => { - if(!this.state.oldPW || !this.state.newPW || !this.state.newPWConfirm){ - alert('모든 필드 값을 다 입력해주셔야 비밀번호를 변경할 수 있습니다.') - return - } - else { - this.putChangePWData() - } - } + const response = await axios + .post("/api/change/password/", { + old_password: this.state.oldPW, + new_password: this.state.newPW, + password_confirm: this.state.newPWConfirm, + }) + .then((response) => { + alert(response.data.message); + this.props.history.push("/login"); + }) + .catch((error) => { + alert(error.response.data.error); + if (error.response.status === 401) this.props.history.push("/login"); + }); + }; - render() { - return ( -
- 로그인 - 아이디 비밀번호 찾기 - this.setState({ oldPW : event.target.value })} /> - this.setState({ newPW : event.target.value })} /> - this.setState({ newPWConfirm : event.target.value })} /> - -
- ) + // TODO: password confirm을 back에서 수행하므로 해당 if 문 삭제 필요? + onClickChangePWButton = () => { + if (!this.state.oldPW || !this.state.newPW || !this.state.newPWConfirm) { + alert("모든 필드 값을 다 입력해주셔야 비밀번호를 변경할 수 있습니다."); + return; + } else { + this.putChangePWData(); } + }; + + render() { + return ( +
+ 비밀번호 변경 + + {/* 로그인 */} + 로그인 + + + + 아이디 비밀번호 찾기 + + {/* 아이디 비밀번호 찾기 */} + + this.setState({ oldPW: event.target.value })} + /> + this.setState({ newPW: event.target.value })} + /> + + this.setState({ newPWConfirm: event.target.value }) + } + /> + +
+ ); + } } -export default ChangePassword; \ No newline at end of file +export default ChangePassword; diff --git a/frontend/gaejosim/src/Component/FindUserInfo/FindUserInfo.css b/frontend/gaejosim/src/Component/FindUserInfo/FindUserInfo.css new file mode 100644 index 0000000..c80de1f --- /dev/null +++ b/frontend/gaejosim/src/Component/FindUserInfo/FindUserInfo.css @@ -0,0 +1,129 @@ +.FindIDTitle { + position: absolute; + /* width: 67px; */ + /* height: 36px; */ + left: 35.4%; + top: 34.5%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 25px; + line-height: 36px; + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.FindIDTitle { + position: absolute; + /* width: 67px; */ + /* height: 36px; */ + left: 17.4%; + top: 34.5%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 25px; + line-height: 36px; + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.FindPWTitle { + position: absolute; + /* width: 67px; */ + /* height: 36px; */ + left: 52%; + top: 34.5%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 25px; + line-height: 36px; + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.FindID_inputField { + position: absolute; + width: 30.6%; + height: 6.5%; + left: 17.4%; + top: 40.4%; + + background: #ffffff; + border: 1px solid #fc0174; + box-sizing: border-box; + border-radius: 12px; +} + +.FindPW_inputField1 { + position: absolute; + width: 30.6%; + height: 6.5%; + left: 52%; + top: 40.4%; + + background: #ffffff; + border: 1px solid #fc0174; + box-sizing: border-box; + border-radius: 12px; +} + +.FindPW_inputField2 { + position: absolute; + width: 30.6%; + height: 6.5%; + left: 52%; + top: 47.8%; + + background: #ffffff; + border: 1px solid #fc0174; + box-sizing: border-box; + border-radius: 12px; +} + +.FindIDButton { + position: absolute; + width: 120px; + height: 39.81px; + /* right: 75%; + transform: translateX(125%); */ + left: 28.5%; + top: 78%; + background: #fc0174; + border-radius: 40px; + color: white; + font-weight: bold; + + outline: 0; + border: 0; +} + +.FindPWButton { + position: absolute; + width: 120px; + height: 39.81px; + /* left: 75%; + transform: translateX(-125%); */ + left: 63.2%; + top: 78%; + background: #fc0174; + border-radius: 40px; + color: white; + font-weight: bold; + + outline: 0; + border: 0; +} diff --git a/frontend/gaejosim/src/Component/FindUserInfo/FindUserInfo.js b/frontend/gaejosim/src/Component/FindUserInfo/FindUserInfo.js index ddb6278..6b380ca 100644 --- a/frontend/gaejosim/src/Component/FindUserInfo/FindUserInfo.js +++ b/frontend/gaejosim/src/Component/FindUserInfo/FindUserInfo.js @@ -5,6 +5,9 @@ import React, { Component } from "react"; import { NavLink, withRouter } from "react-router-dom"; import axios from "axios"; +import "./FindUserInfo.css"; + + class FindUserInfo extends Component { state = { emailForID: "", @@ -88,9 +91,11 @@ class FindUserInfo extends Component { 비밀번호 변경
- + + @@ -105,9 +110,11 @@ class FindUserInfo extends Component {
- + + @@ -115,7 +122,9 @@ class FindUserInfo extends Component { } /> this.setState({ IDforPW: event.target.value })} diff --git a/frontend/gaejosim/src/Component/ReportAction/ReportAction.css b/frontend/gaejosim/src/Component/ReportAction/ReportAction.css index d749741..ec4f165 100644 --- a/frontend/gaejosim/src/Component/ReportAction/ReportAction.css +++ b/frontend/gaejosim/src/Component/ReportAction/ReportAction.css @@ -8,217 +8,275 @@ bottom: 1227px; } */ -.ReportAction{ - background-color: aquamarine; +.LeftBarStyle1 { + position: absolute; + width: 14.6%; + height: 8px; + left: 34.7%; + top: 30.3%; + background: #fc0174; + border-radius: 40px; } -.Box1{ - position: absolute; - height: 240px; - width: 840px; - left: 300px; - right: 300px; - border-radius: 32px; - top: 278px; - bottom: 1227px; - background-color: #FFFFFF; -} -.Box1 #MannerPoint{ - position : absolute; - height: 50px; - width: 1000px; - top: 20px; - left: 54px; - right: 863px; - bottom: 1510px; - - font-size: 20px; - font-style: normal; - font-weight: 700; - line-height: 50px; - letter-spacing: 0px; - text-align: left; -} - -.Box1 #MannerPointDescription{ - position : absolute; - height: 50px; - width: 1000px; - top: 425px; - left: 380px; - right: 863px; - bottom: 1510px; - - font-size: 20px; - font-style: normal; - font-weight: 700; - line-height: 50px; - letter-spacing: 0px; - text-align: left; -} - -.Box1 #MannerPointInput{ - position : absolute; - height: 80px; - width: 691px; - left: 74px; - top: 88px; - border-radius: 16px; - outline:0; - border:0; - background-color: #EFF0F7; - - font-size: 20px; - font-weight: 700; -} - -.Box2{ - position: absolute; - height: 240px; - width: 840px; - border-radius: 32px; - left: 300px; - right: 300px; - top: 577px; - bottom: 688px; - background-color: #FFFFFF; -} - -.Box2 #Tag{ - position : absolute; - height: 50px; - width: 1000px; - top: 20px; - left: 54px; - right: 863px; - bottom: 1510px; - - font-size: 20px; - font-style: normal; - font-weight: 700; - line-height: 50px; - letter-spacing: 0px; - text-align: left; -} -.Box2 .tags{ - position : absolute; - height: 120px; - width: 750px; - top: 80px; - left: 54px; - right: 863px; - bottom: 1510px; - - font-size: 20px; - font-style: normal; - font-weight: 700; - line-height: 50px; - letter-spacing: 0px; - text-align: left; -} - -.Box2 #button{ - position : relative; - height: 44px; - width: 140px; - left: 10px; - right: 10px; - top: 0px; - border-radius: 16px; - background-color: #5F2EEA; - outline:0; - border:0; - padding: 3px; - margin-left:6px; - - font-size: 14px; - font-style: normal; - font-weight: 600; - line-height: 28px; - letter-spacing: 0.75px; - text-align: center; - color: #FFFFFF; -} - -.Box3{ - position: absolute; - height: 240px; - width: 840px; - border-radius: 32px; - left: 300px; - right: 300px; - top: 876px; - bottom: 149px; - background-color: #FFFFFF; -} - -.Box3 #Comment{ - position : absolute; - height: 50px; - width: 1000px; - top: 20px; - left: 54px; - right: 863px; - bottom: 1510px; - - font-size: 20px; - font-style: normal; - font-weight: 700; - line-height: 50px; - letter-spacing: 0px; - text-align: left; -} - -.Box3 #CommentInput{ - position : absolute; - height: 80px; - width: 691px; - left: 74px; - top: 88px; - border-radius: 16px; - outline:0; - border:0; - background-color: #EFF0F7; - -} - -#submit{ - position: absolute; - height: 38.4px; - width: 108px; - left: 596px; - top: 1150px; - border-radius: 16px; - background-color: #5F2EEA; - outline:0; - border:0; - - font-size: 16px; - font-style: normal; - font-weight: 600; - line-height: 28px; - letter-spacing: 0.75px; - text-align: center; - color: #FFFFFF; - -} - -#cancel{ - position: absolute; - height: 38.4px; - width: 108px; - left: 740px; - top: 1150px; - border-radius: 16px; - background-color: #5F2EEA; - outline:0; - border:0; - - font-size: 16px; - font-style: normal; - font-weight: 600; - line-height: 28px; - letter-spacing: 0.75px; - text-align: center; - color: #FFFFFF; -} \ No newline at end of file +.RightBarStyle1 { + position: absolute; + width: 14.6%; + height: 8px; + left: 50.1%; + top: 30.3%; + background: #767676; + border-radius: 40px; +} + +.LeftBarText1 { + position: absolute; + /* width: 14.6%; */ + /* height: 8px; */ + left: 46%; + top: 27%; + /* background: #fc0174; */ + /* border-radius: 40px; */ + + /* font-family: Poppins; */ + font-style: normal; + font-weight: normal; + font-size: 15px; + line-height: 22px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.RightBarText1 { + position: absolute; + /* width: 14.6%; */ + /* height: 8px; */ + left: 61.2%; + top: 27%; + /* background: #fc0174; */ + /* border-radius: 40px; */ + + /* font-family: Poppins; */ + font-style: normal; + font-weight: normal; + font-size: 15px; + line-height: 22px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.ReportAction { + background-color: aquamarine; +} + +.Box1 { + position: absolute; + height: 240px; + width: 840px; + left: 300px; + right: 300px; + border-radius: 32px; + top: 278px; + bottom: 1227px; + background-color: #ffffff; +} +.Box1 #MannerPoint { + position: absolute; + height: 50px; + width: 1000px; + top: 20px; + left: 54px; + right: 863px; + bottom: 1510px; + + font-size: 20px; + font-style: normal; + font-weight: 700; + line-height: 50px; + letter-spacing: 0px; + text-align: left; +} + +.Box1 #MannerPointDescription { + position: absolute; + height: 50px; + width: 1000px; + top: 425px; + left: 380px; + right: 863px; + bottom: 1510px; + + font-size: 20px; + font-style: normal; + font-weight: 700; + line-height: 50px; + letter-spacing: 0px; + text-align: left; +} + +.Box1 #MannerPointInput { + position: absolute; + height: 80px; + width: 691px; + left: 74px; + top: 88px; + border-radius: 16px; + outline: 0; + border: 0; + background-color: #eff0f7; + + font-size: 20px; + font-weight: 700; +} + +.Box2 { + position: absolute; + height: 240px; + width: 840px; + border-radius: 32px; + left: 300px; + right: 300px; + top: 577px; + bottom: 688px; + background-color: #ffffff; +} + +.Box2 #Tag { + position: absolute; + height: 50px; + width: 1000px; + top: 20px; + left: 54px; + right: 863px; + bottom: 1510px; + + font-size: 20px; + font-style: normal; + font-weight: 700; + line-height: 50px; + letter-spacing: 0px; + text-align: left; +} +.Box2 .tags { + position: absolute; + height: 120px; + width: 750px; + top: 80px; + left: 54px; + right: 863px; + bottom: 1510px; + + font-size: 20px; + font-style: normal; + font-weight: 700; + line-height: 50px; + letter-spacing: 0px; + text-align: left; +} + +.Box2 #button { + position: relative; + height: 44px; + width: 140px; + left: 10px; + right: 10px; + top: 0px; + border-radius: 16px; + background-color: #5f2eea; + outline: 0; + border: 0; + padding: 3px; + margin-left: 6px; + + font-size: 14px; + font-style: normal; + font-weight: 600; + line-height: 28px; + letter-spacing: 0.75px; + text-align: center; + color: #ffffff; +} + +.Box3 { + position: absolute; + height: 240px; + width: 840px; + border-radius: 32px; + left: 300px; + right: 300px; + top: 876px; + bottom: 149px; + background-color: #ffffff; +} + +.Box3 #Comment { + position: absolute; + height: 50px; + width: 1000px; + top: 20px; + left: 54px; + right: 863px; + bottom: 1510px; + + font-size: 20px; + font-style: normal; + font-weight: 700; + line-height: 50px; + letter-spacing: 0px; + text-align: left; +} + +.Box3 #CommentInput { + position: absolute; + height: 80px; + width: 691px; + left: 74px; + top: 88px; + border-radius: 16px; + outline: 0; + border: 0; + background-color: #eff0f7; +} + +.submitButton { + position: absolute; + width: 120px; + height: 39.81px; + left: 50%; + transform: translateX(-50%); + /* left: 45.8%; */ + top: 78%; + background: #fc0174; + border-radius: 40px; + color: white; + font-weight: bold; + + outline: 0; + border: 0; +} + +.cancelButton { + position: absolute; + width: 120px; + height: 39.81px; + left: 50%; + transform: translateX(-50%); + /* left: 45.8%; */ + top: 78%; + background: #fc0174; + border-radius: 40px; + color: white; + font-weight: bold; + + outline: 0; + border: 0; +} diff --git a/frontend/gaejosim/src/Component/ReportAction/ReportAction.js b/frontend/gaejosim/src/Component/ReportAction/ReportAction.js index cd2db15..de7fdbf 100644 --- a/frontend/gaejosim/src/Component/ReportAction/ReportAction.js +++ b/frontend/gaejosim/src/Component/ReportAction/ReportAction.js @@ -166,6 +166,12 @@ class ReportAction extends Component { return (
{redirect} + +
+
+ step1 + step2 +

매너포인트

diff --git a/frontend/gaejosim/src/Component/ReportAction/ReportAction.test.js b/frontend/gaejosim/src/Component/ReportAction/ReportAction.test.js index eada813..02929b8 100644 --- a/frontend/gaejosim/src/Component/ReportAction/ReportAction.test.js +++ b/frontend/gaejosim/src/Component/ReportAction/ReportAction.test.js @@ -20,7 +20,6 @@ describe("", () => { }); xit("should handle tag1_1", () => { - const mockClickTag1_1 = jest.fn(); const component = shallow( // @@ -130,12 +129,6 @@ describe("", () => { expect(wrapper).toBeDefined(); }); - it("should change clickTag1_1 state", () => { - const component = shallow(); - component.setState({ clickTag1_1: true }); - expect(component.length).toBe(1); - }); - it("router search page", () => { const history = createMemoryHistory({ initialEntries: ["/"] }); const { getAllByText } = render( diff --git a/frontend/gaejosim/src/Component/ReportAuth/ReportAuth.css b/frontend/gaejosim/src/Component/ReportAuth/ReportAuth.css index 2cce87b..54c3c86 100644 --- a/frontend/gaejosim/src/Component/ReportAuth/ReportAuth.css +++ b/frontend/gaejosim/src/Component/ReportAuth/ReportAuth.css @@ -26,27 +26,80 @@ height: 36px; */ color: #ffffff; } -/* .boxStyle { - width: 840px; - height: 360px; - background: #f8f8f8; - border-radius: 32px; +.LeftBarStyle1 { position: absolute; - left: 20.83%; - right: 20.83%; - top: 200px; - filter: drop-shadow(0px 8px 16px rgba(17, 17, 17, 0.04)); -} */ + width: 14.6%; + height: 8px; + left: 34.7%; + top: 30.3%; + background: #fc0174; + border-radius: 40px; +} + +.RightBarStyle1 { + position: absolute; + width: 14.6%; + height: 8px; + left: 50.1%; + top: 30.3%; + background: #767676; + border-radius: 40px; +} + +.LeftBarText1 { + position: absolute; + /* width: 14.6%; */ + /* height: 8px; */ + left: 46%; + top: 27%; + /* background: #fc0174; */ + /* border-radius: 40px; */ + + /* font-family: Poppins; */ + font-style: normal; + font-weight: normal; + font-size: 15px; + line-height: 22px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.RightBarText1 { + position: absolute; + /* width: 14.6%; */ + /* height: 8px; */ + left: 61.2%; + top: 27%; + /* background: #fc0174; */ + /* border-radius: 40px; */ + + /* font-family: Poppins; */ + font-style: normal; + font-weight: normal; + font-size: 15px; + line-height: 22px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} .reportSummoner { position: relative; width: 30.6%; - height: 6%; + /* height: 6%; */ left: 34.7%; + /* height: 100px; */ /* top: 45.9%; */ - /* margin-top: 10px; */ - /* bottom: 45.9%; */ - /* top: 50%; */ + top: 350px; background: #ffffff; border: 1px solid #fc0174; @@ -57,32 +110,47 @@ height: 36px; */ .authStyle { position: absolute; width: 120px; - height: 38.4px; - background: #76747c; + height: 20px; + left: 63%; + transform: translateX(-50%); + top: 56%; + background: transparent; border-radius: 40px; - color: #ffffff; - bottom: 800px; - left: 810px; + color: white; + font-weight: bold; + + outline: 0; + border: 0; } -.buttonStyle { +.buttonAuthStyle { position: absolute; width: 120px; - height: 38.4px; - background: #5f2eea; + height: 20px; + left: 63%; + transform: translateX(-50%); + top: 56%; + background: transparent; border-radius: 40px; - color: #ffffff; - bottom: 800px; - left: 950px; + color: white; + font-weight: bold; + + outline: 0; + border: 0; } -.buttonAuthStyle { +.buttonStyle { position: absolute; width: 120px; - height: 38.4px; - background: #5f2eea; + height: 39.81px; + left: 50%; + transform: translateX(-50%); + top: 78%; + background: #fc0174; border-radius: 40px; - color: #ffffff; - bottom: 800px; - left: 810px; + color: white; + font-weight: bold; + + outline: 0; + border: 0; } diff --git a/frontend/gaejosim/src/Component/ReportAuth/ReportAuth.js b/frontend/gaejosim/src/Component/ReportAuth/ReportAuth.js index 56b1c26..93a541b 100644 --- a/frontend/gaejosim/src/Component/ReportAuth/ReportAuth.js +++ b/frontend/gaejosim/src/Component/ReportAuth/ReportAuth.js @@ -106,7 +106,11 @@ class ReportAuth extends Component { return (
{/* Report */} - {/*
*/} +
+
+ step1 + step2 +
트롤을 골라주세요
this.setState({ id : event.target.value })} /> - this.setState({ email : event.target.value })} /> - this.setState({ summonerID : event.target.value })} /> - this.setState({ password : event.target.value })} /> - this.passwordHandler(event.target.value)} /> - {(!this.state.agreePolicy) && } - {(this.state.agreePolicy) && } - -
- ) - } + const response = await axios + .post("/api/signup/", { + username: this.state.id, + email: this.state.email, + summoner_name: this.state.summonerID, + password: this.state.password, + }) + .then((response) => { + alert(`${response.data.message}\n로그인 페이지로 이동합니다.`); + this.props.history.push("/login"); + }) + .catch((error) => { + alert(error.response.data.error); + }); + }; + + render() { + return ( +
+ 회원가입 + + 로그인하기 + {/* 로그인하기 */} + + this.setState({ id: event.target.value })} + /> + this.setState({ email: event.target.value })} + /> + + this.setState({ summonerID: event.target.value }) + } + /> + this.setState({ password: event.target.value })} + /> + this.passwordHandler(event.target.value)} + /> + {!this.state.agreePolicy && ( + + )} + {this.state.agreePolicy && ( + + )} + +
+ ); + } } -export default withRouter(SignUp) \ No newline at end of file +export default withRouter(SignUp); diff --git a/frontend/gaejosim/src/Container/Login/Login.css b/frontend/gaejosim/src/Container/Login/Login.css new file mode 100644 index 0000000..8585305 --- /dev/null +++ b/frontend/gaejosim/src/Container/Login/Login.css @@ -0,0 +1,125 @@ +.LoginTitle { + position: absolute; + /* width: 67px; */ + /* height: 36px; */ + left: 35.4%; + top: 34.5%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 25px; + line-height: 36px; + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.Login_Signup_text { + position: absolute; + /* width: 53px; */ + /* height: 22px; */ + /* left: 62%; */ + right: 34.5%; + top: 36%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 15px; + line-height: 22px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.Login_Finduserinfo_text { + position: absolute; + /* width: 53px; */ + /* height: 22px; */ + left: 35.4%; + top: 55.8%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 15px; + line-height: 22px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.Login_Changepassword_text { + position: absolute; + /* width: 53px; */ + /* height: 22px; */ + right: 34.5%; + top: 55.8%; + + /* font-family: Noto Sans KR; */ + font-style: normal; + font-weight: bold; + font-size: 15px; + line-height: 22px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.05em; + + color: #ffffff; +} + +.Login_inputField1 { + position: absolute; + width: 30.6%; + height: 6.5%; + left: 35.1%; + top: 40.4%; + + background: #ffffff; + border: 1px solid #fc0174; + box-sizing: border-box; + border-radius: 12px; +} + +.Login_inputField2 { + position: absolute; + width: 30.6%; + height: 6.5%; + left: 35.1%; + top: 47.8%; + + background: #ffffff; + border: 1px solid #fc0174; + box-sizing: border-box; + border-radius: 12px; +} + +.LoginButton { + position: absolute; + width: 120px; + height: 39.81px; + left: 50%; + transform: translateX(-50%); + /* left: 45.8%; */ + top: 78%; + background: #fc0174; + border-radius: 40px; + color: white; + font-weight: bold; + + outline: 0; + border: 0; +} diff --git a/frontend/gaejosim/src/Container/Login/Login.js b/frontend/gaejosim/src/Container/Login/Login.js index 3e651ea..fbe2704 100644 --- a/frontend/gaejosim/src/Container/Login/Login.js +++ b/frontend/gaejosim/src/Container/Login/Login.js @@ -1,75 +1,87 @@ import React, { Component } from "react"; // import { connect } from 'react-redux'; -import { NavLink, withRouter } from 'react-router-dom' -import axios from 'axios'; +import { NavLink, withRouter } from "react-router-dom"; +import axios from "axios"; + +import "./Login.css"; // TODO: login 유저 스토어에 저장하기 class Login extends Component { - state = { - id : '', - password : '', - } + state = { + id: "", + password: "", + }; - postLoginData = async () => { - console.log("postSignUpData") + postLoginData = async () => { + console.log("postSignUpData"); - axios.defaults.xsrfCookieName = 'csrftoken'; - axios.defaults.xsrfHeaderName = 'X-CSRFToken'; + axios.defaults.xsrfCookieName = "csrftoken"; + axios.defaults.xsrfHeaderName = "X-CSRFToken"; - axios.get('/api/token/').then() + axios.get("/api/token/").then(); - const response = await axios.post('/api/signin/', { - "username" : this.state.id, - "password" : this.state.password, - }) - .then((response) => { - console.log("로그인 완료") - this.props.history.push('/search') - }) - .catch((error) => { - alert(error.response.data.error) - }) - } + const response = await axios + .post("/api/signin/", { + username: this.state.id, + password: this.state.password, + }) + .then((response) => { + console.log("로그인 완료"); + this.props.history.push("/search"); + }) + .catch((error) => { + alert(error.response.data.error); + }); + }; - onClickLoginButton = () => { - if(!this.state.id) { - alert('아이디를 입력해야합니다.') - return - } - else if(!this.state.password) { - alert('패스워드를 입력해야합니다.') - return - } - else { - this.postLoginData() - } + onClickLoginButton = () => { + if (!this.state.id) { + alert("아이디를 입력해야합니다."); + return; + } else if (!this.state.password) { + alert("패스워드를 입력해야합니다."); + return; + } else { + this.postLoginData(); } + }; - render() { - return ( -
- 회원가입 - 아이디 비밀번호 찾기 - 비밀번호 변경 - - this.setState({ id : event.target.value })} /> - this.setState({ password : event.target.value })} /> - -
- ) - } + render() { + return ( +
+ 로그인 + + 회원가입 + + + 아이디 비밀번호 찾기 + + + 비밀번호 변경 + + + this.setState({ id: event.target.value })} + /> + this.setState({ password: event.target.value })} + /> + +
+ ); + } } -export default withRouter(Login) \ No newline at end of file +export default withRouter(Login);