Fix connection card background on iOS
This commit is contained in:
@@ -16,16 +16,16 @@ public struct ConnectionListView: View {
|
||||
Text("Empty connections")
|
||||
} else {
|
||||
ScrollView {
|
||||
LazyVGrid(columns: [GridItem(.flexible())], alignment: .leading) {
|
||||
VStack {
|
||||
ForEach(viewModel.filteredConnections(), id: \.id) { it in
|
||||
ConnectionView(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.toolbar {
|
||||
ToolbarItem {
|
||||
|
||||
@@ -19,12 +19,12 @@ public struct ConnectionView: View {
|
||||
}
|
||||
|
||||
@State private var alert: AlertState?
|
||||
@State private var showDetails = false
|
||||
|
||||
public var body: some View {
|
||||
FormNavigationLink {
|
||||
ConnectionDetailsView(connection)
|
||||
Button {
|
||||
showDetails = true
|
||||
} label: {
|
||||
VStack {
|
||||
HStack {
|
||||
VStack(alignment: .leading) {
|
||||
HStack(alignment: .center) {
|
||||
@@ -75,16 +75,12 @@ public struct ConnectionView: View {
|
||||
}
|
||||
}
|
||||
.foregroundColor(.textColor)
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.buttonStyle(.plain)
|
||||
.padding(16)
|
||||
.cardStyle()
|
||||
#endif
|
||||
}
|
||||
.background(.clear)
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.buttonStyle(.borderless)
|
||||
#endif
|
||||
.alert($alert)
|
||||
.contextMenu {
|
||||
if connection.closedAt == nil {
|
||||
@@ -96,6 +92,14 @@ public struct ConnectionView: View {
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
}
|
||||
.background {
|
||||
NavigationLink(isActive: $showDetails) {
|
||||
ConnectionDetailsView(connection)
|
||||
} label: {
|
||||
EmptyView()
|
||||
}
|
||||
.opacity(0)
|
||||
}
|
||||
}
|
||||
|
||||
private nonisolated func closeConnection() async {
|
||||
|
||||
Reference in New Issue
Block a user