Merge pull request #76 from multica-ai/forrestchang/desktop-qr-refresh

Shorten desktop QR code expiry
This commit is contained in:
Jiayuan Zhang 2026-02-03 21:24:47 +08:00 committed by GitHub
commit 32c406a2a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 9 deletions

View file

@ -21,7 +21,7 @@ export interface ConnectionQRCodeProps {
gateway: string
hubId: string
agentId: string
/** QR code expiry time in seconds (default: 300 = 5 minutes) */
/** QR code expiry time in seconds (default: 30) */
expirySeconds?: number
/** Size of the QR code in pixels (default: 180) */
size?: number
@ -50,7 +50,7 @@ export function ConnectionQRCode({
gateway,
hubId,
agentId,
expirySeconds = 300,
expirySeconds = 30,
size = 180,
onRefresh,
}: ConnectionQRCodeProps) {

View file

@ -53,13 +53,13 @@ export default function HomePage() {
<div className="flex-1 flex gap-8 p-2">
{/* Left: QR Code */}
<div className="flex-1 flex flex-col items-center justify-center">
<ConnectionQRCode
gateway={hubInfo?.url ?? 'http://localhost:3000'}
hubId={hubInfo?.hubId ?? 'unknown'}
agentId={primaryAgent?.id}
expirySeconds={300}
size={180}
/>
<ConnectionQRCode
gateway={hubInfo?.url ?? 'http://localhost:3000'}
hubId={hubInfo?.hubId ?? 'unknown'}
agentId={primaryAgent?.id}
expirySeconds={30}
size={180}
/>
</div>
{/* Right: Hub Status */}