Put back button and title on the same line
Wrap ← Back button and screen title in a Horizontal title-bar container across all screens. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,8 @@ Screen {
|
||||
text-style: bold;
|
||||
color: #00cc00;
|
||||
padding: 1 0;
|
||||
text-align: center;
|
||||
width: 1fr;
|
||||
content-align: center middle;
|
||||
}
|
||||
|
||||
/* Main menu */
|
||||
@@ -175,6 +176,11 @@ SelectionList {
|
||||
margin: 0 0 0 0;
|
||||
}
|
||||
|
||||
#title-bar {
|
||||
height: auto;
|
||||
align: left middle;
|
||||
}
|
||||
|
||||
/* Button rows */
|
||||
#backup-buttons,
|
||||
#restore-buttons,
|
||||
|
||||
@@ -18,8 +18,9 @@ class BackupScreen(Screen):
|
||||
remotes = list_conf_dir("remotes.d")
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="backup-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Backup", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Backup", id="screen-title")
|
||||
if not targets:
|
||||
yield Static("No sources configured. Add a source first.")
|
||||
else:
|
||||
|
||||
@@ -90,8 +90,9 @@ class LogsScreen(Screen):
|
||||
yield Header(show_clock=True)
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="logs-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Logs", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Logs", id="screen-title")
|
||||
yield DataTable(id="logs-table")
|
||||
with Horizontal(id="logs-buttons"):
|
||||
yield Button("View", variant="primary", id="btn-view")
|
||||
|
||||
@@ -18,8 +18,9 @@ class RemotesScreen(Screen):
|
||||
yield Header(show_clock=True)
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="remotes-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Destinations", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Destinations", id="screen-title")
|
||||
yield DataTable(id="remotes-table")
|
||||
with Horizontal(id="remotes-buttons"):
|
||||
yield Button("Add", variant="primary", id="btn-add")
|
||||
|
||||
@@ -21,8 +21,9 @@ class RestoreScreen(Screen):
|
||||
remotes = list_conf_dir("remotes.d")
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="restore-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Restore", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Restore", id="screen-title")
|
||||
if not targets or not remotes:
|
||||
yield Static("Both sources and destinations must be configured for restore.")
|
||||
else:
|
||||
|
||||
@@ -21,8 +21,9 @@ class RetentionScreen(Screen):
|
||||
current_count = conf.get("RETENTION_COUNT", "30")
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="retention-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Retention Cleanup", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Retention Cleanup", id="screen-title")
|
||||
if not targets:
|
||||
yield Static("No sources configured.")
|
||||
else:
|
||||
|
||||
@@ -34,8 +34,9 @@ class RunningTasksScreen(Screen):
|
||||
yield Header(show_clock=True)
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="running-tasks-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Running Tasks", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Running Tasks", id="screen-title")
|
||||
yield DataTable(id="rt-table")
|
||||
with Horizontal(id="rt-buttons"):
|
||||
yield Button("View Log", variant="primary", id="btn-rt-view")
|
||||
|
||||
@@ -21,8 +21,9 @@ class ScheduleScreen(Screen):
|
||||
yield Header(show_clock=True)
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="schedule-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Schedules", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Schedules", id="screen-title")
|
||||
yield DataTable(id="sched-table")
|
||||
with Horizontal(id="sched-buttons"):
|
||||
yield Button("Add", variant="primary", id="btn-add")
|
||||
|
||||
@@ -21,8 +21,9 @@ class SettingsScreen(Screen):
|
||||
settings = AppSettings.from_conf(conf)
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="settings-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Settings", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Settings", id="screen-title")
|
||||
with Vertical(classes="settings-section", id="section-general"):
|
||||
yield Static("Log Level:")
|
||||
yield Select(
|
||||
|
||||
@@ -32,8 +32,9 @@ class SnapshotsScreen(Screen):
|
||||
remotes = list_conf_dir("remotes.d")
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="snapshots-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Snapshots Browser", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Snapshots Browser", id="screen-title")
|
||||
if not targets or not remotes:
|
||||
yield Static("Sources and destinations must be configured to browse snapshots.")
|
||||
else:
|
||||
|
||||
@@ -16,8 +16,9 @@ class TargetsScreen(Screen):
|
||||
yield Header(show_clock=True)
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="targets-screen"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Sources", id="screen-title")
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Static("Sources", id="screen-title")
|
||||
yield DataTable(id="targets-table")
|
||||
with Horizontal(id="targets-buttons"):
|
||||
yield Button("Add", variant="primary", id="btn-add")
|
||||
|
||||
Reference in New Issue
Block a user