Add display_name support for users in backend and frontend
This commit introduces the `display_name` field to the user model. It updates database migrations, API endpoints, and the admin panel to handle this field. Additionally, the `display_name` is now shown in the TopBar and WinnerBadge components, improving user experience.
This commit is contained in:
@@ -2,6 +2,8 @@ import React from "react";
|
||||
import { styles } from "../styles/styles";
|
||||
import { stylesTokens } from "../styles/theme";
|
||||
|
||||
const displayName = (me?.display_name || "").trim() || me.email;
|
||||
|
||||
export default function TopBar({
|
||||
me,
|
||||
userMenuOpen,
|
||||
@@ -18,7 +20,7 @@ export default function TopBar({
|
||||
Notizbogen
|
||||
</div>
|
||||
<div style={{ fontSize: 12, opacity: 0.8, color: stylesTokens.textDim }}>
|
||||
{me.email}
|
||||
{displayName}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user