-
Notifications
You must be signed in to change notification settings - Fork 0
CLAP-223 TopBar 알림, 프로필 모달 UI 구현 #78
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
181 commits
Select commit
Hold shift + click to select a range
f42a4d8
승인 대기 중인 요청 목록 조회 API 연결
seorang42 1055c33
전체 요청 기록 목록 조회 API 연결
seorang42 1a78397
내 작업 목록 조회 API 연결
seorang42 5927f99
:bug: [fix] 상태값 ENUM 값 수정
seorang42 310f5dc
✨ [feat] : 로그인 API 연결
BaekJiyeon02 3e6e037
✨ [feat] : 액세스 토큰 쿠키에 저장
BaekJiyeon02 53ae8e8
✨ [feat] : 로그인 시 각 역할마다 경로 지정
BaekJiyeon02 0526535
✨ [feat] : Pinia 회원정보 저장하여 상태관리
BaekJiyeon02 6297ee9
✨ [feat] : Pinia에 저장된 회원정보 Top, Side에 적용
BaekJiyeon02 af0c262
✨ [feat] : 비밀번호 재설정 API 연결
BaekJiyeon02 ba6f6d2
♻️ [refactor] : 불필요한 코드 제거
BaekJiyeon02 fa97a00
:recycle: [refactor] : prop대신 직접 가져오기, 파일 초기값 배열로
Minkyu0424 62ca2e7
:recycle: [refactor] : 1,2차 카테고리 타입 선언 및 위치 변경
Minkyu0424 7608c6b
:sparkles: [feat] : 카테고리용 드롭다운 개별 생성
Minkyu0424 bc44633
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 28439a2
:sparkles: [feat] : 정보 누락시 경고 텍스트 출력
Minkyu0424 63168c4
:sparkles: [feat] : 요청 완료 후 모달 및 라우팅
Minkyu0424 81ccca9
:recycle: [refactor] : axios instance 객체 분리해서 import
Minkyu0424 1429843
:recycle: [refactor] : 카테고리 드롭다운 placeholder없이, input placeholder 상수화 취소
Minkyu0424 6e4411a
♻️ [refactor] : axios 인스턴스 이슈 반영
BaekJiyeon02 c9e9947
:recycle: [refactor] : 1,2차 카테고리 타입 선언 및 위치 변경
Minkyu0424 4c58d7d
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 70d2fd8
:recycle: [refactor] : 1,2차 카테고리 타입 선언 및 위치 변경
Minkyu0424 f520926
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 df2f3cc
♻️ [refactor] : 역할 변수에 따른 값 수정
BaekJiyeon02 9d27c4a
♻️ [refactor] : 사용하지 않는 값 제거
BaekJiyeon02 46efe46
♻️ [refactor] : 토큰 axios파일에서 처리되므로 불필요하여 제거
BaekJiyeon02 a17f72c
♻️ [refactor] : 불필요한 예외처리 제거
BaekJiyeon02 488d8a2
♻️ [refactor] : request body 추가 및 타입 선언
BaekJiyeon02 bf93f0f
♻️ [refactor] : 불필요 코드 제거
BaekJiyeon02 2bdf956
:bug: [fix] 빌드 오류 해결
seorang42 9933718
♻️ [refactor] : 충돌 코드 해결
BaekJiyeon02 441a236
💄 [design] : 알림 모달 UI 제작
BaekJiyeon02 276954e
✨ [feat] : 버튼 설정
BaekJiyeon02 403cbb9
♻️ [refactor] : TopBar 관련 컴포넌트 폴더 정리
BaekJiyeon02 91988ed
💄 [design] : 알림 모달 디자인 수정
BaekJiyeon02 5587b34
✨ [feat] : 프로필 모달 제작
BaekJiyeon02 9321c29
♻️ [refactor] : 파일 위치 재정의
BaekJiyeon02 3b07387
:sparkles: [feat] : 1차 카테고리 추가 API 연결
seorang42 a7f5204
:sparkles: [feat] : 2차 카테고리 추가 API 연결
seorang42 7b3a47b
전체 요청 기록 목록 조회 API 연결
seorang42 2c4e078
:recycle: [refactor] : prop대신 직접 가져오기, 파일 초기값 배열로
Minkyu0424 184ead3
:recycle: [refactor] : 1,2차 카테고리 타입 선언 및 위치 변경
Minkyu0424 5fc5335
:sparkles: [feat] : 카테고리용 드롭다운 개별 생성
Minkyu0424 9def193
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 f677572
:sparkles: [feat] : 정보 누락시 경고 텍스트 출력
Minkyu0424 58d8978
:sparkles: [feat] : 요청 완료 후 모달 및 라우팅
Minkyu0424 7b833bb
:recycle: [refactor] : axios instance 객체 분리해서 import
Minkyu0424 e11d7f5
:recycle: [refactor] : 카테고리 드롭다운 placeholder없이, input placeholder 상수화 취소
Minkyu0424 4ed2160
CLAP-234 CI/CD 스크립트 분리 (#74)
hyoseong-Choi 355825b
:recycle: [refactor] : prop대신 직접 가져오기, 파일 초기값 배열로
Minkyu0424 c764eb3
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 581450b
:recycle: [refactor] : 카테고리 드롭다운 placeholder없이, input placeholder 상수화 취소
Minkyu0424 cab1103
♻️ [refactor] : 충돌 코드 해결
BaekJiyeon02 e86bfd4
:recycle: [refactor] : division -> label로 변경
Minkyu0424 decc458
:recycle: [refactor] : 라벨 타입 추가, division -> label로 변경
Minkyu0424 cb90570
:sparkles: [feat] : 관리자 구분목록 get api 연결
Minkyu0424 040efee
:recycle: [refactor] : 모달 및 상태관리 함수 하나로 변경
Minkyu0424 1863dc8
:recycle: [refactor] : 구분 삭제 api 연결
Minkyu0424 3afbbc6
:sparkles: [feat] : 구분 추가 api 연결
Minkyu0424 5fa9df8
:bug: [fix] : 구분 삭제 마지막 값이 되는 에러 해결
Minkyu0424 49693d1
:recycle: [refactor] : 색상 타입에 enum 타입 추가를 통한 색깔 변경 반영
Minkyu0424 14164a2
:sparkles: [feat] : 구분 수정 api 연결
Minkyu0424 5eb6c51
:recycle: [refactor] : 수정 삭제 즉각 반영
Minkyu0424 d175beb
:recycle: [refactor] : axios 인스턴스 불필요 콘솔 삭제
Minkyu0424 c821f0f
전체 요청 기록 목록 조회 API 연결
seorang42 165ffc5
:sparkles: [feat] : 폼데이터 요청 api 형식 분리
Minkyu0424 74598f8
:recycle: [refactor] : prop대신 직접 가져오기, 파일 초기값 배열로
Minkyu0424 c92bafa
:recycle: [refactor] : 1,2차 카테고리 타입 선언 및 위치 변경
Minkyu0424 4f9f5ef
:sparkles: [feat] : 카테고리용 드롭다운 개별 생성
Minkyu0424 ed8a3c8
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 2745ffd
:sparkles: [feat] : 정보 누락시 경고 텍스트 출력
Minkyu0424 b9ef1b0
:sparkles: [feat] : 요청 완료 후 모달 및 라우팅
Minkyu0424 989bb7a
:recycle: [refactor] : axios instance 객체 분리해서 import
Minkyu0424 7640af7
:recycle: [refactor] : 카테고리 드롭다운 placeholder없이, input placeholder 상수화 취소
Minkyu0424 b7a4689
:recycle: [refactor] : test api 삭제
Minkyu0424 2bfed9d
:recycle: [refactor] : scrollbar-hide 미적용 부분 재적용
Minkyu0424 9d4e117
:sparkles: [feat] : 작업 관리 카테고리 전체 조회 연결
Minkyu0424 d43c391
:recycle: [refactor] : 불필요 mock 데이터 삭제
Minkyu0424 fe77efa
:recycle: [refactor] : 카테고리 삭제 api 연결
Minkyu0424 e7323ee
:recycle: [refactor] : 수정 후 최신데이터 반영
Minkyu0424 06b1e42
:recycle: [refactor] : 카테고리 삭제 후 최신 데이터 반영
Minkyu0424 ccbc3fa
:sparkles: [feat] : 구분 색상 보여지는 범위 증가
Minkyu0424 b3f94c0
:sparkles: [feat] : 내 요청 눌렀을 때 상세정보 + isManager pinia통해 가져오기
Minkyu0424 0f3e935
:sparkles: [feat] : 요청 상세정보 가져오기
Minkyu0424 4b8c716
:sparkles: [feat] : 사용자의 권한에 맞는 보여주기, 파일 다운, 용햘 표현
Minkyu0424 8d1b849
:sparkles: [feat] : 사용자의 권한에 맞는 top bar + icon 수정
Minkyu0424 185bf24
:sparkles: [feat] : 처리자가 아닌 담당자의 경우 보이는 장면 구현
Minkyu0424 afef79f
:recycle: [refactor] : 카테고리 타입 통합
Minkyu0424 7655194
:recycle: [refactor] : 상태 리스트 추가 지난 피드백 내용 반영
Minkyu0424 e5f9702
:recycle: [refactor] : 담당자용 api get 연결 요청승인 시 승인 경로로 이동
Minkyu0424 e4360e9
:recycle: [refactor] : 코드 포매팅
Minkyu0424 1ae95ef
:sparkles: [feat] : 1차 카테고리 추가 API 연결
seorang42 3651a12
:sparkles: [feat] : 2차 카테고리 추가 API 연결
seorang42 b79ae14
:recycle: [refactor] : 누락 타입 적용 불필요 뷰 삭제
Minkyu0424 5eb5ce8
:sparkles: [feat] : 통계 API 연결 테스트
seorang42 75cbe8b
:sparkles: [feat] : StatisticsCard 컴포넌트 API 연결
seorang42 f0cae4e
:sparkles: [feat] : StatisticsCategoryCard 컴포넌트 API 연결
seorang42 beef6e8
:sparkles: [feat] : 통계 데이터가 없을 때의 예외 처리
seorang42 f13d4af
:bug: [fix] 빌드 오류 해결
seorang42 20cff3f
:recycle: [refactor] : prop대신 직접 가져오기, 파일 초기값 배열로
Minkyu0424 1add59a
:sparkles: [feat] : 카테고리용 드롭다운 개별 생성
Minkyu0424 042eb67
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 0af0c6c
:sparkles: [feat] : 정보 누락시 경고 텍스트 출력
Minkyu0424 e396322
♻️ [refactor] : 충돌 코드 해결
BaekJiyeon02 66de6b7
:sparkles: [feat] : 1차 카테고리 추가 API 연결
seorang42 43f5db6
:sparkles: [feat] : 2차 카테고리 추가 API 연결
seorang42 f10015e
전체 요청 기록 목록 조회 API 연결
seorang42 5d64277
:recycle: [refactor] : prop대신 직접 가져오기, 파일 초기값 배열로
Minkyu0424 43f1c0f
:recycle: [refactor] : 1,2차 카테고리 타입 선언 및 위치 변경
Minkyu0424 ebae623
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 5531d7e
:sparkles: [feat] : 정보 누락시 경고 텍스트 출력
Minkyu0424 2f2449e
:sparkles: [feat] : 요청 완료 후 모달 및 라우팅
Minkyu0424 a0c74fb
:recycle: [refactor] : division -> label로 변경
Minkyu0424 9e3f70b
:recycle: [refactor] : 라벨 타입 추가, division -> label로 변경
Minkyu0424 7f8459a
:sparkles: [feat] : 관리자 구분목록 get api 연결
Minkyu0424 12b07a8
:recycle: [refactor] : 모달 및 상태관리 함수 하나로 변경
Minkyu0424 ea8e762
:recycle: [refactor] : 구분 삭제 api 연결
Minkyu0424 5851d3c
:sparkles: [feat] : 구분 추가 api 연결
Minkyu0424 86230cf
:bug: [fix] : 구분 삭제 마지막 값이 되는 에러 해결
Minkyu0424 00e62cf
:recycle: [refactor] : 색상 타입에 enum 타입 추가를 통한 색깔 변경 반영
Minkyu0424 7ceccad
:sparkles: [feat] : 구분 수정 api 연결
Minkyu0424 d5ae4db
:recycle: [refactor] : 수정 삭제 즉각 반영
Minkyu0424 7bea2c0
:recycle: [refactor] : axios 인스턴스 불필요 콘솔 삭제
Minkyu0424 e817d07
승인 대기 중인 요청 목록 조회 API 연결
seorang42 84fad3d
전체 요청 기록 목록 조회 API 연결
seorang42 ba73f2f
내 작업 목록 조회 API 연결
seorang42 ec0692e
✨ [feat] : 로그인 API 연결
BaekJiyeon02 f6db150
✨ [feat] : 액세스 토큰 쿠키에 저장
BaekJiyeon02 59fe53b
✨ [feat] : 로그인 시 각 역할마다 경로 지정
BaekJiyeon02 be5d2f2
✨ [feat] : Pinia 회원정보 저장하여 상태관리
BaekJiyeon02 b453d79
✨ [feat] : Pinia에 저장된 회원정보 Top, Side에 적용
BaekJiyeon02 90f0c14
✨ [feat] : 비밀번호 재설정 API 연결
BaekJiyeon02 7368716
♻️ [refactor] : 불필요한 코드 제거
BaekJiyeon02 0c1acb9
:sparkles: [feat] : 폼데이터 요청 api 형식 분리
Minkyu0424 4a8feca
:recycle: [refactor] : prop대신 직접 가져오기, 파일 초기값 배열로
Minkyu0424 bc21c82
:recycle: [refactor] : 1,2차 카테고리 타입 선언 및 위치 변경
Minkyu0424 832760a
:sparkles: [feat] : 카테고리용 드롭다운 개별 생성
Minkyu0424 89db285
:sparkles: [feat] : 1, 2차 카테고리 조회 api 연결
Minkyu0424 55d8a39
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 a20222a
:sparkles: [feat] : 정보 누락시 경고 텍스트 출력
Minkyu0424 0f2e010
:sparkles: [feat] : 요청 완료 후 모달 및 라우팅
Minkyu0424 7a9a7d9
:recycle: [refactor] : axios instance 객체 분리해서 import
Minkyu0424 d31443e
:recycle: [refactor] : 카테고리 드롭다운 placeholder없이, input placeholder 상수화 취소
Minkyu0424 624ae9a
♻️ [refactor] : axios 인스턴스 이슈 반영
BaekJiyeon02 78bb03c
:recycle: [refactor] : 1,2차 카테고리 타입 선언 및 위치 변경
Minkyu0424 71c3381
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 8b568e0
:recycle: [refactor] : 1,2차 카테고리 타입 선언 및 위치 변경
Minkyu0424 da3a4f0
:sparkles: [feat] : 요청 생성 api 연결
Minkyu0424 129f5ef
♻️ [refactor] : 사용하지 않는 값 제거
BaekJiyeon02 f6ec9cd
♻️ [refactor] : 토큰 axios파일에서 처리되므로 불필요하여 제거
BaekJiyeon02 b0d66dc
♻️ [refactor] : 불필요한 예외처리 제거
BaekJiyeon02 5b0ac9f
♻️ [refactor] : request body 추가 및 타입 선언
BaekJiyeon02 863c78c
♻️ [refactor] : 불필요 코드 제거
BaekJiyeon02 6cff728
:recycle: [refactor] : test api 삭제
Minkyu0424 7902c73
:sparkles: [feat] : 작업 관리 카테고리 전체 조회 연결
Minkyu0424 ecbafdf
:recycle: [refactor] : 불필요 mock 데이터 삭제
Minkyu0424 5136ae7
:recycle: [refactor] : 카테고리 삭제 api 연결
Minkyu0424 961e459
:recycle: [refactor] : 수정 후 최신데이터 반영
Minkyu0424 ff16a37
:recycle: [refactor] : 카테고리 삭제 후 최신 데이터 반영
Minkyu0424 b99abd5
:bug: [fix] 빌드 오류 해결
seorang42 87bb2a5
:sparkles: [feat] : 구분 색상 보여지는 범위 증가
Minkyu0424 e10e2b5
:sparkles: [feat] : 내 요청 눌렀을 때 상세정보 + isManager pinia통해 가져오기
Minkyu0424 c18a890
:sparkles: [feat] : 요청 상세정보 가져오기
Minkyu0424 286c46f
:sparkles: [feat] : 사용자의 권한에 맞는 보여주기, 파일 다운, 용햘 표현
Minkyu0424 0336eaa
:sparkles: [feat] : 사용자의 권한에 맞는 top bar + icon 수정
Minkyu0424 565b1a8
:sparkles: [feat] : 처리자가 아닌 담당자의 경우 보이는 장면 구현
Minkyu0424 7be7f59
:recycle: [refactor] : 카테고리 타입 통합
Minkyu0424 7f09ca6
:recycle: [refactor] : 상태 리스트 추가 지난 피드백 내용 반영
Minkyu0424 c1fb83d
:recycle: [refactor] : 담당자용 api get 연결 요청승인 시 승인 경로로 이동
Minkyu0424 10ae979
:recycle: [refactor] : 코드 포매팅
Minkyu0424 e81bd15
:sparkles: [feat] : 1차 카테고리 추가 API 연결
seorang42 28d6bc5
:sparkles: [feat] : 2차 카테고리 추가 API 연결
seorang42 bcb4d86
:recycle: [refactor] : 누락 타입 적용 불필요 뷰 삭제
Minkyu0424 440a12c
:sparkles: [feat] : 통계 API 연결 테스트
seorang42 23ff426
:sparkles: [feat] : StatisticsCard 컴포넌트 API 연결
seorang42 ed25959
:sparkles: [feat] : StatisticsCategoryCard 컴포넌트 API 연결
seorang42 9bc7f5e
:sparkles: [feat] : 통계 데이터가 없을 때의 예외 처리
seorang42 5287187
:bug: [fix] 빌드 오류 해결
seorang42 4e80205
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-F…
BaekJiyeon02 8fbbe1c
♻️ [refactor] : 파일 변경 반영
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
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
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 |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| <template> | ||
| <div | ||
| v-if="isOpen" | ||
| class="fixed inset-0 flex z-50 justify-center" | ||
| @click.self="closeModal"> | ||
| <div | ||
| class="flex relative w-[1200px] h-[72px] bg-opacity-15" | ||
| @click.self="closeModal"> | ||
| <div | ||
| class="absolute right-6 top-[72px] h-60 w-80 bg-white rounded-lg shadow-[0_3px_10px_rgb(0,0,0,0.2)]"> | ||
| <div class="flex relative px-4 pt-3 pb-2 border-b border-border-2"> | ||
| <p class="text-body font-bold text-xs">알림</p> | ||
| <div class="absolute right-4"> | ||
| <div class="flex items-center"> | ||
| <button class="flex items-center"> | ||
| <CommonIcons | ||
| :name="smallCheckIcon" | ||
| class="w-2.5 h-1.5 mr-1 fill-primary1" /> | ||
| <p class="font-bold text-primary1 text-xs">모두 읽음</p> | ||
| </button> | ||
| <CommonIcons | ||
| :name="closeIcon" | ||
| class="ml-2 cursor-pointer" | ||
| @click="closeModal" /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="max-h-[186px] flex flex-col h-full overflow-y-auto"> | ||
| <div class="overflow-y-scroll flex"></div> | ||
| <button :class="['flex flex-col border-b py-3 px-4', { 'bg-primary2': isCheck }]"> | ||
| <p class="text-xs text-body font-bold">{{ title }}</p> | ||
| <div class="flex text-xs pt-2"> | ||
| <span class="text-black"> | ||
| <span class="text-primary1 font-bold">"{{ taskTitle }}"</span> | ||
| 요청이 | ||
| <span class="text-primary1 font-bold">{{ message }}</span> | ||
| 상태로 변경 되었습니다 | ||
| </span> | ||
| </div> | ||
| </button> | ||
| <button :class="['flex flex-col border-b py-3 px-4', { 'bg-primary2': !isCheck }]"> | ||
| <p class="text-xs text-body font-bold">{{ title }}</p> | ||
| <div class="flex text-xs pt-2"> | ||
| <span class="text-black"> | ||
| <span class="text-primary1 font-bold">"{{ taskTitle }}"</span> | ||
| 요청이 | ||
| <span class="text-primary1 font-bold">{{ message }}</span> | ||
| 상태로 변경 되었습니다 | ||
| </span> | ||
| </div> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { ref } from 'vue' | ||
| import CommonIcons from '../common/CommonIcons.vue' | ||
| import { smallCheckIcon, closeIcon } from '@/constants/iconPath' | ||
| const props = defineProps<{ | ||
| isOpen: boolean | ||
| }>() | ||
|
|
||
| const title = ref('작업 상태 변경 알림') | ||
| const taskTitle = ref('VM 생성 요청') | ||
| const message = ref('진행 중') | ||
| const isCheck = ref(true) | ||
|
|
||
| const emit = defineEmits<{ | ||
| (e: 'close'): void | ||
| }>() | ||
|
|
||
| const closeModal = () => { | ||
| emit('close') | ||
| } | ||
| </script> |
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 |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| <template> | ||
| <div | ||
| v-if="isOpen" | ||
| class="fixed inset-0 flex z-50 justify-center" | ||
| @click.self="closeModal"> | ||
| <div | ||
| class="flex relative w-[1200px] h-[72px] bg-opacity-15" | ||
| @click.self="closeModal"> | ||
| <div | ||
| class="absolute w-60 bg-white right-6 top-[72px] rounded-lg shadow-[0_3px_10px_rgb(0,0,0,0.2)]"> | ||
| <div | ||
| class="flex items-center justify-center relative px-6 py-8 border-b bg-primary2 border-border-2"> | ||
| <div class="flex flex-col items-center justify-center"> | ||
| <div class="w-24 h-24 bg-background-1 rounded-full mb-6"></div> | ||
| <div> | ||
| <div class="flex flex-col justify-center items-center w-[172px]"> | ||
| <p class="text-xs text-body font-bold">{{ name }}</p> | ||
| <p class="text-black">{{ nickname }}</p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <button | ||
| @click="handleEdit" | ||
| type="button" | ||
| class="flex w-full py-4 px-6 text-sm text-black font-bold border-b border-border-2"> | ||
| 내 정보 수정 | ||
| </button> | ||
| <button | ||
| @click="handleLogout" | ||
| type="button" | ||
| class="flex w-full py-4 px-6 text-sm text-red-1 font-bold"> | ||
| 로그아웃 | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { ref } from 'vue' | ||
| import { useRouter } from 'vue-router' | ||
|
|
||
| const router = useRouter() | ||
|
|
||
| const props = defineProps<{ | ||
| isOpen: boolean | ||
| }>() | ||
|
|
||
| const name = ref('벡지연') | ||
| const nickname = ref('Chloe.yeon') | ||
|
|
||
| const emit = defineEmits<{ | ||
| (e: 'close'): void | ||
| }>() | ||
|
|
||
| const closeModal = () => { | ||
| emit('close') | ||
| } | ||
| const handleEdit = () => { | ||
| router.push('/edit-information') | ||
| emit('close') | ||
| } | ||
| const handleLogout = () => { | ||
| // 로그아웃 API 추가 필요 | ||
| } | ||
| </script> | ||
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 |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| <template> | ||
| <NotificationModal | ||
| :isOpen="isNotifiVisible" | ||
| @close="toggleNotifi" /> | ||
| <ProfileModal | ||
| :isOpen="isProfileVisible" | ||
| @close="toggleProfile" /> | ||
| <div class="fixed w-full bg-white text-black py-2 border-b border-border-1"> | ||
| <div | ||
| class="max-w-[1200px] min-w-[1024px] mx-auto px-6 flex w-full justify-between items-center"> | ||
| <div class="flex justify-center items-center gap-6 h-full"> | ||
| <button | ||
| type="button" | ||
| v-show="isLogined" | ||
| @click="isSideOpen = true"> | ||
| <CommonIcons :name="hamburgerIcon" /> | ||
| </button> | ||
| <img src="/MainLogo.svg" /> | ||
| </div> | ||
| <div | ||
| v-show="isLogined" | ||
| class="flex items-center gap-6"> | ||
| <button | ||
| type="button" | ||
| @click="toggleNotifi"> | ||
| <NotificationIcon :new-notification="12" /> | ||
| </button> | ||
| <button | ||
| type="button" | ||
| @click="toggleProfile"> | ||
| <img | ||
| v-if="info?.imageUrl" | ||
| class="rounded-[50%] w-10 h-10" | ||
| :src="info.imageUrl" | ||
| alt="프로필 이미지" /> | ||
| <div | ||
| v-else | ||
| class="rounded-[50%] bg-zinc-100 p-5" /> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <SideBar | ||
| v-if="isSideOpen" | ||
| @close="onCloseSide" /> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { ref, onMounted } from 'vue' | ||
| import CommonIcons from '../common/CommonIcons.vue' | ||
| import SideBar from './SideBar.vue' | ||
| import { hamburgerIcon } from '../../constants/iconPath' | ||
| import NotificationIcon from '../icons/NotificationIcon.vue' | ||
| import { storeToRefs } from 'pinia' | ||
| import { useMemberStore } from '@/stores/member' | ||
| import NotificationModal from './NotificationModal.vue' | ||
| import ProfileModal from './ProfileModal.vue' | ||
|
|
||
| const memberStore = useMemberStore() | ||
| const { info } = storeToRefs(memberStore) | ||
|
|
||
| onMounted(async () => { | ||
| await memberStore.updateMemberInfoWithToken() | ||
| }) | ||
|
|
||
| const isSideOpen = ref(false) | ||
| const isLogined = ref(true) | ||
|
|
||
| const isNotifiVisible = ref(false) | ||
| const isProfileVisible = ref(false) | ||
|
|
||
| const toggleNotifi = () => { | ||
| isNotifiVisible.value = !isNotifiVisible.value | ||
| } | ||
| const toggleProfile = () => { | ||
| isProfileVisible.value = !isProfileVisible.value | ||
| } | ||
|
|
||
| const onCloseSide = () => { | ||
| isSideOpen.value = false | ||
| } | ||
| </script> |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 이해하기로는 w-[1200px] h-[72px]와 같이 수동으로 외부 클릭 영역을 지정하고, 외부 클릭을 감지하여 모달을 끌 수 있게 하기 위해서 작성된 부분 같아 보입니다.
하지만 이렇게 배경에 일일히 트리거를 부여하는 방법보다는 모달 자체에 ref를 부여하고 이벤트 리스너를 통해 외부 클릭을 감지하는 방향이 더 좋아 보이긴 합니다.
일단 저도 드롭다운을 완성할 때 만들어야 할 부분이지만 React에서는 구현해봤지만 Vue에서는 처음이라,
확실하게는 잘 모르겠지만 추후 커스텀 훅을 통해 수정할 수 있을 것 같습니다.
구글에 outside click 등으로 검색하면 위와 같이 구현된 방식의 reference들이 많이 있으니 관심있으시면 한번 찾아보셔도 좋을 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋은 의견 주신 것 같아요! 이후에 리팩토링시 커스텀 훅을 고려 해보도록 하겠습니다!