File tree Expand file tree Collapse file tree
receiver-c3/components/web_server
receiver/components/web_server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ static const char DASHBOARD_HTML[] =
426426/* Fallback: just show the URL text for manual entry */
427427"const c=document.getElementById('qr-container');"
428428"try{"
429- "const size=200 ;"
429+ "const size=280 ;"
430430 "c.innerHTML=`<img src='https://api.qrserver.com/v1/create-qr-code/?size=${size}x${size}&data=${encodeURIComponent(d.url)}&bgcolor=FFFFFF&color=000000' "
431431 "width='${size}' height='${size}' alt='QR Code' style='image-rendering:pixelated' "
432432 "onerror=\"this.parentNode.innerHTML='<div style=color:#000;padding:2rem;font-size:.8rem>QR GENERATION FAILED<br>USE THE LINK BELOW</div>'\">`;"
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ static const char DASHBOARD_HTML[] =
426426/* Fallback: just show the URL text for manual entry */
427427"const c=document.getElementById('qr-container');"
428428"try{"
429- "const size=200 ;"
429+ "const size=280 ;"
430430 "c.innerHTML=`<img src='https://api.qrserver.com/v1/create-qr-code/?size=${size}x${size}&data=${encodeURIComponent(d.url)}&bgcolor=FFFFFF&color=000000' "
431431 "width='${size}' height='${size}' alt='QR Code' style='image-rendering:pixelated' "
432432 "onerror=\"this.parentNode.innerHTML='<div style=color:#000;padding:2rem;font-size:.8rem>QR GENERATION FAILED<br>USE THE LINK BELOW</div>'\">`;"
Original file line number Diff line number Diff line change @@ -59,12 +59,14 @@ export default function SetupWizard() {
5959 } ) ;
6060
6161 if ( code && code . data ) {
62+ const scanned = code . data . trim ( ) ;
6263 try {
63- const parsed = new URL ( code . data ) ;
64- // New format: http://<ip>/claim — open directly (receiver handles redirect)
64+ const parsed = new URL ( scanned ) ;
65+ // New format: http://<ip>/claim
6566 if ( parsed . pathname === '/claim' ) {
6667 stopScan ( ) ;
67- window . location . href = code . data ;
68+ window . location . href = scanned ;
69+ return ;
6870 }
6971 // Old format: https://cloud/link?id=...&token=...&ip=...
7072 const id = parsed . searchParams . get ( 'id' ) ;
@@ -73,6 +75,7 @@ export default function SetupWizard() {
7375 if ( id && token && ip ) {
7476 stopScan ( ) ;
7577 window . location . href = `/link?id=${ id } &token=${ token } &ip=${ ip } ` ;
78+ return ;
7679 }
7780 } catch { } // Not a valid URL — keep scanning
7881 }
You can’t perform that action at this time.
0 commit comments