라이브

- 메뉴판 UI 추가
This commit is contained in:
Yu Sung
2024-03-08 16:58:00 +09:00
parent aa4171b095
commit b6411c3ccb
13 changed files with 381 additions and 123 deletions

View File

@@ -14,6 +14,8 @@ struct LiveRoomInfoGuestView: View {
let isOnBg: Bool
let isOnNotice: Bool
let isOnMenuPan: Bool
let isShowMenuPanButton: Bool
let creatorId: Int
let creatorNickname: String
@@ -31,6 +33,7 @@ struct LiveRoomInfoGuestView: View {
let onClickFollow: (Bool) -> Void
let onClickProfile: (Int) -> Void
let onClickNotice: () -> Void
let onClickMenuPan: () -> Void
let onClickTotalDonation: () -> Void
var body: some View {
@@ -113,6 +116,21 @@ struct LiveRoomInfoGuestView: View {
onClick: { onClickNotice() }
)
if isShowMenuPanButton {
LiveRoomOverlayStrokeTextToggleButton(
isOn: isOnMenuPan,
onText: "메뉴판",
onTextColor: .button,
onStrokeColor: .button,
offText: nil,
offTextColor: .graybb,
offStrokeColor: .graybb,
strokeWidth: 1,
strokeCornerRadius: 5.3,
onClick: { onClickMenuPan() }
)
}
Spacer()
HStack(spacing: 2.7) {
@@ -151,6 +169,8 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
totalDonationCan: 123456,
isOnBg: true,
isOnNotice: false,
isOnMenuPan: false,
isShowMenuPanButton: false,
creatorId: 1,
creatorNickname: "도화",
creatorProfileUrl: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
@@ -184,6 +204,7 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
onClickFollow: { _ in },
onClickProfile: { _ in },
onClickNotice: {},
onClickMenuPan: {},
onClickTotalDonation: {}
)
}

View File

@@ -16,6 +16,8 @@ struct LiveRoomInfoHostView: View {
let isOnBg: Bool
let isOnNotice: Bool
let isOnMenuPan: Bool
let isShowMenuPanButton: Bool
let creatorId: Int
let creatorNickname: String
@@ -32,6 +34,7 @@ struct LiveRoomInfoHostView: View {
let onClickEdit: () -> Void
let onClickProfile: (Int) -> Void
let onClickNotice: () -> Void
let onClickMenuPan: () -> Void
let onClickTotalDonation: () -> Void
let onClickParticipants: () -> Void
@@ -122,6 +125,21 @@ struct LiveRoomInfoHostView: View {
onClick: { onClickNotice() }
)
if isShowMenuPanButton {
LiveRoomOverlayStrokeTextToggleButton(
isOn: isOnMenuPan,
onText: "메뉴판",
onTextColor: .button,
onStrokeColor: .button,
offText: nil,
offTextColor: .graybb,
offStrokeColor: .graybb,
strokeWidth: 1,
strokeCornerRadius: 5.3,
onClick: { onClickMenuPan() }
)
}
Spacer()
HStack(spacing: 2.7) {
@@ -178,6 +196,8 @@ struct LiveRoomInfoHostView_Previews: PreviewProvider {
participantsCount: 18,
isOnBg: true,
isOnNotice: true,
isOnMenuPan: false,
isShowMenuPanButton: false,
creatorId: 1,
creatorNickname: "도화",
creatorProfileUrl: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
@@ -210,6 +230,7 @@ struct LiveRoomInfoHostView_Previews: PreviewProvider {
onClickEdit: {},
onClickProfile: { _ in },
onClickNotice: {},
onClickMenuPan: {},
onClickTotalDonation: {},
onClickParticipants: {}
)