Show system clock in top right corner of all screens
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ class BackupScreen(Screen):
|
||||
BINDINGS = [("escape", "go_back", "Back")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
targets = list_conf_dir("targets.d")
|
||||
remotes = list_conf_dir("remotes.d")
|
||||
with Vertical(id="backup-screen"):
|
||||
|
||||
@@ -12,7 +12,7 @@ class LogsScreen(Screen):
|
||||
BINDINGS = [("escape", "go_back", "Back")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
with Vertical(id="logs-screen"):
|
||||
yield Static("Logs", id="screen-title")
|
||||
yield DataTable(id="logs-table")
|
||||
|
||||
@@ -44,7 +44,7 @@ class MainMenuScreen(Screen):
|
||||
BINDINGS = [("q", "quit_app", "Quit")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
with Horizontal(id="main-layout"):
|
||||
yield Static(LOGO, id="logo", markup=True)
|
||||
menu_items = []
|
||||
|
||||
@@ -24,7 +24,7 @@ class RemoteEditScreen(Screen):
|
||||
self._is_new = not name
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
title = "Add Remote" if self._is_new else f"Edit Remote: {self._edit_name}"
|
||||
remote = Remote()
|
||||
if not self._is_new:
|
||||
|
||||
@@ -14,7 +14,7 @@ class RemotesScreen(Screen):
|
||||
BINDINGS = [("escape", "go_back", "Back")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
with Vertical(id="remotes-screen"):
|
||||
yield Static("Remotes", id="screen-title")
|
||||
yield DataTable(id="remotes-table")
|
||||
|
||||
@@ -14,7 +14,7 @@ class RestoreScreen(Screen):
|
||||
BINDINGS = [("escape", "go_back", "Back")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
targets = list_conf_dir("targets.d")
|
||||
remotes = list_conf_dir("remotes.d")
|
||||
with Vertical(id="restore-screen"):
|
||||
|
||||
@@ -14,7 +14,7 @@ class RetentionScreen(Screen):
|
||||
BINDINGS = [("escape", "go_back", "Back")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
targets = list_conf_dir("targets.d")
|
||||
conf = parse_conf(CONFIG_DIR / "gniza.conf")
|
||||
current_count = conf.get("RETENTION_COUNT", "30")
|
||||
|
||||
@@ -17,7 +17,7 @@ class ScheduleScreen(Screen):
|
||||
BINDINGS = [("escape", "go_back", "Back")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
with Vertical(id="schedule-screen"):
|
||||
yield Static("Schedules", id="screen-title")
|
||||
yield DataTable(id="sched-table")
|
||||
|
||||
@@ -38,7 +38,7 @@ class ScheduleEditScreen(Screen):
|
||||
self._is_new = not name
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
title = "Add Schedule" if self._is_new else f"Edit Schedule: {self._edit_name}"
|
||||
sched = Schedule()
|
||||
if not self._is_new:
|
||||
|
||||
@@ -12,7 +12,7 @@ class SettingsScreen(Screen):
|
||||
BINDINGS = [("escape", "go_back", "Back")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
conf = parse_conf(CONFIG_DIR / "gniza.conf")
|
||||
settings = AppSettings.from_conf(conf)
|
||||
with Vertical(id="settings-screen"):
|
||||
|
||||
@@ -16,7 +16,7 @@ class SnapshotsScreen(Screen):
|
||||
BINDINGS = [("escape", "go_back", "Back")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
targets = list_conf_dir("targets.d")
|
||||
remotes = list_conf_dir("remotes.d")
|
||||
with Vertical(id="snapshots-screen"):
|
||||
|
||||
@@ -21,7 +21,7 @@ class TargetEditScreen(Screen):
|
||||
self._is_new = not name
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
title = "Add Target" if self._is_new else f"Edit Target: {self._edit_name}"
|
||||
target = Target()
|
||||
if not self._is_new:
|
||||
|
||||
@@ -12,7 +12,7 @@ class TargetsScreen(Screen):
|
||||
BINDINGS = [("escape", "go_back", "Back")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
with Vertical(id="targets-screen"):
|
||||
yield Static("Targets", id="screen-title")
|
||||
yield DataTable(id="targets-table")
|
||||
|
||||
@@ -9,7 +9,7 @@ from tui.config import has_remotes, has_targets
|
||||
class WizardScreen(Screen):
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Header(show_clock=True)
|
||||
with Center():
|
||||
with Vertical(id="wizard"):
|
||||
yield Static(
|
||||
|
||||
Reference in New Issue
Block a user