Add playoff round view, game numbers, goal scorer notifications, standings

- Fetch NHL standings and surface league/season game counts in the menu bar
- Prefix regular-season rows with the league-wide game number (from gameId)
- New ROUND section shows each active playoff series (matchup, series score,
  next game number + time) derived from /v1/playoff-bracket; rows always open
  the NHL series page so completed series remain clickable
- Goal notifications include scorer sweater, abbreviated name, and strength
  (PPG/SHG/EN), resolved via /v1/gamecenter/{id}/play-by-play
- Drop the per-team filter submenu and NHLTeam enum
- Regenerate AppIcon with the full 10-size macOS set (alpha preserved) so
  notifications render the app icon correctly; rename the iOS marketing PNG
  to icon-ios-1024.png
- gitignore .claude/ local tooling settings
This commit is contained in:
2026-04-18 21:51:27 -04:00
parent 8f8f8b2755
commit 57358797e1
44 changed files with 596 additions and 286 deletions
+14 -12
View File
@@ -39,15 +39,23 @@ final class StatusItemManager: @unchecked Sendable {
guard let baseImage = NSImage(named: NSImage.Name("NHLShield")) else {
button.title = "NHL"
button.image = nil
return
}
let pointSize = button.frame.size.height > 0 ? button.frame.size.height : 22
let resizedImage = NSImage(size: NSSize(width: pointSize, height: pointSize))
let height = button.frame.size.height > 0 ? button.frame.size.height : 22
// Use full menu bar height; let width follow natural aspect ratio
let srcW = baseImage.size.width
let srcH = baseImage.size.height
let scale = height / srcH
let width = srcW * scale
let resizedImage = NSImage(size: NSSize(width: width, height: height))
resizedImage.lockFocus()
baseImage.draw(
in: NSRect(x: 0, y: 0, width: pointSize, height: pointSize),
from: NSRect(x: 0, y: 0, width: baseImage.size.width, height: baseImage.size.height),
in: NSRect(x: 0, y: 0, width: width, height: height),
from: NSRect(x: 0, y: 0, width: srcW, height: srcH),
operation: .copy,
fraction: 1.0
)
@@ -58,16 +66,10 @@ final class StatusItemManager: @unchecked Sendable {
}
}
/// Update status bar text with per-day game counts (e.g. "6/10/9" or "10/9")
func updateGameCounts(_ gameDays: [Scoreboard.GameDay]) {
func updateStatusText(_ text: String) {
Task { @MainActor in
guard let button = self.statusItem?.button else { return }
if gameDays.isEmpty {
button.title = ""
return
}
let counts = gameDays.map { "\($0.games.count)" }.joined(separator: "/")
button.title = " \(counts)"
button.title = text.isEmpty ? "" : " \(text)"
}
}
}