Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2eac62897 | ||
|
|
8c64fc50ad | ||
|
|
b2c138f665 | ||
|
|
aa6c299e2a | ||
|
|
ecbae7d7ca | ||
|
|
37a039e1d3 | ||
|
|
8f3ead2f65 | ||
|
|
734670bb3f | ||
|
|
94430e00ba | ||
|
|
7b0368b001 | ||
|
|
4629aeffbc | ||
|
|
2cb4ddfe97 |
@@ -911,12 +911,12 @@ struct ErrorBanner: View {
|
|||||||
struct EmptyStateView: View {
|
struct EmptyStateView: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 10) {
|
VStack(spacing: 10) {
|
||||||
Image(systemName: "key.slash")
|
Image(systemName: "person.crop.circle.badge.questionmark")
|
||||||
.font(.system(size: 28))
|
.font(.system(size: 28))
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
Text("No API key configured")
|
Text("Not signed in")
|
||||||
.font(.system(size: 13, weight: .medium))
|
.font(.system(size: 13, weight: .medium))
|
||||||
Text("Open Settings to add your Anthropic API key.")
|
Text("Sign in to claude.ai to see your usage.")
|
||||||
.font(.system(size: 11.5))
|
.font(.system(size: 11.5))
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.2.1-beta.1</string>
|
<string>1.2.1-beta.4</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>49</string>
|
<string>52</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>13.0</string>
|
<string>13.0</string>
|
||||||
<key>LSUIElement</key>
|
<key>LSUIElement</key>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ struct LoginWebView: NSViewRepresentable {
|
|||||||
|
|
||||||
let webView = WKWebView(frame: .zero, configuration: config)
|
let webView = WKWebView(frame: .zero, configuration: config)
|
||||||
webView.navigationDelegate = context.coordinator
|
webView.navigationDelegate = context.coordinator
|
||||||
webView.load(URLRequest(url: URL(string: "https://claude.ai/login")!))
|
webView.load(URLRequest(url: URL(string: "https://claude.ai")!))
|
||||||
return webView
|
return webView
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,12 +36,10 @@ struct LoginWebView: NSViewRepresentable {
|
|||||||
if let url = webView.url?.absoluteString,
|
if let url = webView.url?.absoluteString,
|
||||||
url.contains("/login") || url.contains("/auth") { return }
|
url.contains("/login") || url.contains("/auth") { return }
|
||||||
|
|
||||||
|
// URL is not a login/auth page, so if any claude.ai cookie exists we're signed in
|
||||||
WKWebsiteDataStore.default().httpCookieStore.getAllCookies { cookies in
|
WKWebsiteDataStore.default().httpCookieStore.getAllCookies { cookies in
|
||||||
let hasSession = cookies.contains {
|
let hasAnyCookie = cookies.contains { $0.domain.contains("claude.ai") }
|
||||||
$0.domain.contains("claude.ai") &&
|
guard hasAnyCookie, !self.didAuthenticate else { return }
|
||||||
($0.name == "sessionKey" || $0.name == "__Secure-next-auth.session-token")
|
|
||||||
}
|
|
||||||
guard hasSession, !self.didAuthenticate else { return }
|
|
||||||
self.didAuthenticate = true
|
self.didAuthenticate = true
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||||
self.onAuthenticated()
|
self.onAuthenticated()
|
||||||
|
|||||||
@@ -43,11 +43,8 @@ class UsageViewModel: ObservableObject {
|
|||||||
|
|
||||||
private func checkInitialSignInState() async {
|
private func checkInitialSignInState() async {
|
||||||
let cookies = await WKWebsiteDataStore.default().httpCookieStore.allCookies()
|
let cookies = await WKWebsiteDataStore.default().httpCookieStore.allCookies()
|
||||||
let hasSession = cookies.contains {
|
let hasAnyCookie = cookies.contains { $0.domain.contains("claude.ai") }
|
||||||
$0.domain.contains("claude.ai") &&
|
if hasAnyCookie { isSignedIn = true }
|
||||||
($0.name == "sessionKey" || $0.name == "__Secure-next-auth.session-token")
|
|
||||||
}
|
|
||||||
if hasSession { isSignedIn = true }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func signOut() async {
|
func signOut() async {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
[](https://swift.org)
|
[](https://swift.org)
|
||||||
[](https://github.com/superdooper86/claudechecker/releases)
|
[](https://github.com/superdooper86/claudechecker/releases)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
<!-- BETA_BADGE -->
|
[](https://github.com/superdooper86/claudechecker/releases/tag/v1.2.1-beta.3) <!-- BETA_BADGE -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -3,5 +3,7 @@
|
|||||||
### Bug fixes
|
### Bug fixes
|
||||||
- Fixed "Not signed in" showing incorrectly on launch when the session was already active
|
- Fixed "Not signed in" showing incorrectly on launch when the session was already active
|
||||||
- Sign-in state is now detected immediately from stored cookies on startup, before the first data refresh completes
|
- Sign-in state is now detected immediately from stored cookies on startup, before the first data refresh completes
|
||||||
|
- Fixed Re-authenticate (and Sign In) not detecting an existing session — the login window now loads `claude.ai` directly so already-signed-in users are detected correctly and the window auto-dismisses
|
||||||
|
- Fixed "No API key configured" showing after signing out — now correctly shows "Not signed in" with a prompt to sign in
|
||||||
- Added `/api/organizations` as a final fallback for org ID resolution when the bootstrap API response doesn't include it
|
- Added `/api/organizations` as a final fallback for org ID resolution when the bootstrap API response doesn't include it
|
||||||
- Session cookie detection now checks both `sessionKey` and `__Secure-next-auth.session-token` cookie names
|
- Session cookie detection now checks both `sessionKey` and `__Secure-next-auth.session-token` cookie names
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "1.1.4-beta.7",
|
"version": "1.2.1-beta.3",
|
||||||
"url": "https://github.com/superdooper86/claudechecker/releases/download/v1.1.4-beta.7/ClaudeChecker.zip",
|
"url": "https://github.com/superdooper86/claudechecker/releases/download/v1.2.1-beta.3/ClaudeChecker.zip",
|
||||||
"notes": "## What's new in v1.1.4-beta.7\n\n### Bug fix\n- Main panel no longer scrolls — popover now auto-sizes to fit content"
|
"notes": "## What's new in v1.2.1\n\n### Bug fixes\n- Fixed \"Not signed in\" showing incorrectly on launch when the session was already active\n- Sign-in state is now detected immediately from stored cookies on startup, before the first data refresh completes\n- Fixed Re-authenticate (and Sign In) not detecting an existing session — the login window now loads `claude.ai` directly so already-signed-in users are detected correctly and the window auto-dismisses\n- Fixed \"No API key configured\" showing after signing out — now correctly shows \"Not signed in\" with a prompt to sign in\n- Added `/api/organizations` as a final fallback for org ID resolution when the bootstrap API response doesn't include it\n- Session cookie detection now checks both `sessionKey` and `__Secure-next-auth.session-token` cookie names"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user