Move Help link to bottom of Account Stats screen. Center footer things.

This commit is contained in:
Brent Simmons committed 2026-06-09 12:18:14 -07:00
1 parent d8d2a3c232
commit e4bee08d6d
2 files changed
+21 -7

No files matched your search

+3
View File
@@ -48,6 +48,9 @@
"Account Stats" : {
"comment" : "Account Stats screen title"
},
"Account Stats Help" : {
"comment" : "Help link"
},
"Accounts" : {
"comment" : "Preferences"
},
+18 -7
View File
@@ -51,13 +51,22 @@ struct AccountStatsView: View {
Text(NSLocalizedString("Vacuuming…", comment: "Vacuum status text"))
.foregroundStyle(.secondary)
}
.frame(maxWidth: .infinity)
} else {
Button(NSLocalizedString("Vacuum Databases", comment: "Vacuum databases button")) {
vacuum()
}
.frame(maxWidth: .infinity)
}
} footer: {
Text(NSLocalizedString("Vacuuming may make databases faster.", comment: "Vacuum explanation"))
.frame(maxWidth: .infinity, alignment: .center)
.multilineTextAlignment(.center)
}
Section {
} footer: {
helpLinkFooter
}
}
.navigationTitle(NSLocalizedString("Account Stats", comment: "Account Stats screen title"))
@@ -72,13 +81,6 @@ struct AccountStatsView: View {
}
.disabled(isVacuuming)
}
ToolbarItem(placement: .topBarTrailing) {
Button {
showHelp = true
} label: {
Label(NSLocalizedString("Help", comment: "Help"), systemImage: "questionmark.circle")
}
}
}
.sheet(isPresented: $showHelp) {
SafariView(url: Self.helpURL)
@@ -116,6 +118,15 @@ private extension AccountStatsView {
var id: String { label }
}
var helpLinkFooter: some View {
Button(NSLocalizedString("Account Stats Help", comment: "Help link")) {
showHelp = true
}
.font(.subheadline)
.frame(maxWidth: .infinity)
.padding(.top, 8)
}
func statsRow(_ item: StatItem, isBold: Bool) -> some View {
HStack {
Text(item.label)