-
Notifications
You must be signed in to change notification settings - Fork 0
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
커스텀 테마 #211
Conversation
it.updatedAt = LocalDateTime.now() | ||
timetableThemeRepository.save(it) | ||
} else { | ||
timetableThemeRepository.delete(it) |
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.
이건 무슨스펙?
if (theme.isCustom) { | ||
theme.isDefault = false | ||
theme.updatedAt = LocalDateTime.now() | ||
timetableThemeRepository.save(theme) | ||
} else { | ||
timetableThemeRepository.delete(theme) | ||
} |
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.
얘도 무슨스펙인지 모르겠음
custom이 아니면 왜 지워야하는거지?
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.
Db 에서 기본 제공 테마(snutt, 가을 같은 거)는 유저가 그걸 자신의 디폴트 테마로 지정했을 때만 존재하도록 해서 만들어진 거야. 굳이 안 지워줘도 되긴 하는데 굳이 잔어물을 남기지 않으려 했음.
기존에 존재하던 SNUTT, 가을, 잔디 등의 테마는 BasicThemeType 이라고 칭함
유저가 해당 Basic 테마들을 디폴트 테마로 지정한 경우에만 TimetableTheme 으로 생성함
그 외에 유저는 커스텀 테마들을 생성/수정/삭제/복사할 수 있음. 이 경우에도 TimetableTheme 을 생성함
강의를 추가하면 커스텀 테마인 경우 테마 색상 중 하나를 랜덤으로 택함
특정 시간표의 지정 테마를 바꾸는 경우, 서버가 해당 테마의 색상들로 일괄 순차 채색함
디폴트 테마를 해제하면 SNUTT 테마를 디폴트로 지정함