Compare commits

..
4 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.4-beta.3</string>
<string>1.1.4-beta.4</string>
<key>CFBundleVersion</key>
<string>43</string>
<string>44</string>
<key>LSMinimumSystemVersion</key>
<string>13.0</string>
<key>LSUIElement</key>
+3 -2
View File
@@ -195,13 +195,14 @@ class UsageViewModel: ObservableObject {
req.setValue("application/json", forHTTPHeaderField: "accept")
if let cookie = await claudeCookieHeader() { req.setValue(cookie, forHTTPHeaderField: "Cookie") }
let (data, response) = try await URLSession.shared.data(for: req)
guard let http = response as? HTTPURLResponse, http.statusCode == 200 else { return nil }
guard let http = response as? HTTPURLResponse, http.statusCode == 200 else { return (nil, nil) }
guard let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],
let account = json["account"] as? [String: Any] else { return (nil, nil) }
let email = account["email_address"] as? String
var planLabel: String? = nil
if let memberships = account["memberships"] as? [[String: Any]],
let caps = memberships.first?["organization"]?["capabilities"] as? [String],
let org = memberships.first?["organization"] as? [String: Any],
let caps = org["capabilities"] as? [String],
let cap = caps.first(where: { $0.hasPrefix("claude_") }) {
let name = String(cap.dropFirst("claude_".count))
planLabel = name.prefix(1).uppercased() + name.dropFirst().lowercased()
+1 -1
View File
@@ -1,4 +1,4 @@
## What's new in v1.1.4-beta.3
## What's new in v1.1.4-beta.4
### Bug fix
- Plan name now updates correctly on every refresh (was only set on first launch)
+3 -3
View File
@@ -1,5 +1,5 @@
{
"version": "0.0.1-beta.33",
"url": "https://github.com/superdooper86/claudechecker/releases/download/win-v0.0.1-beta.33/ClaudeChecker-Windows.zip",
"notes": "## What's new in beta.33\r\n\r\n- Fix: gauge percentage text is now vertically centered within the dial\r\n- Remove: debug banner no longer appears on the main panel"
"version": "0.0.1-beta.35",
"url": "https://github.com/superdooper86/claudechecker/releases/download/win-v0.0.1-beta.35/ClaudeChecker-Windows.zip",
"notes": "## What's new in beta.10\r\n\r\n### Bug fixes\r\n- Limits now update correctly on each refresh cycle\r\n- Session expiry is detected and prompts re-authentication instead of silently showing stale data\r\n- Plan name (e.g. Pro, Max) is now read from the API instead of being hardcoded"
}