-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When Administrator is logged in it should be visual different from normal user #32894
Conversation
Style is not allowed for the change. |
Gitea doesn't use inline-styles. So either add a new CSS class name, or use |
Thanks for the feedback, I normally don't do frontend. But I agree with both of you. Need to figure out what CSS classes are available and what needs to be added. I'm running my dev-env on FreeBSD but could not get the frontend to build with node22, i used prebuild frontend from nightly for the draft. What do you think by putting this behaviour behind a config option, or making it default? Then I also need some backend work to be investigated and implemented. Some people will not going to like this when it is not configurable. But its a matter of taste. |
Before making more changes, I think we need to figure how to make the UI overall look good. To be honest, such color pattern doesn't look to me .... somewhat ugly. Could you share how other softwares do? What's their color palette? And maybe @silverwind could have some ideas. |
I don't think this is needed and just coloring red is far too crude. Admin can see whether they are admin by opening the user menu where "Site Administration" will be present. Only other idea is to overlay a cog icon over the user avatar on top right. |
It doesn't resolve user's problem. The real requirement is to make the "admin UI" more eye-catching to make sure admin users could know they are using an admin account, to avoid making some over-permission operations in unrelated repositories.
It's better to have some more eye-catching UI differences. |
I disagree. It seems over the top and unprofessional to do things like color the navbar. |
It was just a draft after comment from @lunny in the ticket. I would prefer a small bar above the navbar with color and text "Logged in as Site Administrator". After discussing and showing this, the navbar color is also ugly compared to the other UI elements. I'm no UI or frontend expert, but it should feel and look nice. |
The only thing I can accept is a small icon overlay over the avatar. Cog is a common iconology to display admin status: https://www.google.com/search?q=administrator+icon. E.g. like this:
The relevant CSS can be copied from the notification icon's blue dot. |
Okay so there is no general consensus. Then we leave it as-is. |
This is the same as my second idea in the original issue. |
-> Improve navbar: add "admin" tip, add "active" style #32927 |
@wxiaoguang you are an UI expert, this is much better then coloring the navbar. That felt not very natural, but was to discus the idea. Thanks for considering this feature request! Up to v1.24.0 🚀 and beyond the stars. |
This feature enables visual appareance when the logged in user has administrator rights. It colors the toplevel navigation bar red.
See #32885 for discussion