Move the Open Screen link into its own column after Actions
Was embedded in the Status cell next to the Running badge; now a dedicated column to the right of Actions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NiNnj78HGx1KWyCCo39HSz
This commit is contained in:
@@ -272,11 +272,12 @@ def render_page():
|
||||
size = sizes.get(name)
|
||||
size_html = f"{size / 1_000_000:.1f} MB" if size else "?"
|
||||
status = pending.get(name)
|
||||
screen_html = ""
|
||||
if name in novnc_ports:
|
||||
port = novnc_ports[name]
|
||||
link_id = f"novnc-{name}"
|
||||
status_html = (
|
||||
f'<span class="status busy">Running</span> '
|
||||
status_html = '<span class="status busy">Running</span>'
|
||||
screen_html = (
|
||||
f'<a id="{link_id}" href="#" target="_blank">Open Screen</a>'
|
||||
f"<script>document.getElementById('{link_id}').href = "
|
||||
f"'https://' + window.location.hostname + ':{port}/';</script>"
|
||||
@@ -299,7 +300,7 @@ def render_page():
|
||||
actions = button("install", name, "Install")
|
||||
rows.append(
|
||||
f"<tr><td>{title}</td><td>{release_date}</td><td>{publisher}</td>"
|
||||
f"<td>{size_html}</td><td>{status_html}</td><td>{actions}</td></tr>"
|
||||
f"<td>{size_html}</td><td>{status_html}</td><td>{actions}</td><td>{screen_html}</td></tr>"
|
||||
)
|
||||
|
||||
return f"""<!doctype html>
|
||||
@@ -323,8 +324,8 @@ button {{ padding: 0.3em 0.8em; margin-right: 0.3em; }}
|
||||
<p class="slots">{slots_used}/{MAX_CONCURRENT_GAMES} game slots in use</p>
|
||||
<h1>DOSBox games</h1>
|
||||
<table>
|
||||
<tr><th>Game</th><th>Release</th><th>Publisher</th><th>Size</th><th>Status</th><th>Actions</th></tr>
|
||||
{''.join(rows) if rows else '<tr><td colspan="6">No game manifests found on the share</td></tr>'}
|
||||
<tr><th>Game</th><th>Release</th><th>Publisher</th><th>Size</th><th>Status</th><th>Actions</th><th></th></tr>
|
||||
{''.join(rows) if rows else '<tr><td colspan="7">No game manifests found on the share</td></tr>'}
|
||||
</table>
|
||||
</body>
|
||||
</html>"""
|
||||
|
||||
Reference in New Issue
Block a user