Reformat code
This commit is contained in:
@@ -5,10 +5,10 @@ import SwiftUI
|
|||||||
|
|
||||||
public extension View {
|
public extension View {
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
func tabViewBottomAccessoryCompat<Content: View>(
|
func tabViewBottomAccessoryCompat(
|
||||||
isEnabled: Bool = true,
|
isEnabled: Bool = true,
|
||||||
useSystemAccessory: Bool = true,
|
useSystemAccessory: Bool = true,
|
||||||
@ViewBuilder content: @escaping () -> Content
|
@ViewBuilder content: @escaping () -> some View
|
||||||
) -> some View {
|
) -> some View {
|
||||||
if isEnabled {
|
if isEnabled {
|
||||||
if #available(iOS 26.0, *), useSystemAccessory {
|
if #available(iOS 26.0, *), useSystemAccessory {
|
||||||
@@ -24,7 +24,6 @@ import SwiftUI
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private struct TabViewBottomAccessoryContainer<Content: View>: View {
|
private struct TabViewBottomAccessoryContainer<Content: View>: View {
|
||||||
@@ -61,6 +60,5 @@ import SwiftUI
|
|||||||
static let horizontalPadding: CGFloat = 20
|
static let horizontalPadding: CGFloat = 20
|
||||||
static let topPadding: CGFloat = 8
|
static let topPadding: CGFloat = 8
|
||||||
static let bottomPadding: CGFloat = 12
|
static let bottomPadding: CGFloat = 12
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -98,14 +98,14 @@ import SwiftUI
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
.sheet(isPresented: $showCardManagement, onDismiss: {
|
.sheet(isPresented: $showCardManagement, onDismiss: {
|
||||||
Task { await cardConfiguration.reload() }
|
Task { await cardConfiguration.reload() }
|
||||||
}, content: {
|
}, content: {
|
||||||
if #available(iOS 16.0, *) {
|
if #available(iOS 16.0, *) {
|
||||||
CardManagementSheet().presentationDetents([.large]).presentationDragIndicator(.visible)
|
CardManagementSheet().presentationDetents([.large]).presentationDragIndicator(.visible)
|
||||||
} else {
|
} else {
|
||||||
CardManagementSheet()
|
CardManagementSheet()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public struct CoreView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public extension Color {
|
|||||||
return bestColor
|
return bestColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#elseif canImport(AppKit)
|
#elseif canImport(AppKit)
|
||||||
public extension NSColor {
|
public extension NSColor {
|
||||||
var relativeLuminance: CGFloat {
|
var relativeLuminance: CGFloat {
|
||||||
|
|||||||
+1
-1
@@ -96,7 +96,7 @@ struct MainView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private func tabBarBackgroundIfAvailable<Content: View>(_ content: Content) -> some View {
|
private func tabBarBackgroundIfAvailable(_ content: some View) -> some View {
|
||||||
content
|
content
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user