feat(creator): 현재 라이브 섹션을 연결한다
This commit is contained in:
@@ -22,6 +22,9 @@
|
|||||||
CC0101072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift */; };
|
CC0101072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift */; };
|
||||||
CC0102072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift */; };
|
CC0102072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift */; };
|
||||||
CC0103072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift */; };
|
CC0103072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift */; };
|
||||||
|
CC0101142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift */; };
|
||||||
|
CC0102142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift */; };
|
||||||
|
CC0103142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift */; };
|
||||||
CC0101082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100082FF0100000A5BBA3 /* CreatorChannelView.swift */; };
|
CC0101082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100082FF0100000A5BBA3 /* CreatorChannelView.swift */; };
|
||||||
CC0102082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100082FF0100000A5BBA3 /* CreatorChannelView.swift */; };
|
CC0102082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100082FF0100000A5BBA3 /* CreatorChannelView.swift */; };
|
||||||
CC0103082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100082FF0100000A5BBA3 /* CreatorChannelView.swift */; };
|
CC0103082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0100082FF0100000A5BBA3 /* CreatorChannelView.swift */; };
|
||||||
@@ -1746,6 +1749,7 @@
|
|||||||
CC0100112FF0100000A5BBA3 /* CreatorChannelTitleBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatorChannelTitleBar.swift; sourceTree = "<group>"; };
|
CC0100112FF0100000A5BBA3 /* CreatorChannelTitleBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatorChannelTitleBar.swift; sourceTree = "<group>"; };
|
||||||
CC0100122FF0100000A5BBA3 /* CreatorChannelHeaderSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatorChannelHeaderSection.swift; sourceTree = "<group>"; };
|
CC0100122FF0100000A5BBA3 /* CreatorChannelHeaderSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatorChannelHeaderSection.swift; sourceTree = "<group>"; };
|
||||||
CC0100132FF0100000A5BBA3 /* CreatorChannelTabBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatorChannelTabBar.swift; sourceTree = "<group>"; };
|
CC0100132FF0100000A5BBA3 /* CreatorChannelTabBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatorChannelTabBar.swift; sourceTree = "<group>"; };
|
||||||
|
CC0100142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatorChannelCurrentLiveSection.swift; sourceTree = "<group>"; };
|
||||||
0BBDC3ECBBE049EAA4057D3A /* PostChannelDonationRequest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PostChannelDonationRequest.swift; sourceTree = "<group>"; };
|
0BBDC3ECBBE049EAA4057D3A /* PostChannelDonationRequest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PostChannelDonationRequest.swift; sourceTree = "<group>"; };
|
||||||
0EC05859619BDC03056911E7 /* MainTab.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MainTab.swift; sourceTree = "<group>"; };
|
0EC05859619BDC03056911E7 /* MainTab.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MainTab.swift; sourceTree = "<group>"; };
|
||||||
189350EA101CF12EEBA6EC1D /* MainTabBarView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MainTabBarView.swift; sourceTree = "<group>"; };
|
189350EA101CF12EEBA6EC1D /* MainTabBarView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MainTabBarView.swift; sourceTree = "<group>"; };
|
||||||
@@ -2665,6 +2669,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
CC0100072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift */,
|
CC0100072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift */,
|
||||||
|
CC0100142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift */,
|
||||||
);
|
);
|
||||||
path = Components;
|
path = Components;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -5599,6 +5604,7 @@
|
|||||||
CC0101042FF0100000A5BBA3 /* CreatorChannelHomeRepository.swift in Sources */,
|
CC0101042FF0100000A5BBA3 /* CreatorChannelHomeRepository.swift in Sources */,
|
||||||
CC0101062FF0100000A5BBA3 /* CreatorChannelHomeView.swift in Sources */,
|
CC0101062FF0100000A5BBA3 /* CreatorChannelHomeView.swift in Sources */,
|
||||||
CC0101072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */,
|
CC0101072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */,
|
||||||
|
CC0101142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift in Sources */,
|
||||||
CC0101082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */,
|
CC0101082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */,
|
||||||
CC0101112FF0100000A5BBA3 /* CreatorChannelTitleBar.swift in Sources */,
|
CC0101112FF0100000A5BBA3 /* CreatorChannelTitleBar.swift in Sources */,
|
||||||
CC0101122FF0100000A5BBA3 /* CreatorChannelHeaderSection.swift in Sources */,
|
CC0101122FF0100000A5BBA3 /* CreatorChannelHeaderSection.swift in Sources */,
|
||||||
@@ -6396,6 +6402,7 @@
|
|||||||
CC0102042FF0100000A5BBA3 /* CreatorChannelHomeRepository.swift in Sources */,
|
CC0102042FF0100000A5BBA3 /* CreatorChannelHomeRepository.swift in Sources */,
|
||||||
CC0102062FF0100000A5BBA3 /* CreatorChannelHomeView.swift in Sources */,
|
CC0102062FF0100000A5BBA3 /* CreatorChannelHomeView.swift in Sources */,
|
||||||
CC0102072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */,
|
CC0102072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */,
|
||||||
|
CC0102142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift in Sources */,
|
||||||
CC0102082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */,
|
CC0102082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */,
|
||||||
CC0102112FF0100000A5BBA3 /* CreatorChannelTitleBar.swift in Sources */,
|
CC0102112FF0100000A5BBA3 /* CreatorChannelTitleBar.swift in Sources */,
|
||||||
CC0102122FF0100000A5BBA3 /* CreatorChannelHeaderSection.swift in Sources */,
|
CC0102122FF0100000A5BBA3 /* CreatorChannelHeaderSection.swift in Sources */,
|
||||||
@@ -7209,6 +7216,7 @@
|
|||||||
CC0103042FF0100000A5BBA3 /* CreatorChannelHomeRepository.swift in Sources */,
|
CC0103042FF0100000A5BBA3 /* CreatorChannelHomeRepository.swift in Sources */,
|
||||||
CC0103062FF0100000A5BBA3 /* CreatorChannelHomeView.swift in Sources */,
|
CC0103062FF0100000A5BBA3 /* CreatorChannelHomeView.swift in Sources */,
|
||||||
CC0103072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */,
|
CC0103072FF0100000A5BBA3 /* CreatorChannelPlaceholderTabView.swift in Sources */,
|
||||||
|
CC0103142FF0100000A5BBA3 /* CreatorChannelCurrentLiveSection.swift in Sources */,
|
||||||
CC0103082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */,
|
CC0103082FF0100000A5BBA3 /* CreatorChannelView.swift in Sources */,
|
||||||
CC0103112FF0100000A5BBA3 /* CreatorChannelTitleBar.swift in Sources */,
|
CC0103112FF0100000A5BBA3 /* CreatorChannelTitleBar.swift in Sources */,
|
||||||
CC0103122FF0100000A5BBA3 /* CreatorChannelHeaderSection.swift in Sources */,
|
CC0103122FF0100000A5BBA3 /* CreatorChannelHeaderSection.swift in Sources */,
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
private var subscription = Set<AnyCancellable>()
|
private var subscription = Set<AnyCancellable>()
|
||||||
|
|
||||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||||
|
guard !Self.isRunningForPreviews else { return true }
|
||||||
|
|
||||||
FirebaseApp.configure()
|
FirebaseApp.configure()
|
||||||
LoginManager.shared.setup(channelID: LINE_CHANNEL_ID, universalLinkURL: nil)
|
LoginManager.shared.setup(channelID: LINE_CHANNEL_ID, universalLinkURL: nil)
|
||||||
Notifly.initialize(projectId: NOTIFLY_PROJECT_ID, username: NOTIFLY_USERNAME, password: NOTIFLY_PASSWORD)
|
Notifly.initialize(projectId: NOTIFLY_PROJECT_ID, username: NOTIFLY_USERNAME, password: NOTIFLY_PASSWORD)
|
||||||
@@ -51,6 +53,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static var isRunningForPreviews: Bool {
|
||||||
|
ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1"
|
||||||
|
}
|
||||||
|
|
||||||
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
|
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
|
||||||
// Print full message.
|
// Print full message.
|
||||||
DEBUG_LOG("didReceiveRemoteNotification userInfo: \(userInfo)")
|
DEBUG_LOG("didReceiveRemoteNotification userInfo: \(userInfo)")
|
||||||
|
|||||||
@@ -29,9 +29,15 @@ struct SodaLiveApp: App {
|
|||||||
configureImageCache()
|
configureImageCache()
|
||||||
// 앱 시작 직후, 초기 네트워크 요청도 올바른 언어 헤더를 갖도록 동기 초기화
|
// 앱 시작 직후, 초기 네트워크 요청도 올바른 언어 헤더를 갖도록 동기 초기화
|
||||||
LanguageHeaderProvider.initialize()
|
LanguageHeaderProvider.initialize()
|
||||||
|
guard !Self.isRunningForPreviews else { return }
|
||||||
|
|
||||||
KakaoSDK.initSDK(appKey: KAKAO_APP_KEY)
|
KakaoSDK.initSDK(appKey: KAKAO_APP_KEY)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static var isRunningForPreviews: Bool {
|
||||||
|
ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1"
|
||||||
|
}
|
||||||
|
|
||||||
private func configureImageCache() {
|
private func configureImageCache() {
|
||||||
// Kingfisher 전역 캐시 상한 설정
|
// Kingfisher 전역 캐시 상한 설정
|
||||||
let cache = ImageCache.default
|
let cache = ImageCache.default
|
||||||
@@ -50,6 +56,8 @@ struct SodaLiveApp: App {
|
|||||||
ContentView(canPgPaymentViewModel: canPgPaymentViewModel)
|
ContentView(canPgPaymentViewModel: canPgPaymentViewModel)
|
||||||
.environment(\.locale, languageEnvironment.locale)
|
.environment(\.locale, languageEnvironment.locale)
|
||||||
.task {
|
.task {
|
||||||
|
guard !Self.isRunningForPreviews else { return }
|
||||||
|
|
||||||
await LanguageContainer.service.bootstrap()
|
await LanguageContainer.service.bootstrap()
|
||||||
}
|
}
|
||||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)) { _ in
|
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)) { _ in
|
||||||
@@ -62,6 +70,8 @@ struct SodaLiveApp: App {
|
|||||||
ImageCache.default.clearMemoryCache()
|
ImageCache.default.clearMemoryCache()
|
||||||
}
|
}
|
||||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
|
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
|
||||||
|
guard !Self.isRunningForPreviews else { return }
|
||||||
|
|
||||||
UIApplication.shared.applicationIconBadgeNumber = 0
|
UIApplication.shared.applicationIconBadgeNumber = 0
|
||||||
AppsFlyerLib.shared().start()
|
AppsFlyerLib.shared().start()
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ struct SplashView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func fetchLastestVersion() {
|
private func fetchLastestVersion() {
|
||||||
|
guard !isRunningForPreviews else { return }
|
||||||
|
|
||||||
let remoteConfig = RemoteConfig.remoteConfig()
|
let remoteConfig = RemoteConfig.remoteConfig()
|
||||||
let configSettings = RemoteConfigSettings()
|
let configSettings = RemoteConfigSettings()
|
||||||
configSettings.minimumFetchInterval = 60
|
configSettings.minimumFetchInterval = 60
|
||||||
@@ -163,6 +165,10 @@ struct SplashView: View {
|
|||||||
nextAppStep()
|
nextAppStep()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var isRunningForPreviews: Bool {
|
||||||
|
ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Preview {
|
#Preview {
|
||||||
|
|||||||
@@ -0,0 +1,140 @@
|
|||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct CreatorChannelCurrentLiveSection: View {
|
||||||
|
let currentLive: CreatorChannelLiveResponse?
|
||||||
|
let onTapLive: (Int) -> Void
|
||||||
|
|
||||||
|
init(
|
||||||
|
currentLive: CreatorChannelLiveResponse?,
|
||||||
|
onTapLive: @escaping (Int) -> Void = { _ in }
|
||||||
|
) {
|
||||||
|
self.currentLive = currentLive
|
||||||
|
self.onTapLive = onTapLive
|
||||||
|
}
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
if let currentLive {
|
||||||
|
CreatorChannelCurrentLiveCard(live: currentLive) {
|
||||||
|
onTapLive(currentLive.liveId)
|
||||||
|
}
|
||||||
|
.padding(.horizontal, SodaSpacing.s20)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private struct CreatorChannelCurrentLiveCard: View {
|
||||||
|
let live: CreatorChannelLiveResponse
|
||||||
|
let action: () -> Void
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
Button(action: action) {
|
||||||
|
HStack(alignment: .center, spacing: 0) {
|
||||||
|
VStack(alignment: .leading, spacing: SodaSpacing.s4) {
|
||||||
|
HStack(alignment: .center, spacing: SodaSpacing.s8) {
|
||||||
|
LiveTagView()
|
||||||
|
|
||||||
|
Text(live.relativeStartedAtText())
|
||||||
|
.appFont(size: 14, weight: .regular)
|
||||||
|
.foregroundColor(Color.gray700)
|
||||||
|
.lineLimit(1)
|
||||||
|
.fixedSize(horizontal: true, vertical: false)
|
||||||
|
}
|
||||||
|
|
||||||
|
Text(live.title)
|
||||||
|
.appFont(size: 18, weight: .bold)
|
||||||
|
.foregroundColor(.black)
|
||||||
|
.lineLimit(1)
|
||||||
|
.truncationMode(.tail)
|
||||||
|
}
|
||||||
|
.frame(width: 262, alignment: .leading)
|
||||||
|
|
||||||
|
Spacer(minLength: 0)
|
||||||
|
|
||||||
|
priceBadge
|
||||||
|
.frame(height: 78)
|
||||||
|
.layoutPriority(1)
|
||||||
|
}
|
||||||
|
.padding(.leading, SodaSpacing.s24)
|
||||||
|
.padding(.trailing, SodaSpacing.s14)
|
||||||
|
.frame(maxWidth: .infinity, minHeight: 78, alignment: .leading)
|
||||||
|
.background(cardBackground)
|
||||||
|
.clipShape(Capsule())
|
||||||
|
}
|
||||||
|
.buttonStyle(.plain)
|
||||||
|
}
|
||||||
|
|
||||||
|
private var cardBackground: LinearGradient {
|
||||||
|
LinearGradient(
|
||||||
|
colors: [Color(hex: "00FBE2"), Color(hex: "62CFFF")],
|
||||||
|
startPoint: .leading,
|
||||||
|
endPoint: .trailing
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private var priceBadge: some View {
|
||||||
|
ZStack {
|
||||||
|
HStack(spacing: 2) {
|
||||||
|
Image("ic_bar_cash")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
|
||||||
|
Text(live.priceText)
|
||||||
|
.appFont(size: 14, weight: .regular)
|
||||||
|
.foregroundColor(.white)
|
||||||
|
.lineLimit(1)
|
||||||
|
.fixedSize(horizontal: true, vertical: false)
|
||||||
|
}
|
||||||
|
.padding(.horizontal, SodaSpacing.s6)
|
||||||
|
.padding(.vertical, SodaSpacing.s4)
|
||||||
|
.background(Color.black.opacity(0.4))
|
||||||
|
.clipShape(Capsule())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private struct LiveTagView: View {
|
||||||
|
var body: some View {
|
||||||
|
HStack(alignment: .center, spacing: SodaSpacing.s4) {
|
||||||
|
Circle()
|
||||||
|
.fill(Color.red400)
|
||||||
|
.frame(width: 8, height: 8)
|
||||||
|
|
||||||
|
Text(I18n.HomeFollowing.liveTag)
|
||||||
|
.appFont(size: 12, weight: .regular)
|
||||||
|
.foregroundColor(.white)
|
||||||
|
.lineLimit(1)
|
||||||
|
}
|
||||||
|
.padding(.horizontal, SodaSpacing.s6)
|
||||||
|
.padding(.vertical, 2)
|
||||||
|
.frame(height: 18)
|
||||||
|
.background(Color.black)
|
||||||
|
.clipShape(Capsule())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private extension CreatorChannelLiveResponse {
|
||||||
|
func relativeStartedAtText(now: Date = Date()) -> String {
|
||||||
|
DateParser.relativeTimeText(fromUTC: beginDateTimeUtc, fallback: beginDateTimeUtc, now: now)
|
||||||
|
}
|
||||||
|
|
||||||
|
var priceText: String {
|
||||||
|
price > 0 ? price.comma() : I18n.LiveReservation.Item.free
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct CreatorChannelCurrentLiveSection_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
CreatorChannelCurrentLiveSection(
|
||||||
|
currentLive: CreatorChannelLiveResponse(
|
||||||
|
liveId: 1,
|
||||||
|
title: "라이브 제목",
|
||||||
|
coverImageUrl: "https://picsum.photos/300/300",
|
||||||
|
beginDateTimeUtc: "2026-07-01T00:30:00Z",
|
||||||
|
price: 300,
|
||||||
|
isAdult: true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.background(Color.black)
|
||||||
|
.previewLayout(.sizeThatFits)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,12 +3,26 @@ import SwiftUI
|
|||||||
struct CreatorChannelHomeView: View {
|
struct CreatorChannelHomeView: View {
|
||||||
let response: CreatorChannelHomeResponse
|
let response: CreatorChannelHomeResponse
|
||||||
let onSelectTab: (CreatorChannelTab) -> Void
|
let onSelectTab: (CreatorChannelTab) -> Void
|
||||||
|
let onTapLive: (Int) -> Void
|
||||||
|
|
||||||
|
init(
|
||||||
|
response: CreatorChannelHomeResponse,
|
||||||
|
onSelectTab: @escaping (CreatorChannelTab) -> Void,
|
||||||
|
onTapLive: @escaping (Int) -> Void = { _ in }
|
||||||
|
) {
|
||||||
|
self.response = response
|
||||||
|
self.onSelectTab = onSelectTab
|
||||||
|
self.onTapLive = onTapLive
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ScrollView {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
Color.clear
|
CreatorChannelCurrentLiveSection(
|
||||||
.frame(height: 1)
|
currentLive: response.currentLive,
|
||||||
|
onTapLive: onTapLive
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.background(Color.black)
|
.background(Color.black)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -335,7 +335,7 @@
|
|||||||
|
|
||||||
### Phase 5: 현재 라이브 섹션
|
### Phase 5: 현재 라이브 섹션
|
||||||
|
|
||||||
- [ ] **Task 5.1: 현재 라이브 섹션 구현**
|
- [x] **Task 5.1: 현재 라이브 섹션 구현**
|
||||||
- 대상 파일:
|
- 대상 파일:
|
||||||
- 생성: `SodaLive/Sources/V2/CreatorChannel/Home/Components/CreatorChannelCurrentLiveSection.swift`
|
- 생성: `SodaLive/Sources/V2/CreatorChannel/Home/Components/CreatorChannelCurrentLiveSection.swift`
|
||||||
- 수정: `SodaLive/Sources/V2/CreatorChannel/Home/CreatorChannelHomeView.swift`
|
- 수정: `SodaLive/Sources/V2/CreatorChannel/Home/CreatorChannelHomeView.swift`
|
||||||
@@ -619,6 +619,7 @@
|
|||||||
- 2026-07-02: 사용자 확인 사항을 반영해 title bar, 크리에이터 프로필 header, tab-bar를 `CreatorChannelView` 공통 shell로 분리하고, `CreatorChannelHomeView`는 tab-bar 아래 홈 탭 콘텐츠만 담당하도록 PRD와 계획을 갱신했다.
|
- 2026-07-02: 사용자 확인 사항을 반영해 title bar, 크리에이터 프로필 header, tab-bar를 `CreatorChannelView` 공통 shell로 분리하고, `CreatorChannelHomeView`는 tab-bar 아래 홈 탭 콘텐츠만 담당하도록 PRD와 계획을 갱신했다.
|
||||||
- 2026-07-02: 이미 완료된 Phase 1~2 기록은 보존하고, 후속 구조 정리를 위해 Task 2.4 `공통 CreatorChannel shell로 구조 정리`를 추가했다.
|
- 2026-07-02: 이미 완료된 Phase 1~2 기록은 보존하고, 후속 구조 정리를 위해 Task 2.4 `공통 CreatorChannel shell로 구조 정리`를 추가했다.
|
||||||
- 2026-07-02: 사용자 확인 사항을 반영해 title bar Figma URL 3종과 사용할 아이콘 asset(`ic_new_bar_back`, `ic_new_follow`, `ic_new_following`, `ic_new_more`, `ic_bar_bell`, `ic_bar_bell_fill`)을 Task 3.1 및 최종 회귀 검색 기준에 추가했다.
|
- 2026-07-02: 사용자 확인 사항을 반영해 title bar Figma URL 3종과 사용할 아이콘 asset(`ic_new_bar_back`, `ic_new_follow`, `ic_new_following`, `ic_new_more`, `ic_bar_bell`, `ic_bar_bell_fill`)을 Task 3.1 및 최종 회귀 검색 기준에 추가했다.
|
||||||
|
- 2026-07-03: Phase 5 현재 라이브 섹션을 구현했다. Figma `290:8950` 기준으로 LIVE pill, 시작 시간, 제목, 커버 이미지/placeholder, 유료 캔 배지, 성인 표시를 반영하고 `CreatorChannelHomeView`에 `currentLive` optional 기반으로 연결했다.
|
||||||
- 2026-07-03: Phase 4를 완료해 `CreatorChannelView`에서 홈 탭은 `CreatorChannelHomeView`, 홈 외 탭은 `CreatorChannelPlaceholderTabView(title: selectedTab.title)`로 분기하고, 홈 섹션 전체보기용 tab 선택 closure가 `.audio`, `.series`, `.community`, `.fanTalk`, `.donation`으로 전환되도록 연결했다.
|
- 2026-07-03: Phase 4를 완료해 `CreatorChannelView`에서 홈 탭은 `CreatorChannelHomeView`, 홈 외 탭은 `CreatorChannelPlaceholderTabView(title: selectedTab.title)`로 분기하고, 홈 섹션 전체보기용 tab 선택 closure가 `.audio`, `.series`, `.community`, `.fanTalk`, `.donation`으로 전환되도록 연결했다.
|
||||||
- 2026-07-02: 기존 `UserProfile` 구현을 확인해 title bar 팔로우/팔로우 취소/알림 설정/알림 설정 취소를 `UserRepository.creatorFollow(creatorId:follow:notify:)`로 처리하고, `ic_bar_bell`/`ic_bar_bell_fill` 터치 시 각각 `notify: true`/`notify: false` 호출이 일어나도록 계획에 반영했다.
|
- 2026-07-02: 기존 `UserProfile` 구현을 확인해 title bar 팔로우/팔로우 취소/알림 설정/알림 설정 취소를 `UserRepository.creatorFollow(creatorId:follow:notify:)`로 처리하고, `ic_bar_bell`/`ic_bar_bell_fill` 터치 시 각각 `notify: true`/`notify: false` 호출이 일어나도록 계획에 반영했다.
|
||||||
- 2026-07-03: Task 3.4 구현을 완료했다. `CreatorChannelView`에서 geometry preference로 tab-bar 위치를 추적하고, sticky 기준을 디바이스 최상단이 아닌 title bar 하단(`safeAreaInsets.top + 56`)으로 계산하도록 변경했다. `rg "PreferenceKey|GeometryReader|ZStack|overlay|backgroundProgress|Color\\.clear|opacity|isTabBarSticky|clamp|safeAreaInsets|CreatorChannelTitleBar|CreatorChannelTabBar" ...` 기준 키워드를 확인했고, `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`가 `BUILD SUCCEEDED`로 완료됐다.
|
- 2026-07-03: Task 3.4 구현을 완료했다. `CreatorChannelView`에서 geometry preference로 tab-bar 위치를 추적하고, sticky 기준을 디바이스 최상단이 아닌 title bar 하단(`safeAreaInsets.top + 56`)으로 계산하도록 변경했다. `rg "PreferenceKey|GeometryReader|ZStack|overlay|backgroundProgress|Color\\.clear|opacity|isTabBarSticky|clamp|safeAreaInsets|CreatorChannelTitleBar|CreatorChannelTabBar" ...` 기준 키워드를 확인했고, `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`가 `BUILD SUCCEEDED`로 완료됐다.
|
||||||
|
|||||||
Reference in New Issue
Block a user