Prefer usernames in shell and admin flows

This commit is contained in:
cesnimda
2026-03-23 21:07:21 +01:00
parent 2c03379504
commit 2bcee6e07c
5 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -167,7 +167,7 @@ export default function AppShell({
</Box>
);
const nameForAvatar = user?.displayName || user?.userName || user?.email;
const nameForAvatar = user?.userName || user?.displayName || user?.email;
const initials = initialsFrom(nameForAvatar);
const [userMenuAnchor, setUserMenuAnchor] = useState<null | HTMLElement>(null);
@@ -232,7 +232,7 @@ export default function AppShell({
<Avatar src={user.avatarImageDataUrl || undefined} sx={{ width: 30, height: 30, fontWeight: 900 }}>{initials}</Avatar>
</IconButton>
<Box sx={{ display: { xs: "none", sm: "block" } }}>
<Typography sx={{ fontWeight: 600, lineHeight: 1.2 }}>{user.displayName || user.userName || user.email || t("user")}</Typography>
<Typography sx={{ fontWeight: 600, lineHeight: 1.2 }}>{user.userName || user.displayName || user.email || t("user")}</Typography>
<Typography variant="caption" sx={{ color: "text.secondary" }}>
{user.roleLabel || ""}
</Typography>