fix(creator): 팬Talk 액션 팝업을 정리한다
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
import SwiftUI
|
||||
|
||||
struct CreatorChannelFanTalkActionPopup: View {
|
||||
let isMine: Bool
|
||||
let isOwnCreatorChannel: Bool
|
||||
struct CreatorChannelActionPopup: View {
|
||||
let canEdit: Bool
|
||||
let canDelete: Bool
|
||||
let onTapEdit: () -> Void
|
||||
let onTapDelete: () -> Void
|
||||
var editTitle = I18n.Explorer.editAction
|
||||
var deleteTitle = I18n.Explorer.deleteAction
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
if isMine {
|
||||
actionButton(title: "수정하기", action: onTapEdit)
|
||||
if canEdit {
|
||||
actionButton(title: editTitle, action: onTapEdit)
|
||||
}
|
||||
|
||||
if isMine || isOwnCreatorChannel {
|
||||
actionButton(title: "삭제하기", action: onTapDelete)
|
||||
if canDelete {
|
||||
actionButton(title: deleteTitle, action: onTapDelete)
|
||||
}
|
||||
}
|
||||
.background(Color.gray900)
|
||||
@@ -37,3 +39,19 @@ struct CreatorChannelFanTalkActionPopup: View {
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
|
||||
struct CreatorChannelFanTalkActionPopup: View {
|
||||
let isMine: Bool
|
||||
let isOwnCreatorChannel: Bool
|
||||
let onTapEdit: () -> Void
|
||||
let onTapDelete: () -> Void
|
||||
|
||||
var body: some View {
|
||||
CreatorChannelActionPopup(
|
||||
canEdit: isMine,
|
||||
canDelete: isMine || isOwnCreatorChannel,
|
||||
onTapEdit: onTapEdit,
|
||||
onTapDelete: onTapDelete
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user