78 lines
2.5 KiB
Swift
78 lines
2.5 KiB
Swift
//
|
|
// UserBlockConfirmDialogView.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 2023/08/11.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct UserBlockConfirmDialogView: View {
|
|
|
|
@Binding var isShowing: Bool
|
|
|
|
let nickname: String
|
|
let confirmAction: () -> Void
|
|
|
|
let notice = """
|
|
사용자를 차단하면 사용자는 아래 기능이 제한됩니다.
|
|
|
|
- 내가 개설한 라이브 입장 불가
|
|
- 나에게 메시지 보내기 불가
|
|
- 내 채널의 팬Talk 작성불가
|
|
"""
|
|
|
|
let notice2 = "- 사용자를 차단하면 '차단한 사용자의 라이브 중 채팅'이 보이지 않습니다."
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
Color.black
|
|
.opacity(0.7)
|
|
.ignoresSafeArea()
|
|
.onTapGesture { isShowing = false }
|
|
|
|
VStack(spacing: 13.3) {
|
|
Text("사용자 차단")
|
|
.font(.custom(Font.medium.rawValue, size: 16.7))
|
|
.foregroundColor(.white)
|
|
|
|
Text("\(nickname)님을 차단하시겠습니까?")
|
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
|
.foregroundColor(.white)
|
|
|
|
HStack(spacing: 0) {
|
|
Text(UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue ? notice : notice2)
|
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
|
.foregroundColor(.white)
|
|
|
|
Spacer()
|
|
}
|
|
|
|
HStack(spacing: 26.7) {
|
|
Spacer()
|
|
|
|
Text("취소")
|
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
|
.foregroundColor(Color.button)
|
|
.onTapGesture {
|
|
isShowing = false
|
|
}
|
|
|
|
Text("차단")
|
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
|
.foregroundColor(Color.button)
|
|
.onTapGesture {
|
|
isShowing = false
|
|
confirmAction()
|
|
}
|
|
}
|
|
.padding(.top, 13.3)
|
|
}
|
|
.padding(24)
|
|
.frame(width: screenSize().width - 33.3)
|
|
.background(Color.gray22)
|
|
.cornerRadius(13.3)
|
|
}
|
|
}
|
|
}
|