chore: hide unbuilt Workspace section and Advanced coming-soon rows
App Store review won't accept a settings section that's just "Coming Soon" placeholders. Workspace (all 14 sub-sections: details, authentication, security, ai, members, groups, templates, emojis, applications, shared, links, webhooks, importData, exportData) had zero built content, so it's filtered out of SettingsSidebarList entirely rather than shown with a Coming Soon badge - via a new visibleCategories helper (categories with at least one isImplemented section), not by touching the SettingsSection enum itself, so nothing else that switches over it needs to change. Advanced's three comingSoonRow placeholders (Export All Data, Developer Diagnostics, Reset Local Database) are commented out the same way, comingSoonRow() itself kept (unused for now) so re-enabling either is a one-line job once real content lands. Both marked TODO.
This commit is contained in:
@@ -42,7 +42,15 @@ struct SettingsSidebarList: View {
|
|||||||
Divider()
|
Divider()
|
||||||
|
|
||||||
List(selection: $selection) {
|
List(selection: $selection) {
|
||||||
ForEach(SettingsCategory.allCases) { category in
|
// TODO: Workspace is entirely `!isImplemented` placeholders
|
||||||
|
// right now (details/authentication/security/ai/members/
|
||||||
|
// groups/templates/emojis/applications/shared/links/
|
||||||
|
// webhooks/importData/exportData) — App Store review won't
|
||||||
|
// accept a section that's just "Coming Soon" rows, so it's
|
||||||
|
// filtered out of the sidebar below (via `visibleCategories`)
|
||||||
|
// until real content lands. Remove the filter once at least
|
||||||
|
// one Workspace section is built.
|
||||||
|
ForEach(visibleCategories) { category in
|
||||||
let sections = SettingsSection.allCases.filter { $0.category == category }
|
let sections = SettingsSection.allCases.filter { $0.category == category }
|
||||||
Section {
|
Section {
|
||||||
ForEach(sections) { section in
|
ForEach(sections) { section in
|
||||||
@@ -91,6 +99,14 @@ struct SettingsSidebarList: View {
|
|||||||
.task(id: isEffectivelyOnline) { await refreshOutlineVersion() }
|
.task(id: isEffectivelyOnline) { await refreshOutlineVersion() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Categories with at least one built (`isImplemented`) section — see the
|
||||||
|
/// TODO above the `ForEach` that uses this.
|
||||||
|
private var visibleCategories: [SettingsCategory] {
|
||||||
|
SettingsCategory.allCases.filter { category in
|
||||||
|
SettingsSection.allCases.contains { $0.category == category && $0.isImplemented }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private var versionFooter: some View {
|
private var versionFooter: some View {
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
Text("Outpost \(OutpostVersion.displayString)")
|
Text("Outpost \(OutpostVersion.displayString)")
|
||||||
|
|||||||
@@ -1325,9 +1325,10 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
.frame(maxWidth: 480, alignment: .leading)
|
.frame(maxWidth: 480, alignment: .leading)
|
||||||
|
|
||||||
Divider()
|
// TODO: Export All Data / Developer Diagnostics / Reset Local
|
||||||
.frame(maxWidth: 480)
|
// Database aren't built yet — App Store review won't accept
|
||||||
|
// "Coming Soon" rows, so commented out until real content lands.
|
||||||
|
/*
|
||||||
VStack(alignment: .leading, spacing: 12) {
|
VStack(alignment: .leading, spacing: 12) {
|
||||||
comingSoonRow("Export All Data")
|
comingSoonRow("Export All Data")
|
||||||
comingSoonRow("Developer Diagnostics")
|
comingSoonRow("Developer Diagnostics")
|
||||||
@@ -1335,6 +1336,10 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
.frame(maxWidth: 480, alignment: .leading)
|
.frame(maxWidth: 480, alignment: .leading)
|
||||||
|
|
||||||
|
Divider()
|
||||||
|
.frame(maxWidth: 480)
|
||||||
|
*/
|
||||||
|
|
||||||
Divider()
|
Divider()
|
||||||
.frame(maxWidth: 480)
|
.frame(maxWidth: 480)
|
||||||
|
|
||||||
@@ -1400,6 +1405,9 @@ struct SettingsView: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Only referenced from the commented-out block above right now — kept
|
||||||
|
/// (not deleted) so re-enabling those rows is a one-line uncomment once
|
||||||
|
/// they're actually built.
|
||||||
private func comingSoonRow(_ title: String) -> some View {
|
private func comingSoonRow(_ title: String) -> some View {
|
||||||
HStack {
|
HStack {
|
||||||
Text(title)
|
Text(title)
|
||||||
|
|||||||
Reference in New Issue
Block a user