Change Settings to use Form instead of List/grouped

This commit is contained in:
Maurice Parker 2019-06-18 16:54:51 -05:00
parent 231011685c
commit ba41d0dee0
5 changed files with 5 additions and 10 deletions

View File

@ -11,7 +11,7 @@ import Account
struct SettingsAddAccountView : View { struct SettingsAddAccountView : View {
var body: some View { var body: some View {
List { Form {
PresentationButton(destination: SettingsLocalAccountView(name: "")) { PresentationButton(destination: SettingsLocalAccountView(name: "")) {
SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: Account.defaultLocalAccountName) SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: Account.defaultLocalAccountName)
} }
@ -21,7 +21,6 @@ struct SettingsAddAccountView : View {
} }
.padding(4) .padding(4)
} }
.listStyle(.grouped)
.navigationBarTitle(Text("Add Account"), displayMode: .inline) .navigationBarTitle(Text("Add Account"), displayMode: .inline)
} }
} }

View File

@ -17,7 +17,7 @@ struct SettingsDetailAccountView : View {
@State private var showFeedbinCredentials = false @State private var showFeedbinCredentials = false
var body: some View { var body: some View {
List { Form {
Section { Section {
HStack { HStack {
Text("Name") Text("Name")
@ -63,7 +63,6 @@ struct SettingsDetailAccountView : View {
} }
} }
} }
.listStyle(.grouped)
.navigationBarTitle(Text(verbatim: viewModel.nameForDisplay), displayMode: .inline) .navigationBarTitle(Text(verbatim: viewModel.nameForDisplay), displayMode: .inline)
} }

View File

@ -19,7 +19,7 @@ struct SettingsFeedbinAccountView : View {
var body: some View { var body: some View {
NavigationView { NavigationView {
List { Form {
Section(header: Section(header:
SettingsAccountLabelView(accountImage: "accountFeedbin", accountLabel: "Feedbin").padding() SettingsAccountLabelView(accountImage: "accountFeedbin", accountLabel: "Feedbin").padding()
) { ) {
@ -57,7 +57,6 @@ struct SettingsFeedbinAccountView : View {
} }
} }
.disabled(busy) .disabled(busy)
.listStyle(.grouped)
.navigationBarTitle(Text(""), displayMode: .inline) .navigationBarTitle(Text(""), displayMode: .inline)
.navigationBarItems(leading: .navigationBarItems(leading:
Button(action: { self.dismiss() }) { Text("Cancel") } Button(action: { self.dismiss() }) { Text("Cancel") }

View File

@ -15,7 +15,7 @@ struct SettingsLocalAccountView : View {
var body: some View { var body: some View {
NavigationView { NavigationView {
List { Form {
Section(header: Section(header:
SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: Account.defaultLocalAccountName).padding() SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: Account.defaultLocalAccountName).padding()
) { ) {
@ -35,7 +35,6 @@ struct SettingsLocalAccountView : View {
} }
} }
} }
.listStyle(.grouped)
.navigationBarTitle(Text(""), displayMode: .inline) .navigationBarTitle(Text(""), displayMode: .inline)
.navigationBarItems(leading: Button(action: { self.dismiss() }) { Text("Cancel") } ) .navigationBarItems(leading: Button(action: { self.dismiss() }) { Text("Cancel") } )
} }

View File

@ -19,7 +19,7 @@ struct SettingsView : View {
var body: some View { var body: some View {
NavigationView { NavigationView {
List { Form {
Section(header: Text("ACCOUNTS")) { Section(header: Text("ACCOUNTS")) {
ForEach(viewModel.accounts.identified(by: \.self)) { account in ForEach(viewModel.accounts.identified(by: \.self)) { account in
@ -86,7 +86,6 @@ struct SettingsView : View {
.foregroundColor(.primary) .foregroundColor(.primary)
} }
.listStyle(.grouped)
.navigationBarTitle(Text("Settings"), displayMode: .inline) .navigationBarTitle(Text("Settings"), displayMode: .inline)
} }