diff --git a/public/css/custom.css b/public/css/custom.css index 73d624e..446192a 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -819,3 +819,7 @@ input:checked + .slider:before { .font-bold { font-weight: bold; } + +.pointer { + cursor: pointer; +} diff --git a/src/components/board/BoardProfile.vue b/src/components/board/BoardProfile.vue index a3266b4..72af2ef 100644 --- a/src/components/board/BoardProfile.vue +++ b/src/components/board/BoardProfile.vue @@ -27,10 +27,16 @@ +
- Profile Image + Profile Image

{{ user.name }}

@@ -60,7 +60,7 @@
{{ commuter.memberName }} @@ -399,7 +399,7 @@ const loadCommuters = async () => { // 프로필 이미지 생성 const profileImg = document.createElement('img'); profileImg.src = `${baseUrl}upload/img/profile/${commuter.profile}`; - profileImg.className = 'rounded-circle w-px-20 h-px-20 mx-1 mb-1 position-relative z-5 m-auto'; + profileImg.className = 'rounded-circle w-px-20 h-px-20 mx-1 mb-1 position-relative z-5 m-auto object-fit-contain'; profileImg.style.border = `2px solid ${commuter.projctcolor}`; profileImg.onerror = () => { profileImg.src = '/img/icons/icon.png'; }; diff --git a/src/components/commuters/CommuterProjectList.vue b/src/components/commuters/CommuterProjectList.vue index 1f46232..31832a4 100644 --- a/src/components/commuters/CommuterProjectList.vue +++ b/src/components/commuters/CommuterProjectList.vue @@ -23,7 +23,7 @@ User Profile
@@ -60,13 +61,14 @@ diff --git a/src/layouts/TheTop.vue b/src/layouts/TheTop.vue index d00e17c..3ea9bd1 100644 --- a/src/layouts/TheTop.vue +++ b/src/layouts/TheTop.vue @@ -177,7 +177,7 @@ v-if="user" :src="`${baseUrl}upload/img/profile/${user.profile}`" alt="Profile Image" - class="w-px-40 h-px-40 rounded-circle border border-3" + class="w-px-40 h-px-40 rounded-circle border border-3 object-fit-contain" :style="`border-color: ${user.usercolor} !important;`" @error="$event.target.src = '/img/icons/icon.png'" /> diff --git a/src/router/index.js b/src/router/index.js index b8b6c9c..f0e7e0b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ const routes = [ path: '/', name: 'Home', component: () => import('@v/MainView.vue'), - meta: { requiresAuth: true } + meta: { requiresAuth: true }, }, { path: '/board', @@ -22,6 +22,7 @@ const routes = [ }, { path: 'write', + name: 'BoardWrite', component: () => import('@v/board/BoardWrite.vue'), }, { @@ -40,12 +41,13 @@ const routes = [ path: '/mypage', name: 'MyPage', component: () => import('@v/mypage/MyPage.vue'), - meta: { requiresAuth: true } + meta: { requiresAuth: true }, }, { path: '/wordDict', + name: 'WordDict', component: () => import('@v/wordDict/wordDict.vue'), - meta: { requiresAuth: true } + meta: { requiresAuth: true }, }, { path: '/login', @@ -67,36 +69,43 @@ const routes = [ }, { path: '/vacation', + name: 'Vacation', component: () => import('@v/vacation/VacationManagement.vue'), - meta: { requiresAuth: true } + meta: { requiresAuth: true }, }, { path: '/voteboard', + name: 'VoteBoard', component: () => import('@v/voteboard/TheVoteBoard.vue'), meta: { requiresAuth: true }, children: [ { path: '', + name: 'VoteBoardList', component: () => import('@v/voteboard/voteBoardList.vue'), }, { path: 'write', + name: 'VoteboardWrite', component: () => import('@v/voteboard/voteboardWrite.vue'), }, ], }, { path: '/projectlist', + name: 'Projectlist', component: () => import('@v/projectlist/TheProjectList.vue'), - meta: { requiresAuth: true } + meta: { requiresAuth: true }, }, { path: '/commuters', + name: 'Commuters', component: () => import('@v/commuters/TheCommuters.vue'), - meta: { requiresAuth: true } + meta: { requiresAuth: true }, }, { path: '/authorization', + name: 'Authorization', component: () => import('@v/admin/TheAuthorization.vue'), meta: { requiresAuth: true }, }, diff --git a/src/stores/useWeatherStore.js b/src/stores/useWeatherStore.js index 407a2a4..15e9fbe 100644 --- a/src/stores/useWeatherStore.js +++ b/src/stores/useWeatherStore.js @@ -72,7 +72,6 @@ export const useWeatherStore = defineStore('weather', () => { }); }; - // 로컬스토리지 캐시 포함한 로직 const getWeatherInfoWithCache = async () => { const now = new Date(); const pad = n => String(n).padStart(2, '0'); @@ -86,17 +85,21 @@ export const useWeatherStore = defineStore('weather', () => { return; } - // 캐시 삭제 - Object.keys(localStorage).forEach(k => { - if (k.startsWith('weather_')) localStorage.removeItem(k); - }); - try { const { weather: w, dailyWeatherList: d } = await getWeatherInfo(); + + // 기존 캐시 삭제 + Object.keys(localStorage).forEach(k => { + if (k.startsWith('weather_')) localStorage.removeItem(k); + }); + localStorage.setItem(key, JSON.stringify({ weather: w, dailyWeatherList: d })); } catch (e) { - // 오류 시 기존 로컬스토리지 값 중 가장 최신 값 사용 - const oldKey = Object.keys(localStorage).filter(k => k.startsWith('weather_')).sort().pop(); + console.error('날씨 API 호출 실패, 캐시 fallback 시도 중...'); + const oldKey = Object.keys(localStorage) + .filter(k => k.startsWith('weather_')) + .sort() + .pop(); if (oldKey) { const fallback = JSON.parse(localStorage.getItem(oldKey)); weather.value = fallback.weather; diff --git a/src/views/board/BoardList.vue b/src/views/board/BoardList.vue index a6f4ada..46a97d5 100644 --- a/src/views/board/BoardList.vue +++ b/src/views/board/BoardList.vue @@ -190,9 +190,9 @@ searchText: searchText.value, showNotice: showNotices.value, }; - + //localStorage.removeItem // 목록으로 바로 보낼때 필터 유지값 - //localStorage.setItem(`boardList_${seq}`, JSON.stringify(query)); + localStorage.setItem(`boardList_${seq}`, JSON.stringify(query)); }; // 스토리지 초기화 @@ -384,5 +384,4 @@ position: relative; top: -1px; } - diff --git a/src/views/board/BoardView.vue b/src/views/board/BoardView.vue index eaaa5f7..f550688 100644 --- a/src/views/board/BoardView.vue +++ b/src/views/board/BoardView.vue @@ -21,7 +21,14 @@ :is-delete-pushed="isDeletePushed" @editClick="editClick" @deleteClick="deleteClick" - /> + > + + +
@@ -451,6 +458,7 @@ passwordAlert.value = ''; commentAlert.value = ''; await fetchComments(); + activeCommentBtnClass(); } else { alert('댓글 작성을 실패했습니다.'); } @@ -496,6 +504,9 @@ const isUnknown = unknown?.unknown ?? false; if (isUnknown) { + closeAllEditTextareas(); + closeAllPasswordAreas(); + activeCommentBtnClass(); togglePassword('delete'); } else { deletePost(); @@ -581,6 +592,8 @@ // 댓글 삭제 버튼 클릭 const deleteComment = async comment => { + acitveButtonType(); //게시글 버튼 클릭 클래스 제거 + closeAllEditTextareas(); const isMyComment = comment.authorId === currentUserId.value; // 익명인 경우 @@ -686,6 +699,7 @@ isEditPushed.value = false; isDeletePushed.value = false; lastClickedButton.value = ''; + isPassword.value = false; } }; @@ -877,6 +891,16 @@ } }; + // 게시글 목록 이동 버튼 + const goList = () => { + // 목록으로 바로 이동시 필터 유지 + const getFilter = localStorage.getItem(`boardList_${currentBoardId.value}`); + router.push({ + name: 'BoardList', + query: getFilter ? JSON.parse(getFilter) : '', + }); + }; + // 댓글 삭제 (대댓글 포함) const handleCommentDeleted = deletedCommentId => { // 댓글 삭제 diff --git a/src/views/wordDict/wordDict.vue b/src/views/wordDict/wordDict.vue index 7f5e456..f5775d4 100644 --- a/src/views/wordDict/wordDict.vue +++ b/src/views/wordDict/wordDict.vue @@ -31,6 +31,7 @@