크리에이터 채널
- 룰렛 설정 메뉴 추가
This commit is contained in:
@@ -15,6 +15,7 @@ struct UserProfileView: View {
|
||||
@State private var memberId: Int = 0
|
||||
@State private var isShowMemberProfilePopup: Bool = false
|
||||
@State private var isShowFollowNotifyDialog: Bool = false
|
||||
@State private var isShowRouletteSettings: Bool = false
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { proxy in
|
||||
@@ -131,30 +132,51 @@ struct UserProfileView: View {
|
||||
.padding(.horizontal, 13.3)
|
||||
}
|
||||
|
||||
if creatorProfile.liveRoomList.count > 0 {
|
||||
UserProfileLiveView(
|
||||
userId: userId,
|
||||
liveRoomList: creatorProfile.liveRoomList,
|
||||
onClickParticipant: { liveRoom in
|
||||
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) {
|
||||
viewModel.errorMessage = "현재 라이브 중입니다."
|
||||
viewModel.isShowPopup = true
|
||||
} else {
|
||||
AppState.shared.isShowPlayer = false
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
|
||||
viewModel.enterLiveRoom(roomId: liveRoom.roomId)
|
||||
}
|
||||
}
|
||||
},
|
||||
onClickReservation: { liveRoom in
|
||||
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) {
|
||||
viewModel.errorMessage = "내가 만든 라이브는 예약할 수 없습니다."
|
||||
viewModel.isShowPopup = true
|
||||
} else {
|
||||
viewModel.reservationLiveRoom(roomId: liveRoom.roomId)
|
||||
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) || creatorProfile.liveRoomList.count > 0 {
|
||||
VStack(alignment: .leading, spacing: 26.7) {
|
||||
Text("라이브")
|
||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) {
|
||||
HStack(spacing: 8) {
|
||||
Text("룰렛 설정")
|
||||
.font(.custom(Font.bold.rawValue, size: 15))
|
||||
.foregroundColor(Color.grayee)
|
||||
.padding(.vertical, 17)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(Color.button)
|
||||
.cornerRadius(5.3)
|
||||
.onTapGesture { isShowRouletteSettings = true }
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
if creatorProfile.liveRoomList.count > 0 {
|
||||
UserProfileLiveView(
|
||||
userId: userId,
|
||||
liveRoomList: creatorProfile.liveRoomList,
|
||||
onClickParticipant: { liveRoom in
|
||||
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) {
|
||||
viewModel.errorMessage = "현재 라이브 중입니다."
|
||||
viewModel.isShowPopup = true
|
||||
} else {
|
||||
AppState.shared.isShowPlayer = false
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
|
||||
viewModel.enterLiveRoom(roomId: liveRoom.roomId)
|
||||
}
|
||||
}
|
||||
},
|
||||
onClickReservation: { liveRoom in
|
||||
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) {
|
||||
viewModel.errorMessage = "내가 만든 라이브는 예약할 수 없습니다."
|
||||
viewModel.isShowPopup = true
|
||||
} else {
|
||||
viewModel.reservationLiveRoom(roomId: liveRoom.roomId)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
.padding(.top, 26.7)
|
||||
.padding(.horizontal, 13.3)
|
||||
}
|
||||
@@ -339,6 +361,10 @@ struct UserProfileView: View {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if isShowRouletteSettings {
|
||||
RouletteSettingsView(isShowing: $isShowRouletteSettings, availableActive: false) { _, _ in }
|
||||
}
|
||||
}
|
||||
.sheet(
|
||||
isPresented: $viewModel.isShowShareView,
|
||||
|
Reference in New Issue
Block a user