Files
SodaLive
Preview Content
Resources
Sources
Agora
App
Common
Content
CustomView
Debug
Dialog
Explorer
Extensions
Follow
Font
FortuneWheel
IAP
ImagePicker
Keyboard
Live
Cancel
EventBanner
Now
Recommend
RecommendChannel
Reservation
Room
Chat
Create
Detail
Dialog
LiveRoomDialogView.swift
LiveRoomDonationMessageDialog.swift
LiveRoomDonationRankingDialog.swift
LiveRoomDonationRankingItemView.swift
LiveRoomDonationRankingTotalCanView.swift
LiveRoomInfoEditDialog.swift
LiveRoomNoChattingDialogView.swift
LiveRoomProfileDialog.swift
LiveRoomProfileItemTitleView.swift
LiveRoomProfilesDialogView.swift
LiveRoomUserProfileDialogView.swift
Edit
Routlette
DeleteLiveRoomDonationMessage.swift
EnterOrQuitLiveRoomRequest.swift
GetLiveRoomDonationStatusResponse.swift
GetLiveRoomDonationTotalResponse.swift
GetLiveRoomUserProfileResponse.swift
GetMemberCanResponse.swift
GetRoomInfoResponse.swift
GetRoomListRequest.swift
LiveRoomDonationMessage.swift
LiveRoomDonationRequest.swift
LiveRoomKickOutRequest.swift
LiveRoomMember.swift
LiveRoomRequestType.swift
LiveRoomStatus.swift
LiveRoomTopCreatorView.swift
LiveRoomView.swift
LiveRoomViewModel.swift
SetManagerOrSpeakerOrAudienceRequest.swift
GetRoomListResponse.swift
LiveApi.swift
LiveRepository.swift
LiveView.swift
LiveViewModel.swift
SectionCommunityPostView.swift
StartLiveRequest.swift
Main
Message
MyPage
NavigationBar
Onboarding
Report
Settings
Shape
Splash
User
Utils
ContentView.swift
SodaLive.entitlements
SodaLive.xcworkspace
generated
.gitignore
Podfile
Podfile.lock
SodaLive-dev.entitlements
model-SodaLive-dev.json
model-SodaLive.json
sodalive-ios/SodaLive/Sources/Live/Room/Dialog/LiveRoomDialogView.swift

73 lines
2.5 KiB
Swift

//
// LiveRoomDialogView.swift
// SodaLive
//
// Created by klaus on 2023/08/14.
//
import SwiftUI
struct LiveRoomDialogView: View {
let content: String
let cancelTitle: String?
let cancelAction: (() -> Void)?
let confirmTitle: String?
let confirmAction: (() -> Void)?
var body: some View {
VStack(alignment: .leading, spacing: 0) {
HStack(alignment: .center, spacing: 11.7) {
Image(content.contains("룰렛") ? "ic_roulette" : "ic_request_speak")
.resizable()
.frame(width: 36, height: 36)
Text(content)
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
}
.padding(.horizontal, 26.7)
HStack(spacing: 10) {
Spacer()
if let cancelTitle = cancelTitle, let cancelAction = cancelAction {
Text(cancelTitle)
.font(.custom(Font.medium.rawValue, size: 10))
.foregroundColor(.white)
.padding(.horizontal, 8)
.padding(.vertical, 8.3)
.background(Color.white.opacity(0.2))
.cornerRadius(13.3)
.overlay(
RoundedRectangle(cornerRadius: 13.3)
.strokeBorder()
.foregroundColor(.white)
)
.onTapGesture { cancelAction() }
}
if let confirmTitle = confirmTitle, let confirmAction = confirmAction {
Text(confirmTitle)
.font(.custom(Font.medium.rawValue, size: 10))
.foregroundColor(Color(hex: "9970ff"))
.padding(.horizontal, 8)
.padding(.vertical, 8.3)
.background(Color.white)
.cornerRadius(13.3)
.onTapGesture { confirmAction() }
}
}
.padding(.horizontal, 26.7)
.padding(.top, confirmTitle != nil || cancelTitle != nil ? 10 : 0)
}
.padding(.vertical, 20)
.background(Color(hex: "9970ff"))
.cornerRadius(16.7)
.padding(.horizontal, 26.7)
.frame(width: screenSize().width)
}
}