Move Back button to top-left of all screens with ← arrow
Replace bottom-row Back buttons with a top-left "← Back" button across all screens for consistent navigation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -168,6 +168,13 @@ SelectionList {
|
|||||||
margin: 0 0 0 1;
|
margin: 0 0 0 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.back-btn {
|
||||||
|
width: auto;
|
||||||
|
min-width: 10;
|
||||||
|
height: 3;
|
||||||
|
margin: 0 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Button rows */
|
/* Button rows */
|
||||||
#backup-buttons,
|
#backup-buttons,
|
||||||
#restore-buttons,
|
#restore-buttons,
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class BackupScreen(Screen):
|
|||||||
remotes = list_conf_dir("remotes.d")
|
remotes = list_conf_dir("remotes.d")
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="backup-screen"):
|
with Vertical(id="backup-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Backup", id="screen-title")
|
yield Static("Backup", id="screen-title")
|
||||||
if not targets:
|
if not targets:
|
||||||
yield Static("No sources configured. Add a source first.")
|
yield Static("No sources configured. Add a source first.")
|
||||||
@@ -38,7 +39,6 @@ class BackupScreen(Screen):
|
|||||||
with Horizontal(id="backup-buttons"):
|
with Horizontal(id="backup-buttons"):
|
||||||
yield Button("Run Backup", variant="primary", id="btn-backup")
|
yield Button("Run Backup", variant="primary", id="btn-backup")
|
||||||
yield Button("Backup All", variant="warning", id="btn-backup-all")
|
yield Button("Backup All", variant="warning", id="btn-backup-all")
|
||||||
yield Button("Back", id="btn-back")
|
|
||||||
yield DocsPanel.for_screen("backup-screen")
|
yield DocsPanel.for_screen("backup-screen")
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|||||||
@@ -90,11 +90,11 @@ class LogsScreen(Screen):
|
|||||||
yield Header(show_clock=True)
|
yield Header(show_clock=True)
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="logs-screen"):
|
with Vertical(id="logs-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Logs", id="screen-title")
|
yield Static("Logs", id="screen-title")
|
||||||
yield DataTable(id="logs-table")
|
yield DataTable(id="logs-table")
|
||||||
with Horizontal(id="logs-buttons"):
|
with Horizontal(id="logs-buttons"):
|
||||||
yield Button("View", variant="primary", id="btn-view")
|
yield Button("View", variant="primary", id="btn-view")
|
||||||
yield Button("Back", id="btn-back")
|
|
||||||
with Horizontal(id="log-pager-buttons"):
|
with Horizontal(id="log-pager-buttons"):
|
||||||
yield Button("◀ Prev", id="btn-prev-page")
|
yield Button("◀ Prev", id="btn-prev-page")
|
||||||
yield Static("", id="log-page-info")
|
yield Static("", id="log-page-info")
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class RemotesScreen(Screen):
|
|||||||
yield Header(show_clock=True)
|
yield Header(show_clock=True)
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="remotes-screen"):
|
with Vertical(id="remotes-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Destinations", id="screen-title")
|
yield Static("Destinations", id="screen-title")
|
||||||
yield DataTable(id="remotes-table")
|
yield DataTable(id="remotes-table")
|
||||||
with Horizontal(id="remotes-buttons"):
|
with Horizontal(id="remotes-buttons"):
|
||||||
@@ -25,7 +26,6 @@ class RemotesScreen(Screen):
|
|||||||
yield Button("Edit", id="btn-edit")
|
yield Button("Edit", id="btn-edit")
|
||||||
yield Button("Test", variant="warning", id="btn-test")
|
yield Button("Test", variant="warning", id="btn-test")
|
||||||
yield Button("Delete", variant="error", id="btn-delete")
|
yield Button("Delete", variant="error", id="btn-delete")
|
||||||
yield Button("Back", id="btn-back")
|
|
||||||
yield DocsPanel.for_screen("remotes-screen")
|
yield DocsPanel.for_screen("remotes-screen")
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class RestoreScreen(Screen):
|
|||||||
remotes = list_conf_dir("remotes.d")
|
remotes = list_conf_dir("remotes.d")
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="restore-screen"):
|
with Vertical(id="restore-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Restore", id="screen-title")
|
yield Static("Restore", id="screen-title")
|
||||||
if not targets or not remotes:
|
if not targets or not remotes:
|
||||||
yield Static("Both sources and destinations must be configured for restore.")
|
yield Static("Both sources and destinations must be configured for restore.")
|
||||||
@@ -43,7 +44,6 @@ class RestoreScreen(Screen):
|
|||||||
yield Switch(value=True, id="restore-mysql-switch")
|
yield Switch(value=True, id="restore-mysql-switch")
|
||||||
with Horizontal(id="restore-buttons"):
|
with Horizontal(id="restore-buttons"):
|
||||||
yield Button("Restore", variant="primary", id="btn-restore")
|
yield Button("Restore", variant="primary", id="btn-restore")
|
||||||
yield Button("Back", id="btn-back")
|
|
||||||
yield DocsPanel.for_screen("restore-screen")
|
yield DocsPanel.for_screen("restore-screen")
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class RetentionScreen(Screen):
|
|||||||
current_count = conf.get("RETENTION_COUNT", "30")
|
current_count = conf.get("RETENTION_COUNT", "30")
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="retention-screen"):
|
with Vertical(id="retention-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Retention Cleanup", id="screen-title")
|
yield Static("Retention Cleanup", id="screen-title")
|
||||||
if not targets:
|
if not targets:
|
||||||
yield Static("No sources configured.")
|
yield Static("No sources configured.")
|
||||||
@@ -39,7 +40,6 @@ class RetentionScreen(Screen):
|
|||||||
with Horizontal():
|
with Horizontal():
|
||||||
yield Input(value=current_count, id="ret-count", placeholder="30")
|
yield Input(value=current_count, id="ret-count", placeholder="30")
|
||||||
yield Button("Save", id="btn-save-count")
|
yield Button("Save", id="btn-save-count")
|
||||||
yield Button("Back", id="btn-back")
|
|
||||||
yield DocsPanel.for_screen("retention-screen")
|
yield DocsPanel.for_screen("retention-screen")
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|||||||
@@ -34,13 +34,13 @@ class RunningTasksScreen(Screen):
|
|||||||
yield Header(show_clock=True)
|
yield Header(show_clock=True)
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="running-tasks-screen"):
|
with Vertical(id="running-tasks-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Running Tasks", id="screen-title")
|
yield Static("Running Tasks", id="screen-title")
|
||||||
yield DataTable(id="rt-table")
|
yield DataTable(id="rt-table")
|
||||||
with Horizontal(id="rt-buttons"):
|
with Horizontal(id="rt-buttons"):
|
||||||
yield Button("View Log", variant="primary", id="btn-rt-view")
|
yield Button("View Log", variant="primary", id="btn-rt-view")
|
||||||
yield Button("Kill Job", variant="error", id="btn-rt-kill")
|
yield Button("Kill Job", variant="error", id="btn-rt-kill")
|
||||||
yield Button("Clear Finished", variant="warning", id="btn-rt-clear")
|
yield Button("Clear Finished", variant="warning", id="btn-rt-clear")
|
||||||
yield Button("Back", id="btn-rt-back")
|
|
||||||
yield Static("", id="rt-progress-label")
|
yield Static("", id="rt-progress-label")
|
||||||
yield ProgressBar(id="rt-progress", total=100, show_eta=False)
|
yield ProgressBar(id="rt-progress", total=100, show_eta=False)
|
||||||
yield _SafeRichLog(id="rt-log-viewer", wrap=True, highlight=True)
|
yield _SafeRichLog(id="rt-log-viewer", wrap=True, highlight=True)
|
||||||
@@ -98,7 +98,7 @@ class RunningTasksScreen(Screen):
|
|||||||
table.move_cursor(row=min(old_row, table.row_count - 1))
|
table.move_cursor(row=min(old_row, table.row_count - 1))
|
||||||
|
|
||||||
def on_button_pressed(self, event: Button.Pressed) -> None:
|
def on_button_pressed(self, event: Button.Pressed) -> None:
|
||||||
if event.button.id == "btn-rt-back":
|
if event.button.id == "btn-back":
|
||||||
self.app.pop_screen()
|
self.app.pop_screen()
|
||||||
elif event.button.id == "btn-rt-clear":
|
elif event.button.id == "btn-rt-clear":
|
||||||
job_manager.remove_finished()
|
job_manager.remove_finished()
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class ScheduleScreen(Screen):
|
|||||||
yield Header(show_clock=True)
|
yield Header(show_clock=True)
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="schedule-screen"):
|
with Vertical(id="schedule-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Schedules", id="screen-title")
|
yield Static("Schedules", id="screen-title")
|
||||||
yield DataTable(id="sched-table")
|
yield DataTable(id="sched-table")
|
||||||
with Horizontal(id="sched-buttons"):
|
with Horizontal(id="sched-buttons"):
|
||||||
@@ -29,7 +30,6 @@ class ScheduleScreen(Screen):
|
|||||||
yield Button("Toggle Active", variant="warning", id="btn-toggle")
|
yield Button("Toggle Active", variant="warning", id="btn-toggle")
|
||||||
yield Button("Delete", variant="error", id="btn-delete")
|
yield Button("Delete", variant="error", id="btn-delete")
|
||||||
yield Button("Show crontab", id="btn-show")
|
yield Button("Show crontab", id="btn-show")
|
||||||
yield Button("Back", id="btn-back")
|
|
||||||
yield DocsPanel.for_screen("schedule-screen")
|
yield DocsPanel.for_screen("schedule-screen")
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class SettingsScreen(Screen):
|
|||||||
settings = AppSettings.from_conf(conf)
|
settings = AppSettings.from_conf(conf)
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="settings-screen"):
|
with Vertical(id="settings-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Settings", id="screen-title")
|
yield Static("Settings", id="screen-title")
|
||||||
with Vertical(classes="settings-section", id="section-general"):
|
with Vertical(classes="settings-section", id="section-general"):
|
||||||
yield Static("Log Level:")
|
yield Static("Log Level:")
|
||||||
@@ -79,7 +80,6 @@ class SettingsScreen(Screen):
|
|||||||
with Horizontal(id="set-buttons"):
|
with Horizontal(id="set-buttons"):
|
||||||
yield Button("Save", variant="primary", id="btn-save")
|
yield Button("Save", variant="primary", id="btn-save")
|
||||||
yield Button("Send Test Email", id="btn-test-email")
|
yield Button("Send Test Email", id="btn-test-email")
|
||||||
yield Button("Back", id="btn-back")
|
|
||||||
yield DocsPanel.for_screen("settings-screen")
|
yield DocsPanel.for_screen("settings-screen")
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class SnapshotsScreen(Screen):
|
|||||||
remotes = list_conf_dir("remotes.d")
|
remotes = list_conf_dir("remotes.d")
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="snapshots-screen"):
|
with Vertical(id="snapshots-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Snapshots Browser", id="screen-title")
|
yield Static("Snapshots Browser", id="screen-title")
|
||||||
if not targets or not remotes:
|
if not targets or not remotes:
|
||||||
yield Static("Sources and destinations must be configured to browse snapshots.")
|
yield Static("Sources and destinations must be configured to browse snapshots.")
|
||||||
@@ -44,7 +45,6 @@ class SnapshotsScreen(Screen):
|
|||||||
yield DataTable(id="snap-table")
|
yield DataTable(id="snap-table")
|
||||||
with Horizontal(id="snapshots-buttons"):
|
with Horizontal(id="snapshots-buttons"):
|
||||||
yield Button("Browse Files", id="btn-browse")
|
yield Button("Browse Files", id="btn-browse")
|
||||||
yield Button("Back", id="btn-back")
|
|
||||||
yield DocsPanel.for_screen("snapshots-screen")
|
yield DocsPanel.for_screen("snapshots-screen")
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ class TargetsScreen(Screen):
|
|||||||
yield Header(show_clock=True)
|
yield Header(show_clock=True)
|
||||||
with Horizontal(classes="screen-with-docs"):
|
with Horizontal(classes="screen-with-docs"):
|
||||||
with Vertical(id="targets-screen"):
|
with Vertical(id="targets-screen"):
|
||||||
|
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||||
yield Static("Sources", id="screen-title")
|
yield Static("Sources", id="screen-title")
|
||||||
yield DataTable(id="targets-table")
|
yield DataTable(id="targets-table")
|
||||||
with Horizontal(id="targets-buttons"):
|
with Horizontal(id="targets-buttons"):
|
||||||
yield Button("Add", variant="primary", id="btn-add")
|
yield Button("Add", variant="primary", id="btn-add")
|
||||||
yield Button("Edit", id="btn-edit")
|
yield Button("Edit", id="btn-edit")
|
||||||
yield Button("Delete", variant="error", id="btn-delete")
|
yield Button("Delete", variant="error", id="btn-delete")
|
||||||
yield Button("Back", id="btn-back")
|
|
||||||
yield DocsPanel.for_screen("targets-screen")
|
yield DocsPanel.for_screen("targets-screen")
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user