Kleidos API Search

In development. It changes without notice.

Topic

Login Detail View Model

What the detail of a login shows and where each key leads, the sentences about a record, and what a refused one-time code offers.

The detail is a list, a page, a revealed value and a confirmation before a deletion, with no screen behind it. Where a one-time code is refused (One-Time Codes), the one thing that would fix it is offered: a sync over a saved network, adding a network, or setting the clock.

See also
One-Time Codes, Home Screen

Files

file src/ui/credential/cred_brand_mark.h
A credential record's brand mark on its detail screens, keyed like its list row.
file src/ui/credential/cred_detail_logic.h
Headless finite-state machine for the credential-detail overlay.
file src/ui/credential/cred_summary.h
The credential detail's two sentences about a record: its state and what else it stores.
file src/ui/credential/totp_gate_copy.h
What a 2FA surface says, and offers, while the TOTP gate refuses a code.
file src/ui/credential/vault_notices.h
The vault's surfaces that are only words: the narrow pager's empty page, and the 2FA gate's refusal on every surface that shows one.

Classes

struct kleidos::CredStopList
Resolved stop list for one opened credential, in display order. More about kleidos::CredStopList
struct kleidos::CredCardActions
Resolved action bar for one opened credential. More about kleidos::CredCardActions
struct kleidos::MoreRow
One row of the second level. More about kleidos::MoreRow
struct kleidos::MoreRowList
Resolved second level for one opened credential. More about kleidos::MoreRowList
struct kleidos::EpaperCardCursor
Where the dial is within the credential detail. More about kleidos::EpaperCardCursor
class kleidos::CredDetailLogic
Headless credential-detail router; tracks the active id and reveal timer. More about kleidos::CredDetailLogic
struct kleidos::ui::GateCopy
What a surface draws for a refused verdict. More about kleidos::ui::GateCopy
struct kleidos::ui::FixCopy
The words that name an offered fix on each kind of control. More about kleidos::ui::FixCopy

Typedefs

usingkleidos::ui::CredSummaryLine
One sentence of the credential detail.

Enumerations

enum class kleidos::CredDetailStep : uint8_t { kleidos::CredDetailStep::LIST , kleidos::CredDetailStep::DETAIL , kleidos::CredDetailStep::REVEAL , kleidos::CredDetailStep::DeleteConfirm }
Steps of the credential-detail overlay state machine. More about kleidos::CredDetailStep
enum class kleidos::CredDetailResult : uint8_t { kleidos::CredDetailResult::CONTINUE , kleidos::CredDetailResult::DELETED , kleidos::CredDetailResult::CLOSED }
Outcome codes returned by each credential-detail transition. More about kleidos::CredDetailResult
enum class kleidos::CredStop : uint8_t { kleidos::CredStop::Type, kleidos::CredStop::User, kleidos::CredStop::Url, kleidos::CredStop::Totp, kleidos::CredStop::Notes, kleidos::CredStop::Delete }
enum class kleidos::CredCardAction : uint8_t { kleidos::CredCardAction::Type, kleidos::CredCardAction::Reveal, kleidos::CredCardAction::More, kleidos::CredCardAction::Delete, kleidos::CredCardAction::TypeUser, kleidos::CredCardAction::TwoFactor, kleidos::CredCardAction::TypePass }
enum class kleidos::MoreRowKind : uint8_t { kleidos::MoreRowKind::Url, kleidos::MoreRowKind::Custom, kleidos::MoreRowKind::Recovery, kleidos::MoreRowKind::Notes, kleidos::MoreRowKind::Delete }
What one second-level row is. More about kleidos::MoreRowKind
enum class kleidos::EpaperCardLevel : uint8_t { kleidos::EpaperCardLevel::Card , kleidos::EpaperCardLevel::More , kleidos::EpaperCardLevel::Notes }
Which level of the credential detail the dial is on. More about kleidos::EpaperCardLevel
enum class kleidos::EpaperCardKey : uint8_t { kleidos::EpaperCardKey::Up, kleidos::EpaperCardKey::Down, kleidos::EpaperCardKey::OkTap, kleidos::EpaperCardKey::OkHold, kleidos::EpaperCardKey::Back }
A dial key, as the card reads it. More about kleidos::EpaperCardKey
enum class kleidos::EpaperCardCommand : uint8_t { kleidos::EpaperCardCommand::None, kleidos::EpaperCardCommand::Redraw, kleidos::EpaperCardCommand::RunCardAction, kleidos::EpaperCardCommand::OpenMore, kleidos::EpaperCardCommand::RunMoreRow, kleidos::EpaperCardCommand::OpenNotes, kleidos::EpaperCardCommand::NotesPrev, kleidos::EpaperCardCommand::NotesNext, kleidos::EpaperCardCommand::HideReveal, kleidos::EpaperCardCommand::Close }
What the caller must do after a key. More about kleidos::EpaperCardCommand
enum class kleidos::ui::ClockFix : uint8_t { kleidos::ui::ClockFix::None , kleidos::ui::ClockFix::Sync , kleidos::ui::ClockFix::Set , kleidos::ui::ClockFix::Wifi }
The action a 2FA surface offers in place of a code. More about kleidos::ui::ClockFix

Functions

constexpr BrandMarkPropskleidos::ui::credBrandMarkProps (const char *listDomain, const char *name, const char *url)
The props a credential's detail mark is drawn with.
boolkleidos::ui::drawCredBrandMark (Canvas &canvas, const LayoutContext &layout, const Rect &box, const char *url, const char *name, uint16_t background=tokens::color::kBg)
Draw a credential's brand mark from its decrypted URL and name.
MoreRowListkleidos::buildMoreRows (bool hasUrl, uint8_t customCount, uint8_t recoveryLines, bool hasNotes, bool withDelete=false)
Build the second level from the record's field presence. Pure.
CredCardActionskleidos::buildCardActions (bool hasMore)
Build the identity card's action bar. Pure (host-testable).
CredCardActionskleidos::buildEpaperCardActions (bool hasUser, bool hasTotp)
Build the dial card's action band. Pure (host-testable).
const char *kleidos::credUrlHost (const char *url)
The host part of a URL: the text after its scheme. Pure.
EpaperCardCommandkleidos::epaperCardStep (EpaperCardCursor &cursor, EpaperCardKey key, const CredCardActions &actions, const MoreRowList &rows, bool revealed)
Step the dial's cursor through the credential detail. Pure.
CredStopListkleidos::buildCredStops (bool hasUser, bool hasUrl, bool hasTotp, bool hasNotes)
Build the carousel stop list from the opened credential's field presence. Pure (host-testable).
voidkleidos::ui::composeCredStateLine (const CredentialDetail &detail, CredSummaryLine &out)
Compose what is true of the record: favorite · archived · the expiry date · the sign-in provider.
voidkleidos::ui::composeCredAlsoStored (const CredentialDetail &detail, CredSummaryLine &out)
Compose what else the record stores: "2 fields · +1 URLs · Codes · Notes".
constexpr ClockFixkleidos::ui::clockFixFor (kleidos::totp::Gate gate, bool hasRtc, bool networkSaved)
The action to offer for the TOTP gate's verdict.
constexpr ClockFixkleidos::ui::clockFixBeforeRead (kleidos::totp::Gate gate, bool hasRtc)
The fix a surface names before it has read whether a network is saved.
constexpr GateCopykleidos::ui::gateCopyFor (kleidos::totp::Gate gate, bool hasRtc, bool hasGps)
The words for the TOTP gate's verdict.
constexpr FixCopykleidos::ui::fixCopyFor (ClockFix fix)
The words that name an offered fix on each kind of footer and hint.
voidkleidos::ui::toastGateRefusal (kleidos::totp::Gate gate)
Raise the warning that no code can be typed now, and why.
notice_stack::Stackkleidos::ui::vault_notices::layoutEmpty (Canvas &canvas, const LayoutContext &layout, const Rect &body, bool totpPage)
The column of a page that has no entries.
notice_stack::Stackkleidos::ui::vault_notices::layoutTotpRefusal (Canvas &canvas, const LayoutContext &layout, const Rect &body, const GateCopy &copy, ClockFix fix)
The column of the 2FA page while the gate refuses a code.
voidkleidos::ui::vault_notices::drawEmpty (Canvas &canvas, const LayoutContext &layout, const Rect &body, bool totpPage)
Draw the page that has no entries, as layoutEmpty sets it.
voidkleidos::ui::vault_notices::drawTotpRefusal (Canvas &canvas, const LayoutContext &layout, const Rect &body, const GateCopy &copy, ClockFix fix)
Draw the refused 2FA page, as layoutTotpRefusal sets it.
notice_stack::Stackkleidos::ui::vault_notices::layoutCodeRefusal (Canvas &canvas, const LayoutContext &layout, const Rect &band, i18n::StringId headline, i18n::StringId hint)
The column of the full-screen 2FA view while the gate refuses a code.
voidkleidos::ui::vault_notices::drawCodeRefusal (Canvas &canvas, const LayoutContext &layout, const Rect &band, i18n::StringId headline, i18n::StringId hint)
Draw the full-screen view's refusal, as layoutCodeRefusal sets it.
notice_stack::Stackkleidos::ui::vault_notices::layoutListRefusal (Canvas &canvas, const LayoutContext &layout, const Rect &body, const GateCopy &copy)
The column a 2FA list shows in place of its rows while the gate refuses a code.
voidkleidos::ui::vault_notices::drawListRefusal (Canvas &canvas, const LayoutContext &layout, const Rect &body, const GateCopy &copy)
Draw a 2FA list's refusal, as layoutListRefusal sets it.
notice_stack::Stackkleidos::ui::vault_notices::layoutStopRefusal (Canvas &canvas, const LayoutContext &layout, const Rect &box, const GateCopy &copy)
The refusal a credential's 2FA stop shows under its caption: the headline alone.
voidkleidos::ui::vault_notices::drawStopRefusal (Canvas &canvas, const LayoutContext &layout, const Rect &box, const GateCopy &copy)
Draw a 2FA stop's refusal, as layoutStopRefusal sets it.

Variables

constexpr uint8_tkleidos::kCredStopMax
Maximum number of carousel stops (all six present).
constexpr uint8_tkleidos::kCredCardActionMax
Every card action there can be.
constexpr uint8_tkleidos::kMoreRowMax
constexpr uint32_tkleidos::ui::kGateRefusalToastMs
How long the refusal warning stays up, ms: two lines to read.

Back to the top

Enumeration Type Documentation

ClockFix #

enum class kleidos::ui::ClockFix : uint8_t

The action a 2FA surface offers in place of a code.

Enumerator
None 

The gate passes, or codes are off: nothing to fix.

Sync 

A Wi-Fi network is saved: sync the clock over NTP.

Set 

A battery-backed RTC and no saved network: set the time by hand.

Wifi 

No RTC chip and no saved network: add a network to sync over.

CredCardAction #

enum class kleidos::CredCardAction : uint8_t

One action of the fixed identity card's bar.

The card itself never changes as the bar moves: the username, the masked password and the live one-time code stay on screen, because that is the errand almost every open is. Only these three actions cycle under them.

Enumerator
Type 

Type the credential (opens the chooser; hold A).

Reveal 

Unmask the password on the card for a few seconds.

More 

Open the second level: URL, custom fields, codes, notes.

Delete 

Delete the entry (hold-to-confirm).

TypeUser 

Type the username alone (the dial's card names both halves).

TwoFactor 

Type the related one-time code.

TypePass 

Type the password alone (the dial's card).

CredDetailResult #

enum class kleidos::CredDetailResult : uint8_t

Outcome codes returned by each credential-detail transition.

Enumerator
CONTINUE 

Stay in the current step.

DELETED 

Caller must wipe credential from vault + refresh list.

CLOSED 

Back to list without delete.

CredDetailStep #

enum class kleidos::CredDetailStep : uint8_t

Steps of the credential-detail overlay state machine.

Enumerator
LIST 

No detail overlay; vault list visible.

DETAIL 

Detail view with masked password.

REVEAL 

Detail view with password unmasked.

DeleteConfirm 

Modal asking the user to confirm deletion.

CredStop #

enum class kleidos::CredStop : uint8_t

One stop of the credential-detail action carousel. Stops mix actions (Type, Delete) and data fields (username, URL, related TOTP, notes); short A steps forward through them, hold A executes the stop's action.

Enumerator
Type 

Type the credential over BLE HID (action; hold A).

User 

Username field (view + type over BLE).

Url 

Origin URL field (view + type over BLE).

Totp 

Related TOTP live code (view + type over BLE).

Notes 

Free-text notes (read-only).

Delete 

Delete the entry (action; hold-to-confirm).

EpaperCardCommand #

enum class kleidos::EpaperCardCommand : uint8_t

What the caller must do after a key.

Enumerator
None 

Nothing changed.

Redraw 

The cursor moved; repaint.

RunCardAction 

Run the card action the band is on.

OpenMore 

The second level is now on screen; repaint.

RunMoreRow 

Run the second-level row the cursor is on.

OpenNotes 

The notes are now on screen; repaint.

NotesPrev 

Page the notes back.

NotesNext 

Page the notes on.

HideReveal 

End the reveal; the key did nothing else.

Close 

Leave the detail.

EpaperCardKey #

enum class kleidos::EpaperCardKey : uint8_t

A dial key, as the card reads it.

Enumerator
Up 

▲.

Down 

▼.

OkTap 

A tap of the dial's center.

OkHold 

A held center: the acting gesture.

Back 

The side key.

EpaperCardLevel #

enum class kleidos::EpaperCardLevel : uint8_t

Which level of the credential detail the dial is on.

Enumerator
Card 

The identity card and its action band.

More 

The second level's row list.

Notes 

The notes, paged.

MoreRowKind #

enum class kleidos::MoreRowKind : uint8_t

What one second-level row is.

Enumerator
Url 

The primary URL (typeable).

Custom 

One custom field, by ordinal (typeable).

Recovery 

The recovery-codes block (types one code per press).

Notes 

The notes (read-only; opens into a view).

Delete 

Delete the entry (hold-to-confirm), where the card has no room.

Back to the top

Function Documentation

buildCardActions() #

CredCardActions kleidos::buildCardActions(bool hasMore)

Build the identity card's action bar. Pure (host-testable).

Type, Reveal and Delete are always there. Reveal sits second because reading the password IS the fallback errand when the host is not paired, which makes it the most relevant thing after typing. More appears only when the record actually carries something under it — an empty second level is a promise the card cannot keep, and on a two-button panel every action costs a press to skip past.

Parameters
NameDirectionMeaning
hasMoreinWhether any second-level row exists (URL, custom field, recovery codes or notes).
Returns
The resolved bar, in card order Type -> Reveal -> More -> Delete.

buildCredStops() #

CredStopList kleidos::buildCredStops(bool hasUser, bool hasUrl, bool hasTotp, bool hasNotes)

Build the carousel stop list from the opened credential's field presence. Pure (host-testable).

Type and Delete are always present (first and last); the username, URL, TOTP, and notes stops appear only when the credential carries that data, in the order Type -> user -> URL -> TOTP -> notes -> Delete.

Parameters
NameDirectionMeaning
hasUserinCredential has a non-empty username.
hasUrlinCredential has a non-empty origin URL.
hasTotpinCredential embeds a related TOTP secret.
hasNotesinCredential has non-empty notes.
Returns
The resolved stop list (count in [2, kCredStopMax]).

buildEpaperCardActions() #

CredCardActions kleidos::buildEpaperCardActions(bool hasUser, bool hasTotp)

Build the dial card's action band. Pure (host-testable).

The dial's card names each errand instead of routing through a chooser, in the chooser's order: Type (the username, TAB and the password; the password alone when there is no username), the one-time code when the record carries one, the username and the password each alone when there is a username, Reveal, and More. More is always last and always present: the second level holds Delete and the rest of the record there.

Parameters
NameDirectionMeaning
hasUserinNon-empty username.
hasTotpinThe record carries a related one-time code.
Returns
The resolved band, in card order.

buildMoreRows() #

MoreRowList kleidos::buildMoreRows(bool hasUrl, uint8_t customCount, uint8_t recoveryLines, bool hasNotes, bool withDelete = false)

Build the second level from the record's field presence. Pure.

Order is by how often a row gets typed: the site first, then the custom fields in the order the owner stored them, then the recovery codes (rare, but an action), and the notes last because they are read, never typed.

Parameters
NameDirectionMeaning
hasUrlinNon-empty primary URL.
customCountinCustom fields present (clamped to twelve).
recoveryLinesinLines in the recovery-codes block; 0 = no row.
hasNotesinNon-empty notes.
withDeleteinAppend Delete as the last row: the dial's card has no room for it, so the second level carries it.
Returns
The rows, in that order.

clockFixBeforeRead() #

ClockFix kleidos::ui::clockFixBeforeRead(kleidos::totp::Gate gate, bool hasRtc)
constexpr

The fix a surface names before it has read whether a network is saved.

A surface reads the answer when it is entered under a refusal, never from a frame or a tick. A refusal that arrives later in the visit (the precise sync behind the codes runs out while they show) is named without that read: the sync, the fix wherever a network is saved. The press that runs it reads the answer first and runs the fix the answer calls for.

Parameters
NameDirectionMeaning
gateinThe TOTP gate's verdict.
hasRtcinThe board keeps the time in a battery-backed RTC.
Returns
ClockFix::None for a passing gate or codes turned off, else the sync.

clockFixFor() #

ClockFix kleidos::ui::clockFixFor(kleidos::totp::Gate gate, bool hasRtc, bool networkSaved)
constexpr

The action to offer for the TOTP gate's verdict.

A sync wins wherever a network is saved. Without one, a board whose RTC keeps the time through every sleep gets the Set clock editor, which makes its clock trusted; a board without an RTC chip gets the Wi-Fi networks list instead, because no time set by hand ever makes a code there.

Parameters
NameDirectionMeaning
gateinThe TOTP gate's verdict.
hasRtcinThe board keeps the time in a battery-backed RTC.
networkSavedinThe vault holds at least one Wi-Fi network.
Returns
ClockFix::None for a passing gate or codes turned off, else the fix.

composeCredAlsoStored() #

void kleidos::ui::composeCredAlsoStored(const CredentialDetail & detail, CredSummaryLine & out)

Compose what else the record stores: "2 fields · +1 URLs · Codes · Notes".

Parameters
NameDirectionMeaning
detailinThe record's detail projection.
outoutThe list, empty when the record stores nothing more.

composeCredStateLine() #

void kleidos::ui::composeCredStateLine(const CredentialDetail & detail, CredSummaryLine & out)

Compose what is true of the record: favorite · archived · the expiry date · the sign-in provider.

"Expired" only when a trusted clock can say so; an unset clock cannot tell, and a wrong "Expired" is worse than a date.

Parameters
NameDirectionMeaning
detailinThe record's detail projection.
outoutThe line, empty when nothing applies.

credBrandMarkProps() #

BrandMarkProps kleidos::ui::credBrandMarkProps(const char * listDomain, const char * name, const char * url)
constexpr

The props a credential's detail mark is drawn with.

The brand token (ui::brandToken) of listDomain and name, the name as the letter, and url for the logo lookup only when listDomain is non-empty. A URL that names no host would otherwise key the logo by its raw text, which names no brand, while the list row keys it by the name.

Parameters
NameDirectionMeaning
listDomaininThe record's list domain (kleidos::vault::listDomain of url); null or empty when the URL names no host.
nameinThe record's display name.
urlinThe record's URL (null or empty allowed).
Returns
The props; they point into the three arguments.

credUrlHost() #

const char * kleidos::credUrlHost(const char * url)

The host part of a URL: the text after its scheme. Pure.

A credential row shows "github.com", not "https://github.com": the scheme is the same on nearly every record and costs the width the host needs.

Parameters
NameDirectionMeaning
urlinThe stored URL (may be null or empty).
Returns
A pointer into url past the first "://", or url itself when it carries no scheme; never null for a non-null url.

drawCodeRefusal() #

void kleidos::ui::vault_notices::drawCodeRefusal(Canvas & canvas, const LayoutContext & layout, const Rect & band, i18n::StringId headline, i18n::StringId hint)

Draw the full-screen view's refusal, as layoutCodeRefusal sets it.

Parameters
NameDirectionMeaning
canvasin, outSurface to draw on (inside the caller's frame).
layoutinThe panel.
bandinThe view's band under its identity row.
headlineinWhat the gate refuses with.
hintinWhat makes a code readable, as this board offers it.

drawCredBrandMark() #

bool kleidos::ui::drawCredBrandMark(Canvas & canvas, const LayoutContext & layout, const Rect & box, const char * url, const char * name, uint16_t background = tokens::color::kBg)

Draw a credential's brand mark from its decrypted URL and name.

Parameters
NameDirectionMeaning
canvasin, outDrawing surface.
layoutinResponsive context (carries the device profile).
boxinSquare-ish target rectangle for the badge.
urlinThe record's URL (null or empty allowed).
nameinThe record's display name: the letter, and the brand token when the URL names no host.
backgroundinThe surface the mark sits on, which a logo's transparent pixels are blended into (color panels; BrandMarkProps::background).
Return values
ValueMeaning
trueA badge (logo or letter) was drawn.
falseNothing was drawn (empty box).
Warning
SECURITY: the derived domain is record metadata; it is held in a local buffer that is wiped before return.

drawEmpty() #

void kleidos::ui::vault_notices::drawEmpty(Canvas & canvas, const LayoutContext & layout, const Rect & body, bool totpPage)

Draw the page that has no entries, as layoutEmpty sets it.

Parameters
NameDirectionMeaning
canvasin, outSurface to draw on (inside the caller's frame).
layoutinThe panel.
bodyinThe page's body band.
totpPageinTrue on the 2FA page, false on the credentials page.

drawListRefusal() #

void kleidos::ui::vault_notices::drawListRefusal(Canvas & canvas, const LayoutContext & layout, const Rect & body, const GateCopy & copy)

Draw a 2FA list's refusal, as layoutListRefusal sets it.

Parameters
NameDirectionMeaning
canvasin, outSurface to draw on (inside the caller's frame).
layoutinThe panel.
bodyinThe list's body band.
copyinThe words for the refused verdict.

drawStopRefusal() #

void kleidos::ui::vault_notices::drawStopRefusal(Canvas & canvas, const LayoutContext & layout, const Rect & box, const GateCopy & copy)

Draw a 2FA stop's refusal, as layoutStopRefusal sets it.

Parameters
NameDirectionMeaning
canvasin, outSurface to draw on (inside the caller's frame).
layoutinThe panel.
boxinThe room the stop has for it.
copyinThe words for the refused verdict.

drawTotpRefusal() #

void kleidos::ui::vault_notices::drawTotpRefusal(Canvas & canvas, const LayoutContext & layout, const Rect & body, const GateCopy & copy, ClockFix fix)

Draw the refused 2FA page, as layoutTotpRefusal sets it.

Parameters
NameDirectionMeaning
canvasin, outSurface to draw on (inside the caller's frame).
layoutinThe panel.
bodyinThe page's body band.
copyinThe words for the refused verdict.
fixinThe fix the page offers on a hold, if any.

epaperCardStep() #

EpaperCardCommand kleidos::epaperCardStep(EpaperCardCursor & cursor, EpaperCardKey key, const CredCardActions & actions, const MoreRowList & rows, bool revealed)

Step the dial's cursor through the credential detail. Pure.

The binding is one table for all three levels: ▲ / ▼ move with wrap, a held OK acts, and the side key goes back one level and then leaves. An OK tap acts only where a hold would be a promise the screen cannot keep: opening a level (More, Notes) is a tap, and typing or revealing is a hold, so a mis-read tap never sends a password to a host. While the password is revealed every key but the side key just ends the reveal.

Parameters
NameDirectionMeaning
cursorin, outThe dial's position; updated in place.
keyinThe key pressed.
actionsinThe card's action band.
rowsinThe second level's rows.
revealedinWhether the password is unmasked right now.
Returns
What the caller must do.

fixCopyFor() #

FixCopy kleidos::ui::fixCopyFor(ClockFix fix)
constexpr

The words that name an offered fix on each kind of footer and hint.

Parameters
NameDirectionMeaning
fixinThe offered fix. ClockFix::None offers nothing; it gets the Set words, which no surface draws.
Returns
The footer, e-paper footer, key-hint and hold-hint words.

gateCopyFor() #

GateCopy kleidos::ui::gateCopyFor(kleidos::totp::Gate gate, bool hasRtc, bool hasGps)
constexpr

The words for the TOTP gate's verdict.

A board without an RTC chip is never told to set the clock: its codes need a sync, so the line under the headline and the Settings path name the sync (and, where a GPS receiver is fitted, the GPS time sync too). A passing gate has nothing to say; it gets the clock-unset words, which no surface draws.

Parameters
NameDirectionMeaning
gateinThe TOTP gate's verdict.
hasRtcinThe board keeps the time in a battery-backed RTC.
hasGpsinThe board can set its clock from a GPS fix.
Returns
The headline, the detail line and the Settings path.

layoutCodeRefusal() #

notice_stack::Stack kleidos::ui::vault_notices::layoutCodeRefusal(Canvas & canvas, const LayoutContext & layout, const Rect & band, i18n::StringId headline, i18n::StringId hint)

The column of the full-screen 2FA view while the gate refuses a code.

The headline stands where the code would, over the line that says what fixes it. A band too short for both keeps the headline alone: the view's footer or key-hint shelf still names the fix.

Parameters
NameDirectionMeaning
canvasinSurface used only to measure text.
layoutinThe panel.
bandinThe view's band under its identity row.
headlineinWhat the gate refuses with.
hintinWhat makes a code readable, as this board offers it.
Returns
Where the refusal's rows land in band; one block when the hint gave way.

layoutEmpty() #

notice_stack::Stack kleidos::ui::vault_notices::layoutEmpty(Canvas & canvas, const LayoutContext & layout, const Rect & body, bool totpPage)

The column of a page that has no entries.

Parameters
NameDirectionMeaning
canvasinSurface used only to measure text.
layoutinThe panel.
bodyinThe page's body band.
totpPageinTrue on the 2FA page, false on the credentials page.
Returns
Where the rows land in body: what is missing, and where it is added.

layoutListRefusal() #

notice_stack::Stack kleidos::ui::vault_notices::layoutListRefusal(Canvas & canvas, const LayoutContext & layout, const Rect & body, const GateCopy & copy)

The column a 2FA list shows in place of its rows while the gate refuses a code.

The headline over what makes a code readable, as the keyboard, touch and e-paper lists say it. On the 1-bit panel both are body size in the one ink.

Parameters
NameDirectionMeaning
canvasinSurface used only to measure text.
layoutinThe panel.
bodyinThe list's body band.
copyinThe words for the refused verdict.
Returns
Where the refusal's rows land in body.

layoutStopRefusal() #

notice_stack::Stack kleidos::ui::vault_notices::layoutStopRefusal(Canvas & canvas, const LayoutContext & layout, const Rect & box, const GateCopy & copy)

The refusal a credential's 2FA stop shows under its caption: the headline alone.

Parameters
NameDirectionMeaning
canvasinSurface used only to measure text.
layoutinThe panel.
boxinThe room the stop has for it. Its height may be the whole stop's: the caller reads height to place the caption.
copyinThe words for the refused verdict.
Returns
Where the headline's rows land in box.

layoutTotpRefusal() #

notice_stack::Stack kleidos::ui::vault_notices::layoutTotpRefusal(Canvas & canvas, const LayoutContext & layout, const Rect & body, const GateCopy & copy, ClockFix fix)

The column of the 2FA page while the gate refuses a code.

The headline names the refusal, the line under it what makes a code readable, and the last line the way there: the hold that runs fix on this page, or the Settings path when the page offers no fix.

Parameters
NameDirectionMeaning
canvasinSurface used only to measure text.
layoutinThe panel.
bodyinThe page's body band.
copyinThe words for the refused verdict.
fixinThe fix the page offers on a hold, if any.
Returns
Where the refusal's rows land in body.

toastGateRefusal() #

void kleidos::ui::toastGateRefusal(kleidos::totp::Gate gate)

Raise the warning that no code can be typed now, and why.

For a code asked for where the fix cannot run: the code offered after a typed login pair (a sync would tear down the Bluetooth session that typed it), and the credential detail's or the keyboard card's 2FA action while codes are off. Where HOME offers the code (the detail's 2FA action, the keyboard card's 2FA button) a refusal runs the fix instead. The title is the verdict's headline; the body is where the fix lives in Settings. It reads no vault, so it never holds the frame.

Parameters
NameDirectionMeaning
gateinThe TOTP gate's verdict; a passing gate raises nothing.

Back to the top

Variable Documentation

kMoreRowMax #

uint8_t kleidos::kMoreRowMax
inlineconstexpr

Most rows a second level can hold: URL + every custom field + codes + notes

  • delete.

Back to the top