diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-11-17 21:39:33 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-18 02:19:09 -0600 |
commit | 9d4a4efa7a99ddd1b4a90d90f31d17bfeecc5ac0 (patch) | |
tree | a01c2caf4879186a0f8d6c2b36a55794fc18992e | |
parent | afe4b6b6adfe5f40c6c327b97a941a25c2e93798 (diff) |
Add a new profile option to filter posts with undescribed media. At some point, figure out how to put this under Filters, even if it angers the MVC model gods. No gods, no masters.
-rw-r--r-- | app/controllers/settings/profiles_controller.rb | 2 | ||||
-rw-r--r-- | app/views/settings/profiles/show.html.haml | 5 | ||||
-rw-r--r-- | config/locales/simple_form.en.yml | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/settings/profiles_controller.rb b/app/controllers/settings/profiles_controller.rb index f9008727e..183dcdcfc 100644 --- a/app/controllers/settings/profiles_controller.rb +++ b/app/controllers/settings/profiles_controller.rb @@ -27,7 +27,7 @@ class Settings::ProfilesController < Settings::BaseController private def account_params - params.require(:account).permit(:display_name, :note, :avatar, :header, :replies, :locked, :hidden, :unlisted, :block_anon, :gently, :kobold, :adult_content, :bot, :discoverable, fields_attributes: [:name, :value]) + params.require(:account).permit(:display_name, :note, :avatar, :header, :replies, :locked, :hidden, :unlisted, :block_anon, :gently, :kobold, :adult_content, :bot, :discoverable, :filter_undescribed, fields_attributes: [:name, :value]) end def set_account diff --git a/app/views/settings/profiles/show.html.haml b/app/views/settings/profiles/show.html.haml index 4fabfb9f4..35135267c 100644 --- a/app/views/settings/profiles/show.html.haml +++ b/app/views/settings/profiles/show.html.haml @@ -43,6 +43,11 @@ %hr.spacer/ + .fields-group + = f.input :filter_undescribed, as: :boolean, wrapper: :with_label + + %hr.spacer/ + .fields-row .fields-row__column.fields-group.fields-row__column-6 .input.with_block_label diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 6e738c52e..cb387d6bf 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -187,6 +187,8 @@ en: desc: Filter roars with matching media descriptions no_desc: Filter roars WITHOUT media descriptions override_cw: Override existing content warning + + filter_undescribed: Hide roars without media descriptions boost_interval: 1: 1 minute 2: 2 minutes |