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 {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
Section(header: SectionHeaderWithRightAlignedEditButton("Bank Credentials", isEditButtonEnabled: data.hasAtLeastOneAccountBeenAdded)) {
|
Section(header: SectionHeaderWithRightAlignedEditButton("Bank Credentials", isEditButtonEnabled: data.hasAtLeastOneAccountBeenAdded),
|
||||||
|
footer: footer) {
|
||||||
ForEach(data.banksSorted) { bank in
|
ForEach(data.banksSorted) { bank in
|
||||||
NavigationLink(destination: LazyView(BankSettingsDialog(bank))) {
|
NavigationLink(destination: LazyView(BankSettingsDialog(bank))) {
|
||||||
IconedTitleView(bank)
|
IconedTitleView(bank)
|
||||||
|
@ -29,6 +30,18 @@ struct SettingsDialog: View {
|
||||||
}
|
}
|
||||||
.showNavigationBarTitle("Settings")
|
.showNavigationBarTitle("Settings")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var footer: some View {
|
||||||
|
get {
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
NavigationLink(destination: LazyView(AddAccountDialog())) {
|
||||||
|
Text("Add")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
func reorderBanks(from sourceIndices: IndexSet, to destinationIndex: Int) {
|
func reorderBanks(from sourceIndices: IndexSet, to destinationIndex: Int) {
|
||||||
|
|
Loading…
Reference in New Issue