From f447b17aa66fcfd2343d02061104c2abbf3b683e Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 5 Sep 2020 02:39:36 +0200 Subject: [PATCH] Added footer to add account --- .../BankingiOSApp/ui/views/SettingsDialog.swift | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/SettingsDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/SettingsDialog.swift index 07ee8f38..7884adb7 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/SettingsDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/SettingsDialog.swift @@ -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) @@ -29,6 +30,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) {