diff --git a/src/seedpass/tui_v3/screens/maintenance.py b/src/seedpass/tui_v3/screens/maintenance.py index 07ebd1e6..6deb09b6 100644 --- a/src/seedpass/tui_v3/screens/maintenance.py +++ b/src/seedpass/tui_v3/screens/maintenance.py @@ -71,6 +71,15 @@ MAINTENANCE_CSS = """ min-height: 3; } +.maintenance-status-warning { + background: #4a3800; + color: #ffdd88; + border: solid #aa7700; + padding: 1; + margin-top: 1; + min-height: 3; +} + .maintenance-label { color: #ffffff; text-style: bold; @@ -116,6 +125,19 @@ MAINTENANCE_CSS = """ """ +_STATUS_ICONS: dict[str, str] = { + "ready": "◎", + "working": "⟳", + "success": "✓", + "warning": "⚠", + "error": "✗", + "danger": "⚠", + "info": "ℹ", +} + + def format_status(level: str, message: str) -> str: - prefix = level.strip().capitalize() or "Info" - return f"{prefix}: {message}" + key = level.strip().lower() + icon = _STATUS_ICONS.get(key, "◉") + prefix = key.capitalize() or "Info" + return f"{icon} {prefix}: {message}" diff --git a/src/seedpass/tui_v3/screens/profile.py b/src/seedpass/tui_v3/screens/profile.py index 3066d83a..9b0e1fa2 100644 --- a/src/seedpass/tui_v3/screens/profile.py +++ b/src/seedpass/tui_v3/screens/profile.py @@ -46,7 +46,7 @@ class ProfileManagementScreen(Screen): yield Static("SeedPass ◈ Profile Management", classes="maintenance-title") with Container(id="profile-container", classes="maintenance-panel-dark"): yield Static( - "Switch between profiles or remove unused ones. The active profile is marked with *. Removing a profile requires confirmation.", + "Switch between profiles or remove unused ones. The active profile is marked with ►. Each profile is identified by its fingerprint. Removing a profile is permanent and requires confirmation.", id="profile-intro", classes="maintenance-intro-dark", ) @@ -105,7 +105,7 @@ class ProfileManagementScreen(Screen): for idx, profile in enumerate(profiles, start=1): fingerprint = profile["fingerprint"] label = profile["label"] - marker = "*" if fingerprint == current else " " + marker = "►" if fingerprint == current else " " lines.append(f"{idx}. {marker} {label}") if not profiles: lines.append("(none)") diff --git a/src/seedpass/tui_v3/screens/pubkey.py b/src/seedpass/tui_v3/screens/pubkey.py index 4808ec55..fd637932 100644 --- a/src/seedpass/tui_v3/screens/pubkey.py +++ b/src/seedpass/tui_v3/screens/pubkey.py @@ -12,8 +12,8 @@ class NostrPubkeyScreen(Screen): """Display the active profile npub and its public QR payload.""" BINDINGS = [ - ("escape", "app.pop_screen", "Back"), - ("c", "copy_pubkey", "Copy npub"), + Binding("escape", "app.pop_screen", "Back", show=True), + Binding("c", "copy_pubkey", "Copy npub", show=True), ] CSS = ( diff --git a/src/seedpass/tui_v3/screens/relays.py b/src/seedpass/tui_v3/screens/relays.py index 2dd977d7..da5beaf9 100644 --- a/src/seedpass/tui_v3/screens/relays.py +++ b/src/seedpass/tui_v3/screens/relays.py @@ -196,8 +196,6 @@ class RelaysScreen(Screen): async def _perform_sync(self) -> None: sync_service = self.app.services.get("sync") try: - import traceback - sync_service.sync() self.app.call_from_thread( self.app.notify, "Synchronization complete", severity="information" diff --git a/src/seedpass/tui_v3/screens/security.py b/src/seedpass/tui_v3/screens/security.py index 8bfc5816..79d9100b 100644 --- a/src/seedpass/tui_v3/screens/security.py +++ b/src/seedpass/tui_v3/screens/security.py @@ -114,7 +114,7 @@ class BackupParentSeedScreen(Screen): ) yield Label("Destination Path", classes="maintenance-label") yield Input(placeholder="seed-backup.enc", id="backup-seed-path", classes="maintenance-input") - yield Label("Backup Password (optional)", classes="maintenance-label") + yield Label("Backup Passphrase (optional — encrypts the exported seed bundle)", classes="maintenance-label") yield Input(password=True, id="backup-seed-password", classes="maintenance-input") yield Static( format_status("ready", "Enter the backup destination path to export an encrypted seed bundle."),