about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2017-10-25 17:37:48 -0400
committerGitHub <noreply@github.com>2017-10-25 17:37:48 -0400
commita2612d0d3865fbbd6e8a93572f6d4e4044a8d64b (patch)
tree464822f052ca346fc38ad70eb8e3d96dbc363790 /config
parent31814ddda009939d5d2ebe3e0ac061c26387529a (diff)
parente40fe4092dfd927dd4b6605b7b398fcd0984d903 (diff)
Merge pull request #179 from glitch-soc/keyword-mute
Keyword muting
Diffstat (limited to 'config')
-rw-r--r--config/locales/en.yml9
-rw-r--r--config/navigation.rb1
-rw-r--r--config/routes.rb7
3 files changed, 17 insertions, 0 deletions
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 45929e97d..7d46df327 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -373,6 +373,14 @@ en:
       following: Following list
       muting: Muting list
     upload: Upload
+  keyword_mutes:
+    add_keyword: Add keyword
+    edit: Edit
+    edit_keyword: Edit keyword
+    keyword: Keyword
+    match_whole_word: Match whole word
+    remove: Remove
+    remove_all: Remove all
   landing_strip_html: "<strong>%{name}</strong> is a user on %{link_to_root_path}. You can follow them or interact with them if you have an account anywhere in the fediverse."
   landing_strip_signup_html: If you don't, you can <a href="%{sign_up_path}">sign up here</a>.
   media_attachments:
@@ -491,6 +499,7 @@ en:
     export: Data export
     followers: Authorized followers
     import: Import
+    keyword_mutes: Muted keywords
     notifications: Notifications
     preferences: Preferences
     settings: Settings
diff --git a/config/navigation.rb b/config/navigation.rb
index 50bfbd480..9fa029b72 100644
--- a/config/navigation.rb
+++ b/config/navigation.rb
@@ -7,6 +7,7 @@ SimpleNavigation::Configuration.run do |navigation|
     primary.item :settings, safe_join([fa_icon('cog fw'), t('settings.settings')]), settings_profile_url do |settings|
       settings.item :profile, safe_join([fa_icon('user fw'), t('settings.edit_profile')]), settings_profile_url
       settings.item :preferences, safe_join([fa_icon('sliders fw'), t('settings.preferences')]), settings_preferences_url
+      settings.item :keyword_mutes, safe_join([fa_icon('volume-off fw'), t('settings.keyword_mutes')]), settings_keyword_mutes_url
       settings.item :notifications, safe_join([fa_icon('bell fw'), t('settings.notifications')]), settings_notifications_url
       settings.item :password, safe_join([fa_icon('lock fw'), t('auth.change_password')]), edit_user_registration_url, highlights_on: %r{/auth/edit|/settings/delete}
       settings.item :two_factor_authentication, safe_join([fa_icon('mobile fw'), t('settings.two_factor_authentication')]), settings_two_factor_authentication_url, highlights_on: %r{/settings/two_factor_authentication}
diff --git a/config/routes.rb b/config/routes.rb
index 047de73ba..d01489725 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -66,6 +66,13 @@ Rails.application.routes.draw do
 
   namespace :settings do
     resource :profile, only: [:show, :update]
+
+    resources :keyword_mutes do
+      collection do
+        delete :destroy_all
+      end
+    end
+
     resource :preferences, only: [:show, :update]
     resource :notifications, only: [:show, :update]
     resource :import, only: [:show, :create]