From adb0501c47ca8a6a494251f9f49a6f754843d8e1 Mon Sep 17 00:00:00 2001 From: ChaelCodes Date: Thu, 5 Oct 2023 15:26:13 +0000 Subject: [PATCH] Move "Privacy and reach" from "Public profile" to top-level navigation. --- app/views/settings/privacy/show.html.haml | 3 +-- app/views/settings/shared/_profile_navigation.html.haml | 1 - config/navigation.rb | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/settings/privacy/show.html.haml b/app/views/settings/privacy/show.html.haml index f7241cfb24..553d6e80af 100644 --- a/app/views/settings/privacy/show.html.haml +++ b/app/views/settings/privacy/show.html.haml @@ -2,8 +2,7 @@ = t('privacy.title') - content_for :heading do - %h2= t('settings.profile') - = render partial: 'settings/shared/profile_navigation' + %h2= t('privacy.title') = simple_form_for @account, url: settings_privacy_path do |f| = render 'shared/error_messages', object: @account diff --git a/app/views/settings/shared/_profile_navigation.html.haml b/app/views/settings/shared/_profile_navigation.html.haml index 2f81cb5cfd..9da8af9c2e 100644 --- a/app/views/settings/shared/_profile_navigation.html.haml +++ b/app/views/settings/shared/_profile_navigation.html.haml @@ -2,6 +2,5 @@ = render_navigation renderer: :links do |primary| :ruby primary.item :edit_profile, safe_join([material_symbol('person'), t('settings.edit_profile')]), settings_profile_path - primary.item :privacy_reach, safe_join([material_symbol('lock'), t('privacy.title')]), settings_privacy_path primary.item :verification, safe_join([material_symbol('check'), t('verification.verification')]), settings_verification_path primary.item :featured_tags, safe_join([material_symbol('tag'), t('settings.featured_tags')]), settings_featured_tags_path diff --git a/config/navigation.rb b/config/navigation.rb index bdda569092..50ddefc872 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -12,7 +12,8 @@ SimpleNavigation::Configuration.run do |navigation| if: -> { Rails.configuration.x.mastodon.software_update_url.present? && current_user.can?(:view_devops) && SoftwareUpdate.urgent_pending? }, html: { class: 'warning' } - n.item :profile, safe_join([material_symbol('person'), t('settings.profile')]), settings_profile_path, if: -> { current_user.functional? && !self_destruct }, highlights_on: %r{/settings/profile|/settings/featured_tags|/settings/verification|/settings/privacy} + n.item :profile, safe_join([material_symbol('person'), t('settings.profile')]), settings_profile_path, if: -> { current_user.functional? && !self_destruct }, highlights_on: %r{/settings/profile|/settings/featured_tags|/settings/verification} + n.item :privacy, safe_join([material_symbol('globe'), t('privacy.title')]), settings_privacy_path, if: -> { current_user.functional? && !self_destruct }, highlights_on: %r{/settings/privacy} n.item :preferences, safe_join([material_symbol('settings'), t('settings.preferences')]), settings_preferences_path, if: -> { current_user.functional? && !self_destruct } do |s| s.item :appearance, safe_join([material_symbol('computer'), t('settings.appearance')]), settings_preferences_appearance_path