From 9249ef976b81fdc4e7e9b312c1aafe28f756bfc3 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Tue, 15 Nov 2022 21:34:45 +0100 Subject: [PATCH] Add social graph field to privacy settings view --- app/controllers/settings/privacy_controller.rb | 3 ++- app/views/settings/privacy/edit.html.haml | 1 + config/locales/activerecord.en.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/settings/privacy_controller.rb b/app/controllers/settings/privacy_controller.rb index 55d553e8..6deea58a 100644 --- a/app/controllers/settings/privacy_controller.rb +++ b/app/controllers/settings/privacy_controller.rb @@ -11,7 +11,8 @@ class Settings::PrivacyController < ApplicationController :privacy_allow_public_timeline, :privacy_allow_stranger_answers, :privacy_show_in_search, - :privacy_require_user) + :privacy_require_user, + :privacy_hide_social_graph) if current_user.update(user_attributes) flash[:success] = t(".success") else diff --git a/app/views/settings/privacy/edit.html.haml b/app/views/settings/privacy/edit.html.haml index a0f25626..f320c928 100644 --- a/app/views/settings/privacy/edit.html.haml +++ b/app/views/settings/privacy/edit.html.haml @@ -6,6 +6,7 @@ = f.check_box :privacy_require_user = f.check_box :privacy_allow_public_timeline = f.check_box :privacy_allow_stranger_answers + = f.check_box :privacy_hide_social_graph = f.primary diff --git a/config/locales/activerecord.en.yml b/config/locales/activerecord.en.yml index 956a3d5e..e0992444 100644 --- a/config/locales/activerecord.en.yml +++ b/config/locales/activerecord.en.yml @@ -72,6 +72,7 @@ en: privacy_require_user: "Require users to be logged in to ask you questions" privacy_allow_public_timeline: "Show your answers in the public timeline" privacy_allow_stranger_answers: "Allow other people to answer your questions" + privacy_hide_social_graph: "Hide your social graph" profile_picture: "Profile picture" profile_header: "Profile header" sign_in_count: "Sign in count"