mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-26 15:31:52 +00:00
Add confirmation dialog when clicking remote URLs in moderation action log
This commit is contained in:
parent
88fa8e710a
commit
3912d142b4
|
@ -16,9 +16,13 @@ module Admin::ActionLogsHelper
|
||||||
when 'Report'
|
when 'Report'
|
||||||
link_to "##{log.human_identifier.presence || log.target_id}", admin_report_path(log.target_id)
|
link_to "##{log.human_identifier.presence || log.target_id}", admin_report_path(log.target_id)
|
||||||
when 'DomainBlock', 'DomainAllow', 'EmailDomainBlock', 'UnavailableDomain'
|
when 'DomainBlock', 'DomainAllow', 'EmailDomainBlock', 'UnavailableDomain'
|
||||||
link_to log.human_identifier, "https://#{log.human_identifier.presence}"
|
link_to log.human_identifier, "https://#{log.human_identifier.presence}", data: { confirm: t('admin.action_logs.external_link', url: "https//#{log.human_identifier.presence}") }
|
||||||
when 'Status'
|
when 'Status'
|
||||||
link_to log.human_identifier, log.permalink
|
if log.permalink.blank? || TagManager.instance.local_url?(log.permalink)
|
||||||
|
link_to log.human_identifier, log.permalink
|
||||||
|
else
|
||||||
|
link_to log.human_identifier, log.permalink, data: { confirm: t('admin.action_logs.external_link', url: log.permalink) }
|
||||||
|
end
|
||||||
when 'AccountWarning'
|
when 'AccountWarning'
|
||||||
link_to log.human_identifier, disputes_strike_path(log.target_id)
|
link_to log.human_identifier, disputes_strike_path(log.target_id)
|
||||||
when 'Announcement'
|
when 'Announcement'
|
||||||
|
|
|
@ -289,6 +289,7 @@ en:
|
||||||
update_user_role_html: "%{name} changed %{target} role"
|
update_user_role_html: "%{name} changed %{target} role"
|
||||||
deleted_account: deleted account
|
deleted_account: deleted account
|
||||||
empty: No logs found.
|
empty: No logs found.
|
||||||
|
external_link: You are going to visit the external link %{url}. Proceed?
|
||||||
filter_by_action: Filter by action
|
filter_by_action: Filter by action
|
||||||
filter_by_user: Filter by user
|
filter_by_user: Filter by user
|
||||||
title: Audit log
|
title: Audit log
|
||||||
|
|
Loading…
Reference in New Issue
Block a user