Ensure dashboard activates terminal tab
This commit is contained in:
@@ -1162,9 +1162,19 @@ class LocalServer:
|
|||||||
if (!tile || !tile.slug) return;
|
if (!tile || !tile.slug) return;
|
||||||
const url = `/?route_key=${{encodeURIComponent(tile.slug)}}`;
|
const url = `/?route_key=${{encodeURIComponent(tile.slug)}}`;
|
||||||
const target = `webterm-${{tile.slug}}`;
|
const target = `webterm-${{tile.slug}}`;
|
||||||
const win = window.open(url, target);
|
let win = window.open(url, target);
|
||||||
if (win && typeof win.focus === 'function') {{
|
if (!win) {{
|
||||||
win.focus();
|
window.location.href = url;
|
||||||
|
return;
|
||||||
|
}}
|
||||||
|
if (win.closed) {{
|
||||||
|
win = window.open(url, target);
|
||||||
|
}}
|
||||||
|
if (win) {{
|
||||||
|
if (typeof win.focus === 'function') {{
|
||||||
|
win.focus();
|
||||||
|
}}
|
||||||
|
win.location.href = url;
|
||||||
}} else {{
|
}} else {{
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user