fix(mac): pass auth token to dashboard URL

This commit is contained in:
rahthakor
2026-01-15 01:38:24 +05:30
committed by Peter Steinberger
parent 57b4865ab3
commit 400e901c9c

View File

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