feat: add user display profiles and fix web context menu UX
Some checks failed
CI / test (push) Failing after 17s
Some checks failed
CI / test (push) Failing after 17s
backend: - add required user name and optional bio fields - extend auth/register and user schemas/services with name/bio - add alembic migration 0006 with safe backfill name=username - compute per-user chat display_title for private chats - keep Saved Messages delete-for-all protections web: - registration now includes name - add profile edit modal (name/username/bio/avatar url) - show private chat names via display_title - fix context menus to open near cursor with viewport clamping - stabilize +/close floating button to remove visual jump
This commit is contained in:
@@ -36,11 +36,17 @@ async def update_user_profile(
|
||||
db: AsyncSession,
|
||||
user: User,
|
||||
*,
|
||||
name: str | None = None,
|
||||
username: str | None = None,
|
||||
bio: str | None = None,
|
||||
avatar_url: str | None = None,
|
||||
) -> User:
|
||||
if name is not None:
|
||||
user.name = name
|
||||
if username is not None:
|
||||
user.username = username
|
||||
if bio is not None:
|
||||
user.bio = bio
|
||||
if avatar_url is not None:
|
||||
user.avatar_url = avatar_url
|
||||
await db.commit()
|
||||
|
||||
Reference in New Issue
Block a user