mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-01 11:36:56 +01:00
look and feel of edit account matches production
This commit is contained in:
parent
39a71077b4
commit
64848a9421
@ -19,49 +19,13 @@ struct EditAccountView: View {
|
|||||||
ZStack {
|
ZStack {
|
||||||
RoundedRectangle(cornerRadius: 8, style: .circular)
|
RoundedRectangle(cornerRadius: 8, style: .circular)
|
||||||
.foregroundColor(Color.secondary.opacity(0.1))
|
.foregroundColor(Color.secondary.opacity(0.1))
|
||||||
|
.padding(.top, 8)
|
||||||
|
|
||||||
VStack {
|
VStack {
|
||||||
HStack {
|
editAccountHeader
|
||||||
Spacer()
|
|
||||||
Button("Account Information", action: {})
|
|
||||||
Spacer()
|
|
||||||
}.padding(4)
|
|
||||||
|
|
||||||
if viewModel.account != nil {
|
if viewModel.account != nil {
|
||||||
Form(content: {
|
editAccountForm
|
||||||
HStack(alignment: .top) {
|
|
||||||
Text("Type: ")
|
|
||||||
.frame(width: 50)
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
Text(viewModel.account!.defaultName)
|
|
||||||
Toggle("Active", isOn: $viewModel.accountIsActive)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HStack(alignment: .top) {
|
|
||||||
Text("Name: ")
|
|
||||||
.frame(width: 50)
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
TextField(viewModel.account!.name ?? "", text: $viewModel.accountName)
|
|
||||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
|
||||||
Text("The name appears in the sidebar. It can be anything you want. You can even use emoji. 🎸")
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Spacer()
|
|
||||||
if viewModel.account?.type != .onMyMac {
|
|
||||||
HStack {
|
|
||||||
Spacer()
|
|
||||||
Button("Credentials", action: {
|
|
||||||
|
|
||||||
})
|
|
||||||
Spacer()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}).padding()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
@ -69,6 +33,47 @@ struct EditAccountView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var editAccountHeader: some View {
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
Button("Account Information", action: {})
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
.padding([.leading, .trailing, .bottom], 4)
|
||||||
|
}
|
||||||
|
|
||||||
|
var editAccountForm: some View {
|
||||||
|
Form(content: {
|
||||||
|
HStack(alignment: .top) {
|
||||||
|
Text("Type: ")
|
||||||
|
.frame(width: 50)
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
Text(viewModel.account!.defaultName)
|
||||||
|
Toggle("Active", isOn: $viewModel.accountIsActive)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HStack(alignment: .top) {
|
||||||
|
Text("Name: ")
|
||||||
|
.frame(width: 50)
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
TextField(viewModel.account!.name ?? "", text: $viewModel.accountName)
|
||||||
|
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||||
|
Text("The name appears in the sidebar. It can be anything you want. You can even use emoji. 🎸")
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Spacer()
|
||||||
|
if viewModel.account?.type != .onMyMac {
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
Button("Credentials", action: {
|
||||||
|
|
||||||
|
})
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).padding()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user