채금 기능 추가

This commit is contained in:
Yu Sung
2023-10-11 19:25:12 +09:00
parent 91c43e679f
commit 282ee73de1
8 changed files with 309 additions and 26 deletions

View File

@@ -74,6 +74,7 @@ struct LiveRoomProfileItemMasterView: View {
struct LiveRoomProfileItemUserView: View {
let isStaff: Bool
let userId: Int
let creatorId: Int
let nickname: String
let profileUrl: String
let role: LiveRoomMemberRole
@@ -82,6 +83,7 @@ struct LiveRoomProfileItemUserView: View {
let onClickInviteSpeaker: (Int) -> Void
let onClickKickOut: (Int) -> Void
let onClickProfile: (Int) -> Void
let onClickNoChatting: (Int, String, String) -> Void
var body: some View {
ZStack {
@@ -145,6 +147,25 @@ struct LiveRoomProfileItemUserView: View {
}
}
if role != .MANAGER && creatorId == UserDefaults.int(forKey: .userId) {
Text("채금")
.font(.custom(Font.medium.rawValue, size: 10))
.foregroundColor(Color(hex: "ffffff"))
.padding(.horizontal, 5.5)
.padding(.vertical, 12)
.background(Color(hex: "9970ff").opacity(0.3))
.cornerRadius(6.7)
.overlay(
RoundedRectangle(cornerRadius: 6.7)
.stroke(Color(hex: "9970ff"), lineWidth: 1)
)
.cornerRadius(6.7)
.padding(.leading, 10)
.onTapGesture {
onClickNoChatting(userId, nickname, profileUrl)
}
}
if role != .MANAGER && isStaff {
Image("ic_kick_out")
.padding(.leading, 10)