Move Follow Recommendations to Trends menu, rename to Recommendations & Trends (#31292)

pull/2810/head
Emelia Smith 2024-08-10 11:17:10 +02:00 committed by GitHub
parent 885e67b2ed
commit d3089018d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 5 deletions

View File

@ -290,6 +290,10 @@ code {
flex: 0; flex: 0;
} }
.input.select.select--languages {
min-width: 32ch;
}
.required abbr { .required abbr {
text-decoration: none; text-decoration: none;
color: lighten($error-value-color, 12%); color: lighten($error-value-color, 12%);

View File

@ -12,7 +12,7 @@
.filters .filters
.filter-subset.filter-subset--with-select .filter-subset.filter-subset--with-select
%strong= t('admin.follow_recommendations.language') %strong= t('admin.follow_recommendations.language')
.input.select.optional .input.select.select--languages.optional
= form.select :language, = form.select :language,
options_for_select(Trends.available_locales.map { |key| [standard_locale_name(key), key] }, @language) options_for_select(Trends.available_locales.map { |key| [standard_locale_name(key), key] }, @language)
.filter-subset .filter-subset

View File

@ -12,10 +12,11 @@
.filters .filters
.filter-subset.filter-subset--with-select .filter-subset.filter-subset--with-select
%strong= t('admin.follow_recommendations.language') %strong= t('admin.follow_recommendations.language')
.input.select.optional .input.select.select--languages.optional
= form.select :locale, = form.select :locale,
options_for_select(@locales.map { |key| [standard_locale_name(key), key] }, params[:locale]), options_for_select(@locales.map { |key| [standard_locale_name(key), key] }, params[:locale]),
include_blank: true { include_blank: true },
{ disabled: @locales.empty? }
.filter-subset .filter-subset
%strong= t('admin.trends.trending') %strong= t('admin.trends.trending')
%ul %ul

View File

@ -976,7 +976,7 @@ en:
used_by_over_week: used_by_over_week:
one: Used by one person over the last week one: Used by one person over the last week
other: Used by %{count} people over the last week other: Used by %{count} people over the last week
title: Trends title: Recommendations & Trends
trending: Trending trending: Trending
warning_presets: warning_presets:
add_new: Add new add_new: Add new

View File

@ -42,6 +42,7 @@ SimpleNavigation::Configuration.run do |navigation|
s.item :statuses, safe_join([material_symbol('chat_bubble'), t('admin.trends.statuses.title')]), admin_trends_statuses_path, highlights_on: %r{/admin/trends/statuses} s.item :statuses, safe_join([material_symbol('chat_bubble'), t('admin.trends.statuses.title')]), admin_trends_statuses_path, highlights_on: %r{/admin/trends/statuses}
s.item :tags, safe_join([material_symbol('tag'), t('admin.trends.tags.title')]), admin_trends_tags_path, highlights_on: %r{/admin/trends/tags} s.item :tags, safe_join([material_symbol('tag'), t('admin.trends.tags.title')]), admin_trends_tags_path, highlights_on: %r{/admin/trends/tags}
s.item :links, safe_join([material_symbol('breaking_news'), t('admin.trends.links.title')]), admin_trends_links_path, highlights_on: %r{/admin/trends/links} s.item :links, safe_join([material_symbol('breaking_news'), t('admin.trends.links.title')]), admin_trends_links_path, highlights_on: %r{/admin/trends/links}
s.item :follow_recommendations, safe_join([material_symbol('person_add'), t('admin.follow_recommendations.title')]), admin_follow_recommendations_path, highlights_on: %r{/admin/follow_recommendations}
end end
n.item :moderation, safe_join([material_symbol('gavel'), t('moderation.title')]), nil, if: -> { current_user.can?(:manage_reports, :view_audit_log, :manage_users, :manage_invites, :manage_taxonomies, :manage_federation, :manage_blocks) && !self_destruct } do |s| n.item :moderation, safe_join([material_symbol('gavel'), t('moderation.title')]), nil, if: -> { current_user.can?(:manage_reports, :view_audit_log, :manage_users, :manage_invites, :manage_taxonomies, :manage_federation, :manage_blocks) && !self_destruct } do |s|
@ -49,7 +50,6 @@ SimpleNavigation::Configuration.run do |navigation|
s.item :accounts, safe_join([material_symbol('groups'), t('admin.accounts.title')]), admin_accounts_path(origin: 'local'), highlights_on: %r{/admin/accounts|admin/account_moderation_notes|/admin/pending_accounts|/admin/disputes|/admin/users}, if: -> { current_user.can?(:manage_users) } s.item :accounts, safe_join([material_symbol('groups'), t('admin.accounts.title')]), admin_accounts_path(origin: 'local'), highlights_on: %r{/admin/accounts|admin/account_moderation_notes|/admin/pending_accounts|/admin/disputes|/admin/users}, if: -> { current_user.can?(:manage_users) }
s.item :tags, safe_join([material_symbol('tag'), t('admin.tags.title')]), admin_tags_path, highlights_on: %r{/admin/tags}, if: -> { current_user.can?(:manage_taxonomies) } s.item :tags, safe_join([material_symbol('tag'), t('admin.tags.title')]), admin_tags_path, highlights_on: %r{/admin/tags}, if: -> { current_user.can?(:manage_taxonomies) }
s.item :invites, safe_join([material_symbol('person_add'), t('admin.invites.title')]), admin_invites_path, if: -> { current_user.can?(:manage_invites) } s.item :invites, safe_join([material_symbol('person_add'), t('admin.invites.title')]), admin_invites_path, if: -> { current_user.can?(:manage_invites) }
s.item :follow_recommendations, safe_join([material_symbol('person_add'), t('admin.follow_recommendations.title')]), admin_follow_recommendations_path, highlights_on: %r{/admin/follow_recommendations}, if: -> { current_user.can?(:manage_taxonomies) }
s.item :instances, safe_join([material_symbol('cloud'), t('admin.instances.title')]), admin_instances_path(limited: limited_federation_mode? ? nil : '1'), highlights_on: %r{/admin/instances|/admin/domain_blocks|/admin/domain_allows}, if: -> { current_user.can?(:manage_federation) } s.item :instances, safe_join([material_symbol('cloud'), t('admin.instances.title')]), admin_instances_path(limited: limited_federation_mode? ? nil : '1'), highlights_on: %r{/admin/instances|/admin/domain_blocks|/admin/domain_allows}, if: -> { current_user.can?(:manage_federation) }
s.item :email_domain_blocks, safe_join([material_symbol('mail'), t('admin.email_domain_blocks.title')]), admin_email_domain_blocks_path, highlights_on: %r{/admin/email_domain_blocks}, if: -> { current_user.can?(:manage_blocks) } s.item :email_domain_blocks, safe_join([material_symbol('mail'), t('admin.email_domain_blocks.title')]), admin_email_domain_blocks_path, highlights_on: %r{/admin/email_domain_blocks}, if: -> { current_user.can?(:manage_blocks) }
s.item :ip_blocks, safe_join([material_symbol('hide_source'), t('admin.ip_blocks.title')]), admin_ip_blocks_path, highlights_on: %r{/admin/ip_blocks}, if: -> { current_user.can?(:manage_blocks) } s.item :ip_blocks, safe_join([material_symbol('hide_source'), t('admin.ip_blocks.title')]), admin_ip_blocks_path, highlights_on: %r{/admin/ip_blocks}, if: -> { current_user.can?(:manage_blocks) }