ユーザー設定の複数の項目を反転 (#639)
This commit is contained in:
parent
fcb97f6125
commit
eee13b3f5f
9 changed files with 45 additions and 25 deletions
|
@ -49,7 +49,7 @@ class FiltersController < ApplicationController
|
|||
end
|
||||
|
||||
def resource_params
|
||||
params.require(:custom_filter).permit(:title, :expires_in, :filter_action, :exclude_follows, :exclude_localusers, :with_quote, context: [], keywords_attributes: [:id, :keyword, :whole_word, :_destroy])
|
||||
params.require(:custom_filter).permit(:title, :expires_in, :filter_action, :exclude_follows, :exclude_localusers, :exclude_quote, context: [], keywords_attributes: [:id, :keyword, :whole_word, :_destroy])
|
||||
end
|
||||
|
||||
def set_body_classes
|
||||
|
|
|
@ -66,6 +66,14 @@ class CustomFilter < ApplicationRecord
|
|||
hide_action?
|
||||
end
|
||||
|
||||
def exclude_quote=(value)
|
||||
self.with_quote = !ActiveModel::Type::Boolean.new.cast(value)
|
||||
end
|
||||
|
||||
def exclude_quote
|
||||
!with_quote
|
||||
end
|
||||
|
||||
def self.cached_filters_for(account_id)
|
||||
active_filters = Rails.cache.fetch("filters:v3:#{account_id}") do
|
||||
filters_hash = {}
|
||||
|
|
|
@ -44,6 +44,9 @@ class UserSettings
|
|||
setting :reject_send_limited_to_suspects, default: false
|
||||
|
||||
setting_inverse_alias :indexable, :noindex
|
||||
setting_inverse_alias :show_statuses_count, :hide_statuses_count
|
||||
setting_inverse_alias :show_following_count, :hide_following_count
|
||||
setting_inverse_alias :show_followers_count, :hide_followers_count
|
||||
|
||||
namespace :web do
|
||||
setting :advanced_layout, default: false
|
||||
|
@ -73,6 +76,11 @@ class UserSettings
|
|||
setting :hide_emoji_reaction_unavailable_server, default: false
|
||||
setting :hide_favourite_menu, default: false
|
||||
setting :hide_emoji_reaction_count, default: false
|
||||
|
||||
setting_inverse_alias :'web.show_blocking_quote', :'web.hide_blocking_quote'
|
||||
setting_inverse_alias :'web.show_emoji_reaction_count', :'web.hide_emoji_reaction_count'
|
||||
setting_inverse_alias :'web.show_favourite_menu', :'web.hide_favourite_menu'
|
||||
setting_inverse_alias :'web.show_recent_emojis', :'web.hide_recent_emojis'
|
||||
end
|
||||
|
||||
namespace :notification_emails do
|
||||
|
|
|
@ -18,4 +18,8 @@ class UserSettings::Namespace
|
|||
@definitions[s.key] = s
|
||||
end
|
||||
end
|
||||
|
||||
def setting_inverse_alias(key, original_key)
|
||||
@definitions[key] = @definitions[original_key].inverse_of(key)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
= f.input :exclude_localusers, wrapper: :with_label, kmyblue: true, label: t('simple_form.labels.filters.options.exclude_localusers')
|
||||
|
||||
.fields-group
|
||||
= f.input :with_quote, wrapper: :with_label, kmyblue: true, label: t('simple_form.labels.filters.options.with_quote')
|
||||
= f.input :exclude_quote, wrapper: :with_label, as: :boolean, kmyblue: true, label: t('simple_form.labels.filters.options.exclude_quote')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
|
|
|
@ -62,25 +62,25 @@
|
|||
%h4= t 'appearance.custom_emoji_and_emoji_reactions'
|
||||
|
||||
.fields-group
|
||||
= ff.input :'web.hide_recent_emojis', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_recent_emojis'), hint: false
|
||||
= ff.input :'web.hide_recent_emojis', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_recent_emojis'), hint: false
|
||||
- if Setting.enable_emoji_reaction
|
||||
= ff.input :'web.enable_emoji_reaction', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_enable_emoji_reaction'), hint: I18n.t('simple_form.hints.defaults.setting_enable_emoji_reaction')
|
||||
= ff.input :'web.show_emoji_reaction_on_timeline', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_emoji_reaction_on_timeline')
|
||||
= ff.input :'web.hide_emoji_reaction_unavailable_server', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_emoji_reaction_unavailable_server')
|
||||
= ff.input :'web.hide_emoji_reaction_count', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_emoji_reaction_count')
|
||||
= ff.input :'web.show_emoji_reaction_count', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_emoji_reaction_count')
|
||||
|
||||
%h4= t 'appearance.saved_posts'
|
||||
|
||||
.fields-group
|
||||
= ff.input :'web.bookmark_category_needed', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_bookmark_category_needed'), hint: I18n.t('simple_form.hints.defaults.setting_bookmark_category_needed')
|
||||
= ff.input :'web.hide_favourite_menu', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_favourite_menu')
|
||||
= ff.input :'web.show_favourite_menu', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_favourite_menu')
|
||||
|
||||
%h4= t 'appearance.quotes'
|
||||
|
||||
.fields-group
|
||||
= ff.input :'web.show_quote_in_home', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_quote_in_home'), hint: false
|
||||
= ff.input :'web.show_quote_in_public', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_quote_in_public'), hint: false
|
||||
= ff.input :'web.hide_blocking_quote', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_blocking_quote'), hint: false
|
||||
= ff.input :'web.show_blocking_quote', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_blocking_quote'), hint: false
|
||||
|
||||
%h4= t 'appearance.timelines'
|
||||
|
||||
|
|
|
@ -58,9 +58,9 @@
|
|||
|
||||
= f.simple_fields_for :settings, current_user.settings do |ff|
|
||||
.fields-group
|
||||
= ff.input :hide_statuses_count, as: :boolean, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_statuses_count'), hint: false
|
||||
= ff.input :hide_following_count, as: :boolean, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_following_count'), hint: false
|
||||
= ff.input :hide_followers_count, as: :boolean, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_followers_count'), hint: false
|
||||
= ff.input :show_statuses_count, as: :boolean, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_statuses_count'), hint: false
|
||||
= ff.input :show_following_count, as: :boolean, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_following_count'), hint: false
|
||||
= ff.input :show_followers_count, as: :boolean, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_followers_count'), hint: false
|
||||
|
||||
.fields-group
|
||||
= ff.input :show_application, wrapper: :with_label
|
||||
|
|
|
@ -268,15 +268,8 @@ en:
|
|||
mutuals_only: Mutuals only
|
||||
outside_only: Followings or followers only
|
||||
setting_expand_spoilers: Always expand posts marked with content warnings
|
||||
setting_hide_blocking_quote: Hide posts which have a quote written by the user you are blocking
|
||||
setting_hide_emoji_reaction_count: Hide emoji reaction count
|
||||
setting_hide_emoji_reaction_unavailable_server: Hide emoji reaction button from unavailable server
|
||||
setting_hide_favourite_menu: Hide favourite menu
|
||||
setting_hide_followers_count: Hide followers count
|
||||
setting_hide_following_count: Hide following count
|
||||
setting_hide_network: Hide your social graph
|
||||
setting_hide_recent_emojis: Hide recent emojis
|
||||
setting_hide_statuses_count: Hide statuses count
|
||||
setting_lock_follow_from_bot: Request approval about bot follow
|
||||
setting_public_post_to_unlisted: Convert public post to public unlisted if not using Web app
|
||||
setting_reduce_motion: Reduce motion in animations
|
||||
|
@ -285,9 +278,16 @@ en:
|
|||
setting_reject_unlisted_subscription: Reject sending unlisted visibility/non-public searchability posts to Misskey, Calckey
|
||||
setting_reverse_search_quote: Perform word-by-word search when search keywords are not enclosed in double quotes
|
||||
setting_show_application: Disclose application used to send posts
|
||||
setting_show_blocking_quote: Show posts which have a quote written by the user you are blocking
|
||||
setting_show_emoji_reaction_count: Show emoji reaction number
|
||||
setting_show_emoji_reaction_on_timeline: Show all emoji reactions on timeline
|
||||
setting_show_favourite_menu: Show favourite menu
|
||||
setting_show_followers_count: Show followers count
|
||||
setting_show_following_count: Show following count
|
||||
setting_show_quote_in_home: Show quotes in home, list or antenna timelines
|
||||
setting_show_quote_in_public: Show quotes in public timelines
|
||||
setting_show_recent_emojis: Show recent emojis
|
||||
setting_show_statuses_count: Show statuses count
|
||||
setting_simple_timeline_menu: Reduce post menu on timeline
|
||||
setting_single_ref_to_quote: Deliver single reference to other server as quote
|
||||
setting_slip_local_emoji_reaction: Allow bypassing emoji reaction from local users
|
||||
|
@ -334,7 +334,7 @@ en:
|
|||
options:
|
||||
exclude_follows: Exclude following users
|
||||
exclude_localusers: Exclude local users
|
||||
with_quote: Also check quote or references
|
||||
exclude_quote: Exclude quote or references
|
||||
form_admin_settings:
|
||||
activity_api_enabled: Publish aggregate statistics about user activity in the API
|
||||
backups_retention_period: User archive retention period
|
||||
|
|
|
@ -278,18 +278,18 @@ ja:
|
|||
setting_emoji_reaction_streaming_notify_impl2: Nyastodon, Catstodon, glitch-soc互換の絵文字リアクション機能を有効にする
|
||||
setting_enable_emoji_reaction: 絵文字リアクション機能を使用する
|
||||
setting_expand_spoilers: 閲覧注意としてマークされた投稿を常に展開する
|
||||
setting_hide_blocking_quote: ブロックしたユーザーの投稿を引用した投稿を隠す
|
||||
setting_hide_emoji_reaction_count: 投稿につけられた各絵文字の数を隠す
|
||||
setting_hide_emoji_reaction_unavailable_server: 絵文字リアクションに対応していないと思われるサーバーの投稿から絵文字リアクション機能を隠す
|
||||
setting_hide_favourite_menu: 右サイドメニューから「お気に入り」を隠す
|
||||
setting_hide_followers_count: フォロワー数を隠す
|
||||
setting_hide_following_count: フォロー数を隠す
|
||||
setting_hide_network: 繋がりを隠す
|
||||
setting_hide_recent_emojis: 絵文字ピッカーで最近使用した絵文字を隠す(絵文字デッキのみを表示する)
|
||||
setting_hide_statuses_count: 投稿数を隠す
|
||||
setting_lock_follow_from_bot: botからのフォローを承認制にする
|
||||
setting_show_blocking_quote: ブロックしたユーザーの投稿を引用した投稿を表示する
|
||||
setting_show_emoji_reaction_count: 投稿につけられた各絵文字の数を表示する
|
||||
setting_show_favourite_menu: 右サイドメニューに「お気に入り」を表示する
|
||||
setting_show_followers_count: フォロワー数を公開する
|
||||
setting_show_following_count: フォロー数を公開する
|
||||
setting_show_quote_in_home: ホーム・リスト・アンテナなどで引用を表示する
|
||||
setting_show_quote_in_public: 公開タイムライン(ローカル・連合)で引用を表示する
|
||||
setting_show_recent_emojis: 絵文字ピッカーで絵文字デッキと一緒に、絵文字の使用履歴も表示する
|
||||
setting_show_statuses_count: 投稿数を公開する
|
||||
setting_stay_privacy: 投稿時に公開範囲を保存する
|
||||
setting_public_post_to_unlisted: サードパーティから公開範囲「公開」で投稿した場合、「ローカル公開」に変更する
|
||||
setting_reduce_motion: アニメーションの動きを減らす
|
||||
|
@ -345,7 +345,7 @@ ja:
|
|||
options:
|
||||
exclude_follows: フォロー中のユーザーをフィルターの対象にしない
|
||||
exclude_localusers: ローカルユーザーをフィルターの対象にしない
|
||||
with_quote: 引用・参照の内容をフィルターの対象に含める
|
||||
exclude_quote: 引用・参照の内容をフィルターの対象にしない
|
||||
form_admin_settings:
|
||||
activity_api_enabled: APIでユーザーアクティビティに関する集計統計を公開する
|
||||
backups_retention_period: ユーザーアーカイブの保持期間
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue