diff --git a/NucleicRemote/NucleicRemote/Views/HomeView.swift b/NucleicRemote/NucleicRemote/Views/HomeView.swift index 6c240f7..e5df5f9 100644 --- a/NucleicRemote/NucleicRemote/Views/HomeView.swift +++ b/NucleicRemote/NucleicRemote/Views/HomeView.swift @@ -135,6 +135,8 @@ private struct StatCard: View { /// A lightning bolt whose charge grows with the streak (mirrors the Mac StreakBadge). struct StreakBadge: View { let days: Int + /// Streak freezes in reserve (one per five days), shown as a small snowflake tally. + var freezes: Int = 0 private var intensity: Double { min(1, Double(max(0, days - 1)) / 20) } var body: some View { @@ -152,6 +154,14 @@ struct StreakBadge: View { Text("\(days)").font(.headline.monospacedDigit()) Text("day streak").font(.caption2).foregroundStyle(.secondary) } + if freezes > 0 { + HStack(spacing: 2) { + Image(systemName: "snowflake") + Text("\(freezes)").monospacedDigit() + } + .font(.caption.weight(.semibold)) + .foregroundStyle(Palette.frozen) + } } .padding(.horizontal, 12).padding(.vertical, 8) .background(Color(.secondarySystemBackground), in: Capsule())