Added footer to add account
This commit is contained in:
parent
5d29a12f02
commit
f447b17aa6
|
@ -14,7 +14,8 @@ struct SettingsDialog: View {
|
|||
|
||||
var body: some View {
|
||||
Form {
|
||||
Section(header: SectionHeaderWithRightAlignedEditButton("Bank Credentials", isEditButtonEnabled: data.hasAtLeastOneAccountBeenAdded)) {
|
||||
Section(header: SectionHeaderWithRightAlignedEditButton("Bank Credentials", isEditButtonEnabled: data.hasAtLeastOneAccountBeenAdded),
|
||||
footer: footer) {
|
||||
ForEach(data.banksSorted) { bank in
|
||||
NavigationLink(destination: LazyView(BankSettingsDialog(bank))) {
|
||||
IconedTitleView(bank)
|
||||
|
@ -30,6 +31,18 @@ struct SettingsDialog: View {
|
|||
.showNavigationBarTitle("Settings")
|
||||
}
|
||||
|
||||
private var footer: some View {
|
||||
get {
|
||||
HStack {
|
||||
Spacer()
|
||||
|
||||
NavigationLink(destination: LazyView(AddAccountDialog())) {
|
||||
Text("Add")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func reorderBanks(from sourceIndices: IndexSet, to destinationIndex: Int) {
|
||||
let _ = data.banksSorted.reorder(from: sourceIndices, to: destinationIndex)
|
||||
|
|
Loading…
Reference in New Issue