유료방 입장 팝업 - UI 수정, 알림 문구 수정
This commit is contained in:
		@@ -24,6 +24,7 @@ final class UserProfileViewModel: ObservableObject {
 | 
			
		||||
    
 | 
			
		||||
    @Published var paymentDialogTitle = ""
 | 
			
		||||
    @Published var paymentDialogDesc = ""
 | 
			
		||||
    @Published var paymentDialogDesc2 = ""
 | 
			
		||||
    @Published var isShowPaymentDialog = false
 | 
			
		||||
    @Published var paymentDialogConfirmAction = {}
 | 
			
		||||
    @Published var paymentDialogConfirmTitle = ""
 | 
			
		||||
@@ -50,6 +51,9 @@ final class UserProfileViewModel: ObservableObject {
 | 
			
		||||
    @Published var isShowCheersReportView = false
 | 
			
		||||
    @Published var isShowCheersDeleteView = false
 | 
			
		||||
    
 | 
			
		||||
    @Published var liveStartDate: String? = nil
 | 
			
		||||
    @Published var nowDate: String? = nil
 | 
			
		||||
    
 | 
			
		||||
    let paymentDialogCancelTitle = "취소"
 | 
			
		||||
    
 | 
			
		||||
    func getCreatorProfile(userId: Int) {
 | 
			
		||||
@@ -201,8 +205,24 @@ final class UserProfileViewModel: ObservableObject {
 | 
			
		||||
                        }
 | 
			
		||||
                        self.isShowPasswordDialog = true
 | 
			
		||||
                    } else {
 | 
			
		||||
                        self.paymentDialogTitle = "\($0.price)캔으로 입장"
 | 
			
		||||
                        self.paymentDialogDesc = "'\($0.title)' 라이브에 참여하기 위해 결제합니다."
 | 
			
		||||
                        let fromFormatter = DateFormatter()
 | 
			
		||||
                        fromFormatter.dateFormat = "yyyy.MM.dd EEE hh:mm a"
 | 
			
		||||
                        fromFormatter.locale = Locale(identifier: "en_US_POSIX")
 | 
			
		||||
                        let beginDate = fromFormatter.date(from: $0.beginDateTime)!
 | 
			
		||||
                        let now = Date()
 | 
			
		||||
                        
 | 
			
		||||
                        let timeInterval = now.timeIntervalSince(beginDate)
 | 
			
		||||
                        let hours = Int(timeInterval / 3600)
 | 
			
		||||
                        let minutes = Int((timeInterval.truncatingRemainder(dividingBy: 3600)) / 60)
 | 
			
		||||
                        
 | 
			
		||||
                        if hours >= 1 {
 | 
			
		||||
                            self.liveStartDate = beginDate.convertDateFormat(dateFormat: "yyyy-MM-dd, HH:mm")
 | 
			
		||||
                            self.nowDate = now.convertDateFormat(dateFormat: "yyyy-MM-dd, HH:mm")
 | 
			
		||||
                            self.paymentDialogDesc2 = "라이브를 시작한 지 \(hours)시간 \(minutes)분이 지났습니다. 라이브에 입장 후 30분 이내에 라이브가 종료될 수도 있습니다."
 | 
			
		||||
                        }
 | 
			
		||||
                        
 | 
			
		||||
                        self.paymentDialogTitle = "유료 라이브 입장"
 | 
			
		||||
                        self.paymentDialogDesc = "\($0.price)캔을 차감하고\n라이브에 입장 하시겠습니까?"
 | 
			
		||||
                        self.paymentDialogConfirmTitle = "결제 후 참여하기"
 | 
			
		||||
                        self.paymentDialogConfirmAction = { [unowned self] in
 | 
			
		||||
                            hidePaymentPopup()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user