Skip to content

Commit

Permalink
Add: 管理画面での操作履歴フィルタにkmyblue独自項目 (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode authored Mar 5, 2024
1 parent cfb808b commit 8cb4838
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/helpers/admin/action_logs_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def log_target(log)
link_to log.human_identifier, disputes_strike_path(log.target_id)
when 'Announcement'
link_to truncate(log.human_identifier), edit_admin_announcement_path(log.target_id)
when 'IpBlock', 'Instance', 'CustomEmoji'
when 'CustomEmoji'
link_to log.human_identifier, edit_admin_custom_emoji_path(log.target_id)
when 'IpBlock', 'Instance'
log.human_identifier
when 'CanonicalEmailBlock'
content_tag(:samp, (log.human_identifier.presence || '')[0...7], title: log.human_identifier)
Expand Down
4 changes: 4 additions & 0 deletions app/models/admin/action_log_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class Admin::ActionLogFilter
confirm_user: { target_type: 'User', action: 'confirm' }.freeze,
approve_user: { target_type: 'User', action: 'approve' }.freeze,
reject_user: { target_type: 'User', action: 'reject' }.freeze,
approve_remote_account: { target_type: 'Account', action: 'approve_remote' }.freeze,
reject_remote_account: { target_type: 'Account', action: 'reject_remote' }.freeze,
create_account_warning: { target_type: 'AccountWarning', action: 'create' }.freeze,
create_announcement: { target_type: 'Announcement', action: 'create' }.freeze,
create_custom_emoji: { target_type: 'CustomEmoji', action: 'create' }.freeze,
Expand Down Expand Up @@ -60,6 +62,8 @@ class Admin::ActionLogFilter
update_announcement: { target_type: 'Announcement', action: 'update' }.freeze,
update_custom_emoji: { target_type: 'CustomEmoji', action: 'update' }.freeze,
update_status: { target_type: 'Status', action: 'update' }.freeze,
force_cw_status: { target_type: 'Status', action: 'force_cw' }.freeze,
force_sensitive_status: { target_type: 'Status', action: 'force_sensitive' }.freeze,
update_user_role: { target_type: 'UserRole', action: 'update' }.freeze,
update_ip_block: { target_type: 'IpBlock', action: 'update' }.freeze,
unblock_email_account: { target_type: 'Account', action: 'unblock_email' }.freeze,
Expand Down
4 changes: 4 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ en:
action_logs:
action_types:
approve_appeal: Approve Appeal
approve_remote_account: Approve Remote Account
approve_user: Approve User
assigned_to_self_report: Assign Report
change_email_user: Change E-mail for User
Expand Down Expand Up @@ -210,9 +211,12 @@ en:
enable_custom_emoji: Enable Custom Emoji
enable_sign_in_token_auth_user: Enable E-mail Token Authentication for User
enable_user: Enable User
force_cw_status: Add CW to Post
force_sensitive_status: Add Sensitive Flag to Post
memorialize_account: Memorialize Account
promote_user: Promote User
reject_appeal: Reject Appeal
reject_remote_account: Reject Remote Account
reject_user: Reject User
remove_avatar_user: Remove Avatar
reopen_report: Reopen Report
Expand Down
4 changes: 4 additions & 0 deletions config/locales/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ ja:
action_logs:
action_types:
approve_appeal: 抗議を承認
approve_remote_account: リモートアカウントの承認
approve_user: ユーザーの承認
assigned_to_self_report: 通報の担当者に設定
change_email_user: ユーザーのメールアドレスを変更
Expand Down Expand Up @@ -207,9 +208,12 @@ ja:
enable_custom_emoji: カスタム絵文字を有効化
enable_sign_in_token_auth_user: メールトークンのユーザー認証を有効にする
enable_user: ユーザーを有効化
force_cw_status: 投稿に警告文を追加
force_sensitive_status: 投稿を閲覧注意に変更
memorialize_account: 追悼アカウント化
promote_user: ユーザーを昇格
reject_appeal: 抗議を却下
reject_remote_account: リモートアカウントを拒否
reject_user: ユーザーを拒否
remove_avatar_user: アイコンを削除
reopen_report: 未解決に戻す
Expand Down

0 comments on commit 8cb4838

Please sign in to comment.