Move posting defaults to their own preferences sub-category (#35966)

This commit is contained in:
Claire 2025-09-01 10:31:07 +02:00 committed by GitHub
parent f21d9f64db
commit ab698ff521
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 92 additions and 45 deletions

View file

@ -1740,6 +1740,8 @@ en:
self_vote: You cannot vote in your own polls
too_few_options: must have more than one item
too_many_options: can't contain more than %{max} items
posting_defaults:
explanation: These settings will be used as defaults when you create new posts, but you can edit them per post within the composer.
preferences:
other: Other
posting_defaults: Posting defaults

View file

@ -16,6 +16,7 @@ SimpleNavigation::Configuration.run do |navigation|
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
s.item :posting_defaults, safe_join([material_symbol('edit_square'), t('preferences.posting_defaults')]), settings_preferences_posting_defaults_path
s.item :notifications, safe_join([material_symbol('mail'), t('settings.notifications')]), settings_preferences_notifications_path
s.item :other, safe_join([material_symbol('tune'), t('preferences.other')]), settings_preferences_other_path
end

View file

@ -9,6 +9,7 @@ namespace :settings do
namespace :preferences do
resource :appearance, only: [:show, :update], controller: :appearance
resource :posting_defaults, only: [:show, :update], controller: :posting_defaults
resource :notifications, only: [:show, :update]
resource :other, only: [:show, :update], controller: :other
end