cadrumo.entrypoints.tui.secret.login module

Login: full-screen credential entry that unlocks one existing profile.

See also

CredentialScreen

The shared attempt lifecycle and panel layout this screen builds on.

RegistrationScreen

The other credential surface, sharing the same base.

class LoginScreen(*, choices, authenticate, preselected=None)[source]

Bases: CredentialScreen[ProfileLoginOutcome]

Full-screen credential entry that unlocks one existing profile.

Parameters:
SCOPED_CSS: ClassVar[bool]

Should default css be limited to the widget type?

DEFAULT_CSS: ClassVar[str]

Default TCSS.

ATTEMPT_NAME: ClassVar[str]
compose()[source]

Yield the banner, the two credential fields, and the footer.

Return type:

Iterable[Widget]

on_mount()[source]

Install the theme, render copy, and focus password entry.

Return type:

None

on_button_pressed(event)[source]

Route an unlock or cancellation button intent.

Return type:

None

Parameters:

event (Pressed)

on_input_submitted(event)[source]

Enter in the password field is the unlock.

Return type:

None

Parameters:

event (Submitted)

selected_profile_id()[source]

Return the profile the chooser currently addresses.

Return type:

str

action_unlock()[source]

Hand the typed password to the injected unlock door off-loop.

Return type:

None

default_refusal()[source]

Text shown when a refusal carries no message.

Return type:

str

progress_message()[source]

Operator-facing description of the subclass’s in-flight attempt.

Return type:

str

refuse(message)[source]

Show refusal, clear the rejected password, and focus retry.

Return type:

None

Parameters:

message (str)

set_busy(*, busy)[source]

Render unlock progress and freeze inputs during derivation.

Return type:

None

Parameters:

busy (bool)

can_focus: bool

Widget may receive focus.

can_focus_children: bool

Widget’s children may receive focus.