라이브 방
- 채팅창 너비 축소 - 오른쪽 하단 옵션 버튼 baseline이 채팅창 baseline과 동일하게 설정
This commit is contained in:
@@ -16,23 +16,15 @@ struct LiveRoomInputChatView: View {
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 6.7) {
|
||||
TextField("채팅을 입력하세요", text: $chatMessage)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(.graybb)
|
||||
.accentColor(.button)
|
||||
.keyboardType(.default)
|
||||
.padding(.horizontal, 13.3)
|
||||
.padding(.vertical, 18.3)
|
||||
.background(Color.gray22)
|
||||
.cornerRadius(5.3)
|
||||
.frame(maxWidth: .infinity)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 5.3)
|
||||
.strokeBorder(lineWidth: 1)
|
||||
.foregroundColor(.gray77)
|
||||
)
|
||||
ChatTextFieldView(text: $chatMessage, placeholder: "채팅을 입력하세요") {
|
||||
if sendMessage(chatMessage) {
|
||||
chatMessage = ""
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 13.3)
|
||||
.padding(.vertical, 18.3)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
Image("btn_message_send")
|
||||
.resizable()
|
||||
@@ -44,6 +36,13 @@ struct LiveRoomInputChatView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.background(Color.gray22)
|
||||
.cornerRadius(5.3)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 5.3)
|
||||
.strokeBorder(lineWidth: 1)
|
||||
.foregroundColor(.gray77)
|
||||
)
|
||||
.padding(13.3)
|
||||
}
|
||||
}
|
||||
|
@@ -185,47 +185,50 @@ struct LiveRoomViewV2: View {
|
||||
.padding(.bottom, 40)
|
||||
.padding(.trailing, 13.3)
|
||||
|
||||
VStack(spacing: 13.3) {
|
||||
if liveRoomInfo.creatorId == UserDefaults.int(forKey: .userId) {
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: "ic_roulette_settings",
|
||||
onClick: { viewModel.isShowRouletteSettings = true }
|
||||
)
|
||||
} else if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) && viewModel.isActiveRoulette {
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: "ic_roulette",
|
||||
onClick: { viewModel.showRoulette() }
|
||||
)
|
||||
HStack(alignment: .bottom, spacing: 0) {
|
||||
LiveRoomInputChatView {
|
||||
viewModel.sendMessage(chatMessage: $0) {
|
||||
viewModel.isShowingNewChat = false
|
||||
proxy.scrollTo(viewModel.messages.count - 1, anchor: .center)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
if viewModel.role == .SPEAKER {
|
||||
VStack(spacing: 13.3) {
|
||||
if liveRoomInfo.creatorId == UserDefaults.int(forKey: .userId) {
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: "ic_roulette_settings",
|
||||
onClick: { viewModel.isShowRouletteSettings = true }
|
||||
)
|
||||
} else if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) && viewModel.isActiveRoulette {
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: "ic_roulette",
|
||||
onClick: { viewModel.showRoulette() }
|
||||
)
|
||||
}
|
||||
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: viewModel.isMute ? "ic_mic_off" : "ic_mic_on",
|
||||
onClick: { viewModel.toggleMute() }
|
||||
imageName: "ic_donation_message_list",
|
||||
onClick: { viewModel.isShowDonationMessagePopup = true }
|
||||
)
|
||||
|
||||
if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) {
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: "ic_donation",
|
||||
onClick: { viewModel.isShowDonationPopup = true }
|
||||
)
|
||||
}
|
||||
|
||||
if viewModel.role == .SPEAKER {
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: viewModel.isMute ? "ic_mic_off" : "ic_mic_on",
|
||||
onClick: { viewModel.toggleMute() }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: "ic_donation_message_list",
|
||||
onClick: { viewModel.isShowDonationMessagePopup = true }
|
||||
)
|
||||
|
||||
if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) {
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: "ic_donation",
|
||||
onClick: { viewModel.isShowDonationPopup = true }
|
||||
)
|
||||
}
|
||||
}
|
||||
.padding(.trailing, 13.3)
|
||||
|
||||
LiveRoomInputChatView {
|
||||
viewModel.sendMessage(chatMessage: $0) {
|
||||
viewModel.isShowingNewChat = false
|
||||
proxy.scrollTo(viewModel.messages.count - 1, anchor: .center)
|
||||
}
|
||||
|
||||
return true
|
||||
.padding(.bottom, 13.3)
|
||||
.padding(.trailing, 13.3)
|
||||
}
|
||||
.padding(.bottom, 10)
|
||||
}
|
||||
|
Reference in New Issue
Block a user