Skip to content

five-on-it / apps/client/src/ui/AccountBar

apps/client/src/ui/AccountBar ​

Who the player is on the platform, and the way to change it, on the kit: an avatar chip (#<prefix>-account-menu) that opens a menu card holding the account's name (the device's guest's, or the account signed in to), beside a signed-in account's name its Respect tier and total (RespectParts.tsx' StandingSummary, a link to its standing's page), Profile (?profile), for an admin's account (/me says so) a link to the admins' page (?admin), the language, and Sign out. Not signed in (a guest, or nobody on a platform for the game's owners), a filled "Sign in" (#<prefix>-sign-in) opens the sign-in form in a kit dialog: an email and a password, the form saying that signing in accepts the terms and linking them and the privacy policy (the terms' version goes with the sign-in, legal.ts). Where the platform signs in through Steam (its /info), "Sign in through Steam" (the OpenID round trip, steam.ts) and, for an e-mail account, "Link to Steam" in the menu; on a platform for the game's owners the e-mail form gives way to linking an e-mail account (its e-mail and password asked once Steam said who the player is), and a Steam account the platform refused is told why, with "Get it on Steam": what comes back from Steam opens the form by itself. In the desktop app the same buttons go through the app (steam.ts): its Steam ticket, else Steam's page in a window of the app's; once it signed in through Steam on this device it signs in again by itself with the ticket where its session is gone. The game pages' header, the legend's Games tab and the main menu's corner all show it; its element ids start with the prefix each gives (browse-account, browse-email, games-admin, menu-account-sign-in…), the end-to-end tests' contract.

Interfaces ​

Functions ​