Skip to content

Commit

Permalink
Feat : Github Login & routing (#52)
Browse files Browse the repository at this point in the history
* feat : email verify modal dev start

* feat : verify modal ui

* feat : register modal api && login api connect

* feat : gh login 1. login for registerd user
  • Loading branch information
masibasi authored Aug 9, 2023
1 parent 00b1bc3 commit e146755
Show file tree
Hide file tree
Showing 24 changed files with 778 additions and 402 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"axios": "^1.4.0",
"bootstrap": "^5.3.0",
"frappe-gantt": "^0.6.1",
"http-proxy-middleware": "^2.0.6",
"moment": "^2.29.4",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.1",
Expand Down
5 changes: 4 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ import { AuthenticationContextProvider } from "./service/authentication/authenti
import AppRouter from "./navigation/AppRouter";
import "bootstrap/dist/css/bootstrap.min.css";
import { TeamsContextProvider } from "./service/teams/teams.context";
import { ProjectsContextProvider } from "./service/projects/projects.context";

const App: React.FC = () => {
return (
<AuthenticationContextProvider>
<TeamsContextProvider>
<AppRouter />
<ProjectsContextProvider>
<AppRouter />
</ProjectsContextProvider>
</TeamsContextProvider>
</AuthenticationContextProvider>
);
Expand Down
Binary file added src/assets/images/ghLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/components/Modal/EmailVerifyModal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.EmailVerifyModal .inputLabel {
margin-bottom: 16px;
}
.EmailVerifyModal .infoBox {
background-color: rgba(218, 218, 218, 0.33);
padding: 4%;
border-radius: 20px;
margin-top: 40px;
}
.EmailVerifyModal .infoText {
}
57 changes: 57 additions & 0 deletions src/components/Modal/EmailVerifyModal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import React, { useContext, useState } from "react";
import { Button, Modal, Form } from "react-bootstrap";
import "./EmailVerifyModal.css";
import { BsDot } from "react-icons/bs";

export const EmailVerifyModal = ({ show, handleClose, checkNumber, setCheckNumber, CheckEmailMessageHandler }) => {
return (
<Modal show={show} onHide={handleClose} className="EmailVerifyModal">
<Modal.Header closeButton>
<Modal.Title>인증번호</Modal.Title>
</Modal.Header>
<Modal.Body>
<Form>
<Form.Group className="">
<Form.Label className="inputLabel">이메일로 인증번호 전송이 완료되었습니다!</Form.Label>
<Form.Control maxLength={6} type="text" placeholder="인증코드 입력" value={checkNumber} onChange={(e) => setCheckNumber(e.target.value)} />
</Form.Group>
</Form>
<div className="infoBox">
<p style={{ color: "rgb(230,59,71)", fontWeight: 600 }}>인증번호 문자를 못 받으셨나요?</p>
<div style={{ display: "flex" }}>
<BsDot />
<p className="infoText">
입력하신 인증정보가 일치하지 않을 경우, 인증번호 문자
<br />는 발송되지 않습니다.
</p>
</div>
<div style={{ display: "flex" }}>
<BsDot />
<p className="infoText">
인증번호가 문자로 수신되지 않을 경우 정확한 정보로 재
<br /> 시도해 주시기 바랍니다.
</p>
</div>
</div>
</Modal.Body>
<Modal.Footer>
<Button
variant="secondary"
onClick={() => {
handleClose();
}}
>
취소
</Button>
<Button
variant="primary"
onClick={() => {
CheckEmailMessageHandler();
}}
>
인증확인
</Button>
</Modal.Footer>
</Modal>
);
};
62 changes: 31 additions & 31 deletions src/navigation/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,38 @@ import MyIssues from "../pages/MyIssues/MyIssues";
import TeamInfo from "../pages/TeamInfo/TeamInfo";
import TeamSetting from "../pages/TeamSetting/TeamSetting";
import { ProjectAccess } from "../pages/ProjectSetting/ProjectAccess";
import { ProjectSetting } from "../pages/ProjectSetting/projectSetting";
import { ProjectsContextProvider } from "../service/projects/projects.context";
import React from "react";
import { ProjectSetting } from "../pages/ProjectSetting/ProjectSetting";
import { Profile } from "../pages/Profile/Profile";
import { GithubLogin } from "../pages/Login/GithubLogin";

const AppRouter = (): JSX.Element => {
return (
<BrowserRouter>
<ProjectsContextProvider>
<Routes>
<Route element={<TopNavBar />}>
<Route path="/" element={<Home />} />
<Route path="/login" element={<Login />} />
<Route path="/registerform" element={<RegisterForm />} />
<Route path="/teamInfo" element={<TeamInfo />} />
<Route path="/teamSetting" element={<TeamSetting />} />
<Route path="/projectSetting/:projectPk/:projectName" element={<ProjectSetting />} />
<Route path="/projectAccess/:projectPk/:projectName" element={<ProjectAccess />} />
<Route element={<LeftTeamSection />}>
<Route path="/myProjects" element={<MyProjects />} />
<Route path="/myIssues" element={<MyIssues />} />
<Route path="/CreateProject" element={<CreateProject />} />
</Route>
<Route element={<LeftNavSection />}>
<Route path="/Board" element={<Board />} />
<Route path="/Timeline" element={<Timeline />} />
<Route path="/ReleaseNote" element={<ReleaseNote />} />
<Route path="/CreateReleaseNote" element={<CreateReleaseNote />} />
</Route>
</Route>
</Routes>
</ProjectsContextProvider>
</BrowserRouter>
);
return (
<BrowserRouter>
<Routes>
<Route element={<TopNavBar />}>
<Route path="/" element={<Home />} />
<Route path="/login" element={<Login />} />
<Route path="/ghLogin" element={<GithubLogin />} />
<Route path="/registerform" element={<RegisterForm />} />
<Route path="/teamInfo" element={<TeamInfo />} />
<Route path="/teamSetting" element={<TeamSetting />} />
<Route path="/projectSetting/:projectPk/:projectName" element={<ProjectSetting />} />
<Route path="/projectAccess/:projectPk/:projectName" element={<ProjectAccess />} />
<Route path="/profile" element={<Profile />} />
<Route element={<LeftTeamSection />}>
<Route path="/myProjects" element={<MyProjects />} />
<Route path="/myIssues" element={<MyIssues />} />
<Route path="/CreateProject" element={<CreateProject />} />
</Route>
<Route element={<LeftNavSection />}>
<Route path="/Board" element={<Board />} />
<Route path="/Timeline" element={<Timeline />} />
<Route path="/ReleaseNote" element={<ReleaseNote />} />
<Route path="/CreateReleaseNote" element={<CreateReleaseNote />} />
</Route>
</Route>
</Routes>
</BrowserRouter>
);
};
export default AppRouter;
43 changes: 22 additions & 21 deletions src/navigation/LeftTeamSection.css
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
.LeftTeamSection {
display: flex;
width: 100%;
background-color: #e9e3f5;
display: flex;
width: 100%;
height: 100%;
background-color: #e9e3f5;
}

.LeftTeamSection .container {
display: flex;
margin: 4%;
padding: 4%;
flex-direction: column;
align-items: center;
width: 200px;
height: fit-content;
border-radius: 50px;
background-color: white;
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
display: flex;
margin: 4%;
padding: 4%;
flex-direction: column;
align-items: center;
width: 200px;
height: fit-content;
border-radius: 50px;
background-color: white;
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.LeftTeamSection .all-button,
.LeftTeamSection .private-button {
width: 100px;
margin-top: 10px;
width: 100px;
margin-top: 10px;
}

.LeftTeamSection .teams {
display: flex;
flex-direction: column;
align-items: flex-start;
margin-top: 20px;
display: flex;
flex-direction: column;
align-items: flex-start;
margin-top: 20px;
}

.LeftTeamSection .teams-title {
}

.LeftTeamSection .teams Button {
margin-top: 10px;
width: 100px;
margin-top: 10px;
width: 100px;
}
Loading

0 comments on commit e146755

Please sign in to comment.