mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
Improve top margin spacing of notifications policy view and make close button look better
Contributes to IOS-398
This commit is contained in:
parent
0ecc98be32
commit
e64bef0492
@ -127,36 +127,42 @@ struct NotificationPolicyView: View {
|
||||
}
|
||||
|
||||
@ViewBuilder func mainView() -> some View {
|
||||
VStack {
|
||||
HStack {
|
||||
ZStack(alignment: Alignment(horizontal: .trailing, vertical: .top)) {
|
||||
|
||||
// Settings table
|
||||
VStack() {
|
||||
Spacer()
|
||||
.frame(maxWidth: .infinity)
|
||||
Button {
|
||||
viewModel.dismissView?()
|
||||
} label: {
|
||||
Image(systemName: "x.circle")
|
||||
.frame(width: 45, height: 45)
|
||||
.font(.title)
|
||||
.frame(height: 40)
|
||||
List {
|
||||
ForEach(viewModel.sections, id: \.self) { section in
|
||||
Section(
|
||||
header:
|
||||
Text(section.headerText).font(.title2).fixedSize()
|
||||
) {
|
||||
ForEach(section.items, id: \.self) { policyItem in
|
||||
rowView(policyItem)
|
||||
}
|
||||
}
|
||||
.textCase(nil)
|
||||
}
|
||||
}
|
||||
.listStyle(.insetGrouped)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.background(Color(uiColor: .systemGroupedBackground))
|
||||
|
||||
// Close button
|
||||
Button {
|
||||
viewModel.dismissView?()
|
||||
} label: {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.frame(width: 45, height: 45)
|
||||
.font(.title)
|
||||
.foregroundStyle(SeparatorShapeStyle())
|
||||
}
|
||||
.padding()
|
||||
|
||||
List {
|
||||
ForEach(viewModel.sections, id: \.self) { section in
|
||||
Section(header: Text(section.headerText).font(.title2)) {
|
||||
ForEach(section.items, id: \.self) { policyItem in
|
||||
rowView(policyItem)
|
||||
}
|
||||
}
|
||||
.textCase(nil)
|
||||
}
|
||||
}
|
||||
.listStyle(.insetGrouped)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.background(Color(uiColor: .systemGroupedBackground))
|
||||
|
||||
}
|
||||
|
||||
@ViewBuilder func rowView(
|
||||
|
Loading…
x
Reference in New Issue
Block a user