From ac49b4e2ad74caa0eb189d3741405add31813868 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Mon, 22 Jan 2024 03:18:00 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=A0=EB=A3=8C=EB=9D=BC=EC=9D=B4=EB=B8=8C?= =?UTF-8?q?=20=EC=9E=85=EC=9E=A5=20=EC=95=88=EB=82=B4=20=ED=8C=9D=EC=97=85?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20-=20=EB=9D=BC=EC=9D=B4=EB=B8=8C=20?= =?UTF-8?q?=EC=8B=9C=EC=9E=91=20=EC=8B=9C=EA=B0=81=EA=B3=BC=20=ED=98=84?= =?UTF-8?q?=EC=9E=AC=20=EC=8B=9C=EA=B0=81=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile.lock | 2 +- .../xcshareddata/swiftpm/Package.resolved | 18 +++ .../Sources/Dialog/LivePaymentDialog.swift | 104 ++++++++++++++++++ 3 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 SodaLive/Sources/Dialog/LivePaymentDialog.swift diff --git a/Podfile.lock b/Podfile.lock index 1f90cbc..80d7765 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -51,4 +51,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: cdff30c96e85662f4de75ddd8d54358311c1e629 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.3 diff --git a/SodaLive.xcworkspace/xcshareddata/swiftpm/Package.resolved b/SodaLive.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0448761..89afb67 100644 --- a/SodaLive.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/SodaLive.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -180,6 +180,24 @@ "version" : "6.6.0" } }, + { + "identity" : "sdwebimage", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImage.git", + "state" : { + "revision" : "59730af512c06fb569c119d737df4c1c499e001d", + "version" : "5.18.10" + } + }, + { + "identity" : "sdwebimageswiftui", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImageSwiftUI.git", + "state" : { + "revision" : "261b6cec35686d2dc192b809ab50742b4502a73b", + "version" : "2.2.6" + } + }, { "identity" : "swift-protobuf", "kind" : "remoteSourceControl", diff --git a/SodaLive/Sources/Dialog/LivePaymentDialog.swift b/SodaLive/Sources/Dialog/LivePaymentDialog.swift new file mode 100644 index 0000000..1951ecd --- /dev/null +++ b/SodaLive/Sources/Dialog/LivePaymentDialog.swift @@ -0,0 +1,104 @@ +// +// LivePaymentDialog.swift +// SodaLive +// +// Created by klaus on 1/21/24. +// + +import SwiftUI + +struct LivePaymentDialog: View { + + let title: String + let desc: String + let confirmButtonTitle: String + let confirmButtonAction: () -> Void + let cancelButtonTitle: String + let cancelButtonAction: () -> Void + + let startDateTime: String? + let nowDateTime: String? + + var body: some View { + VStack { + Text(title) + .font(.custom(Font.bold.rawValue, size: 18.3)) + .foregroundColor(Color.graybb) + + if let startDateTime = startDateTime, let nowDateTime = nowDateTime { + HStack(spacing: 0) { + VStack(alignment: .leading, spacing: 13.3) { + Text("시작 시각") + .font(.custom(Font.medium.rawValue, size: 13.3)) + .foregroundColor(Color.graybb) + + Text("현재 시각") + .font(.custom(Font.medium.rawValue, size: 13.3)) + .foregroundColor(Color.graybb) + } + .frame(maxWidth: .infinity) + + VStack(alignment: .leading, spacing: 13.3) { + Text(startDateTime) + .font(.custom(Font.medium.rawValue, size: 13.3)) + .foregroundColor(Color.graybb) + + Text(nowDateTime) + .font(.custom(Font.medium.rawValue, size: 13.3)) + .foregroundColor(Color.graybb) + } + .frame(maxWidth: .infinity) + } + .padding(13.3) + .background(Color.gray30) + .cornerRadius(13.3) + .padding(.top, 21.3) + } + + Text(desc) + .font(.custom(Font.medium.rawValue, size: 15)) + .foregroundColor(Color.graybb) + .padding(.top, startDateTime != nil && nowDateTime != nil ? 16.7 : 21.3) + + HStack(spacing: 13.3) { + Text("취소") + .font(.custom(Font.bold.rawValue, size: 18.3)) + .foregroundColor(Color.button) + .padding(.vertical, 16) + .frame(maxWidth: .infinity) + .background(Color.bg) + .cornerRadius(10) + .overlay( + RoundedRectangle(cornerRadius: 8) + .stroke(Color(hex: "3bb9f1"), lineWidth: 1) + ) + + Text("결제 후 입장") + .font(.custom(Font.bold.rawValue, size: 18.3)) + .padding(.vertical, 16) + .frame(maxWidth: .infinity) + .background(Color.button) + .cornerRadius(10) + } + .padding(.top, 45) + } + .padding(.horizontal, 16.7) + .padding(.bottom, 16.7) + .padding(.top, 40) + .background(Color(hex: "222222")) + .cornerRadius(10) + } +} + +#Preview { + LivePaymentDialog( + title: "100캔으로 입장", + desc: "'테스트' 라이브에 참여하기 위해 결제합니다.'테스트' 라이브에 참여하기 위해 결제합니다.'테스트' 라이브에 참여하기 위해 결제합니다.", + confirmButtonTitle: "", + confirmButtonAction: {}, + cancelButtonTitle: "", + cancelButtonAction: {}, + startDateTime: "2024-01-01 15:00", + nowDateTime: "2024-01-02 15:00" + ) +}