Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
666d59c483 | ||
|
|
311118f0fa |
@@ -21,7 +21,7 @@ struct FuelBoardApp: App {
|
|||||||
|
|
||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
WindowGroup {
|
WindowGroup {
|
||||||
ContentView()
|
rootView
|
||||||
.onOpenURL(perform: handleOpenURL)
|
.onOpenURL(perform: handleOpenURL)
|
||||||
.onReceive(NotificationCenter.default.publisher(for: .fuelBoardWatchRefreshRequested)) { _ in
|
.onReceive(NotificationCenter.default.publisher(for: .fuelBoardWatchRefreshRequested)) { _ in
|
||||||
WatchSyncManager.shared.pushSnapshot()
|
WatchSyncManager.shared.pushSnapshot()
|
||||||
@@ -32,6 +32,24 @@ struct FuelBoardApp: App {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// QA hook (Debug builds only): `-qaScreenMarker` paints the whole screen a
|
||||||
|
/// flat magenta. A macOS capture of the Simulator window can then locate the
|
||||||
|
/// device-screen rectangle exactly, which yields a pixel-accurate mapping
|
||||||
|
/// from simulator screenshots to click coordinates. That is the only way to
|
||||||
|
/// drive REAL taps into the Simulator: `simctl` cannot, and this project has
|
||||||
|
/// no UI-test target. Everything else renders ContentView as normal.
|
||||||
|
@ViewBuilder private var rootView: some View {
|
||||||
|
#if DEBUG
|
||||||
|
if ProcessInfo.processInfo.arguments.contains("-qaScreenMarker") {
|
||||||
|
Color(red: 1, green: 0, blue: 1).ignoresSafeArea()
|
||||||
|
} else {
|
||||||
|
ContentView()
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
ContentView()
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
private func startQALiveActivity(fuel: FuelType) {
|
private func startQALiveActivity(fuel: FuelType) {
|
||||||
let state = FuelBoardLiveActivityAttributes.ContentState(
|
let state = FuelBoardLiveActivityAttributes.ContentState(
|
||||||
|
|||||||
@@ -138,6 +138,12 @@ struct StationDetailView: View {
|
|||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// REQUIRED: with the default button style a `List` row has ONE
|
||||||
|
// row-wide tap target, so two buttons in the same row BOTH fire
|
||||||
|
// on any tap inside the row (tapping Directions also showed the
|
||||||
|
// report-issue alert and vice versa). `.borderless` gives each
|
||||||
|
// button its own hit area — the half-row frame above.
|
||||||
|
.buttonStyle(.borderless)
|
||||||
}
|
}
|
||||||
Section {
|
Section {
|
||||||
// The station name is NOT repeated here: the sheet header
|
// The station name is NOT repeated here: the sheet header
|
||||||
|
|||||||
Reference in New Issue
Block a user