mud_server.admin_tui.screens.user_detail

User detail screen for PipeWorks Admin TUI.

Displays account metadata and a list of characters owned by the user.

Classes

UserDetailScreen

User account detail screen.

Module Contents

class mud_server.admin_tui.screens.user_detail.UserDetailScreen(user)

Bases: textual.screen.Screen

User account detail screen.

Shows user metadata plus characters owned by the user.

Initialize with the user record selected from the users table.

BINDINGS
CSS = Multiline-String
Show Value
"""
    UserDetailScreen {
        layout: vertical;
    }

    .detail-container {
        height: 1fr;
        padding: 1 2;
    }

    .summary-box {
        border: solid $primary;
        padding: 1 2;
        height: auto;
        margin-bottom: 1;
    }

    .summary-row {
        height: auto;
    }

    .summary-label {
        width: 18;
        color: $text-muted;
    }

    .summary-value {
        color: $text;
    }

    .characters-panel {
        height: 1fr;
    }

    DataTable {
        height: 1fr;
        width: 100%;
    }
    """
compose()

Compose the user summary and character list layout.

on_mount()

Validate permissions and load the user’s character list.

on_key(event)

Translate configured keys to local actions.

action_cursor_up()

Move selection up one row.

action_cursor_down()

Move selection down one row.

action_cursor_left()

Move selection left one column.

action_cursor_right()

Move selection right one column.

action_select()

Open the selected character in a detail placeholder.

action_back()

Return to the previous screen.

action_quit()

Quit the application.