-
Notifications
You must be signed in to change notification settings - Fork 0
CLAP-225 알림, 프로필 모달 api 연결 #94
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e6694f2
♻️ [refactor] : 파일 위치 변경
BaekJiyeon02 6c48636
✨ [feat] : logout 기능 추가
BaekJiyeon02 a841b48
✨ [feat] : logout API 추가
BaekJiyeon02 8e015b9
✨ [feat] : Access Token 통해 로그인 여부 받아오기
BaekJiyeon02 d40fc80
✨ [feat] : 알림목록 조회 API 추가
BaekJiyeon02 290bc14
✨ [feat] : 알림목록 무한 스크롤
BaekJiyeon02 c75da99
✨ [feat] : 무한 스크롤 v3-infinite-loading 라이브러리 추가
BaekJiyeon02 745c13f
♻️ [refactor] : 불필요한 코드 제거
BaekJiyeon02 27cfe39
✨ [feat] : 알림 읽음 상태 변경, 미확인 알림 개수
BaekJiyeon02 127d11f
✨ [feat] : 미확인 알림 개수 반영
BaekJiyeon02 0eea7f7
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-F…
BaekJiyeon02 8977e3c
♻️ [refactor] : 임시 프로필 사진 제거
BaekJiyeon02 9b04fba
✨ [feat] :로그인시 반응형으로 바뀌지 않는 TopBar 수정
BaekJiyeon02 17cdd54
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-F…
BaekJiyeon02 455aecf
💄 [design] : 알림 디자인 수정
BaekJiyeon02 a3534fc
💄 [design] : 탑바 및 로그인 디자인 수정
BaekJiyeon02 ae0f361
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-F…
BaekJiyeon02 489f95b
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-F…
BaekJiyeon02 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,44 @@ | ||
| import { axiosInstance } from '@/utils/axios' | ||
| import Cookies from 'js-cookie' | ||
| import type { loginDataTypes } from '@/types/auth' | ||
| import { useMemberStore } from '@/stores/member' | ||
|
|
||
| export const postLogin = async (loginData: loginDataTypes, sessionId: string) => { | ||
| const memberStore = useMemberStore() | ||
| const response = await axiosInstance.post('/api/auths/login', loginData, { | ||
| headers: { sessionId: sessionId } | ||
| }) | ||
| Cookies.set('accessToken', response.data.accessToken, { | ||
| path: '/', | ||
| sameSite: 'strict' | ||
| }) | ||
| Cookies.set('refreshToken', response.data.refreshToken, { | ||
| path: '/', | ||
| sameSite: 'strict' | ||
| }) | ||
|
|
||
| await memberStore.updateMemberInfoWithToken() | ||
| return response.data | ||
| } | ||
|
|
||
| export const patchPassword = async (password: string) => { | ||
| const accessToken = Cookies.get('accessToken') | ||
| const response = await axiosInstance.patch('/api/members/password', password) | ||
|
|
||
| if (!accessToken) return | ||
| return response.data | ||
| } | ||
|
|
||
| export const deleteLogout = async () => { | ||
| const memberStore = useMemberStore() | ||
| const refreshToken = Cookies.get('refreshToken') | ||
|
|
||
| const response = await axiosInstance.patch('/api/members/password', password, { | ||
| const response = await axiosInstance.delete('/api/auths/logout', { | ||
Minkyu0424 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| headers: { | ||
| Authorization: `Bearer ${accessToken}` | ||
| Authorization: `Bearer ${import.meta.env.VITE_ACCESS_TOKEN}`, | ||
| refreshToken: refreshToken | ||
| } | ||
| }) | ||
|
|
||
| return response.data | ||
| Cookies.remove('accessToken', { path: '/' }) | ||
| Cookies.remove('refreshToken', { path: '/' }) | ||
| await memberStore.updateMemberInfoWithToken() | ||
| return response | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ | |
| class="w-24 h-24 rounded-full object-cover border mt-3" /> | ||
| <div | ||
| v-else | ||
| class="w-24 h-24 rounded-full bg-background-1 flex items-center justify-center"></div> | ||
| class="w-24 h-24 rounded-full bg-background-1 flex items-center justify-center mt-3"></div> | ||
| <!-- 파일 업로드 필요 --> | ||
| <p class="mt-3 text-xs text-primary1 font-bold cursor-pointer">변경</p> | ||
| </div> | ||
|
|
@@ -91,7 +91,7 @@ const memberId = ref('Chole.yeon') | |
| const memberEmail = ref('[email protected]') | ||
| const memberDepartment = ref('인프라팀') | ||
| const memberJob = ref('인프라 아키텍처') | ||
| const imageUrl = ref('../../public/images/mockProfile.jpg') | ||
| const imageUrl = ref('') | ||
| const isModalVisible = ref(false) | ||
|
|
||
| const memberForm = ref({ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.