[PR #830] [MERGED] Avatar #979

Closed
opened 2026-02-27 09:10:28 +03:00 by kerem · 0 comments
Owner

📋 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: mainHead: avatar


📝 Commits (4)

📊 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.

Screenshot 2024-02-03 11 01 59 PM
Screenshot 2024-02-03 10 59 24 PM


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/lldap/lldap/pull/830 **Author:** [@pixelrazor](https://github.com/pixelrazor) **Created:** 2/4/2024 **Status:** ✅ Merged **Merged:** 2/5/2024 **Merged by:** [@pixelrazor](https://github.com/pixelrazor) **Base:** `main` ← **Head:** `avatar` --- ### 📝 Commits (4) - [`4897020`](https://github.com/lldap/lldap/commit/48970206e1907ad2a95da603dee55c4b3d894732) Create avatar component and reorganize a little bit - [`33c9eb8`](https://github.com/lldap/lldap/commit/33c9eb85b90d0591b5bb88a6f52e6b0f26dde130) html fmt - [`241637e`](https://github.com/lldap/lldap/commit/241637eb6cf337ca46af32e6cce19718cf8aa5ef) fmt - [`711ba8e`](https://github.com/lldap/lldap/commit/711ba8eb4dd02f82b7bd6dec64dc6764d9502134) Merge branch 'main' into avatar ### 📊 Changes **6 files changed** (+263 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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. ![Screenshot 2024-02-03 11 01 59 PM](https://github.com/lldap/lldap/assets/24706952/dcdf69f7-c353-4703-ad36-cf8dffda25f0) ![Screenshot 2024-02-03 10 59 24 PM](https://github.com/lldap/lldap/assets/24706952/cc28a8ae-b3d8-4fe9-b5eb-15d8b880cc4e) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 09:10:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#979
No description provided.