Addo domein block extra supports
This commit is contained in:
parent
bb7fa1d060
commit
9ad92e6a09
24 changed files with 331 additions and 35 deletions
|
@ -78,15 +78,15 @@ module Admin
|
|||
end
|
||||
|
||||
def update_params
|
||||
params.require(:domain_block).permit(:severity, :reject_media, :reject_reports, :private_comment, :public_comment, :obfuscate)
|
||||
params.require(:domain_block).permit(:severity, :reject_media, :reject_favourite, :reject_reply, :reject_send_not_public_searchability, :reject_send_unlisted_dissubscribable, :reject_send_public_unlisted, :reject_send_dissubscribable, :reject_send_media, :reject_send_sensitive, :reject_hashtag, :reject_straight_follow, :reject_new_follow, :reject_reports, :private_comment, :public_comment, :obfuscate, :hidden, :hidden_anonymous)
|
||||
end
|
||||
|
||||
def resource_params
|
||||
params.require(:domain_block).permit(:domain, :severity, :reject_media, :reject_reports, :private_comment, :public_comment, :obfuscate)
|
||||
params.require(:domain_block).permit(:domain, :severity, :reject_media, :reject_favourite, :reject_reply, :reject_send_not_public_searchability, :reject_send_unlisted_dissubscribable, :reject_send_public_unlisted, :reject_send_dissubscribable, :reject_send_media, :reject_send_sensitive, :reject_hashtag, :reject_straight_follow, :reject_new_follow, :reject_reports, :private_comment, :public_comment, :obfuscate, :hidden, :hidden_anonymous)
|
||||
end
|
||||
|
||||
def form_domain_block_batch_params
|
||||
params.require(:form_domain_block_batch).permit(domain_blocks_attributes: [:enabled, :domain, :severity, :reject_media, :reject_reports, :private_comment, :public_comment, :obfuscate])
|
||||
params.require(:form_domain_block_batch).permit(domain_blocks_attributes: [:enabled, :domain, :severity, :reject_media, :reject_favourite, :reject_reply, :reject_send_not_public_searchability, :reject_send_unlisted_dissubscribable, :reject_send_public_unlisted, :reject_send_dissubscribable, :reject_send_media, :reject_send_sensitive, :reject_hashtag, :reject_straight_follow, :reject_new_follow, :reject_reports, :private_comment, :public_comment, :obfuscate, :hidden, :hidden_anonymous])
|
||||
end
|
||||
|
||||
def action_from_button
|
||||
|
|
|
@ -69,7 +69,7 @@ class Api::V1::Admin::DomainBlocksController < Api::BaseController
|
|||
end
|
||||
|
||||
def domain_block_params
|
||||
params.permit(:severity, :reject_media, :reject_reports, :private_comment, :public_comment, :obfuscate)
|
||||
params.permit(:severity, :reject_media, :reject_favourite, :reject_reply, :reject_reports, :reject_send_not_public_searchability, :reject_send_unlisted_dissubscribable, :reject_send_public_unlisted, :reject_send_dissubscribable, :reject_send_media, :reject_send_sensitive, :reject_hashtag, :reject_straight_follow, :reject_new_follow, :private_comment, :public_comment, :obfuscate, :hidden, :hidden_anonymous)
|
||||
end
|
||||
|
||||
def insert_pagination_headers
|
||||
|
@ -101,6 +101,6 @@ class Api::V1::Admin::DomainBlocksController < Api::BaseController
|
|||
end
|
||||
|
||||
def resource_params
|
||||
params.permit(:domain, :severity, :reject_media, :reject_reports, :private_comment, :public_comment, :obfuscate)
|
||||
params.permit(:domain, :severity, :reject_media, :reject_favourite, :reject_reply, :reject_send_not_public_searchability, :reject_send_unlisted_dissubscribable, :reject_send_public_unlisted, :reject_send_dissubscribable, :reject_send_media, :reject_send_sensitive, :reject_hashtag, :reject_straight_follow, :reject_new_follow, :reject_reports, :private_comment, :public_comment, :obfuscate, :hidden, :hidden_anonymous)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,5 +19,6 @@ class Api::V1::Instances::DomainBlocksController < Api::BaseController
|
|||
|
||||
def set_domain_blocks
|
||||
@domain_blocks = DomainBlock.with_user_facing_limitations.by_severity
|
||||
@domain_blocks = @domain_blocks.filter { |block| !block.hidden_anonymous } if !user_signed_in?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,6 +17,8 @@ const messages = defineMessages({
|
|||
title: { id: 'column.about', defaultMessage: 'About' },
|
||||
rules: { id: 'about.rules', defaultMessage: 'Server rules' },
|
||||
blocks: { id: 'about.blocks', defaultMessage: 'Moderated servers' },
|
||||
noop: { id: 'about.domain_blocks.noop.title', defaultMessage: 'Soft limited' },
|
||||
noopExplanation: { id: 'about.domain_blocks.noop.explanation', defaultMessage: 'This server is limited partically.' },
|
||||
silenced: { id: 'about.domain_blocks.silenced.title', defaultMessage: 'Limited' },
|
||||
silencedExplanation: { id: 'about.domain_blocks.silenced.explanation', defaultMessage: 'You will generally not see profiles and content from this server, unless you explicitly look it up or opt into it by following.' },
|
||||
suspended: { id: 'about.domain_blocks.suspended.title', defaultMessage: 'Suspended' },
|
||||
|
@ -33,6 +35,11 @@ const severityMessages = {
|
|||
title: messages.suspended,
|
||||
explanation: messages.suspendedExplanation,
|
||||
},
|
||||
|
||||
noop: {
|
||||
title: messages.noop,
|
||||
explanation: messages.noopExplanation,
|
||||
},
|
||||
};
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
|
@ -188,7 +195,7 @@ class About extends React.PureComponent {
|
|||
<div className='about__domain-blocks__domain' key={block.get('domain')}>
|
||||
<div className='about__domain-blocks__domain__header'>
|
||||
<h6><span title={`SHA-256: ${block.get('digest')}`}>{block.get('domain')}</span></h6>
|
||||
<span className='about__domain-blocks__domain__type' title={intl.formatMessage(severityMessages[block.get('severity')].explanation)}>{intl.formatMessage(severityMessages[block.get('severity')].title)}</span>
|
||||
<span className='about__domain-blocks__domain__type' title={intl.formatMessage(severityMessages[block.get('severity')].explanation)}>{intl.formatMessage(severityMessages[block.get('severity_ex') || block.get('severity')].title)}</span>
|
||||
</div>
|
||||
|
||||
<p>{(block.get('comment') || '').length > 0 ? block.get('comment') : <FormattedMessage id='about.domain_blocks.no_reason_available' defaultMessage='Reason not available' />}</p>
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
"about.disclaimer": "Mastodon is free, open-source software, and a trademark of Mastodon gGmbH.",
|
||||
"about.domain_blocks.no_reason_available": "Reason not available",
|
||||
"about.domain_blocks.preamble": "Mastodon generally allows you to view content from and interact with users from any other server in the fediverse. These are the exceptions that have been made on this particular server.",
|
||||
"about.domain_blocks.noop.title": "Soft limited",
|
||||
"about.domain_blocks.noop.explanation": "This server is limited partically.",
|
||||
"about.domain_blocks.silenced.explanation": "You will generally not see profiles and content from this server, unless you explicitly look it up or opt into it by following.",
|
||||
"about.domain_blocks.silenced.title": "Limited",
|
||||
"about.domain_blocks.suspended.explanation": "No data from this server will be processed, stored or exchanged, making any interaction or communication with users from this server impossible.",
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
"about.domain_blocks.no_reason_available": "制限理由",
|
||||
"about.domain_blocks.preamble": "Mastodonでは連合先のどのようなサーバーのユーザーとも交流できます。ただし次のサーバーには例外が設定されています。",
|
||||
"about.domain_blocks.silenced.explanation": "このサーバーのプロフィールやコンテンツは、明示的に検索したり、フォローでオプトインしない限り、通常は表示されません。",
|
||||
"about.domain_blocks.noop.title": "一部制限",
|
||||
"about.domain_blocks.noop.explanation": "このサーバーは部分的に制限されています。",
|
||||
"about.domain_blocks.silenced.title": "制限",
|
||||
"about.domain_blocks.suspended.explanation": "これらのサーバーからのデータは処理されず、保存や変換もされません。該当するユーザーとの交流もできません。",
|
||||
"about.domain_blocks.suspended.title": "停止済み",
|
||||
|
|
|
@ -8811,12 +8811,6 @@ noscript {
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
p {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
end
|
||||
|
||||
def process_hashtag(tag)
|
||||
return if tag['name'].blank?
|
||||
return if tag['name'].blank? || ignore_hashtags?
|
||||
|
||||
Tag.find_or_create_by_names(tag['name']) do |hashtag|
|
||||
@tags << hashtag unless @tags.include?(hashtag) || !hashtag.valid?
|
||||
|
@ -392,6 +392,14 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
!replied_to_status.nil? && replied_to_status.account.local?
|
||||
end
|
||||
|
||||
def reject_reply_to_local?
|
||||
@reject_reply_to_local ||= DomainBlock.reject_reply?(@account.domain)
|
||||
end
|
||||
|
||||
def ignore_hashtags?
|
||||
@ignore_hashtags ||= DomainBlock.reject_hashtag?(@account.domain)
|
||||
end
|
||||
|
||||
def related_to_local_activity?
|
||||
fetch? || followed_by_local_accounts? || requested_through_relay? ||
|
||||
responds_to_followed_account? || addresses_local_accounts?
|
||||
|
|
|
@ -15,7 +15,7 @@ class ActivityPub::Activity::Follow < ActivityPub::Activity
|
|||
return
|
||||
end
|
||||
|
||||
if target_account.blocking?(@account) || target_account.domain_blocking?(@account.domain) || target_account.moved? || target_account.instance_actor?
|
||||
if target_account.blocking?(@account) || target_account.domain_blocking?(@account.domain) || target_account.moved? || target_account.instance_actor? || block_new_follow?
|
||||
reject_follow_request!(target_account)
|
||||
return
|
||||
end
|
||||
|
@ -30,7 +30,7 @@ class ActivityPub::Activity::Follow < ActivityPub::Activity
|
|||
|
||||
follow_request = FollowRequest.create!(account: @account, target_account: target_account, uri: @json['id'])
|
||||
|
||||
if target_account.locked? || @account.silenced?
|
||||
if target_account.locked? || @account.silenced? || block_straight_follow?
|
||||
LocalNotificationWorker.perform_async(target_account.id, follow_request.id, 'FollowRequest', 'follow_request')
|
||||
else
|
||||
AuthorizeFollowService.new.call(@account, target_account)
|
||||
|
@ -42,4 +42,12 @@ class ActivityPub::Activity::Follow < ActivityPub::Activity
|
|||
json = Oj.dump(serialize_payload(FollowRequest.new(account: @account, target_account: target_account, uri: @json['id']), ActivityPub::RejectFollowSerializer))
|
||||
ActivityPub::DeliveryWorker.perform_async(json, target_account.id, @account.inbox_url)
|
||||
end
|
||||
|
||||
def block_straight_follow?
|
||||
@block_straight_follow ||= DomainBlock.reject_straight_follow?(@account.domain)
|
||||
end
|
||||
|
||||
def block_new_follow?
|
||||
@block_new_follow ||= DomainBlock.reject_new_follow?(@account.domain)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ class StatusReachFinder
|
|||
if @status.reblog?
|
||||
[]
|
||||
else
|
||||
Account.where(id: reached_account_ids).inboxes
|
||||
Account.where(id: reached_account_ids).where.not(domain: banned_domains).inboxes
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -74,7 +74,7 @@ class StatusReachFinder
|
|||
elsif @status.direct_visibility? || @status.limited_visibility?
|
||||
[]
|
||||
else
|
||||
@status.account.followers.inboxes
|
||||
@status.account.followers.where.not(domain: banned_domains).inboxes
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -93,4 +93,16 @@ class StatusReachFinder
|
|||
def unsafe?
|
||||
@options[:unsafe]
|
||||
end
|
||||
|
||||
def banned_domains
|
||||
return @banned_domains if @banned_domains
|
||||
blocks = []
|
||||
blocks << DomainBlock.where(reject_send_not_public_searchability: true).pluck(:domain) if @status.compute_searchability != 'public'
|
||||
blocks << DomainBlock.where(reject_send_unlisted_dissubscribable: true).pluck(:domain) if @status.unlisted_visibility? && @status.account.dissubscribable
|
||||
blocks << DomainBlock.where(reject_send_public_unlisted: true).pluck(:domain) if @status.public_unlisted_visibility?
|
||||
blocks << DomainBlock.where(reject_send_dissubscribable: true).pluck(:domain) if @status.account.dissubscribable
|
||||
blocks << DomainBlock.where(reject_send_media: true).pluck(:domain) if @status.with_media?
|
||||
blocks << DomainBlock.where(reject_send_sensitive: true).pluck(:domain) if (@status.with_media? && @status.sensitive) || @status.spoiler_text
|
||||
return @banned_domains = blocks.uniq
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,13 +26,20 @@ class AccountStatusesFilter
|
|||
scope.merge!(no_reblogs_scope) if exclude_reblogs?
|
||||
scope.merge!(hashtag_scope) if tagged?
|
||||
|
||||
scope.merge!(scope.where(searchability: :public)) if domain_block&.reject_send_not_public_searchability
|
||||
scope.merge!(scope.where.not(visibility: :unlisted)) if domain_block&.reject_send_unlisted_dissubscribable && @account.dissubscribable
|
||||
scope.merge!(scope.where.not(visibility: :public_unlisted)) if domain_block&.reject_send_public_unlisted
|
||||
scope.merge!(scope.where(spoiler_text: ['', nil])) if domain_block&.reject_send_sensitive
|
||||
|
||||
scope
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def initial_scope
|
||||
if suspended?
|
||||
if suspended? || (domain_block&.reject_send_dissubscribable && @account.dissubscribable)
|
||||
Status.none
|
||||
elsif domain_block&.reject_send_media
|
||||
Status.none
|
||||
elsif anonymous?
|
||||
account.statuses.where(visibility: %i(public unlisted public_unlisted))
|
||||
|
@ -131,4 +138,8 @@ class AccountStatusesFilter
|
|||
def truthy_param?(key)
|
||||
ActiveModel::Type::Boolean.new.cast(params[key])
|
||||
end
|
||||
|
||||
def domain_block
|
||||
@domain_block = DomainBlock.find_by(domain: @account&.domain)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,16 +4,29 @@
|
|||
#
|
||||
# Table name: domain_blocks
|
||||
#
|
||||
# id :bigint(8) not null, primary key
|
||||
# domain :string default(""), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# severity :integer default("silence")
|
||||
# reject_media :boolean default(FALSE), not null
|
||||
# reject_reports :boolean default(FALSE), not null
|
||||
# private_comment :text
|
||||
# public_comment :text
|
||||
# obfuscate :boolean default(FALSE), not null
|
||||
# id :bigint(8) not null, primary key
|
||||
# domain :string default(""), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# severity :integer default("silence")
|
||||
# reject_media :boolean default(FALSE), not null
|
||||
# reject_reports :boolean default(FALSE), not null
|
||||
# private_comment :text
|
||||
# public_comment :text
|
||||
# obfuscate :boolean default(FALSE), not null
|
||||
# reject_favourite :boolean default(FALSE), not null
|
||||
# reject_reply :boolean default(FALSE), not null
|
||||
# reject_send_not_public_searchability :boolean default(FALSE), not null
|
||||
# reject_send_unlisted_dissubscribable :boolean default(FALSE), not null
|
||||
# reject_send_public_unlisted :boolean default(FALSE), not null
|
||||
# reject_send_dissubscribable :boolean default(FALSE), not null
|
||||
# reject_send_media :boolean default(FALSE), not null
|
||||
# reject_send_sensitive :boolean default(FALSE), not null
|
||||
# reject_hashtag :boolean default(FALSE), not null
|
||||
# reject_straight_follow :boolean default(FALSE), not null
|
||||
# reject_new_follow :boolean default(FALSE), not null
|
||||
# hidden :boolean default(FALSE), not null
|
||||
# hidden_anonymous :boolean default(FALSE), not null
|
||||
#
|
||||
|
||||
class DomainBlock < ApplicationRecord
|
||||
|
@ -29,8 +42,8 @@ class DomainBlock < ApplicationRecord
|
|||
delegate :count, to: :accounts, prefix: true
|
||||
|
||||
scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) }
|
||||
scope :with_user_facing_limitations, -> { where(severity: [:silence, :suspend]) }
|
||||
scope :with_limitations, -> { where(severity: [:silence, :suspend]).or(where(reject_media: true)) }
|
||||
scope :with_user_facing_limitations, -> { where(hidden: false) }
|
||||
scope :with_limitations, -> { where(severity: [:silence, :suspend]).or(where(reject_media: true)).or(where(reject_favourite: true)).or(where(reject_reply: true)).or(where(reject_new_follow: true)).or(where(reject_straight_follow: true)) }
|
||||
scope :by_severity, -> { order(Arel.sql('(CASE severity WHEN 0 THEN 1 WHEN 1 THEN 2 WHEN 2 THEN 0 END), domain')) }
|
||||
|
||||
def to_log_human_identifier
|
||||
|
@ -41,7 +54,21 @@ class DomainBlock < ApplicationRecord
|
|||
if suspend?
|
||||
[:suspend]
|
||||
else
|
||||
[severity.to_sym, reject_media? ? :reject_media : nil, reject_reports? ? :reject_reports : nil].reject { |policy| policy == :noop || policy.nil? }
|
||||
[severity.to_sym,
|
||||
reject_media? ? :reject_media : nil,
|
||||
reject_favourite? ? :reject_favourite : nil,
|
||||
reject_reply? ? :reject_reply : nil,
|
||||
reject_send_not_public_searchability? ? :reject_send_not_public_searchability : nil,
|
||||
reject_send_unlisted_dissubscribable? ? :reject_send_unlisted_dissubscribable : nil,
|
||||
reject_send_public_unlisted? ? :reject_send_public_unlisted : nil,
|
||||
reject_send_dissubscribable? ? :reject_send_dissubscribable : nil,
|
||||
reject_send_media? ? :reject_send_media : nil,
|
||||
reject_send_sensitive? ? :reject_send_sensitive : nil,
|
||||
reject_hashtag? ? :reject_hashtag : nil,
|
||||
reject_straight_follow? ? :reject_straight_follow : nil,
|
||||
reject_new_follow? ? :reject_new_follow : nil,
|
||||
reject_reports? ? :reject_reports : nil
|
||||
].reject { |policy| policy == :noop || policy.nil? }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -58,6 +85,26 @@ class DomainBlock < ApplicationRecord
|
|||
!!rule_for(domain)&.reject_media?
|
||||
end
|
||||
|
||||
def reject_favourite?(domain)
|
||||
!!rule_for(domain)&.reject_favourite?
|
||||
end
|
||||
|
||||
def reject_reply?(domain)
|
||||
!!rule_for(domain)&.reject_reply?
|
||||
end
|
||||
|
||||
def reject_hashtag?(domain)
|
||||
!!rule_for(domain)&.reject_hashtag?
|
||||
end
|
||||
|
||||
def reject_straight_follow?(domain)
|
||||
!!rule_for(domain)&.reject_straight_follow?
|
||||
end
|
||||
|
||||
def reject_new_follow?(domain)
|
||||
!!rule_for(domain)&.reject_new_follow?
|
||||
end
|
||||
|
||||
def reject_reports?(domain)
|
||||
!!rule_for(domain)&.reject_reports?
|
||||
end
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
|
||||
class REST::Admin::DomainBlockSerializer < ActiveModel::Serializer
|
||||
attributes :id, :domain, :created_at, :severity,
|
||||
:reject_media, :reject_reports,
|
||||
:reject_media, :reject_favourite, :reject_reply, :reject_reports,
|
||||
:reject_send_not_public_searchability, :reject_send_unlisted_dissubscribable,
|
||||
:reject_send_public_unlisted, :reject_send_dissubscribable, :reject_send_media, :reject_send_sensitive,
|
||||
:reject_hashtag, :reject_straight_follow, :reject_new_follow,
|
||||
:private_comment, :public_comment, :obfuscate
|
||||
|
||||
def id
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class REST::DomainBlockSerializer < ActiveModel::Serializer
|
||||
attributes :domain, :digest, :severity, :comment
|
||||
attributes :domain, :digest, :severity, :severity_ex, :comment
|
||||
|
||||
def domain
|
||||
object.public_domain
|
||||
|
@ -11,6 +11,14 @@ class REST::DomainBlockSerializer < ActiveModel::Serializer
|
|||
object.domain_digest
|
||||
end
|
||||
|
||||
def severity
|
||||
object.severity == 'noop' ? 'silence' : object.severity
|
||||
end
|
||||
|
||||
def severity_ex
|
||||
object.severity
|
||||
end
|
||||
|
||||
def comment
|
||||
object.public_comment if instance_options[:with_comment]
|
||||
end
|
||||
|
|
|
@ -21,12 +21,16 @@ class UpdateAccountService < BaseService
|
|||
|
||||
def authorize_all_follow_requests(account)
|
||||
follow_requests = FollowRequest.where(target_account: account)
|
||||
follow_requests = follow_requests.preload(:account).select { |req| !req.account.silenced? }
|
||||
follow_requests = follow_requests.preload(:account).select { |req| !req.account.silenced? && !reject_straight_follow_domains.include?(req.account.domain) }
|
||||
AuthorizeFollowWorker.push_bulk(follow_requests) do |req|
|
||||
[req.account_id, req.target_account_id]
|
||||
end
|
||||
end
|
||||
|
||||
def reject_straight_follow_domains
|
||||
DomainBlock.where(reject_straight_follow: true).pluck(:domain)
|
||||
end
|
||||
|
||||
def check_links(account)
|
||||
VerifyAccountLinksWorker.perform_async(account.id) if account.fields.any?(&:requires_verification?)
|
||||
end
|
||||
|
|
|
@ -17,6 +17,39 @@
|
|||
.fields-group
|
||||
= f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_favourite, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_favourite'), hint: I18n.t('admin.domain_blocks.reject_favourite_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_reply, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reply'), hint: I18n.t('admin.domain_blocks.reject_reply_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_not_public_searchability, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_not_public_searchability'), hint: I18n.t('admin.domain_blocks.reject_send_not_public_searchability_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_unlisted_dissubscribable, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_unlisted_dissubscribable'), hint: I18n.t('admin.domain_blocks.reject_send_unlisted_dissubscribable_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_dissubscribable, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_dissubscribable'), hint: I18n.t('admin.domain_blocks.reject_send_dissubscribable_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_public_unlisted, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_public_unlisted'), hint: I18n.t('admin.domain_blocks.reject_send_public_unlisted_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_media'), hint: I18n.t('admin.domain_blocks.reject_send_media_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_sensitive, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_sensitive'), hint: I18n.t('admin.domain_blocks.reject_send_sensitive_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_hashtag, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_hashtag'), hint: I18n.t('admin.domain_blocks.reject_hashtag_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_straight_follow, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_straight_follow'), hint: I18n.t('admin.domain_blocks.reject_straight_follow_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_new_follow, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_new_follow'), hint: I18n.t('admin.domain_blocks.reject_new_follow_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint')
|
||||
|
||||
|
@ -29,5 +62,11 @@
|
|||
.field-group
|
||||
= f.input :public_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.public_comment'), hint: t('admin.domain_blocks.public_comment_hint'), as: :string
|
||||
|
||||
.fields-group
|
||||
= f.input :hidden, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.hidden'), hint: I18n.t('admin.domain_blocks.hidden_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :hidden_anonymous, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.hidden_anonymous'), hint: I18n.t('admin.domain_blocks.hidden_anonymous_hint')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -17,6 +17,39 @@
|
|||
.fields-group
|
||||
= f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_favourite, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_favourite'), hint: I18n.t('admin.domain_blocks.reject_favourite_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_reply, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reply'), hint: I18n.t('admin.domain_blocks.reject_reply_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_not_public_searchability, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_not_public_searchability'), hint: I18n.t('admin.domain_blocks.reject_send_not_public_searchability_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_unlisted_dissubscribable, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_unlisted_dissubscribable'), hint: I18n.t('admin.domain_blocks.reject_send_unlisted_dissubscribable_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_dissubscribable, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_dissubscribable'), hint: I18n.t('admin.domain_blocks.reject_send_dissubscribable_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_public_unlisted, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_public_unlisted'), hint: I18n.t('admin.domain_blocks.reject_send_public_unlisted_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_media'), hint: I18n.t('admin.domain_blocks.reject_send_media_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_send_sensitive, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_send_sensitive'), hint: I18n.t('admin.domain_blocks.reject_send_sensitive_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_hashtag, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_hashtag'), hint: I18n.t('admin.domain_blocks.reject_hashtag_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_straight_follow, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_straight_follow'), hint: I18n.t('admin.domain_blocks.reject_straight_follow_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_new_follow, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_new_follow'), hint: I18n.t('admin.domain_blocks.reject_new_follow_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint')
|
||||
|
||||
|
@ -29,5 +62,11 @@
|
|||
.field-group
|
||||
= f.input :public_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.public_comment'), hint: t('admin.domain_blocks.public_comment_hint'), as: :string
|
||||
|
||||
.fields-group
|
||||
= f.input :hidden, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.hidden'), hint: I18n.t('admin.domain_blocks.hidden_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :hidden_anonymous, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.hidden_anonymous'), hint: I18n.t('admin.domain_blocks.hidden_anonymous_hint')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('.create'), type: :submit
|
||||
|
|
|
@ -10,6 +10,17 @@
|
|||
= f.hidden_field :domain
|
||||
= f.hidden_field :severity
|
||||
= f.hidden_field :reject_media
|
||||
= f.hidden_field :reject_favourite
|
||||
= f.hidden_field :reject_reply
|
||||
= f.hidden_field :reject_send_not_public_searchability
|
||||
= f.hidden_field :reject_send_unlisted_dissubscribable
|
||||
= f.hidden_field :reject_send_public_unlisted
|
||||
= f.hidden_field :reject_send_dissubscribable
|
||||
= f.hidden_field :reject_send_media
|
||||
= f.hidden_field :reject_send_sensitive
|
||||
= f.hidden_field :reject_hashtag
|
||||
= f.hidden_field :reject_straight_follow
|
||||
= f.hidden_field :reject_new_follow
|
||||
= f.hidden_field :reject_reports
|
||||
= f.hidden_field :obfuscate
|
||||
= f.hidden_field :private_comment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue