live activity: tint pump glyph by monitored fuel

Move FuelType.tintColor (green=unleaded #30D158, yellow=premium #FFD60A,
cyan=diesel #64D2FF) into Shared/FuelStore.swift so the app, widget, and
Live Activity all read one definition (was app-only in StationsView, so the
widget couldn't see it). Tint the Live Activity rich card pump icon and the
Dynamic Island compactLeading pump by context.state.fuel.tintColor.
This commit is contained in:
FuelBoard Contributor
2026-08-19 22:18:56 +01:00
parent a6620d36f7
commit 2c6e63f6b1
3 changed files with 17 additions and 13 deletions
@@ -41,7 +41,7 @@ struct FuelBoardLiveActivity: Widget {
}
} compactLeading: {
Image(systemName: "fuelpump.fill")
.foregroundStyle(.green)
.foregroundStyle(context.state.fuel.tintColor)
} compactTrailing: {
FuelBoardLiveActivityPriceView(context: context)
} minimal: {
@@ -95,7 +95,7 @@ private struct FuelBoardLiveActivityView: View {
// LEFT station brand glyph
Image(systemName: "fuelpump.circle.fill")
.font(.system(size: 32))
.foregroundStyle(.green, .white)
.foregroundStyle(context.state.fuel.tintColor, .white)
.frame(width: 40, height: 40)
// MIDDLE fuel + station