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

커스텀 테마 #211

Merged
merged 5 commits into from
Jan 9, 2024
Merged

커스텀 테마 #211

merged 5 commits into from
Jan 9, 2024

Conversation

davin111
Copy link
Member

@davin111 davin111 commented Jan 9, 2024

기존에 존재하던 SNUTT, 가을, 잔디 등의 테마는 BasicThemeType 이라고 칭함

유저가 해당 Basic 테마들을 디폴트 테마로 지정한 경우에만 TimetableTheme 으로 생성함

그 외에 유저는 커스텀 테마들을 생성/수정/삭제/복사할 수 있음. 이 경우에도 TimetableTheme 을 생성함

강의를 추가하면 커스텀 테마인 경우 테마 색상 중 하나를 랜덤으로 택함

특정 시간표의 지정 테마를 바꾸는 경우, 서버가 해당 테마의 색상들로 일괄 순차 채색함

디폴트 테마를 해제하면 SNUTT 테마를 디폴트로 지정함

@davin111 davin111 self-assigned this Jan 9, 2024
@davin111 davin111 marked this pull request as ready for review January 9, 2024 20:37
@davin111 davin111 requested review from PFCJeong and a team as code owners January 9, 2024 20:37
@davin111 davin111 requested review from Hank-Choi, Jhvictor4 and subeenpark-io and removed request for a team January 9, 2024 20:37
@davin111 davin111 merged commit 062c560 into develop Jan 9, 2024
2 checks passed
@davin111 davin111 deleted the feature/custom-th branch January 9, 2024 20:41
it.updatedAt = LocalDateTime.now()
timetableThemeRepository.save(it)
} else {
timetableThemeRepository.delete(it)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 무슨스펙?

Comment on lines +133 to +139
if (theme.isCustom) {
theme.isDefault = false
theme.updatedAt = LocalDateTime.now()
timetableThemeRepository.save(theme)
} else {
timetableThemeRepository.delete(theme)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘도 무슨스펙인지 모르겠음
custom이 아니면 왜 지워야하는거지?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Db 에서 기본 제공 테마(snutt, 가을 같은 거)는 유저가 그걸 자신의 디폴트 테마로 지정했을 때만 존재하도록 해서 만들어진 거야. 굳이 안 지워줘도 되긴 하는데 굳이 잔어물을 남기지 않으려 했음.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants