Quality profiles

This commit is contained in:
Arkadiusz Fal
2022-08-14 19:06:22 +02:00
parent 57d8698f86
commit ac9abaec5a
19 changed files with 1372 additions and 234 deletions

View File

@@ -1,14 +1,13 @@
import Defaults
import Foundation
import SwiftUI
struct SettingsView: View {
static let matrixURL = URL(string: "https://tinyurl.com/matrix-yattee")!
static let discordURL = URL(string: "https://yattee.stream/discord")!
#if os(macOS)
private enum Tabs: Hashable {
case locations, browsing, player, history, sponsorBlock, advanced, help
case locations, browsing, player, quality, history, sponsorBlock, advanced, help
}
@State private var selection = Tabs.locations
@@ -59,6 +58,14 @@ struct SettingsView: View {
}
.tag(Tabs.player)
Form {
QualitySettings()
}
.tabItem {
Label("Quality", systemImage: "4k.tv")
}
.tag(Tabs.quality)
Form {
HistorySettings()
}
@@ -92,18 +99,14 @@ struct SettingsView: View {
.tag(Tabs.help)
}
.padding(20)
.frame(width: 480, height: windowHeight)
.frame(width: 520, height: windowHeight)
#else
Group {
NavigationView {
settingsList
#if os(tvOS)
settingsList
#else
NavigationView {
settingsList
}
.navigationBarHidden(true)
#endif
}
#endif
}
@@ -142,6 +145,12 @@ struct SettingsView: View {
Label("Player", systemImage: "play.rectangle")
}
NavigationLink {
QualitySettings()
} label: {
Label("Quality", systemImage: "4k.tv")
}
NavigationLink {
HistorySettings()
} label: {
@@ -219,6 +228,8 @@ struct SettingsView: View {
return 390
case .player:
return 420
case .quality:
return 400
case .history:
return 480
case .sponsorBlock: