sodalive-ios/SodaLive/Sources/Live/Room/Dialog/LiveRoomNoChattingDialogVie...

86 lines
3.0 KiB
Swift

//
// LiveRoomNoChattingDialogView.swift
// SodaLive
//
// Created by klaus on 2023/10/11.
//
import SwiftUI
import Kingfisher
struct LiveRoomNoChattingDialogView: View {
let nickname: String
let profileUrl: String
let confirmAction: () -> Void
let cancelAction: () -> Void
var body: some View {
ZStack {
Color.black
.opacity(0.5)
.frame(width: screenSize().width, height: screenSize().height)
VStack(spacing: 21) {
Text("채팅금지")
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(Color(hex: "bbbbbb"))
HStack(spacing: 8) {
KFImage(URL(string: profileUrl))
.resizable()
.frame(width: 26.7, height: 26.7)
Text(nickname)
.font(.custom(Font.medium.rawValue, size: 16.7))
.foregroundColor(Color(hex: "bbbbbb"))
}
Text("3분간 채팅금지를 하겠습니까?")
.font(.custom(Font.medium.rawValue, size: 15))
.foregroundColor(Color(hex: "bbbbbb"))
HStack(spacing: 13.3) {
Text("취소")
.font(.custom(Font.bold.rawValue, size: 15.3))
.foregroundColor(Color(hex: "9970ff"))
.padding(.vertical, 16)
.frame(width: (screenSize().width - 80) / 2)
.background(Color(hex: "9970ff").opacity(0.13))
.cornerRadius(8)
.overlay(
RoundedRectangle(cornerRadius: 8)
.stroke(Color(hex: "9970ff"), lineWidth: 1)
)
.onTapGesture { cancelAction() }
Text("확인")
.font(.custom(Font.bold.rawValue, size: 15.3))
.foregroundColor(Color(hex: "ffffff"))
.padding(.vertical, 16)
.frame(width: (screenSize().width - 80) / 2)
.background(Color(hex: "9970ff"))
.cornerRadius(8)
.onTapGesture { confirmAction() }
}
}
.padding(.top, 40)
.padding(.bottom, 16.7)
.padding(.horizontal, 16.7)
.background(Color(hex: "222222"))
.cornerRadius(10)
}
}
}
struct LiveRoomNoChattingDialogView_Previews: PreviewProvider {
static var previews: some View {
LiveRoomNoChattingDialogView(
nickname: "닉네임",
profileUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
confirmAction: {},
cancelAction: {}
)
}
}