- 오디션 탭 추가
This commit is contained in:
Yu Sung 2025-01-05 18:25:35 +09:00
parent 47bc905e4d
commit 5c3bf18d27
10 changed files with 44 additions and 26 deletions

View File

@ -9,7 +9,7 @@
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "ic_tabbar_explorer_normal.png", "filename" : "ic_tabbar_audition_normal.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -9,7 +9,7 @@
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "ic_tabbar_explorer_selected.png", "filename" : "ic_tabbar_audition_selected.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,18 @@
//
// AuditionView.swift
// SodaLive
//
// Created by klaus on 1/5/25.
//
import SwiftUI
struct AuditionView: View {
var body: some View {
Text("오디션")
}
}
#Preview {
AuditionView()
}

View File

@ -34,8 +34,8 @@ struct BottomTabView: View {
}, },
color: { color: {
currentTab == .content ? currentTab == .content ?
Color(hex: "3bb9f1") : Color.button :
Color(hex: "bbbbbb") Color.graybb
}, },
width: tabWidth width: tabWidth
) )
@ -59,33 +59,33 @@ struct BottomTabView: View {
}, },
color: { color: {
currentTab == .live ? currentTab == .live ?
Color(hex: "3bb9f1") : Color.button :
Color(hex: "bbbbbb") Color.graybb
}, },
width: tabWidth width: tabWidth
) )
TabButton( TabButton(
title: "탐색", title: "오디션",
action: { action: {
if currentTab != .explorer { if currentTab != .audition {
currentTab = .explorer currentTab = .audition
} }
}, },
image: { image: {
currentTab == .explorer ? currentTab == .audition ?
"ic_tabbar_explorer_selected" : "ic_tabbar_audition_selected" :
"ic_tabbar_explorer_normal" "ic_tabbar_audition_normal"
}, },
fontName: { fontName: {
currentTab == .explorer ? currentTab == .audition ?
Font.bold.rawValue : Font.bold.rawValue :
Font.medium.rawValue Font.medium.rawValue
}, },
color: { color: {
currentTab == .explorer ? currentTab == .audition ?
Color(hex: "3bb9f1") : Color.button :
Color(hex: "bbbbbb") Color.graybb
}, },
width: tabWidth width: tabWidth
) )
@ -109,8 +109,8 @@ struct BottomTabView: View {
}, },
color: { color: {
currentTab == .message ? currentTab == .message ?
Color(hex: "3bb9f1") : Color.button :
Color(hex: "bbbbbb") Color.graybb
}, },
width: tabWidth width: tabWidth
) )
@ -134,13 +134,13 @@ struct BottomTabView: View {
}, },
color: { color: {
currentTab == .mypage ? currentTab == .mypage ?
Color(hex: "3bb9f1") : Color.button :
Color(hex: "bbbbbb") Color.graybb
}, },
width: tabWidth width: tabWidth
) )
} }
.background(Color(hex: "111111")) .background(Color.gray11)
} }
} }

View File

@ -21,7 +21,7 @@ struct HomeView: View {
@StateObject var contentPlayerPlayManager = ContentPlayerPlayManager.shared @StateObject var contentPlayerPlayManager = ContentPlayerPlayManager.shared
private let liveView = LiveView() private let liveView = LiveView()
private let explorer = ExplorerView() private let audition = AuditionView()
private let messageView = MessageView() private let messageView = MessageView()
private let contentView = ContentMainView() private let contentView = ContentMainView()
@ -40,9 +40,9 @@ struct HomeView: View {
.frame(width: viewModel.currentTab == .live ? proxy.size.width : 0) .frame(width: viewModel.currentTab == .live ? proxy.size.width : 0)
.opacity(viewModel.currentTab == .live ? 1.0 : 0.01) .opacity(viewModel.currentTab == .live ? 1.0 : 0.01)
explorer audition
.frame(width: viewModel.currentTab == .explorer ? proxy.size.width : 0) .frame(width: viewModel.currentTab == .audition ? proxy.size.width : 0)
.opacity(viewModel.currentTab == .explorer ? 1.0 : 0.01) .opacity(viewModel.currentTab == .audition ? 1.0 : 0.01)
messageView messageView
.frame(width: viewModel.currentTab == .message ? proxy.size.width : 0) .frame(width: viewModel.currentTab == .message ? proxy.size.width : 0)

View File

@ -21,7 +21,7 @@ final class HomeViewModel: ObservableObject {
private let playbackTrackingRepository = PlaybackTrackingRepository() private let playbackTrackingRepository = PlaybackTrackingRepository()
enum CurrentTab: String { enum CurrentTab: String {
case content, live, explorer, message, mypage case content, live, audition, message, mypage
} }
@Published var currentTab: CurrentTab = .content @Published var currentTab: CurrentTab = .content