1
0
mirror of https://github.com/whippyshou/mastodon synced 2025-01-22 17:54:07 +09:00
This commit is contained in:
whippyshou 2024-02-06 00:43:23 +09:00
parent 6a86b8e873
commit ba40a3cac5
5 changed files with 7 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

@ -3,6 +3,7 @@
class Admin::StatusFilter class Admin::StatusFilter
KEYS = %i( KEYS = %i(
media media
direct
report_id report_id
).freeze ).freeze
@ -33,6 +34,8 @@ class Admin::StatusFilter
case key.to_s case key.to_s
when 'media' when 'media'
Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id).reorder('statuses.id desc') Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id).reorder('statuses.id desc')
when 'direct'
Status.where(visibility: :direct).group(:id).reorder('statuses.id desc')
else else
raise Mastodon::InvalidParameterError, "Unknown filter: #{key}" raise Mastodon::InvalidParameterError, "Unknown filter: #{key}"
end end

View File

@ -7,8 +7,9 @@
.filter-subset .filter-subset
%strong= t('admin.statuses.media.title') %strong= t('admin.statuses.media.title')
%ul %ul
%li= filter_link_to t('generic.all'), media: nil, id: nil %li= filter_link_to t('generic.all'), media: nil, id: nil, direct: nil
%li= filter_link_to t('admin.statuses.with_media'), media: '1' %li= filter_link_to t('admin.statuses.with_media'), media: '1', direct: nil
%li= filter_link_to t('admin.statuses.with_direct'), media: nil, direct: '1'
.back-link .back-link
- if params[:report_id] - if params[:report_id]
= link_to admin_report_path(params[:report_id].to_i) do = link_to admin_report_path(params[:report_id].to_i) do

View File

@ -805,6 +805,7 @@ ko:
trending: 유행 중 trending: 유행 중
visibility: 공개 설정 visibility: 공개 설정
with_media: 미디어 있음 with_media: 미디어 있음
with_direct: DM 보기
strikes: strikes:
actions: actions:
delete_statuses: "%{name} 님이 %{target} 님의 게시물을 삭제했습니다" delete_statuses: "%{name} 님이 %{target} 님의 게시물을 삭제했습니다"