Fix admin image manager design
This commit is contained in:
parent
bd839a8abc
commit
f930b9db47
6 changed files with 42 additions and 8 deletions
|
@ -380,3 +380,14 @@
|
||||||
color: $gold-star;
|
color: $gold-star;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.batch-table__row--attention .media-attachments-table {
|
||||||
|
.image {
|
||||||
|
max-width: 80%;
|
||||||
|
max-height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detailed-status__meta {
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -209,7 +209,7 @@ class MediaAttachment < ApplicationRecord
|
||||||
scope :local, -> { where(remote_url: '') }
|
scope :local, -> { where(remote_url: '') }
|
||||||
scope :remote, -> { where.not(remote_url: '') }
|
scope :remote, -> { where.not(remote_url: '') }
|
||||||
scope :cached, -> { remote.where.not(file_file_name: nil) }
|
scope :cached, -> { remote.where.not(file_file_name: nil) }
|
||||||
scope :recently_attachments, -> { attached.order(status_id: 'DESC') }
|
scope :recently_attachments, -> { attached.where(remote_url: '').order(status_id: 'DESC') }
|
||||||
|
|
||||||
default_scope { order(id: :asc) }
|
default_scope { order(id: :asc) }
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,30 @@
|
||||||
.batch-table__row{ class: ['batch-table__row--attention'] }
|
.batch-table__row{ class: ['batch-table__row--attention'] }
|
||||||
.batch-table__row__content.batch-table__row__content--unpadded
|
.batch-table__row__content.batch-table__row__content--unpadded
|
||||||
%table.accounts-table
|
%table.media-attachments-table
|
||||||
%tbody
|
%tbody
|
||||||
%tr
|
%tr
|
||||||
%td
|
%td
|
||||||
%img{ src: media_attachment.url }
|
%img{ src: media_attachment.url, class: 'image' }
|
||||||
%div
|
.detailed-status__meta
|
||||||
= media_attachment.status.uri
|
- if media_attachment.status.application
|
||||||
%div
|
= media_attachment.status.application.name
|
||||||
= media_attachment.status.visibility
|
·
|
||||||
|
= link_to ActivityPub::TagManager.instance.url_for(media_attachment.status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener noreferrer' do
|
||||||
|
%time.formatted{ datetime: media_attachment.status.created_at.iso8601, title: l(media_attachment.status.created_at) }= l(media_attachment.status.created_at)
|
||||||
|
- if media_attachment.status.edited?
|
||||||
|
·
|
||||||
|
= link_to t('statuses.edited_at_html', date: content_tag(:time, l(media_attachment.status.edited_at), datetime: media_attachment.status.edited_at.iso8601, title: l(status.edited_at), class: 'formatted')), admin_account_status_path(status.account_id, status), class: 'detailed-status__datetime'
|
||||||
|
- if media_attachment.status.discarded?
|
||||||
|
·
|
||||||
|
%span.negative-hint= t('admin.statuses.deleted')
|
||||||
|
·
|
||||||
|
- if media_attachment.status.reblog?
|
||||||
|
= fa_icon('retweet fw')
|
||||||
|
= t('statuses.boosted_from_html', acct_link: admin_account_inline_link_to(status.proper.account))
|
||||||
|
- else
|
||||||
|
= fa_visibility_icon(media_attachment.status)
|
||||||
|
= t("statuses.visibilities.#{media_attachment.status.visibility}")
|
||||||
|
- if media_attachment.status.proper.sensitive?
|
||||||
|
·
|
||||||
|
= fa_icon('eye-slash fw')
|
||||||
|
= t('stream_entries.sensitive_content')
|
||||||
|
|
|
@ -547,6 +547,8 @@ en:
|
||||||
title: Create new IP rule
|
title: Create new IP rule
|
||||||
no_ip_block_selected: No IP rules were changed as none were selected
|
no_ip_block_selected: No IP rules were changed as none were selected
|
||||||
title: IP rules
|
title: IP rules
|
||||||
|
media_attachments:
|
||||||
|
title: Media attachments
|
||||||
relationships:
|
relationships:
|
||||||
title: "%{acct}'s relationships"
|
title: "%{acct}'s relationships"
|
||||||
relays:
|
relays:
|
||||||
|
|
|
@ -536,6 +536,8 @@ ja:
|
||||||
title: 新規IPルール
|
title: 新規IPルール
|
||||||
no_ip_block_selected: 何も選択されていないためIPルールを変更しませんでした
|
no_ip_block_selected: 何も選択されていないためIPルールを変更しませんでした
|
||||||
title: IPルール
|
title: IPルール
|
||||||
|
media_attachments:
|
||||||
|
title: 投稿された画像
|
||||||
relationships:
|
relationships:
|
||||||
title: "%{acct} さんのフォロー・フォロワー"
|
title: "%{acct} さんのフォロー・フォロワー"
|
||||||
relays:
|
relays:
|
||||||
|
|
|
@ -42,7 +42,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
||||||
n.item :moderation, safe_join([fa_icon('gavel fw'), t('moderation.title')]), nil, if: -> { current_user.can?(:manage_reports, :view_audit_log, :manage_users, :manage_invites, :manage_taxonomies, :manage_federation, :manage_blocks) } do |s|
|
n.item :moderation, safe_join([fa_icon('gavel fw'), t('moderation.title')]), nil, if: -> { current_user.can?(:manage_reports, :view_audit_log, :manage_users, :manage_invites, :manage_taxonomies, :manage_federation, :manage_blocks) } do |s|
|
||||||
s.item :reports, safe_join([fa_icon('flag fw'), t('admin.reports.title')]), admin_reports_path, highlights_on: %r{/admin/reports}, if: -> { current_user.can?(:manage_reports) }
|
s.item :reports, safe_join([fa_icon('flag fw'), t('admin.reports.title')]), admin_reports_path, highlights_on: %r{/admin/reports}, if: -> { current_user.can?(:manage_reports) }
|
||||||
s.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_path(origin: 'local'), highlights_on: %r{/admin/accounts|/admin/pending_accounts|/admin/disputes|/admin/users}, if: -> { current_user.can?(:manage_users) }
|
s.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_path(origin: 'local'), highlights_on: %r{/admin/accounts|/admin/pending_accounts|/admin/disputes|/admin/users}, if: -> { current_user.can?(:manage_users) }
|
||||||
s.item :media_attachments, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_media_attachments_path, highlights_on: %r{/admin/media_attachments}, if: -> { current_user.can?(:manage_users) }
|
s.item :media_attachments, safe_join([fa_icon('picture-o fw'), t('admin.media_attachments.title')]), admin_media_attachments_path, highlights_on: %r{/admin/media_attachments}, if: -> { current_user.can?(:manage_users) }
|
||||||
s.item :invites, safe_join([fa_icon('user-plus fw'), t('admin.invites.title')]), admin_invites_path, if: -> { current_user.can?(:manage_invites) }
|
s.item :invites, safe_join([fa_icon('user-plus fw'), t('admin.invites.title')]), admin_invites_path, if: -> { current_user.can?(:manage_invites) }
|
||||||
s.item :follow_recommendations, safe_join([fa_icon('user-plus fw'), t('admin.follow_recommendations.title')]), admin_follow_recommendations_path, highlights_on: %r{/admin/follow_recommendations}, if: -> { current_user.can?(:manage_taxonomies) }
|
s.item :follow_recommendations, safe_join([fa_icon('user-plus fw'), t('admin.follow_recommendations.title')]), admin_follow_recommendations_path, highlights_on: %r{/admin/follow_recommendations}, if: -> { current_user.can?(:manage_taxonomies) }
|
||||||
s.item :instances, safe_join([fa_icon('cloud fw'), t('admin.instances.title')]), admin_instances_path(limited: whitelist_mode? ? nil : '1'), highlights_on: %r{/admin/instances|/admin/domain_blocks|/admin/domain_allows}, if: -> { current_user.can?(:manage_federation) }
|
s.item :instances, safe_join([fa_icon('cloud fw'), t('admin.instances.title')]), admin_instances_path(limited: whitelist_mode? ? nil : '1'), highlights_on: %r{/admin/instances|/admin/domain_blocks|/admin/domain_allows}, if: -> { current_user.can?(:manage_federation) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue