Add noai config
This commit is contained in:
parent
2317e7ddac
commit
424dc584a9
9 changed files with 24 additions and 4 deletions
|
@ -71,6 +71,10 @@ module HasUserSettings
|
|||
settings['noindex']
|
||||
end
|
||||
|
||||
def setting_noai
|
||||
settings['noai']
|
||||
end
|
||||
|
||||
def setting_theme
|
||||
settings['theme']
|
||||
end
|
||||
|
|
|
@ -11,6 +11,7 @@ class UserSettings
|
|||
setting :aggregate_reblogs, default: true
|
||||
setting :theme, default: -> { ::Setting.theme }
|
||||
setting :noindex, default: -> { ::Setting.noindex }
|
||||
setting :noai, default: true
|
||||
setting :show_application, default: true
|
||||
setting :default_language, default: nil
|
||||
setting :default_sensitive, default: false
|
||||
|
|
|
@ -15,6 +15,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
attribute :suspended, if: :suspended?
|
||||
attribute :silenced, key: :limited, if: :silenced?
|
||||
attribute :noindex, if: :local?
|
||||
attribute :noai, if: :local?
|
||||
|
||||
attribute :memorial, if: :memorial?
|
||||
|
||||
|
@ -146,6 +147,10 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
object.user_prefers_noindex?
|
||||
end
|
||||
|
||||
def noai
|
||||
object.user&.setting_noai
|
||||
end
|
||||
|
||||
delegate :suspended?, :silenced?, :local?, :memorial?, to: :object
|
||||
|
||||
def moved_and_not_nested?
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
- content_for :header_tags do
|
||||
- if @account.user_prefers_noindex?
|
||||
%meta{ name: 'robots', content: 'noindex, noarchive, noai, noimageai' }/
|
||||
- else
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }/
|
||||
- elsif @account.user&.setting_noai
|
||||
%meta{ name: 'robots', content: 'noai, noimageai' }/
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }/
|
||||
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }
|
||||
%link{ rel: 'alternate', type: 'application/rss+xml', href: @rss_url }/
|
||||
%link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@account) }/
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
- content_for :header_tags do
|
||||
- unless request.path == '/'
|
||||
%meta{ name: 'robots', content: 'noindex, noai, noimageai' }/
|
||||
- else
|
||||
%meta{ name: 'robots', content: 'noai, noimageai' }/
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }
|
||||
|
||||
= render partial: 'shared/og'
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
.fields-group
|
||||
= ff.input :noindex, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_noindex'), hint: I18n.t('simple_form.hints.defaults.setting_noindex')
|
||||
|
||||
.fields-group
|
||||
= ff.input :noai, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_noai'), hint: I18n.t('simple_form.hints.defaults.setting_noai')
|
||||
|
||||
.fields-group
|
||||
= ff.input :aggregate_reblogs, wrapper: :with_label, recommended: true, label: I18n.t('simple_form.labels.defaults.setting_aggregate_reblogs'), hint: I18n.t('simple_form.hints.defaults.setting_aggregate_reblogs')
|
||||
|
||||
|
|
|
@ -4,9 +4,10 @@
|
|||
- content_for :header_tags do
|
||||
- if @account.user_prefers_noindex?
|
||||
%meta{ name: 'robots', content: 'noindex, noarchive, noai, noimageai' }/
|
||||
- else
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }/
|
||||
- elsif @account.user&.setting_noai
|
||||
%meta{ name: 'robots', content: 'noai, noimageai' }/
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }
|
||||
%meta{ name: 'CCBot', content: 'nofollow' }/
|
||||
|
||||
%link{ rel: 'alternate', type: 'application/json+oembed', href: api_oembed_url(url: short_account_status_url(@account, @status), format: 'json') }/
|
||||
%link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@status) }/
|
||||
|
|
|
@ -219,6 +219,7 @@ en:
|
|||
setting_display_media_show_all: Show all
|
||||
setting_expand_spoilers: Always expand posts marked with content warnings
|
||||
setting_hide_network: Hide your social graph
|
||||
setting_noai: Set noai meta tags
|
||||
setting_noindex: Opt-out of search engine indexing
|
||||
setting_public_post_to_unlisted: Convert public post to public unlisted if not using Web app
|
||||
setting_reduce_motion: Reduce motion in animations
|
||||
|
|
|
@ -61,6 +61,7 @@ ja:
|
|||
setting_display_media_show_all: メディアを常に表示する
|
||||
setting_hide_network: フォローとフォロワーの情報がプロフィールページで見られないようにします
|
||||
setting_display_media_expand: Misskeyなどは4個を超えて投稿可能です。その追加分を最大8個まで表示します。kmyblueからアップロードはできません
|
||||
setting_noai: AI学習への利用を禁止するメタタグをプロフィールページに追加します。ただし実効性があるとは限りません
|
||||
setting_noindex: 公開プロフィールおよび各投稿ページに影響します
|
||||
setting_public_post_to_unlisted: 未対応のサードパーティアプリからもローカル公開で投稿できますが、公開投稿はWeb以外できなくなります
|
||||
setting_reject_unlisted_subscription: Misskeyやそのフォーク(Calckeyなど)は、フォローしていないアカウントの「未収載」投稿を **購読・検索** することができます。これはkmyblueの挙動と異なります。そのようなサーバーのうち管理人が指定したものに、指定した公開範囲の投稿を「フォロワーのみ」として配送します。ただし構造上、完璧な対応は困難でたまに未収載として配信されること、ご理解ください
|
||||
|
@ -224,6 +225,7 @@ ja:
|
|||
setting_display_media_show_all: 表示
|
||||
setting_expand_spoilers: 閲覧注意としてマークされた投稿を常に展開する
|
||||
setting_hide_network: 繋がりを隠す
|
||||
setting_noai: 自分のコンテンツのAI学習利用に対して不快感を表明する
|
||||
setting_noindex: 検索エンジンによるインデックスを拒否する
|
||||
setting_public_post_to_unlisted: サードパーティアプリから投稿するとき、公開投稿をローカル公開に変更する
|
||||
setting_reduce_motion: アニメーションの動きを減らす
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue