Compare commits

..

5 Commits

Author SHA1 Message Date
Yu Sung 6d7e3a40e7 시리즈 소개
- 연재 요일 표시에서 마지막에 있는 요일 제거
2024-10-02 18:19:10 +09:00
Yu Sung 109f3b39d1 스플래시 2024년 10월 2024-10-02 15:23:17 +09:00
Yu Sung 1a133158bf 라이브 - 스피커 리스트
- 닉네임 가로폭 28로 수정
2024-09-25 19:53:21 +09:00
Yu Sung e34a172779 라이브 방
- 스피커 수가 증가함에 따라 UI가 화면에서 넘치던 버그 수정
2024-09-24 23:06:32 +09:00
Yu Sung 9c051ff1e0 라이프 참여자 리스트
- 스피커 표시 최대 5명
2024-09-24 19:39:47 +09:00
11 changed files with 73 additions and 113 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "splash_title.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -103,7 +103,7 @@ struct SeriesDetailIntroductionView: View {
.foregroundColor(Color.white) .foregroundColor(Color.white)
} }
Text(seriesDetail.publishedDaysOfWeek == "랜덤" ? seriesDetail.publishedDaysOfWeek : "\(seriesDetail.publishedDaysOfWeek)요일") Text(seriesDetail.publishedDaysOfWeek == "랜덤" ? seriesDetail.publishedDaysOfWeek : "\(seriesDetail.publishedDaysOfWeek)")
.font(.custom(Font.medium.rawValue, size: 14.7)) .font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color.white) .foregroundColor(Color.white)

View File

@ -28,7 +28,7 @@ struct LiveRoomProfileItemTitleView: View {
} }
if let totalCount = totalCount { if let totalCount = totalCount {
Text("/\(totalCount > 4 ? 4 : totalCount - 1)") Text("/\(totalCount > 5 ? 5 : totalCount - 1)")
.font(.custom(Font.medium.rawValue, size: 13)) .font(.custom(Font.medium.rawValue, size: 13))
.foregroundColor(Color.graybb) .foregroundColor(Color.graybb)
} }

View File

@ -67,6 +67,7 @@ struct LiveRoomInfoCreatorView: View {
Text(creatorNickname) Text(creatorNickname)
.font(.custom(Font.medium.rawValue, size: 12)) .font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(.gray77) .foregroundColor(.gray77)
.lineLimit(1)
if isShowFollowingButton { if isShowFollowingButton {
Image(isFollowing ? "btn_following" : "btn_follow") Image(isFollowing ? "btn_following" : "btn_follow")
@ -75,8 +76,8 @@ struct LiveRoomInfoCreatorView: View {
} }
} }
} }
.padding(.vertical, 8) .padding(8)
.padding(.horizontal, 5.3) .frame(width: screenSize().width / 2.5, alignment: .leading)
.overlay( .overlay(
RoundedRectangle(cornerRadius: 5.3) RoundedRectangle(cornerRadius: 5.3)
.stroke(Color.graybb, lineWidth: 1) .stroke(Color.graybb, lineWidth: 1)
@ -87,7 +88,7 @@ struct LiveRoomInfoCreatorView: View {
struct LiveRoomInfoCreatorView_Previews: PreviewProvider { struct LiveRoomInfoCreatorView_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
LiveRoomInfoCreatorView( LiveRoomInfoCreatorView(
roomTitle: "오늘 라이브방송은 OOO 입니다.", roomTitle: "qwer",
creatorNickname: "도화", creatorNickname: "도화",
creatorProfileUrl: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320", creatorProfileUrl: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
isMute: false, isMute: false,

View File

@ -108,23 +108,28 @@ struct LiveRoomInfoGuestView: View {
onClickFollow: { onClickFollow(isFollowing) }, onClickFollow: { onClickFollow(isFollowing) },
onClickProfile: { onClickProfile(creatorId) } onClickProfile: { onClickProfile(creatorId) }
) )
.frame(width: 180, alignment: .leading)
Spacer() Spacer()
ForEach(0..<speakerList.count, id: \.self) { index in ScrollView(.horizontal, showsIndicators: false) {
let speaker = speakerList[index] HStack(spacing: 8) {
ForEach(0..<speakerList.count, id: \.self) { index in
if speaker.id != UInt(creatorId) { let speaker = speakerList[index]
LiveRoomInfoSpeakerView(
nickname: speaker.nickname, if speaker.id != UInt(creatorId) {
profileUrl: speaker.profileImage, LiveRoomInfoSpeakerView(
isMute: muteSpeakerList.contains(UInt(speaker.id)), nickname: speaker.nickname,
isActiveSpeaker: activeSpeakerList.contains(UInt(speaker.id)), profileUrl: speaker.profileImage,
onClickProfile: { onClickProfile(speaker.id) } isMute: muteSpeakerList.contains(UInt(speaker.id)),
) isActiveSpeaker: activeSpeakerList.contains(UInt(speaker.id)),
onClickProfile: { onClickProfile(speaker.id) }
)
}
}
} }
.rotationEffect(Angle(degrees: 180))
} }
.rotationEffect(Angle(degrees: 180))
} }
HStack(spacing: 5.3) { HStack(spacing: 5.3) {
@ -184,13 +189,19 @@ struct LiveRoomInfoGuestView: View {
.padding(.horizontal, 13.3) .padding(.horizontal, 13.3)
.padding(.top, 16) .padding(.top, 16)
.background(Color.gray22) .background(Color.gray22)
.onAppear {
UIScrollView.appearance().bounces = false
}
.onDisappear {
UIScrollView.appearance().bounces = true
}
} }
} }
struct LiveRoomInfoGuestView_Previews: PreviewProvider { struct LiveRoomInfoGuestView_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
LiveRoomInfoGuestView( LiveRoomInfoGuestView(
title: "오늘의 라이브방송은 OOO입니다.", title: "qwer",
totalDonationCan: 123456, totalDonationCan: 123456,
isOnBg: true, isOnBg: true,
isOnNotice: false, isOnNotice: false,
@ -218,25 +229,7 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
nickname: "LUNA", nickname: "LUNA",
profileImage: "https://cf.sodalive.net/profile/4679/4679-profile-41e83399-234e-4541-8591-f961a025cfaa-5819-1699536915310", profileImage: "https://cf.sodalive.net/profile/4679/4679-profile-41e83399-234e-4541-8591-f961a025cfaa-5819-1699536915310",
role: .SPEAKER role: .SPEAKER
), )
LiveRoomMember(
id: 4,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
LiveRoomMember(
id: 5,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
LiveRoomMember(
id: 6,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
], ],
muteSpeakerList: [], muteSpeakerList: [],
activeSpeakerList: [], activeSpeakerList: [],

View File

@ -106,23 +106,28 @@ struct LiveRoomInfoHostView: View {
onClickFollow: {}, onClickFollow: {},
onClickProfile: {} onClickProfile: {}
) )
.frame(width: 180, alignment: .leading)
Spacer() Spacer()
ForEach(0..<speakerList.count, id: \.self) { index in ScrollView(.horizontal, showsIndicators: false) {
let speaker = speakerList[index] HStack(spacing: 8) {
ForEach(0..<speakerList.count, id: \.self) { index in
if speaker.id != UInt(creatorId) { let speaker = speakerList[index]
LiveRoomInfoSpeakerView(
nickname: speaker.nickname, if speaker.id != UInt(creatorId) {
profileUrl: speaker.profileImage, LiveRoomInfoSpeakerView(
isMute: muteSpeakerList.contains(UInt(speaker.id)), nickname: speaker.nickname,
isActiveSpeaker: activeSpeakerList.contains(UInt(speaker.id)), profileUrl: speaker.profileImage,
onClickProfile: { onClickProfile(speaker.id) } isMute: muteSpeakerList.contains(UInt(speaker.id)),
) isActiveSpeaker: activeSpeakerList.contains(UInt(speaker.id)),
onClickProfile: { onClickProfile(speaker.id) }
)
}
}
} }
.rotationEffect(Angle(degrees: 180))
} }
.rotationEffect(Angle(degrees: 180))
} }
HStack(spacing: 5.3) { HStack(spacing: 5.3) {
@ -199,6 +204,12 @@ struct LiveRoomInfoHostView: View {
.padding(.horizontal, 13.3) .padding(.horizontal, 13.3)
.padding(.top, 16) .padding(.top, 16)
.background(Color.gray22) .background(Color.gray22)
.onAppear {
UIScrollView.appearance().bounces = false
}
.onDisappear {
UIScrollView.appearance().bounces = true
}
} }
} }
@ -228,31 +239,7 @@ struct LiveRoomInfoHostView_Previews: PreviewProvider {
nickname: "청령", nickname: "청령",
profileImage: "https://cf.sodalive.net/profile/13/13-profile-fabb75e0-2870-4d99-900e-1d9aa63e605b-685-1704859996417", profileImage: "https://cf.sodalive.net/profile/13/13-profile-fabb75e0-2870-4d99-900e-1d9aa63e605b-685-1704859996417",
role: .SPEAKER role: .SPEAKER
), )
LiveRoomMember(
id: 3,
nickname: "LUNA",
profileImage: "https://cf.sodalive.net/profile/4679/4679-profile-41e83399-234e-4541-8591-f961a025cfaa-5819-1699536915310",
role: .SPEAKER
),
LiveRoomMember(
id: 4,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
LiveRoomMember(
id: 5,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
LiveRoomMember(
id: 6,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
], ],
muteSpeakerList: [], muteSpeakerList: [],
activeSpeakerList: [], activeSpeakerList: [],

View File

@ -19,32 +19,34 @@ struct LiveRoomInfoSpeakerView: View {
let onClickProfile: () -> Void let onClickProfile: () -> Void
var body: some View { var body: some View {
VStack(spacing: 2.7) { VStack(spacing: 5) {
ZStack(alignment: .center) { ZStack(alignment: .center) {
KFImage(URL(string: profileUrl)) KFImage(URL(string: profileUrl))
.resizable() .resizable()
.frame(width: 26.7, height: 26.7) .frame(width: 25, height: 25)
.clipShape(Circle()) .clipShape(Circle())
.overlay(
Circle()
.stroke(
Color.button,
lineWidth: isActiveSpeaker ? 3 : 0
)
)
if isMute { if isMute {
Image("ic_mute") Image("ic_mute")
.resizable() .resizable()
.frame(width: 30, height: 30) .frame(width: 25, height: 25)
} }
} }
.overlay(
Circle()
.stroke(
Color.button,
lineWidth: isActiveSpeaker ? 3 : 0
)
)
Text(nickname) Text(nickname)
.font(.custom(Font.medium.rawValue, fixedSize: 10.7)) .font(.custom(Font.medium.rawValue, fixedSize: 8.7))
.foregroundColor(.gray77) .foregroundColor(.gray77)
.lineLimit(1)
.truncationMode(.tail)
.frame(width: 28)
} }
.frame(width: 30, height: 30)
.onTapGesture { onClickProfile() } .onTapGesture { onClickProfile() }
} }
} }
@ -52,7 +54,7 @@ struct LiveRoomInfoSpeakerView: View {
struct LiveRoomInfoSpeakerView_Previews: PreviewProvider { struct LiveRoomInfoSpeakerView_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
LiveRoomInfoSpeakerView( LiveRoomInfoSpeakerView(
nickname: "청령", nickname: "테스트중입니다",
profileUrl: "https://cf.sodalive.net/profile/13/13-profile-fabb75e0-2870-4d99-900e-1d9aa63e605b-685-1704859996417", profileUrl: "https://cf.sodalive.net/profile/13/13-profile-fabb75e0-2870-4d99-900e-1d9aa63e605b-685-1704859996417",
isMute: false, isMute: false,
isActiveSpeaker: true, isActiveSpeaker: true,

View File

@ -21,14 +21,12 @@ struct SplashView: View {
.scaledToFill() .scaledToFill()
.edgesIgnoringSafeArea(.all) .edgesIgnoringSafeArea(.all)
VStack(spacing: 0) { HStack(spacing: 0) {
Image("splash_title")
.padding(.top, 60)
Spacer() Spacer()
Image("splash_text") Image("splash_text")
.padding(.bottom, 36) .padding(.top, 94)
.padding(.trailing, 38)
} }
if isShowUpdatePopup { if isShowUpdatePopup {