콘텐츠 메인, 라이브 메인, 오디션 메인, 마이페이지

- 로그인 하지 않고 페이지 조회가 되도록 수정
This commit is contained in:
Yu Sung
2025-03-24 18:32:27 +09:00
parent fa94c5447f
commit 80cb19a1c7
32 changed files with 874 additions and 595 deletions

View File

@@ -13,6 +13,7 @@ struct SectionRecommendChannelView: View {
let items: [GetRecommendChannelResponse]
@Binding var isFollowingList: Bool
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
var body: some View {
VStack(spacing: 21.3) {
@@ -20,30 +21,32 @@ struct SectionRecommendChannelView: View {
if isFollowingList {
Text("팔로잉 ")
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(Color(hex: "eeeeee"))
.foregroundColor(.grayee)
} else {
Text("추천 ")
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(Color(hex: "eeeeee"))
.foregroundColor(.grayee)
}
Text("채널")
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(Color(hex: "3bb9f1"))
.foregroundColor(.button)
Spacer()
Text("팔로잉 채널")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "777777"))
Image(isFollowingList ? "btn_toggle_on_big" : "btn_toggle_off_big")
.resizable()
.frame(width: 33.3, height: 20)
.padding(.leading, 6.7)
.onTapGesture {
isFollowingList.toggle()
}
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
Text("팔로잉 채널")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(.gray77)
Image(isFollowingList ? "btn_toggle_on_big" : "btn_toggle_off_big")
.resizable()
.frame(width: 33.3, height: 20)
.padding(.leading, 6.7)
.onTapGesture {
isFollowingList.toggle()
}
}
}
.frame(width: screenSize().width - 26.7, alignment: .leading)
@@ -70,7 +73,7 @@ struct SectionRecommendChannelView: View {
Circle()
.strokeBorder(lineWidth: 3)
.foregroundColor(
Color(hex: "3bb9f1")
.button
.opacity(item.isOnAir ? 1 : 0)
)
)
@@ -81,21 +84,25 @@ struct SectionRecommendChannelView: View {
.foregroundColor(.white)
.padding(.vertical, 2.7)
.padding(.horizontal, 5.7)
.background(Color(hex: "3bb9f1"))
.background(Color.button)
.cornerRadius(6.7)
}
}
Text(item.nickname)
.font(.custom(Font.medium.rawValue, size: 11.3))
.foregroundColor(Color(hex: "bbbbbb"))
.foregroundColor(Color.graybb)
.frame(width: screenSize().width * 0.18)
.lineLimit(1)
}
.onTapGesture {
AppState.shared.setAppStep(
step: .creatorDetail(userId: item.creatorId)
)
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
AppState.shared.setAppStep(
step: .creatorDetail(userId: item.creatorId)
)
} else {
AppState.shared.setAppStep(step: .login)
}
}
}
@@ -112,10 +119,15 @@ struct SectionRecommendChannelView: View {
.lineLimit(1)
}
.onTapGesture {
AppState.shared.setAppStep(step: .followingList)
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
AppState.shared.setAppStep(step: .followingList)
} else {
AppState.shared.setAppStep(step: .login)
}
}
}
}
.padding(.horizontal, 13.3)
}
}
}