mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[PR #830] [MERGED] Avatar #979
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#979
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/830
Author: @pixelrazor
Created: 2/4/2024
Status: ✅ Merged
Merged: 2/5/2024
Merged by: @pixelrazor
Base:
main← Head:avatar📝 Commits (4)
4897020Create avatar component and reorganize a little bit33c9eb8html fmt241637efmt711ba8eMerge branch 'main' into avatar📊 Changes
6 files changed (+263 additions, -123 deletions)
View changed files
📝
app/src/components/app.rs(+3 -123)➕
app/src/components/avatar.rs(+87 -0)➕
app/src/components/banner.rs(+132 -0)📝
app/src/components/mod.rs(+2 -0)➕
app/src/infra/functional.rs(+38 -0)📝
app/src/infra/mod.rs(+1 -0)📄 Description
Fixes #356
Implementation of an avatar component that displays the avatar (if set) in the banner. If there's an error fetching the avatar, the blank avatar will be red, and the hover text will be the error message (i think this makes it obvious something is wrong and that the end user didn't mess up setting their avatar or something).
The avatar DOES update automatically if users change their avatar in the ui. The situation where the avatar will be stale is if an admin changes it - even then, a reload will fix it. This is a pretty uncommon situation that i don't think is worth the large amounts of added complexity to solve it.
There's a bit of refactoring i did when putting this in. There's two distinct things here - the reorganization of the banner into a new file with multiple components, and the introduction of a custom hook that will allow for functional components that use graphql.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.