mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 13:12:53 +00:00
Let the accounts screen own the switcher instead of the settings list
The main settings list carried both an Accounts row and a switcher row beside it — two account controls at the top level, one of them opening the screen the other belonged on. The switcher row moves to the top of the accounts screen as a Current Account section, where the selection it names sits directly above the checkmarked row it corresponds to. The subscriptions-settings row and the macOS sidebar footer keep theirs: those are contextual surfaces, not the settings list.
This commit is contained in:
@@ -461,6 +461,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"accounts.switcher.section" : {
|
||||
"comment" : "Header of the accounts screen section holding the account switcher",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Current Account"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"accounts.switcher.title" : {
|
||||
"comment" : "Label of the control that switches the selected account",
|
||||
"localizations" : {
|
||||
|
||||
@@ -123,6 +123,16 @@ struct AccountsListView: View {
|
||||
emptyState
|
||||
} else {
|
||||
Form {
|
||||
// The switcher lives here rather than beside the Accounts row
|
||||
// in Settings: which account is current is this screen's
|
||||
// subject, and the row below names the same account the
|
||||
// checkmarked row further down is marked as.
|
||||
Section {
|
||||
DataContextSwitcherSettingsRow()
|
||||
} header: {
|
||||
Text(String(localized: "accounts.switcher.section"))
|
||||
}
|
||||
|
||||
ForEach(groups, id: \.instance.id) { group in
|
||||
instanceSection(group.instance, accounts: group.accounts)
|
||||
}
|
||||
|
||||
@@ -152,8 +152,6 @@ struct SettingsView: View {
|
||||
}
|
||||
.accessibilityIdentifier("settings.row.accounts")
|
||||
|
||||
DataContextSwitcherSettingsRow()
|
||||
|
||||
NavigationLink {
|
||||
TVSidebarDetailContainer(systemImage: "icloud", title: String(localized: "settings.icloud.title")) { iCloudSettingsView() }
|
||||
} label: {
|
||||
@@ -269,8 +267,6 @@ struct SettingsView: View {
|
||||
}
|
||||
}
|
||||
.accessibilityIdentifier("settings.row.accounts")
|
||||
|
||||
DataContextSwitcherSettingsRow()
|
||||
}
|
||||
|
||||
Section {
|
||||
|
||||
Reference in New Issue
Block a user