Add admin/mod/bot indicators

This commit is contained in:
Sol Fisher Romanoff 2022-10-23 21:50:02 +03:00 committed by Sam Therapy
parent 16ddd5a9c9
commit 6a99c55435
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
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">Admin</span>
<% end %>
<%= if @user.is_moderator && @user.show_role do %>
<span class="user-role">Moderator</span>
<% end %>
<%= if @user.actor_type == "Service" do %>
<span class="user-role">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;
}