33 lines
850 B
Swift
33 lines
850 B
Swift
import SwiftUI
|
|
|
|
struct SettingsContentView: View {
|
|
|
|
let section: SettingsSection
|
|
|
|
@EnvironmentObject
|
|
private var content: Content
|
|
|
|
var body: some View {
|
|
switch section {
|
|
case .general:
|
|
GeneralSettingsDetailView(generalSettings: content.settings.general)
|
|
case .paths:
|
|
PathSettingsView()
|
|
case .navigationBar:
|
|
NavigationBarSettingsView()
|
|
case .postFeed:
|
|
PostFeedSettingsView(postSettings: content.settings.posts)
|
|
case .pages:
|
|
PageSettingsDetailView(pageSettings: content.settings.pages)
|
|
case .tagOverview:
|
|
TagOverviewDetailView()
|
|
case .audioPlayer:
|
|
AudioSettingsDetailView(audioPlayer: content.settings.audioPlayer)
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
SettingsContentView(section: .paths)
|
|
}
|