@@ -29,7 +29,8 @@ import { styles, triggerShapes } from './user-button.styles';
2929export interface UserButtonSession {
3030 sessionId : string ;
3131 name : string ;
32- email : string ;
32+ /** Whatever the account is addressed by: username, email, phone, or wallet. */
33+ identifier : string ;
3334 imageUrl ?: string ;
3435}
3536
@@ -446,9 +447,9 @@ function HeaderActionButton({ label, icon, onClick, busyKey }: HeaderAction) {
446447function Header ( ) {
447448 const data = useUserButtonContext ( ) ;
448449 const signOutSession = data . onSignOutSession ;
449- const { sessionId, email } = data . activeSession ;
450+ const { sessionId, identifier } = data . activeSession ;
450451 const { name, imageUrl, shape, organization } = leadWorkspace ( data ) ;
451- const subtitle = organization ? membershipSubtitle ( organization ) : email ;
452+ const subtitle = organization ? membershipSubtitle ( organization ) : identifier ;
452453 // Inviting belongs to whichever organization is active, even where the account is what heads the
453454 // surface. The gear manages whatever the header names.
454455 const invitable = showsOrganizations ( data ) ? data . activeOrganization : null ;
@@ -537,13 +538,13 @@ function ActionMenu({ label, actions, disabled }: { label: string; actions: Acco
537538}
538539
539540/**
540- * The active account, identified by its email . It heads the workspaces that belong to it and
541+ * The active account, named by its identifier . It heads the workspaces that belong to it and
541542 * carries the account-wide actions, the way the "Accounts" row heads the other accounts.
542543 */
543544function ActiveAccountRow ( ) {
544545 const data = useUserButtonContext ( ) ;
545546 const signOutSession = data . onSignOutSession ;
546- const { email , sessionId } = data . activeSession ;
547+ const { identifier , sessionId } = data . activeSession ;
547548 // Its actions live in a menu that closes on click, so the row itself carries their spinner.
548549 const { busy, disabled } = useBusy ( userButtonBusyKeys . signOutSession ( sessionId ) ) ;
549550
@@ -570,7 +571,7 @@ function ActiveAccountRow() {
570571 fontWeight : fontWeightVars [ '--cl-font-medium' ] ,
571572 } }
572573 >
573- { email }
574+ { identifier }
574575 </ Item . Description >
575576 </ Item . Content >
576577 { busy ? (
@@ -579,7 +580,7 @@ function ActiveAccountRow() {
579580 </ Trailing >
580581 ) : (
581582 < ActionMenu
582- label = { `Actions for ${ email } ` }
583+ label = { `Actions for ${ identifier } ` }
583584 actions = { actions }
584585 disabled = { disabled }
585586 />
@@ -787,8 +788,8 @@ function AccountRow({ session, active }: { session: UserButtonSession; active?:
787788 />
788789 </ Item . Media >
789790 < Item . Content >
790- { /* Identified by email , like the active account's row, so the two read as the same kind. */ }
791- < Item . Title > { session . email } </ Item . Title >
791+ { /* Named by its identifier , like the active account's row, so the two read as the same kind. */ }
792+ < Item . Title > { session . identifier } </ Item . Title >
792793 </ Item . Content >
793794 { busy ? (
794795 < Trailing >
0 commit comments