Add admin/mod/bot indicators

This commit is contained in:
Sol Fisher Romanoff 2022-10-23 21:50:02 +03:00
parent 8d88fd8b8d
commit 673c7df278
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62
2 changed files with 24 additions and 1 deletions

View file

@ -20,6 +20,15 @@
</div>
<div class="bottom-line">
<%= link "@#{@user.nickname}", to: (@user.uri || @user.ap_id), class: "account-name" %>
<%= if @user.is_admin && @user.show_role do %>
<span class="user-role"><%= gettext("Admin") %></span>
<% end %>
<%= if @user.is_moderator && @user.show_role do %>
<span class="user-role"><%= gettext("Moderator") %></span>
<% end %>
<%= if @user.actor_type == "Service" do %>
<span class="user-role"><%= gettext("Bot") %></span>
<% end %>
</div>
</div>
</div>

View file

@ -1,5 +1,7 @@
/* pleroma-light and pleroma-dark themes from pleroma-fe */
:root {
--alertNeutral: rgba(185, 185, 186, 0.5);
--alertNeutralText: rgba(255, 255, 255, 1);
--avatarShadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.7);
--profileBg: rgba(7, 12, 17, 1);
@ -148,7 +150,7 @@ .heading-left {
display: flex;
}
.account-name {
.status-container .account-name {
min-width: 1.6em;
margin-right: 0.4em;
white-space: nowrap;
@ -369,3 +371,15 @@ .user-count h5 {
.profile .status-container {
border-bottom: 1px solid var(--border);
}
.user-role {
color: var(--alertNeutralText);
background-color: var(--alertNeutral);
margin: 0 0.35em;
padding: 0 0.25em;
border-radius: 2px;
}
.bottom-line {
display: flex;
}