feat(gift): 선물 발송 표시를 보정한다
This commit is contained in:
@@ -57,6 +57,7 @@ struct CreatorChannelHeaderSection: View {
|
||||
CreatorChannelTalkActionSection(
|
||||
recipientMemberId: creator.creatorId,
|
||||
recipientCreatorNickname: creator.nickname,
|
||||
recipientCreatorProfileImageUrl: creator.profileImageUrl,
|
||||
isAiChatAvailable: creator.isAiChatAvailable,
|
||||
isDmAvailable: creator.isDmAvailable,
|
||||
isOwnCreatorChannel: isOwnCreatorChannel,
|
||||
|
||||
+15
-6
@@ -3,6 +3,7 @@ import SwiftUI
|
||||
struct CreatorChannelTalkActionSection: View {
|
||||
let recipientMemberId: Int
|
||||
let recipientCreatorNickname: String
|
||||
let recipientCreatorProfileImageUrl: String
|
||||
let isAiChatAvailable: Bool
|
||||
let isDmAvailable: Bool
|
||||
let isOwnCreatorChannel: Bool
|
||||
@@ -66,16 +67,24 @@ struct CreatorChannelTalkActionSection: View {
|
||||
Button(action: {
|
||||
AppState.shared.setAppStep(step: .giftSend(
|
||||
recipientMemberId: recipientMemberId,
|
||||
recipientCreatorNickname: recipientCreatorNickname
|
||||
recipientCreatorNickname: recipientCreatorNickname,
|
||||
recipientCreatorProfileImageUrl: recipientCreatorProfileImageUrl
|
||||
))
|
||||
}) {
|
||||
Text(I18n.CreatorChannelHome.sendGift)
|
||||
.appFont(size: 16, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
HStack(spacing: SodaSpacing.s6) {
|
||||
Image("ic_send_gift")
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
.accessibilityHidden(true)
|
||||
|
||||
Text(I18n.CreatorChannelHome.sendGift)
|
||||
.appFont(size: 16, weight: .medium)
|
||||
.foregroundColor(.black)
|
||||
}
|
||||
.padding(SodaSpacing.s12)
|
||||
.overlay(
|
||||
.background(
|
||||
Capsule()
|
||||
.stroke(Color.white.opacity(0.3), lineWidth: 1)
|
||||
.fill(Color.white)
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
@@ -3,6 +3,7 @@ import SwiftUI
|
||||
struct GiftAgreementRow: View {
|
||||
let title: String
|
||||
@Binding var isAgreed: Bool
|
||||
var policyURL: URL? = GiftConstants.termsURL
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .top, spacing: SodaSpacing.s4) {
|
||||
@@ -25,7 +26,7 @@ struct GiftAgreementRow: View {
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityValue(isAgreed ? "동의함" : "동의 안 함")
|
||||
|
||||
if let url = GiftConstants.termsURL {
|
||||
if let url = policyURL {
|
||||
Link(destination: url) {
|
||||
Text("(필수)")
|
||||
.underline()
|
||||
|
||||
@@ -2,6 +2,7 @@ import Foundation
|
||||
|
||||
enum GiftConstants {
|
||||
static let termsURL = URL(string: "https://app.notion.com/p/3eb27b359673802b937ae741ab7b4ad3")
|
||||
static let damagePolicyURL = URL(string: "https://app.notion.com/p/3f227b3596738018ba5dea2e5205293b")
|
||||
static let addressSearchAvailable = false
|
||||
static let inquiryStep: AppStep = .serviceCenter
|
||||
static let feedbackStep: AppStep = .serviceCenter
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import SwiftUI
|
||||
|
||||
struct GiftSendView: View {
|
||||
private let recipientCreatorProfileImageUrl: String
|
||||
@StateObject private var viewModel: GiftSendViewModel
|
||||
@State private var hasAppeared = false
|
||||
|
||||
init(recipientMemberId: Int, recipientCreatorNickname: String) {
|
||||
init(recipientMemberId: Int, recipientCreatorNickname: String, recipientCreatorProfileImageUrl: String) {
|
||||
self.recipientCreatorProfileImageUrl = recipientCreatorProfileImageUrl
|
||||
_viewModel = StateObject(wrappedValue: GiftSendViewModel(
|
||||
recipientMemberId: recipientMemberId,
|
||||
recipientCreatorNickname: recipientCreatorNickname,
|
||||
@@ -12,7 +14,7 @@ struct GiftSendView: View {
|
||||
AppState.shared.replaceCurrentAppStep(
|
||||
step: .giftDetail(applicationNo: applicationNo),
|
||||
ifCurrentStep: { step in
|
||||
guard case .giftSend(let memberId, let nickname) = step else { return false }
|
||||
guard case .giftSend(let memberId, let nickname, _) = step else { return false }
|
||||
return memberId == recipientMemberId && nickname == recipientCreatorNickname
|
||||
}
|
||||
)
|
||||
@@ -77,7 +79,8 @@ struct GiftSendView: View {
|
||||
VStack(alignment: .leading, spacing: SodaSpacing.s14) {
|
||||
sectionTitle("받는 크리에이터")
|
||||
HStack(spacing: SodaSpacing.s12) {
|
||||
Circle().fill(Color.gray800).frame(width: 38, height: 38)
|
||||
DownsampledKFImage(url: URL(string: recipientCreatorProfileImageUrl), size: CGSize(width: 38, height: 38))
|
||||
.clipShape(Circle())
|
||||
.accessibilityHidden(true)
|
||||
Text(viewModel.recipientCreatorNickname)
|
||||
.appFont(size: 16, weight: .bold)
|
||||
@@ -155,7 +158,8 @@ struct GiftSendView: View {
|
||||
}
|
||||
.disabled(viewModel.categories.isEmpty)
|
||||
if viewModel.selectedCategory?.requiresDamageWaiver == true {
|
||||
GiftAgreementRow(title: "파손 및 분실 면책 사항에 동의합니다.", isAgreed: $viewModel.damageWaiverAgreed)
|
||||
GiftAgreementRow(title: "파손 및 분실 면책 사항에 동의합니다.", isAgreed: $viewModel.damageWaiverAgreed,
|
||||
policyURL: GiftConstants.damagePolicyURL)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user