Skip to content

Change admin indicator to icon-only #34586

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@
<span class="only-mobile">{{.SignedUser.Name}}</span>
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
</span>
{{/* do not localize it, here it needs the fixed length (width) to make UI comfortable */}}
{{if .IsAdmin}}<span class="navbar-profile-admin">admin</span>{{end}}
{{if .IsAdmin}}<span class="navbar-profile-admin" title="{{ctx.Locale.Tr "repo.settings.collaboration.admin"}}">{{svg "octicon-server" 11}}</span>{{end}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think it's right. That text is for "repo admin"

But here it is "site admin"

Copy link
Member Author

@silverwind silverwind Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm right, I guess we can just remove the title completely. Unfortunately, there is no suitable existing translation and I would like to backport.

<div class="menu user-menu">
<div class="header">
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
Expand Down
19 changes: 12 additions & 7 deletions web_src/css/modules/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,22 @@
}
}

#navbar .ui.dropdown.active .navbar-profile-admin {
background: var(--color-nav-hover-bg);
border-color: var(--color-nav-hover-bg);
}

#navbar .ui.dropdown .navbar-profile-admin {
display: block;
position: absolute;
font-size: 9px;
font-weight: var(--font-weight-bold);
color: var(--color-nav-bg);
background: var(--color-primary);
padding: 2px 3px;
color: var(--color-text);
background: var(--color-nav-bg);
border: 1px solid var(--color-nav-bg);
padding: 2px;
border-radius: 10px;
top: -1px;
left: 18px;
top: -0.5px;
left: 28px;
line-height: 0;
}

#navbar a.item:hover .notification_count,
Expand Down