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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user