✨(frontend) display full name if available
We can get the full name from the OIDC, so we should display it if available.
This commit is contained in:
@@ -8,4 +8,6 @@
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
full_name: string;
|
||||
short_name: string;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ export const DocHeader = ({ doc, versionId }: DocHeaderProps) => {
|
||||
)
|
||||
.map((access, index, accesses) => (
|
||||
<Fragment key={`access-${index}`}>
|
||||
{access.user.email}{' '}
|
||||
{access.user.full_name || access.user.email}{' '}
|
||||
{index < accesses.length - 1 ? ' / ' : ''}
|
||||
</Fragment>
|
||||
))}
|
||||
|
||||
@@ -84,9 +84,10 @@ export const MemberItem = ({
|
||||
$css={`flex: ${isSmallMobile ? '100%' : '70%'};`}
|
||||
>
|
||||
<IconBG iconName="account_circle" $size="2rem" />
|
||||
<Text $justify="center" $css="flex:1;">
|
||||
{access.user.email}
|
||||
</Text>
|
||||
<Box $justify="center" $css="flex:1;">
|
||||
{access.user.full_name && <Text>{access.user.full_name}</Text>}
|
||||
<Text>{access.user.email}</Text>
|
||||
</Box>
|
||||
<Box
|
||||
$direction="row"
|
||||
$gap="1rem"
|
||||
|
||||
@@ -213,6 +213,8 @@ export class ApiPlugin implements WorkboxPlugin {
|
||||
user: {
|
||||
id: 'dummy-id',
|
||||
email: 'dummy-email',
|
||||
full_name: 'dummy-full-name',
|
||||
short_name: 'dummy-short-name',
|
||||
},
|
||||
abilities: {
|
||||
destroy: false,
|
||||
|
||||
Reference in New Issue
Block a user