Files
SodaLive
Preview Content
Resources
Sources
Agora
App
Common
Content
CustomView
Debug
Dialog
Explorer
Extensions
Follow
Font
FortuneWheel
IAP
ImagePicker
Keyboard
Live
Main
Message
MyPage
NavigationBar
Onboarding
Report
CheersReportDialogView.swift
ProfileReportDialogView.swift
ProfileReportMenuView.swift
ReportApi.swift
ReportRepository.swift
ReportRequest.swift
UserBlockConfirmDialogView.swift
UserReportDialogView.swift
Settings
Shape
Splash
UI
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/Report/ProfileReportMenuView.swift
2023-08-11 18:34:29 +09:00

87 lines
2.8 KiB
Swift

//
// ProfileReportMenuView.swift
// SodaLive
//
// Created by klaus on 2023/08/11.
//
import SwiftUI
struct ProfileReportMenuView: View {
@Binding var isShowing: Bool
let isBlockedUser: Bool
let userBlockAction: () -> Void
let userUnBlockAction: () -> Void
let userReportAction: () -> Void
let profileReportAction: () -> Void
var body: some View {
ZStack {
Color.black
.opacity(0.7)
.ignoresSafeArea()
.onTapGesture { isShowing = false }
VStack(spacing: 0) {
Spacer()
VStack(spacing: 13.3) {
HStack(spacing: 0) {
Text(isBlockedUser ? "사용자 차단해제" : "사용자 차단하기")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(.white)
Spacer()
}
.padding(.vertical, 8)
.padding(.horizontal, 26.7)
.contentShape(Rectangle())
.onTapGesture {
isShowing = false
if isBlockedUser {
userUnBlockAction()
} else {
userBlockAction()
}
}
HStack(spacing: 0) {
Text("사용자 신고하기")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(.white)
Spacer()
}
.padding(.vertical, 8)
.padding(.horizontal, 26.7)
.contentShape(Rectangle())
.onTapGesture {
isShowing = false
userReportAction()
}
HStack(spacing: 0) {
Text("프로필 신고하기")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(.white)
Spacer()
}
.padding(.vertical, 8)
.padding(.horizontal, 26.7)
.contentShape(Rectangle())
.onTapGesture {
isShowing = false
profileReportAction()
}
}
.padding(24)
.background(Color(hex: "222222"))
.cornerRadius(13.3, corners: [.topLeft, .topRight])
}
}
}
}