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

active menu on dock #237

Merged
merged 2 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ class ScheduleTimeParsingWorker(
),
content = schedule.content
)
val response = scheduleTimeParsingService.parseScheduleTime(request)

val response: ScheduleTimeParsingResponse
try {
response = scheduleTimeParsingService.parseScheduleTime(request)
} catch (e: Exception) {
log.error("OpenAI API error", e)
return
}

if (responseFail(response, schedule)) return
if (haveNoTimeInfo(response, schedule)) return
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/static/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -812,3 +812,7 @@ input[readonly], textarea[readonly] {
background-color: rgba(255, 255, 255, 0.2);
border-radius: 10px;
}

.mobile-footer .link.active {
background-color: rgba(255, 255, 255, 0.2);
}
28 changes: 24 additions & 4 deletions src/main/resources/templates/layout/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
</a>
</div>
<div class="mobile-footer row text-align-center fs-1">
<a href="/" class="link col-3">
<a href="/" class="link col-3" data-link="/">
<i class="bi bi-house-door"></i>
<br/>
<span>홈</span>
</a>
<a th:if="${loginMember != null}" th:href="@{/duty/{name}(name=${loginMember.id})}" class="link col-3">
<a th:if="${loginMember != null}" th:href="@{/duty/{name}(name=${loginMember.id})}" class="link col-3"
data-link="/duty">
<i class="bi bi-calendar2-week"></i>
<br/>
<span>내 시간표</span>
Expand All @@ -24,14 +25,33 @@
<br/>
<span>내 시간표</span>
</a>
<a href="/member/d-day" class="link col-3">
<a href="/member/d-day" class="link col-3" data-link="member/d-day">
<i class="bi bi-calendar-check"></i>
<br/>
<span>디데이</span>
</a>
<a href="/member" class="link col-3">
<a href="/member" class="link col-3" data-link="/member">
<i class="bi bi-person"></i>
<br/>
<span>내 정보</span>
</a>
</div>

<script>
const currentPath = window.location.pathname;
const loginMemberId = parseInt("[[${loginMember?.id}]]");
switch (currentPath) {
case '/':
document.querySelector('.mobile-footer .link[data-link="/"]').classList.add('active');
break;
case '/member':
document.querySelector('.mobile-footer .link[data-link="/member"]').classList.add('active');
break;
case '/member/d-day':
document.querySelector('.mobile-footer .link[data-link="member/d-day"]').classList.add('active');
break;
case '/duty/' + loginMemberId:
document.querySelector('.mobile-footer .link[data-link="/duty"]').classList.add('active');
break;
}
</script>
18 changes: 13 additions & 5 deletions src/main/resources/templates/member/d-day.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
<div class="vue-dday" v-cloak>
<button v-on:click="add()" class="btn btn-primary">
추가 <i class="bi bi-calendar-plus-fill"></i>
</button>
<div class="vue-dday p-4" v-cloak>
<div class="d-day-list">
<div v-if="dDays.length == 0" class="empty card shadow-sm border-0 p-4 text-center">
<div class="empty-icon mb-3">
<i class="bi bi-calendar-x text-secondary" style="font-size: 3rem;"></i>
</div>
<h2 class="text-muted fw-bold">디데이가 없습니다.</h2>
<p class="text-secondary">중요한 이벤트들을 추가해서 (남은/지난) 일수를 확인하세요</p>
</div>
<div class="text-center card">
<button v-on:click="add()" class="btn btn-outline-primary mt-2">
<i class="bi bi-plus-circle"></i> 디데이 추가
</button>
</div>
<div v-for="(dDay, index) in dDays"
class="d-day-item card row"
:data-id="dDay.id"
Expand Down Expand Up @@ -50,7 +59,6 @@
</div>
</div>


<script>
$(function () {
const body = $('#body');
Expand Down
15 changes: 6 additions & 9 deletions src/main/resources/templates/member/member.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ <h1 class="mb-0">내 정보</h1>
</td>
</tr>
<tr>
<th class="bg-light">로그인</th>
<td>
<td colspan="2">
<div class="table-responsive">
<table class="table table-bordered text-center">
<thead class="table-light">
Expand Down Expand Up @@ -65,8 +64,7 @@ <h1 class="mb-0">내 정보</h1>
</td>
</tr>
<tr class="sso-logins">
<th class="bg-light">계정 연동</th>
<td>
<td colspan="2">
<div class="d-flex flex-column gap-2">
<div class="d-flex justify-content-between align-items-center">
<div>
Expand Down Expand Up @@ -96,13 +94,12 @@ <h1 class="mb-0">내 정보</h1>
</td>
</tr>
<tr>
<th class="bg-light">관리</th>
<td class="d-flex flex-wrap gap-2">
<button th:if="${member.hasPassword}" class="btn btn-outline-warning btn-sm" @click="changePassword">
<td colspan="2" class="gap-2 text-align-right">
<button th:if="${member.hasPassword}" class="btn btn-outline-info btn-sm" @click="changePassword">
비밀번호 변경
</button>
<a class="btn btn-outline-danger btn-sm" href="/logout">로그아웃</a>
<button class="btn btn-outline-secondary btn-sm" @click="deleteAccount">회원 탈퇴</button>
<a class="btn btn-outline-warning btn-sm" href="/logout">로그아웃</a>
<button class="btn btn-outline-danger btn-sm" @click="deleteAccount">회원 탈퇴</button>
</td>
</tr>
</tbody>
Expand Down
Loading