fix: dashboard auth query items (#918) - thanks @rahthakor

Co-authored-by: Rahul Thakor <rahthakor@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-01-14 23:36:23 +00:00
parent de7f567b9a
commit 983e1b2303
2 changed files with 8 additions and 5 deletions

View File

@@ -8,8 +8,8 @@
- Docs: standardize Claude Code CLI naming across docs and prompts. (follow-up to #915) - Docs: standardize Claude Code CLI naming across docs and prompts. (follow-up to #915)
### Fixes ### Fixes
- Mac: pass auth token/password to dashboard URL for authenticated access. - Mac: pass auth token/password to dashboard URL for authenticated access. (#918) — thanks @rahthakor.
- UI: use application-defined WebSocket close code (browser compatibility). - UI: use application-defined WebSocket close code (browser compatibility). (#918) — thanks @rahthakor.
- Gateway/Dev: ensure `pnpm gateway:dev` always uses the dev profile config + state (`~/.clawdbot-dev`). - Gateway/Dev: ensure `pnpm gateway:dev` always uses the dev profile config + state (`~/.clawdbot-dev`).
- macOS: fix cron preview/testing payload to use `channel` key. (#867) — thanks @wes-davis. - macOS: fix cron preview/testing payload to use `channel` key. (#867) — thanks @wes-davis.
- Telegram: honor `channels.telegram.timeoutSeconds` for grammY API requests. (#863) — thanks @Snaver. - Telegram: honor `channels.telegram.timeoutSeconds` for grammY API requests. (#863) — thanks @Snaver.

View File

@@ -328,11 +328,14 @@ struct MenuContent: View {
components.scheme = "http" components.scheme = "http"
} }
components.path = "/" components.path = "/"
var queryItems: [URLQueryItem] = []
if let token = config.token, !token.isEmpty { if let token = config.token, !token.isEmpty {
components.queryItems = [URLQueryItem(name: "token", value: token)] queryItems.append(URLQueryItem(name: "token", value: token))
} else if let password = config.password, !password.isEmpty {
components.queryItems = [URLQueryItem(name: "password", value: password)]
} }
if let password = config.password, !password.isEmpty {
queryItems.append(URLQueryItem(name: "password", value: password))
}
components.queryItems = queryItems.isEmpty ? nil : queryItems
guard let url = components.url else { guard let url = components.url else {
throw NSError(domain: "Dashboard", code: 2, userInfo: [ throw NSError(domain: "Dashboard", code: 2, userInfo: [
NSLocalizedDescriptionKey: "Failed to build dashboard URL", NSLocalizedDescriptionKey: "Failed to build dashboard URL",