Make back button smaller and non-focusable
Style as a compact transparent link-like element. Set can_focus=False so it doesn't steal initial focus from the main content. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -171,9 +171,18 @@ SelectionList {
|
||||
|
||||
.back-btn {
|
||||
width: auto;
|
||||
min-width: 10;
|
||||
height: 3;
|
||||
min-width: 8;
|
||||
max-width: 12;
|
||||
height: 1;
|
||||
margin: 0 0 0 0;
|
||||
padding: 0 1;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: $text-muted;
|
||||
}
|
||||
|
||||
.back-btn:hover {
|
||||
color: $text;
|
||||
}
|
||||
|
||||
#title-bar {
|
||||
|
||||
@@ -19,7 +19,7 @@ class BackupScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="backup-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Backup", id="screen-title")
|
||||
if not targets:
|
||||
yield Static("No sources configured. Add a source first.")
|
||||
|
||||
@@ -91,7 +91,7 @@ class LogsScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="logs-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Logs", id="screen-title")
|
||||
yield DataTable(id="logs-table")
|
||||
with Horizontal(id="logs-buttons"):
|
||||
|
||||
@@ -19,7 +19,7 @@ class RemotesScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="remotes-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Destinations", id="screen-title")
|
||||
yield DataTable(id="remotes-table")
|
||||
with Horizontal(id="remotes-buttons"):
|
||||
|
||||
@@ -22,7 +22,7 @@ class RestoreScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="restore-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Restore", id="screen-title")
|
||||
if not targets or not remotes:
|
||||
yield Static("Both sources and destinations must be configured for restore.")
|
||||
|
||||
@@ -22,7 +22,7 @@ class RetentionScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="retention-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Retention Cleanup", id="screen-title")
|
||||
if not targets:
|
||||
yield Static("No sources configured.")
|
||||
|
||||
@@ -35,7 +35,7 @@ class RunningTasksScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="running-tasks-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Running Tasks", id="screen-title")
|
||||
yield DataTable(id="rt-table")
|
||||
with Horizontal(id="rt-buttons"):
|
||||
|
||||
@@ -22,7 +22,7 @@ class ScheduleScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="schedule-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Schedules", id="screen-title")
|
||||
yield DataTable(id="sched-table")
|
||||
with Horizontal(id="sched-buttons"):
|
||||
|
||||
@@ -22,7 +22,7 @@ class SettingsScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="settings-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Settings", id="screen-title")
|
||||
with Vertical(classes="settings-section", id="section-general"):
|
||||
yield Static("Log Level:")
|
||||
|
||||
@@ -33,7 +33,7 @@ class SnapshotsScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="snapshots-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Snapshots Browser", id="screen-title")
|
||||
if not targets or not remotes:
|
||||
yield Static("Sources and destinations must be configured to browse snapshots.")
|
||||
|
||||
@@ -17,7 +17,7 @@ class TargetsScreen(Screen):
|
||||
with Horizontal(classes="screen-with-docs"):
|
||||
with Vertical(id="targets-screen"):
|
||||
with Horizontal(id="title-bar"):
|
||||
yield Button("← Back", id="btn-back", classes="back-btn")
|
||||
yield Button("← Back", id="btn-back", classes="back-btn", can_focus=False)
|
||||
yield Static("Sources", id="screen-title")
|
||||
yield DataTable(id="targets-table")
|
||||
with Horizontal(id="targets-buttons"):
|
||||
|
||||
Reference in New Issue
Block a user