Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend #184

Merged
merged 64 commits into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
c1ce6d2
feat. 새로 고침 버튼 개발[#46]
KyuTae98 Nov 13, 2022
c00f8f6
Merge branch 'main' into Frontend
KyuTae98 Nov 13, 2022
9ee1d5e
feat. map component 리팩토링
KyuTae98 Nov 13, 2022
2d90ac3
Merge branch 'main' into Frontend
KyuTae98 Nov 16, 2022
e79dba3
Merge branch 'main' into Frontend
KyuTae98 Nov 16, 2022
997e0b3
feat. 버스페이지 css작업 완료
KyuTae98 Nov 21, 2022
dd7f880
Merge branch 'main' into Frontend
KyuTae98 Nov 21, 2022
b122d9d
Merge branch 'main' into Frontend
KyuTae98 Nov 21, 2022
3d9e5da
Merge branch 'Frontend' of https://github.com/2022-Sejong-Creative-Se…
KyuTae98 Nov 21, 2022
d15e1a8
feat. 입력 폼 변경
KyuTae98 Nov 22, 2022
24bf7ec
Merge branch 'main' into Frontend
KyuTae98 Nov 23, 2022
7cafbbc
Merge branch 'main' into Frontend
KyuTae98 Nov 23, 2022
4f18ff3
feat. 지하철 page생성
KyuTae98 Nov 26, 2022
9763491
Merge branch 'main' into Frontend
KyuTae98 Nov 27, 2022
524fc29
feat. map-slice수정
KyuTae98 Nov 27, 2022
9e8bf92
feat. subway page개발(v1.1)
KyuTae98 Nov 27, 2022
33d4fb1
feat. main화면 bus화면 디자인 변경
KyuTae98 Dec 4, 2022
d2b5db6
feat. 디자인 폰트, 버스 페이지 어느 정도 완성
KyuTae98 Dec 5, 2022
6054379
feat. 지하철 페이지 디자인에 맞춰 개발
KyuTae98 Dec 7, 2022
a8cfae4
Merge branch 'main' into Frontend
KyuTae98 Dec 7, 2022
d88e685
Merge branch 'main' into Frontend
KyuTae98 Dec 7, 2022
7c8c545
feat. 지하철 메뉴
KyuTae98 Dec 7, 2022
b51eb61
feat. 모바일 반응형
KyuTae98 Dec 9, 2022
9f11d3d
Merge branch 'main' into Frontend
KyuTae98 Dec 9, 2022
67604d2
feat. 환승 page개발
KyuTae98 Dec 9, 2022
dfdb1b5
feat. HashRouter로 변경
KyuTae98 Dec 11, 2022
8dc6e8d
Merge branch 'main' into Frontend
KyuTae98 Dec 11, 2022
14d4571
feat. 이모지 + 서버
KyuTae98 Dec 13, 2022
09e4289
Merge branch 'main' into Frontend
KyuTae98 Dec 13, 2022
832f422
feat.지하철 수정
KyuTae98 Dec 13, 2022
671b97b
Merge branch 'Frontend' of https://github.com/2022-Sejong-Creative-Se…
KyuTae98 Dec 13, 2022
e3c1cbf
Merge branch 'main' into Frontend
KyuTae98 Dec 13, 2022
2b106f4
feat. map focusing 수정
KyuTae98 Dec 13, 2022
2e0315f
feat. 휠체어 기능 하기 전 저장
KyuTae98 Dec 13, 2022
822104f
feat. 휠체어 수정 완료
KyuTae98 Dec 13, 2022
dff0ed6
feat. 디테일한 수정
KyuTae98 Dec 13, 2022
c336db0
Update Api.js
KyuTae98 Dec 13, 2022
f2067e2
feat. 약간의 수정
KyuTae98 Dec 13, 2022
d010ffb
Merge branch 'Frontend' of https://github.com/2022-Sejong-Creative-Se…
KyuTae98 Dec 13, 2022
0408743
Merge branch 'main' into Frontend
KyuTae98 Dec 13, 2022
17413e3
feat.폰트, 맵 초기화 수정
KyuTae98 Dec 21, 2022
05c4a0a
Merge branch 'Frontend' of https://github.com/2022-Sejong-Creative-Se…
KyuTae98 Dec 21, 2022
db7ff6d
feat. 최종 수정
KyuTae98 Dec 21, 2022
b5661a7
Merge branch 'main' into Frontend
KyuTae98 Dec 21, 2022
67a2f1c
Update StationItem.js
KyuTae98 Jan 5, 2023
963f24f
Merge branch 'Frontend' of https://github.com/2022-Sejong-Creative-Se…
KyuTae98 Jan 5, 2023
85d55cc
refac: typescript로 Refectoring중
KyuTae98 Sep 13, 2023
19d1d07
feat(front): ts변경 오류 다수 발견
KyuTae98 Oct 11, 2023
5965578
feat(front): gps기반 지도 중심 개발
KyuTae98 Oct 11, 2023
76ce3da
fix(front): 프론트 정리
KyuTae98 Oct 11, 2023
b179900
fix(front): Api 수정
KyuTae98 Oct 12, 2023
732ba68
Merge branch 'main' into Frontend
KyuTae98 Oct 12, 2023
3bae8bf
fix(front): map 변경
KyuTae98 Oct 12, 2023
d8e1e7d
Merge branch 'Frontend' of https://github.com/2022-Sejong-Creative-Se…
KyuTae98 Oct 12, 2023
8e2d793
feat: 간단 퍼블리싱(1)
KyuTae98 Nov 6, 2023
c817b54
feat:menuBar 수정(SVG로 표현)
KyuTae98 Nov 7, 2023
bac7499
feat(front): 모바일 환경에 맞게 수정
KyuTae98 Nov 9, 2023
5d58f39
feat(): busmode 완성
KyuTae98 Nov 15, 2023
1cce4fb
feat: busmode 수정
KyuTae98 Nov 15, 2023
a53d224
feat: 지하철 수정
KyuTae98 Nov 24, 2023
62b9f63
feat: 지하철 마무리
KyuTae98 Nov 26, 2023
a5c9637
feat: map Marker 클릭이벤트 등록 완료
KyuTae98 Nov 28, 2023
e42a816
feat: 길찾기 솔루션 개발중
KyuTae98 Nov 30, 2023
9a3fa7a
feat: Frontend
KyuTae98 Dec 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Backend/Frontend/creative/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import SubwayPage from "./page/subwaypage/SubwayPage.tsx"
import SubwayDetailPage from "./page/subwaypage/SubwayDetailPage.tsx"
import SubwayElevatorPage from "./page/subwaypage/SubwayElevator.tsx";
import SubwayBathChairPage from "./page/subwaypage/SubwayBathchair.tsx";
import SignPage from "./page/SignPage.tsx";
import SignDetailPage from "./page/SIgnDetailPage.tsx";

//page마다 url을 따로 지정, 페이지에서 api를 호출할 때 필요한 파라미터를 제공
function App() {
Expand All @@ -18,6 +20,8 @@ function App() {
<Route path="/subway/detail/:stCd/:stNm" element={<SubwayDetailPage />} />
<Route path="/subway/elevator/:stCd/:stNm/:railCd/:lnCd" element={<SubwayElevatorPage />} />
<Route path="/subway/bathchair/:stCd/:stNm/:railCd/:lnCd" element={<SubwayBathChairPage />} />
<Route path="/sign" element={<SignPage/>}/>
<Route path="/sign/detail" element={<SignDetailPage/>}/>
</Routes>
</HashRouter>
);
Expand Down
4 changes: 4 additions & 0 deletions Backend/Frontend/creative/src/component/auth/Api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import axios from "axios"

export const api = axios.create({
<<<<<<< HEAD
baseURL: "http://34.145.39.241:3005"
=======
baseURL: "http://34.168.80.42:3005"
>>>>>>> a4564550bd27da525e96b6fc9b5b02b8210532dc
})

Original file line number Diff line number Diff line change
@@ -1,48 +1,31 @@
import React, {useRef} from "react";
import React from "react";
import { useDispatch } from "react-redux";
import styled from "styled-components";
import { api } from "../../auth/Api.ts";
import { MapActions } from "../../../store/Map-slice.ts";
import { BusActions } from "../../../store/Bus-slice.ts";

const StyledForm = styled.form`
display:flex;
width: 100%;
height: 140px;
border: 4px solid #CDD029;
display: flex;
position: fixed;
z-index: 100;
top: 15vh;
height: 1vh;
width: 80vw;
.busFormInput{
width: 80%;
height: 80%;
padding: 15px;
font-size: 2.5vw;
border:0;
width: 100%;
padding: 1em;
font-size: 80%;
font-family: 'Pretendard-Regular';
font-weight: 700;
}
.busFormBtn{
width: 20%;
height: 100%;
background: #CDD029;
border: 1px solid #CDD029;
padding:0;
}
@media (max-width:500px){
width: 98vw;
height: 15vw;
.busFormInput{
font-family: 'Pretendard-Regular';
width: 80%;
height: 15vw;
font-size: 6vw;
padding: 1%;
}
border: 0;
border-radius: 30px;
}
`


const BusForm:React.FC = () => {
const dispatch = useDispatch();
const inputRef = useRef<HTMLInputElement>(null);

const SubmitBusStation = (value: string|null) => {
api
.get(`/bus/stNm/${value}`)
Expand All @@ -59,14 +42,16 @@ const BusForm:React.FC = () => {
alert("해당 정류장이 없습니다.");
});
};

const BusStationData = (event:React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
SubmitBusStation(inputRef.current!.value);
let [station]:any = (event.target as HTMLInputElement);
SubmitBusStation(station.value);
};

return (
<StyledForm onSubmit={BusStationData}>
<input className="busFormInput" ref={inputRef} placeholder="정류장을 입력해주세요." />
<button className="busFormBtn"><img className="GRASS" src="./image/GRASS.png" alt="GRASS" /></button>
<input className="busFormInput" name="station" placeholder="정류장을 입력해주세요." />
</StyledForm>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ const StyledBusItem = styled.li`
justify-content: space-between;
align-items: center;
width: 100%;
min-height: 10%;
list-style: none;
text-align: center;
border-bottom: 1px solid #d2d2d2;
font-family: "Pretendard-Regular";
.mark {
width: 1.5vw;
height: 1.5vw;
margin-right: 0.8vw;
width: 1em;
height: 1em;
margin-right: 0.5rem;
}
:hover {
cursor: pointer;
Expand All @@ -38,44 +39,26 @@ const StyledBusItem = styled.li`
font-family: "Pretendard-Regular";
font-style: normal;
font-weight: 600;
font-size: 2vw;
font-size: 1em;
line-height: 60px;
margin-right: 10px;
}
.direction {
font-family: "Pretendard-Regular";
font-style: normal;
font-weight: 600;
font-size: 1.3vw;
font-size: 1em;
line-height: 29px;
}
.id {
padding-right: 20px;
font-family: "Pretendard-Regular";
font-style: normal;
font-weight: 600;
font-size: 1.5vw;
font-size: 1em;
line-height: 29px;
color: #9c9c9c;
}

@media (max-width: 500px) {
height: 28%;
.Name {
font-size: 5vw;
}
.direction {
font-size: 3vw;
}
.id {
font-size: 3vw;
}
.mark {
width: 100%;
height: 100%;
margin-right: 2vw;
}
}
`;

const BusItem = (props:any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@ flex-direction:column;
align-items: center;
box-sizing: border-box;
width: 100%;
height: 640px;
background: #FFFFFF;
border: 4px solid #CDD029 ;
max-height:50%;
min-height:50%;
padding:0;
margin:0;
overflow:auto;
@media (max-width:500px) {
border: 4px solid #CDD029 ;
width:100%;
height:30vh;
}
`


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { BusActions } from "../../../store/Bus-slice.ts";
import { RootState } from "../../../store/index.ts";

const StyledRefreshButton = styled.button`
width: 3vw;
height: 3vw;
width: 2em;
height: 2em;
border: 0;
border-radius: 50px;
background-color: transparent;
Expand All @@ -19,14 +19,6 @@ const StyledRefreshButton = styled.button`
:hover {
cursor: pointer;
}
@media (max-width: 500px) {
width: 10vw;
height: 10vw;
img {
width: 70%;
height: 70%;
}
}
`;

const RefreshButton = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,27 @@ import { useEffect, useState } from "react";
import { RootState } from "../../../store/index.ts";

interface stItem {
color:any;
color:string;
}

const StationItem = (props:any) => {
const [color, setColor] = useState<boolean>(false);
const [color, setColor] = useState<string>("false");
const { stNm, arsId, tmX, tmY } = props.items;

const dispatch = useDispatch();
const station = useSelector((state:RootState) => state.bus.currentStation);
useEffect(() => {
if (station === arsId) {
setColor(false);
setColor("false");
} else {
setColor(true);
setColor("true");
}
}, [arsId, station]);

const ClickClass = () => {
if (station === arsId) {
SubmitStation();
} else if (station !== arsId) {
setColor(false);
setColor("false");
dispatch(BusActions.ClickStation(arsId));
dispatch(MapActions.positioning({ tmX, tmY }));
}
Expand Down Expand Up @@ -63,7 +62,7 @@ const StyledStationItem = styled.li<stItem>`
width: 100%;
list-style: none;
border-bottom: 1px solid #d2d2d2;
background-color: ${props => (props.color ? "#FFFFFF" : "#CDD029")};
background-color: ${props => (props.color==="true" ? "#FFFFFF" : "#FFD12D")};
font-family: "Pretendard-Regular";
:hover {
cursor: pointer;
Expand All @@ -73,34 +72,23 @@ const StyledStationItem = styled.li<stItem>`
padding-left: 20px;
font-family: "Pretendard-Regular";
font-style: normal;
font-weight: ${props => (props.color ? "400" : "700")};
font-size: 2vw;
font-weight: ${props => (props.color==="true" ? "400" : "700")};
font-size: 1em;
line-height: 60px;
color: ${props => (props.color ? "#000000" : "#FFFFFF")};
color: ${props => (props.color==="true" ? "#000000" : "#FFFFFF")};
}

.id {
padding-right: 20px;
font-family: "Pretendard-Regular";
font-style: normal;
font-weight: ${props => (props.color ? "500" : "700")};
font-size: 1.7vw;
font-weight: ${props => (props.color==="true" ? "500" : "700")};
font-size: 1em;
line-height: 29px;
display: flex;
align-items: center;
text-align: center;
color: ${props => (props.color ? "#000000" : "#FFFFFF")};
}
@media (max-width: 500px) {
height: 35%;
.Name {
font-family: "Pretendard-Regular";
font-size: 5vw;
}
.id {
font-family: "Pretendard-Regular";
font-size: 3vw;
}
color: ${props => (props.color==="true" ? "#000000" : "#FFFFFF")};
}
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ align-items:center;
height:50px;
width:90%;
height:auto;
font-size:1.9vw;
font-size:1em;
font-family: 'Pretendard-Regular';
padding:0;
p{
font-weight:bold;
margin:0;
}
@media (max-width:500px){
font-size:4.5vw;
height:20%;
}
`

const BusNumber = (props:any) => {
Expand Down
8 changes: 8 additions & 0 deletions Backend/Frontend/creative/src/component/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ import { MapActions } from "../../store/Map-slice.ts";

const StyledHeader = styled.header`
display:flex;
position: fixed;
top: 0;
z-index: 100;
justify-content:space-between;
background-color: #FFFFFF;
align-items:center;
position:fixed;
top: 0;
font-family: 'GmarketSansMedium';
border-bottom: 2px solid #EBEBEB;
width:100vw;
<<<<<<< HEAD
height:10vh;
=======
min-height:8vh;
>>>>>>> a4564550bd27da525e96b6fc9b5b02b8210532dc
.header_home{
font-size:5vw;
color:#000000;
Expand Down
14 changes: 14 additions & 0 deletions Backend/Frontend/creative/src/component/loding/Loding.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";




const Loding = () => {
return (
<div>
Loding...
</div>
)
}

export default Loding
Loading