mud_server.admin_tui.screens.database_actions
Action helpers for the admin database screen.
This module keeps the DatabaseScreen focused on orchestration by encapsulating user/session actions and UI flows (modals, selection, error handling) in a dedicated helper.
Classes
Encapsulate user/session actions for DatabaseScreen. |
Module Contents
- class mud_server.admin_tui.screens.database_actions.DatabaseActions(screen)
Encapsulate user/session actions for DatabaseScreen.
The helper keeps UI flows (confirmations, selection resolution, refresh) in one place so new actions can be added without bloating the screen.
Bind to the owning DatabaseScreen instance.
- open_user_detail()
Open user detail screen for the currently selected user row.
Uses the cached users list from the UsersTab to avoid extra API calls.
- open_character_detail_from_locations()
Open character detail for the selected character location row.
Character Location rows only provide id/name, so the detail screen hydrates missing fields on mount.
- async kick_selected()
Prompt and kick the selected session from the connections/sessions table.
Handles modal confirmation, permission errors, and table refreshes.
- async remove_selected_user()
Prompt and remove the selected user (deactivate or delete).
Uses the confirmation modal and refreshes user-related tables.
- safe_cursor_left()
Move cursor left without crashing if horizontal scroll is disabled.
Textual raises SkipAction when horizontal scrolling is disabled.
- safe_cursor_right()
Move cursor right without crashing if horizontal scroll is disabled.
Textual raises SkipAction when horizontal scrolling is disabled.