-
Notifications
You must be signed in to change notification settings - Fork 1
[FEAT] 게시판 UI 업데이트 #363
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
[FEAT] 게시판 UI 업데이트 #363
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "colors" : [ | ||
| { | ||
| "color" : { | ||
| "color-space" : "srgb", | ||
| "components" : { | ||
| "alpha" : "1.000", | ||
| "blue" : "0x25", | ||
| "green" : "0x25", | ||
| "red" : "0x25" | ||
| } | ||
| }, | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,6 +82,77 @@ private struct BulletinBoardContentView: View { | |
| } | ||
| } | ||
|
|
||
| // MARK: - QuestionNotificationView | ||
|
|
||
| private struct QuestionNotificationView: View { | ||
|
|
||
| let store: StoreOf<BulletinBoardFeature> | ||
|
|
||
| var body: some View { | ||
| if !store.todayQuestion.isAnswered { | ||
| Button { | ||
| store.send(.questionNotiTapped(store.todayQuestion)) | ||
| } label: { | ||
| HStack(spacing: 0) { | ||
|
Comment on lines
+87
to
+96
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 답변 유무에 따른 UI 변경입니다! |
||
| Image("questionReady") | ||
| .resizable() | ||
| .scaledToFit() | ||
| .frame(width: 20, height: 20) | ||
| .padding(.trailing, 6) | ||
| .padding(.leading, 18) | ||
|
|
||
| Text("오늘의 질문이 도착했어요!") | ||
| .font(.pretendard(.semiBold, size: 15)) | ||
| .foregroundStyle(.white) | ||
|
|
||
| Spacer() | ||
| } | ||
| .frame(width: 361, height: 47) | ||
| .background(RoundedRectangle(cornerRadius: 12) | ||
| .fill(.questionNoti) | ||
| .stroke(.button.opacity(0.17), lineWidth: 0.6)) // TODO: 그라데이션 | ||
| } | ||
| } else { | ||
| Button { | ||
| store.send(.popularAnswerTapped(store.todayQuestion)) | ||
| } label: { | ||
| HStack(spacing: 0) { | ||
| VStack(spacing: 0) { | ||
| Image("questionComplete") | ||
| .resizable() | ||
| .scaledToFit() | ||
| .frame(width: 20, height: 20) | ||
| .padding(.trailing, 8) | ||
| .padding(.leading, 18) | ||
|
|
||
| Spacer() | ||
| } | ||
|
|
||
|
|
||
| VStack(alignment: .leading, spacing: 0) { | ||
| Text("오늘의 인기 답변") | ||
| .font(.pretendard(.regular, size: 12)) | ||
| .foregroundStyle(TextLabel.sub4) | ||
|
|
||
| Spacer() | ||
|
|
||
| Text("프라이데이는 여자친구가 가지고 싶어요") // TODO: 인기 답변으로 | ||
| .font(.pretendard(.regular, size: 15)) | ||
| .foregroundStyle(.white) | ||
| } | ||
|
|
||
| Spacer() | ||
| } | ||
| .padding(.vertical, 12) | ||
| .frame(width: 361, height: 67) | ||
| .background(RoundedRectangle(cornerRadius: 12) | ||
| .fill(.questionNoti) | ||
| .stroke(.button.opacity(0.17), lineWidth: 0.6)) // TODO: 그라데이션 | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // MARK: - BulletionBoardListView | ||
|
|
||
| private struct BulletionBoardListView: View { | ||
|
|
@@ -90,6 +161,11 @@ private struct BulletionBoardListView: View { | |
|
|
||
| var body: some View { | ||
| ScrollView { | ||
|
|
||
| QuestionNotificationView(store: store) | ||
| .padding(.horizontal) | ||
| .padding(.top, 2) | ||
|
|
||
| LazyVStack(spacing: 0) { | ||
| ForEach(enumerated(store.bulletinBoardList), id: \.offset) { index, board in | ||
| Button { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ struct QPAcademyDayCounter: View { | |
| } | ||
| } | ||
| } | ||
| .padding(.vertical, 16) | ||
| .padding(.vertical, 14) | ||
| .padding(.horizontal, 20) | ||
| .background(.second) | ||
| .clipShape(RoundedRectangle(cornerRadius: 12)) | ||
|
|
@@ -44,21 +44,21 @@ private struct ContentView: View { | |
| VStack(spacing: 0) { | ||
| Header(event: event, dayLeft: dayLeft, isCurrentEvent: true) | ||
|
|
||
| HStack { | ||
| Text(event.period.0.formatting(.mdKorean)) | ||
| Spacer() | ||
| Text(event.period.1.formatting(.mdKorean)) | ||
| } | ||
| .padding(.top, 16) | ||
| .padding(.horizontal, 2) | ||
| .foregroundStyle(.main).opacity(0.6) | ||
| .pretendard(.semiBold, 14) | ||
| // HStack { | ||
| // Text(event.period.0.formatting(.mdKorean)) | ||
| // Spacer() | ||
| // Text(event.period.1.formatting(.mdKorean)) | ||
| // } | ||
| // .padding(.top, 16) | ||
| // .padding(.horizontal, 2) | ||
| // .foregroundStyle(.main).opacity(0.6) | ||
| // .pretendard(.semiBold, 14) | ||
|
|
||
| ProgressBar( | ||
| event: event, | ||
| dayLeft: dayLeft | ||
| ) | ||
| .padding(.top, 8) | ||
| // ProgressBar( | ||
| // event: event, | ||
| // dayLeft: dayLeft | ||
| // ) | ||
| // .padding(.top, 8) | ||
|
Comment on lines
+47
to
+61
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 캘린더 UI는 잠시 안녕..
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 건강하게 살아야한다 캘린더야~ |
||
| } | ||
| } | ||
| } | ||
|
|
||
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.
오늘의 질문을 불러와야해서 게시판 피처에 api호출 추가했습니다!