add ability to hide explore tab ( true backwards compability ), translation, cleanup

This commit is contained in:
Dominic Drees 2025-05-02 13:15:33 +02:00
parent 5f62e7f05e
commit 06681ffda6
3 changed files with 27 additions and 4 deletions

View file

@ -1412,6 +1412,22 @@
}
}
},
"Hide Explore Tab" : {
"localizations" : {
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "Erkunden Tab verstecken"
}
},
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Hide Explore Tab"
}
}
}
},
"HLS Downloader" : {
"localizations" : {
"de" : {

View file

@ -8,12 +8,16 @@
import SwiftUI
struct RootView: View {
@AppStorage("hideExploreTab") private var hideExploreTab: Bool?
var body: some View {
TabView {
ExploreView()
.tabItem {
Label("Explore", systemImage: "star")
}
if !(hideExploreTab ?? false) {
ExploreView()
.tabItem {
Label("Explore", systemImage: "star")
}
}
SearchView()
.tabItem {
Label("Search", systemImage: "magnifyingglass")

View file

@ -17,6 +17,7 @@ struct SettingsViewGeneral: View {
@AppStorage("mediaColumnsPortrait") private var mediaColumnsPortrait = 2
@AppStorage("mediaColumnsLandscape") private var mediaColumnsLandscape = 4
@AppStorage("hideEmptySections") private var hideEmptySections = false
@AppStorage("hideExploreTab") private var hideExploreTab = false
@AppStorage("currentAppIcon") private var currentAppIcon = "Default"
@AppStorage("episodeSortOrder") private var episodeSortOrder = "Ascending"
@ -72,6 +73,8 @@ struct SettingsViewGeneral: View {
}
Toggle("Hide Empty Sections", isOn: $hideEmptySections)
.tint(.accentColor)
Toggle("Hide Explore Tab", isOn: $hideExploreTab)
.tint(.accentColor)
}
Section(header: Text("Media View"), footer: Text("The episode range controls how many episodes appear on each page. Episodes are grouped into sets (like 1-25, 26-50, and so on), allowing you to navigate through them more easily.\n\nFor episode metadata it is refering to the episode thumbnail and title, since sometimes it can contain spoilers.")) {