fix: set tab title to container/app name
Updates the HTML page title to display the app name instead of a generic 'Textual Web Terminal' title. Resolves TODO item #1.
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
- [ ] Set tab title to the container name
|
||||||
|
- [ ] screenshots are still showing the tmux bar creeping up and slowly taking over the screenshot
|
||||||
@@ -724,11 +724,12 @@ class LocalServer:
|
|||||||
route_key = RouteKey(generate().lower())
|
route_key = RouteKey(generate().lower())
|
||||||
|
|
||||||
ws_url = self._get_ws_url_from_request(request, route_key)
|
ws_url = self._get_ws_url_from_request(request, route_key)
|
||||||
|
page_title = available_app.name if available_app else "Textual Web Terminal"
|
||||||
|
|
||||||
html_content = f"""<!DOCTYPE html>
|
html_content = f"""<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Textual Web Terminal</title>
|
<title>{page_title}</title>
|
||||||
<link rel=\"stylesheet\" href=\"/static/css/xterm.css\">
|
<link rel=\"stylesheet\" href=\"/static/css/xterm.css\">
|
||||||
<link rel=\"stylesheet\" href=\"/static-webterm/monospace.css\">
|
<link rel=\"stylesheet\" href=\"/static-webterm/monospace.css\">
|
||||||
<script src=\"/static/js/textual.js\"></script>
|
<script src=\"/static/js/textual.js\"></script>
|
||||||
|
|||||||
@@ -494,6 +494,7 @@ class TestLocalServerMoreCoverage:
|
|||||||
assert "/static-webterm/monospace.css" in resp.text
|
assert "/static-webterm/monospace.css" in resp.text
|
||||||
assert "data-session-websocket-url" in resp.text
|
assert "data-session-websocket-url" in resp.text
|
||||||
assert "data-font-size" in resp.text
|
assert "data-font-size" in resp.text
|
||||||
|
assert "<title>Known</title>" in resp.text
|
||||||
|
|
||||||
def test_rewrite_svg_fonts_removes_font_face_and_forces_stack(self):
|
def test_rewrite_svg_fonts_removes_font_face_and_forces_stack(self):
|
||||||
svg = (
|
svg = (
|
||||||
|
|||||||
Reference in New Issue
Block a user