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

[FEAT & DESIGN] 마이페이지 #27

Merged
merged 26 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fb9d7d5
🐛fix(#23): Navigator title 정렬 안맞는 오류 해결
hyo-4 Sep 25, 2024
2b5500d
✨feat(#23): 마이페이지 상단 프로필 정보 Container
hyo-4 Sep 25, 2024
f561d19
✨feat(#23): 마이페이지 홈 UI
hyo-4 Sep 25, 2024
1510752
✨feat(#23): 내 프로필 LayOut
hyo-4 Sep 25, 2024
900147a
✨feat(#23): 내 프로필 UI
hyo-4 Sep 26, 2024
e49691d
✨feat(#23): 생일 선택 모달
hyo-4 Sep 26, 2024
aa017c6
✨feat(#23): Calendar 옵션 추가
hyo-4 Sep 26, 2024
71eae3b
✨feat(#23): 로그아웃 기능 추가
hyo-4 Sep 26, 2024
3d23476
✨feat(#23): 모달 애니메이션
hyo-4 Sep 26, 2024
b7320c9
💄design(#23): 애니메이션 효과 범위 수정
hyo-4 Sep 26, 2024
d4d3e3c
Merge branch 'feat/#19' into feat/#23
hyo-4 Sep 26, 2024
f886654
💄design(#23): 편지 날짜 보기 UI
hyo-4 Sep 26, 2024
6acac4f
💄design(#23): 내 프로필 UI 스크롤바 수정 & 보낸 편지함 추가
hyo-4 Sep 27, 2024
619f041
💄design(#23): 마이페이지 스크롤 바 수정
hyo-4 Sep 27, 2024
cb06c24
💄design(#23): LetterTag Component 추가
hyo-4 Sep 27, 2024
a4f7436
💄design(#23): LetterTag 글자수 늘어나면 생략(..)처리
hyo-4 Sep 27, 2024
bf4539b
✨feat(#23): 보낸 편지함 - 전체 선택, 삭제 구현
hyo-4 Sep 27, 2024
569e5dd
✨feat(#23): 보낸 편지함 - 삭제시 모달 open
hyo-4 Sep 27, 2024
fbe66f5
💄design(#23): LetterTag CheckCircle 스타일 수정
hyo-4 Sep 27, 2024
81f22a1
✨feat(#23): 회원 탈퇴 페이지 레이아웃
hyo-4 Sep 27, 2024
db03cd8
💄design(#23): DateModal type에 따라 icon 수정
hyo-4 Sep 27, 2024
ff339fa
feat: 회원 탈퇴 page
hyo-4 Oct 1, 2024
a29352c
💄design: LetterTag 클릭 범위 변경
hyo-4 Oct 1, 2024
595a03c
💄design(#23): Letter Component Sender type 추가
hyo-4 Oct 1, 2024
13a21a7
🐛fix(#23): 라우터 버튼 범위 변경
hyo-4 Oct 1, 2024
8ca418d
💄design(#23): 보낸 편지함 상세
hyo-4 Oct 1, 2024
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
3 changes: 3 additions & 0 deletions public/assets/icons/ic_arrow_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/assets/icons/ic_arrow_profile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/icons/ic_calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/assets/icons/ic_kakao_profile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/assets/icons/ic_letter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/mypage/ic_check.svg
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 public/assets/mypage/img_date_sample.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 public/assets/mypage/img_date_sample2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/profile/ic_arrow_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/profile/ic_arrow_left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/profile/ic_arrow_right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/profile/ic_arrow_up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/assets/profile/ic_close.svg
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 public/assets/profile/img_profile_letter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/app/guide/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const GuidePage = () => {
checked={isCheckedBox}
onChange={handleBoxChange}
/>

<br />
<h3>Input</h3>
<Input
Expand Down
164 changes: 164 additions & 0 deletions src/app/mypage/delete/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
"use client";

import Button from "@/components/common/Button";
import Check from "@/components/common/Check";
import Dropdown from "@/components/common/Dropdown";
import Input from "@/components/common/Input";
import Loader, { LoaderContainer } from "@/components/common/Loader";
import NavigatorBar from "@/components/common/NavigatorBar";
import { Suspense, useState } from "react";
import styled from "styled-components";

const DeleteAccount = () => {
const [selectedOption, setSelectedOption] = useState(""); //드롭다운
const options = [
"개인정보를 삭제하고 싶어요",
"서비스 이용이 불편해요",
"탈퇴 후 다시 가입할 예정이에요",
"서비스를 이용하지 않아요",
"그 외 기타",
];
const [textarea, setTextarea] = useState(""); //질문2
const [isCheckedBox, setIsCheckedBox] = useState(false); // 체크박스

const handleBoxChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setIsCheckedBox(e.target.checked);
};

return (
<Container>
<Wrapper>
<NavigatorBar title="회원 탈퇴" cancel={false} />
</Wrapper>
<MainWrapper>
<MainTitle>정말 레터링을 탈퇴하시겠어요?</MainTitle>
<SubTitle>
회원 탈퇴 후에는 레터링에 저장된 행성과 편지들이
<br />
모두 삭제되며, 삭제된 내용은 복구할 수 없어요{" "}
</SubTitle>
<QuestionWrapper>
<QuestionText>레터링을 탈퇴하는 이유를 말씀해주세요</QuestionText>
<Dropdown
options={options}
value={selectedOption}
onChange={setSelectedOption}
placeholder="선택해주세요"
></Dropdown>
</QuestionWrapper>
<QuestionWrapper>
<QuestionText>
더 나은 서비스를 위해 의견을 남겨주세요
<span>{textarea.length + " / 500"}</span>
</QuestionText>
<Input
inputType="boxTextArea"
value={textarea}
onChange={setTextarea}
//placeholder="BoxTexarea Input (height=150px)"
height="150px"
/>
</QuestionWrapper>
<Check
checkType="box"
labelFont="button03"
label="모든 데이터를 삭제하고 탈퇴하는 것에 동의합니다"
checked={isCheckedBox}
onChange={handleBoxChange}
/>
</MainWrapper>
<Wrapper>
<Button buttonType="primary" size="large" text="탈퇴하기" />
</Wrapper>
</Container>
);
};

export default function SendedLetterPaging() {
return (
<Suspense
fallback={
<LoaderContainer>
<Loader />
</LoaderContainer>
}
>
<DeleteAccount />
</Suspense>
);
}

const Container = styled.div`
display: flex;
flex-direction: column;
height: 100%;
min-height: 100%;
max-height: 100%;
justify-content: space-between;
color: white;
background:${(props) => props.theme.colors.bg};
`;

const MainWrapper = styled.div`
display: flex;
flex-direction: column;
padding: 5px 24px;
height: 100%;
overflow-y: auto;
box-sizing: border-box;
&::-webkit-scrollbar {
width: 5px; /* Width of the scrollbar */
}

&::-webkit-scrollbar-track {
background: ${(props: any) => props.theme.colors.gray800};
border-radius: 10px; /* Rounded corners */
}

&::-webkit-scrollbar-thumb {
background: ${(props: any) => props.theme.colors.gray600};
border-radius: 10px; /* Rounded corners */
}
`;

const Wrapper = styled.div`
display: flex;
width: 100%;
padding: 24px;
`;

const MainTitle = styled.div`
${(props: any) => props.theme.fonts.title01};
color: ${(props: any) => props.theme.colors.white};
padding: 9px 0;
`;

const SubTitle = styled.div`
${(props: any) => props.theme.fonts.body08};
color: ${(props: any) => props.theme.colors.white};
margin-bottom: 35px;
`;

const QuestionText = styled.div`
${(props: any) => props.theme.fonts.subtitle};
color: ${(props: any) => props.theme.colors.white};
display : flex;
justify-content: space-between;

//글자수
span {
display: flex;
text-align: center;
align-items: center;
${(props: any) => props.theme.fonts.caption03};
color: ${(props: any) => props.theme.colors.white};
}
`;

const QuestionWrapper = styled.div`
display: flex;
width: 100%;
flex-direction: column;
gap: 12px;
padding: 20px 0;
`;
155 changes: 155 additions & 0 deletions src/app/mypage/lettertype/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
"use client";

import Button from "@/components/common/Button";
import Check from "@/components/common/Check";
import Loader, { LoaderContainer } from "@/components/common/Loader";
import NavigatorBar from "@/components/common/NavigatorBar";
import { useRouter } from "next/navigation";
import { Suspense, useState } from "react";
import styled from "styled-components";

const LetterType = () => {
const [isCheckedBox, setIsCheckedBox] = useState(false); // false라면 이름만, true라면 이름과 날짜
const router = useRouter();

const handleBoxChange = (newCheckedState: boolean) => {
if (!isCheckedBox || !newCheckedState) {
setIsCheckedBox(newCheckedState);
}
};

const handleSumbit = () => {
if (isCheckedBox) {
console.log("이름과날짜");
} else {
console.log("이름만");
}
router.push("/mypage");
};

return (
<Container>
<Wrapper>
<NavigatorBar title="편지 날짜 보기" cancel={false} />
</Wrapper>
<MainWrapper>
<MainText>해당 날짜는 스페이스에 등록된 날짜예요</MainText>
<SelectWrapper>
<Select>
<SelectTitle>이름만 (기본)</SelectTitle>
<SampleImg src="/assets/mypage/img_date_sample.png" />
<Check
checkType="large"
checked={!isCheckedBox}
onChange={() => handleBoxChange(false)}
/>
</Select>
<Select>
<SelectTitle>이름과 날짜</SelectTitle>
<SampleImg src="/assets/mypage/img_date_sample.png" />
<Check
checkType="large"
checked={isCheckedBox}
onChange={() => handleBoxChange(true)}
/>
</Select>
</SelectWrapper>
</MainWrapper>
<Wrapper>
<Button
buttonType="primary"
size="large"
text="저장하기"
onClick={handleSumbit}
/>
</Wrapper>
</Container>
);
};

export default function LetterTypePaging() {
return (
<Suspense
fallback={
<LoaderContainer>
<Loader />
</LoaderContainer>
}
>
<LetterType />
</Suspense>
);
}

const Container = styled.div`
display: flex;
flex-direction: column;
height: 100%;
min-height: 100%;
max-height: 100%;
justify-content: space-between;
color: white;
background:${(props) => props.theme.colors.bg};
`;

const MainWrapper = styled.div`
display: flex;
flex-direction: column;
align-items: center;
padding: 24px;
overflow-y: auto;
box-sizing: border-box;
&::-webkit-scrollbar {
width: 5px; /* Width of the scrollbar */
}

&::-webkit-scrollbar-track {
background: ${(props: any) => props.theme.colors.gray800};
border-radius: 10px; /* Rounded corners */
}

&::-webkit-scrollbar-thumb {
background: ${(props: any) => props.theme.colors.gray600};
border-radius: 10px; /* Rounded corners */
}
`;

const MainText = styled.div`
${(props: any) => props.theme.fonts.body07};
color: ${(props: any) => props.theme.colors.gray300};
`;

const SelectWrapper = styled.div`
display: flex;
flex-direction: row;
width: 100%;
gap: 20px;
margin: 42px 0;
`;

const Select = styled.div`
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column;
width: 50%;
gap: 20px;
`;

const SelectTitle = styled.div`
width: 100%;
text-align: center;
${(props: any) => props.theme.fonts.body08};
color: ${(props: any) => props.theme.colors.white};
`;

const SampleImg = styled.img`
width: 100%;
height: auto;
`;

const Wrapper = styled.div`
display: flex;
width: 100%;
padding: 24px;
`;
Loading