|
|
|
@ -16,6 +16,7 @@ struct UmpireView: View { |
|
|
|
|
|
|
|
|
|
|
|
@State private var presentSearchView: Bool = false |
|
|
|
@State private var presentSearchView: Bool = false |
|
|
|
@State private var showSubscriptions: Bool = false |
|
|
|
@State private var showSubscriptions: Bool = false |
|
|
|
|
|
|
|
@State private var showProductIds: Bool = false |
|
|
|
|
|
|
|
|
|
|
|
// @State var isConnected: Bool = false |
|
|
|
// @State var isConnected: Bool = false |
|
|
|
|
|
|
|
|
|
|
|
@ -36,7 +37,20 @@ struct UmpireView: View { |
|
|
|
self.showSubscriptions = true |
|
|
|
self.showSubscriptions = true |
|
|
|
} label: { |
|
|
|
} label: { |
|
|
|
Label("Les offres", systemImage: "bookmark.fill") |
|
|
|
Label("Les offres", systemImage: "bookmark.fill") |
|
|
|
} |
|
|
|
}.simultaneousGesture( |
|
|
|
|
|
|
|
LongPressGesture() |
|
|
|
|
|
|
|
.onEnded { _ in |
|
|
|
|
|
|
|
self.showProductIds = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.highPriorityGesture( |
|
|
|
|
|
|
|
TapGesture() |
|
|
|
|
|
|
|
.onEnded { _ in |
|
|
|
|
|
|
|
self.showSubscriptions = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -161,6 +175,9 @@ struct UmpireView: View { |
|
|
|
.environment(\.colorScheme, .light) |
|
|
|
.environment(\.colorScheme, .light) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
.sheet(isPresented: self.$showProductIds, content: { |
|
|
|
|
|
|
|
ProductIdsView() |
|
|
|
|
|
|
|
}) |
|
|
|
.sheet(isPresented: $presentSearchView) { |
|
|
|
.sheet(isPresented: $presentSearchView) { |
|
|
|
let user = dataStore.user |
|
|
|
let user = dataStore.user |
|
|
|
NavigationStack { |
|
|
|
NavigationStack { |
|
|
|
@ -228,6 +245,27 @@ struct AccountRowView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct ProductIdsView: View { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@State var ids: [String] = [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var body: some View { |
|
|
|
|
|
|
|
VStack { |
|
|
|
|
|
|
|
List { |
|
|
|
|
|
|
|
LabeledContent("count", value: String(ids.count)) |
|
|
|
|
|
|
|
ForEach(self.ids) { id in |
|
|
|
|
|
|
|
Text(id) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}.onAppear { |
|
|
|
|
|
|
|
Task { |
|
|
|
|
|
|
|
self.ids = await Guard.main.productIds() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//#Preview { |
|
|
|
//#Preview { |
|
|
|
// UmpireView() |
|
|
|
// UmpireView() |
|
|
|
//} |
|
|
|
//} |
|
|
|
|