diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-10 03:48:11 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:23 -0500 |
commit | 3b06175e8f5cb9d688e8ec376dbfd88abf5f3278 (patch) | |
tree | 160a6f6c97777ca022326bb93701f358fe689c99 /app/helpers | |
parent | 5c59d1837f2d3152342ef45bf7827495183e62dd (diff) |
Moderation: add `force sensitive` and `force unlisted` actions. Accounts: add federatable `adult content` tag. Handle from remote accounts as well.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/admin/action_logs_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/stream_entries_helper.rb | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/helpers/admin/action_logs_helper.rb b/app/helpers/admin/action_logs_helper.rb index e5fbb1500..93ce447a1 100644 --- a/app/helpers/admin/action_logs_helper.rb +++ b/app/helpers/admin/action_logs_helper.rb @@ -19,7 +19,7 @@ module Admin::ActionLogsHelper elsif log.target_type == 'User' && [:change_email].include?(log.action) log.recorded_changes.slice('email', 'unconfirmed_email') elsif log.target_type == 'DomainBlock' - log.recorded_changes.slice('severity', 'reject_media') + log.recorded_changes.slice('severity', 'reject_media', 'force_sensitive') elsif log.target_type == 'Status' && log.action == :update log.recorded_changes.slice('sensitive') end @@ -55,13 +55,13 @@ module Admin::ActionLogsHelper def class_for_log_icon(log) case log.action - when :enable, :unsuspend, :unsilence, :confirm, :promote, :resolve + when :enable, :allow_public, :allow_nonsensitive, :unsuspend, :unsilence, :confirm, :promote, :resolve 'positive' when :create opposite_verbs?(log) ? 'negative' : 'positive' when :update, :reset_password, :disable_2fa, :memorialize, :change_email 'neutral' - when :demote, :silence, :disable, :suspend, :remove_avatar, :remove_header, :reopen + when :demote, :force_sensitive, :force_unlisted, :silence, :disable, :suspend, :remove_avatar, :remove_header, :reopen 'negative' when :destroy opposite_verbs?(log) ? 'positive' : 'negative' diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb index f3848f3be..8757518b4 100644 --- a/app/helpers/stream_entries_helper.rb +++ b/app/helpers/stream_entries_helper.rb @@ -38,6 +38,7 @@ module StreamEntriesHelper content_tag(:div, class: 'roles') do roles = [] roles << content_tag(:div, t('accounts.roles.bot'), class: 'account-role bot') if account.bot? + roles << content_tag(:div, t('accounts.roles.adults_only'), class: 'account-role adults-only') if account.adults_only? roles << content_tag(:div, t('accounts.roles.gentlies_kobolds'), class: 'account-role gentlies') if account&.user&.setting_gently_kobolds roles << content_tag(:div, t('accounts.roles.kobold'), class: 'account-role kobold') if account&.user&.setting_user_is_kobold |