SodaLive
Preview Content
Resources
Sources
Advertisement
Agora
App
Common
Content
All
Create
Curation
Detail
Comment
AudioContentDeleteDialogView.swift
AudioContentReportDialogView.swift
ContentDetailAnotherItemView.swift
ContentDetailCreatorProfileView.swift
ContentDetailInfoView.swift
ContentDetailMenuView.swift
ContentDetailMosaicView.swift
ContentDetailOtherContentView.swift
ContentDetailPlayView.swift
ContentDetailPurchaseButton.swift
ContentDetailView.swift
ContentDetailViewModel.swift
ContentOrderConfirmDialogView.swift
ContentOrderDialogView.swift
GetAudioContentDetailResponse.swift
LiveRoomDonationDialogView.swift
PutAudioContentLikeRequest.swift
Donation
Main
Modify
Order
AddAllPlaybackTrackingRequest.swift
ContentApi.swift
ContentListItemView.swift
ContentListView.swift
ContentListViewModel.swift
ContentPlayManager.swift
ContentRepository.swift
PlaybackTracking.swift
PlaybackTrackingRepository.swift
Debug
Dialog
Explorer
Extensions
Follow
Font
IAP
ImagePicker
Keyboard
Live
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
84 lines
2.8 KiB
Swift
84 lines
2.8 KiB
Swift
//
|
|
// ContentDetailMenuView.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 2023/08/13.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ContentDetailMenuView: View {
|
|
|
|
@Binding var isShowing: Bool
|
|
|
|
let isShowCreatorMenu: Bool
|
|
let modifyAction: () -> Void
|
|
let deleteAction: () -> Void
|
|
let reportAction: () -> Void
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
Color.black
|
|
.opacity(0.7)
|
|
.ignoresSafeArea()
|
|
.onTapGesture { isShowing = false }
|
|
|
|
VStack(spacing: 0) {
|
|
Spacer()
|
|
|
|
VStack(spacing: 13.3) {
|
|
if isShowCreatorMenu {
|
|
HStack(spacing: 0) {
|
|
Text("수정")
|
|
.font(.custom(Font.medium.rawValue, size: 16.7))
|
|
.foregroundColor(.white)
|
|
|
|
Spacer()
|
|
}
|
|
.padding(.vertical, 8)
|
|
.padding(.horizontal, 26.7)
|
|
.contentShape(Rectangle())
|
|
.onTapGesture {
|
|
isShowing = false
|
|
modifyAction()
|
|
}
|
|
|
|
HStack(spacing: 0) {
|
|
Text("삭제")
|
|
.font(.custom(Font.medium.rawValue, size: 16.7))
|
|
.foregroundColor(.white)
|
|
|
|
Spacer()
|
|
}
|
|
.padding(.vertical, 8)
|
|
.padding(.horizontal, 26.7)
|
|
.contentShape(Rectangle())
|
|
.onTapGesture {
|
|
isShowing = false
|
|
deleteAction()
|
|
}
|
|
} else {
|
|
HStack(spacing: 0) {
|
|
Text("신고")
|
|
.font(.custom(Font.medium.rawValue, size: 16.7))
|
|
.foregroundColor(.white)
|
|
|
|
Spacer()
|
|
}
|
|
.padding(.vertical, 8)
|
|
.padding(.horizontal, 26.7)
|
|
.contentShape(Rectangle())
|
|
.onTapGesture {
|
|
isShowing = false
|
|
reportAction()
|
|
}
|
|
}
|
|
}
|
|
.padding(24)
|
|
.background(Color(hex: "222222"))
|
|
.cornerRadius(13.3, corners: [.topLeft, .topRight])
|
|
}
|
|
}
|
|
}
|
|
}
|