Display moderator badge (green), admin badge changed to red (#5728)

rebase/4.0.0rc2
Eugen Rochko 2017-11-17 01:22:38 +01:00 committed by GitHub
parent ad207456d6
commit 2151fd3150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 4 deletions

View File

@ -531,7 +531,19 @@
font-size: 12px;
line-height: 12px;
font-weight: 500;
color: $success-green;
background-color: rgba($success-green, 0.1);
border: 1px solid rgba($success-green, 0.5);
color: $ui-secondary-color;
background-color: rgba($ui-secondary-color, 0.1);
border: 1px solid rgba($ui-secondary-color, 0.5);
&.moderator {
color: $success-green;
background-color: rgba($success-green, 0.1);
border-color: rgba($success-green, 0.5);
}
&.admin {
color: $error-red;
background-color: rgba($error-red, 0.1);
border-color: rgba($error-red, 0.5);
}
}

View File

@ -115,6 +115,8 @@ class Account < ApplicationRecord
:current_sign_in_at,
:confirmed?,
:admin?,
:moderator?,
:staff?,
:locale,
to: :user,
prefix: true,

View File

@ -29,8 +29,12 @@
- if account.user_admin?
.roles
.account-role
.account-role.admin
= t 'accounts.roles.admin'
- elsif account.user_moderator?
.roles
.account-role.moderator
= t 'accounts.roles.moderator'
.bio
.account__header__content.p-note.emojify= Formatter.instance.simplified_format(account)

View File

@ -48,6 +48,7 @@ en:
reserved_username: The username is reserved
roles:
admin: Admin
moderator: Mod
unfollow: Unfollow
admin:
account_moderation_notes: