Compare commits

..
7 changed files with 29 additions and 11 deletions
+4 -2
View File
@@ -40,14 +40,15 @@ class AppDelegate: NSObject, NSApplicationDelegate {
// Popover // Popover
popover = NSPopover() popover = NSPopover()
popover?.contentSize = NSSize(width: 480, height: 640)
popover?.behavior = .transient popover?.behavior = .transient
popover?.animates = true popover?.animates = true
popover?.contentViewController = NSHostingController( let hc = NSHostingController(
rootView: ContentView() rootView: ContentView()
.environmentObject(usageViewModel) .environmentObject(usageViewModel)
.environmentObject(updateManager) .environmentObject(updateManager)
) )
hc.sizingOptions = .preferredContentSize
popover?.contentViewController = hc
// React to limits or menubar toggle changes // React to limits or menubar toggle changes
usageViewModel.$limits usageViewModel.$limits
@@ -236,3 +237,4 @@ class AppDelegate: NSObject, NSApplicationDelegate {
} }
} }
+4 -1
View File
@@ -429,7 +429,9 @@ struct SparklineView: View {
var body: some View { var body: some View {
GeometryReader { geo in GeometryReader { geo in
if data.count > 1 { let plotData = data.count == 1 ? [data[0], data[0]] : data
if plotData.count > 1 {
let data = plotData
let w = geo.size.width let w = geo.size.width
let h = geo.size.height let h = geo.size.height
let minV = data.min() ?? 0 let minV = data.min() ?? 0
@@ -1170,3 +1172,4 @@ struct UpdateSheet: View {
} }
} }
+4 -2
View File
@@ -15,9 +15,9 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.1.3-beta.2</string> <string>1.1.3-beta.4</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>36</string> <string>38</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>13.0</string> <string>13.0</string>
<key>LSUIElement</key> <key>LSUIElement</key>
@@ -45,3 +45,5 @@
</dict> </dict>
</dict> </dict>
</plist> </plist>
+6 -1
View File
@@ -37,6 +37,9 @@ class UsageViewModel: ObservableObject {
let saved = UserDefaults.standard.double(forKey: "refresh_interval") let saved = UserDefaults.standard.double(forKey: "refresh_interval")
refreshInterval = saved > 0 ? saved : 60 refreshInterval = saved > 0 ? saved : 60
showInMenuBar = UserDefaults.standard.object(forKey: "show_in_menubar") as? Bool ?? true showInMenuBar = UserDefaults.standard.object(forKey: "show_in_menubar") as? Bool ?? true
if let saved = UserDefaults.standard.object(forKey: "burn_history") as? [String: [Double]] {
burnHistoryStore = saved
}
loadPlaceholderData() loadPlaceholderData()
} }
@@ -84,8 +87,9 @@ class UsageViewModel: ObservableObject {
history.append(limits[i].usedPercent) history.append(limits[i].usedPercent)
if history.count > maxHistorySamples { history.removeFirst() } if history.count > maxHistorySamples { history.removeFirst() }
burnHistoryStore[key] = history burnHistoryStore[key] = history
if history.count > 1 { limits[i].burnHistory = history } limits[i].burnHistory = history
} }
UserDefaults.standard.set(burnHistoryStore, forKey: "burn_history")
checkLimitNotifications(for: limits) checkLimitNotifications(for: limits)
} catch AppError.notAuthenticated { } catch AppError.notAuthenticated {
isNotAuthenticated = true isNotAuthenticated = true
@@ -313,3 +317,4 @@ extension Notification.Name {
static let limitReset = Notification.Name("limitReset") static let limitReset = Notification.Name("limitReset")
static let openUpdateSheet = Notification.Name("openUpdateSheet") static let openUpdateSheet = Notification.Name("openUpdateSheet")
} }
+1 -1
View File
@@ -10,7 +10,7 @@
[![Swift](https://img.shields.io/badge/Swift-5.9-F05138?style=flat&logo=swift&logoColor=white)](https://swift.org) [![Swift](https://img.shields.io/badge/Swift-5.9-F05138?style=flat&logo=swift&logoColor=white)](https://swift.org)
[![Version](https://img.shields.io/badge/version-1.1.2-orange?style=flat)](https://github.com/superdooper86/claudechecker/releases) [![Version](https://img.shields.io/badge/version-1.1.2-orange?style=flat)](https://github.com/superdooper86/claudechecker/releases)
[![License](https://img.shields.io/badge/license-MIT-blue?style=flat)](LICENSE) [![License](https://img.shields.io/badge/license-MIT-blue?style=flat)](LICENSE)
[![Beta](https://img.shields.io/badge/beta-1.1.3--beta.1-orange?style=flat)](https://github.com/superdooper86/claudechecker/releases/tag/v1.1.3-beta.1) <!-- BETA_BADGE --> [![Beta](https://img.shields.io/badge/beta-1.1.3--beta.3-orange?style=flat)](https://github.com/superdooper86/claudechecker/releases/tag/v1.1.3-beta.3) <!-- BETA_BADGE -->
</div> </div>
+7 -1
View File
@@ -2,4 +2,10 @@
### UI polish ### UI polish
- Limit headers now read "5 Hour Limit" and "7 Day Limit" instead of "5hr" - Limit headers now read "5 Hour Limit" and "7 Day Limit" instead of "5hr"
- Tapping anywhere on the blue update banner now opens the update window (not just the Update button) - Tapping anywhere on the blue update banner now opens the update window
### Session Diary fix
- Burn history is now persisted across app launches — the sparkline populates immediately on first open
### Window sizing fix
- The popover now resizes correctly when switching between the main view and settings — no more empty space below the main view
+3 -3
View File
@@ -1,5 +1,5 @@
{ {
"version": "1.1.3-beta.1", "version": "1.1.3-beta.3",
"url": "https://github.com/superdooper86/claudechecker/releases/download/v1.1.3-beta.1/ClaudeChecker.zip", "url": "https://github.com/superdooper86/claudechecker/releases/download/v1.1.3-beta.3/ClaudeChecker.zip",
"notes": "## What's new in v1.1.3\n\n### Compact update banner\nThe in-app update banner no longer shows full release notes — it now shows a short message and lets you tap Update to read what's new in the install sheet. This prevents the banner from pushing content around when release notes are long." "notes": "## What's new in v1.1.3\n\n### UI polish\n- Limit headers now read \"5 Hour Limit\" and \"7 Day Limit\" instead of \"5hr\"\n- Tapping anywhere on the blue update banner now opens the update window\n\n### Session Diary fix\n- Burn history is now persisted across app launches — the sparkline populates immediately on first open instead of requiring a manual refresh"
} }