fix: render a single tab without a tab bar

142 tab bars held one tab, most of them "On the device" under a heading saying so. One item now stands alone, led by its label unless it names the place the text around already gives. The network route drops "Run the command on the computer" under the heading "From your computer", which keeps RetroPie in its word budget.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:46:22 +01:00
1 parent 124e96cd09
commit 32cc1ce4fa
6 files changed
+39 -4

No files matched your search

+6
View File
@@ -454,6 +454,10 @@ def fence(shell: str, command: str, indent: str = "") -> list[str]:
return [f'{indent}```{shell} title="{FENCE_TITLES[shell]}"', f"{indent}{command}", f"{indent}```"]
# Terminals named by where the command runs, not by the system it runs on.
PLACES = ("device", "server")
def terminal_tabs(
tabs: tuple[str, ...], args: dict[str, str], indent: str = "", steps: bool = True,
how: dict[str, str] | None = None,
@@ -465,6 +469,8 @@ def terminal_tabs(
items = []
for key in tabs:
label, shared, shell = TERMINALS[key]
if len(tabs) == 1 and key in PLACES:
label = "" # one place, which the text around already names
text = (how or {}).get(key) or shared
body = [text, ""] if steps else []
items.append((label, body + fence(shell, install_command(shell, args.get(key, "")))))