fix: reuse same browser tab when clicking dashboard tiles

Use tile slug as window name in window.open() so clicking the same
tile twice focuses the existing tab instead of opening a new one.

Changed: window.open(url, '_blank') -> window.open(url, 'webterm-{slug}')
This commit is contained in:
GitHub Copilot
2026-01-24 11:23:43 +00:00
parent 0cae07cba6
commit 8ae3f77f23
+2 -1
View File
@@ -718,7 +718,8 @@ class LocalServer:
card.appendChild(body);
card.appendChild(meta);
card.onclick = () => {{
window.open(`/?route_key=${{encodeURIComponent(tile.slug)}}`, '_blank');
// Use tile slug as window name to reuse the same tab for each tile
window.open(`/?route_key=${{encodeURIComponent(tile.slug)}}`, `webterm-${{tile.slug}}`);
}};
card.img = img;
return card;