Merge commit '877090518682b6c77ba9bdfa0231afd56daec44d' into glitch-soc/merge-upstream

Conflicts:
- `app/models/concerns/user/has_settings.rb`:
  Not a real conflict, upstream added a setting textually close to a glitch-soc one.
  Added upstream's new setting.
- `app/views/settings/preferences/appearance/show.html.haml`:
  Not a real conflict, upstream added a setting textually close to a glitch-soc one.
  Added upstream's new setting.
- `config/routes.rb`:
  Upstream moved web app routes to `config/routes/web_app.rb`, while glitch-soc had
  an extra route.
  Moved the extra route to `config/routes/web_app.rb`.
- `spec/controllers/settings/preferences/appearance_controller_spec.rb`:
  This spec got converted to a system spec upstream.
  However, the theme setting works differently in glitch-soc, so the spec had been
  changed.
  Changed the corresponding system spec as well.
This commit is contained in:
Claire
2024-12-25 18:01:37 +01:00
759 changed files with 13447 additions and 7221 deletions

View File

@@ -44,7 +44,7 @@
= t("statuses.visibilities.#{status.visibility}")
·
= link_to ActivityPub::TagManager.instance.url_for(status.proper), class: 'detailed-status__link', rel: 'noopener noreferrer' do
= link_to ActivityPub::TagManager.instance.url_for(status.proper), class: 'detailed-status__link', rel: 'noopener' do
= t('admin.statuses.view_publicly')
- if status.proper.sensitive?

View File

@@ -63,7 +63,7 @@
= material_symbol 'link'
= media_attachment.file_file_name
.strike-card__statuses-list__item__meta
= link_to ActivityPub::TagManager.instance.url_for(status), target: '_blank', rel: 'noopener noreferrer' do
= link_to ActivityPub::TagManager.instance.url_for(status), target: '_blank', rel: 'noopener' do
%time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
- unless status.application.nil?
·

View File

@@ -9,7 +9,7 @@
data: { confirm: t('admin.reports.are_you_sure') },
name: :report,
type: :submit
= link_to t('admin.statuses.open'), ActivityPub::TagManager.instance.url_for(@status), class: 'button', target: '_blank', rel: 'noopener noreferrer'
= link_to t('admin.statuses.open'), ActivityPub::TagManager.instance.url_for(@status), class: 'button', target: '_blank', rel: 'noopener'
%h3= t('admin.statuses.metadata')

View File

@@ -29,7 +29,8 @@
%hr.spacer/
.batch-table
.batch-table.batch-table--no-toolbar
.batch-table__toolbar
.batch-table__body
- if @tags.empty?
= nothing_here 'nothing-here--under-tabs nothing-here--no-toolbar'

View File

@@ -6,7 +6,7 @@
.time-period
= date_range(@time_period)
= link_to t('admin.tags.open'), tag_url(@tag), class: 'button', target: '_blank', rel: 'noopener noreferrer'
= link_to t('admin.tags.open'), tag_url(@tag), class: 'button', target: '_blank', rel: 'noopener'
- if current_user.can?(:view_dashboard)
.dashboard
@@ -17,7 +17,7 @@
label: t('admin.trends.tags.dashboard.tag_accounts_measure'),
measure: 'tag_accounts',
params: { id: @tag.id },
rel: 'noopener noreferrer',
rel: 'noopener',
start_at: @time_period.first,
target: '_blank'
.dashboard__item

View File

@@ -0,0 +1,6 @@
.content__heading__tabs
= render_navigation renderer: :links do |primary|
:ruby
primary.item :current, safe_join([material_symbol('description'), t('admin.terms_of_service.current')]), admin_terms_of_service_index_path
primary.item :draft, safe_join([material_symbol('description'), t('admin.terms_of_service.draft')]), admin_terms_of_service_draft_path
primary.item :previous, safe_join([material_symbol('history'), t('admin.terms_of_service.history')]), admin_terms_of_service_history_path

View File

@@ -0,0 +1,19 @@
- content_for :page_title do
= t('admin.terms_of_service.title')
- content_for :heading do
%h2= t('admin.terms_of_service.title')
= render partial: 'admin/terms_of_service/links'
= simple_form_for @terms_of_service, url: admin_terms_of_service_draft_path, method: :put do |form|
= render 'shared/error_messages', object: @terms_of_service
.fields-group
= form.input :text, wrapper: :with_block_label, input_html: { rows: 8 }
.fields-group
= form.input :changelog, wrapper: :with_block_label, input_html: { rows: 8 }
.actions
= form.button :button, t('admin.terms_of_service.save_draft'), type: :submit, name: :action_type, value: :save_draft, class: 'button button-secondary'
= form.button :button, t('admin.terms_of_service.publish'), type: :submit, name: :action_type, value: :publish

View File

@@ -0,0 +1,41 @@
- content_for :page_title do
= t('admin.terms_of_service.generates.title')
- content_for :heading_actions do
.back-link
= link_to admin_terms_of_service_index_path do
= material_symbol 'chevron_left'
= t('admin.terms_of_service.back')
%p.lead= t('admin.terms_of_service.generates.explanation_html')
%p.lead= t('admin.terms_of_service.generates.chance_to_review_html')
%hr.spacer/
= simple_form_for @generator, url: admin_terms_of_service_generate_path, method: :post do |form|
= render 'shared/error_messages', object: @generator
.fields-group
= form.input :domain, wrapper: :with_label
.fields-group
= form.input :jurisdiction, wrapper: :with_label
.fields-group
= form.input :admin_email, wrapper: :with_label
.fields-group
= form.input :dmca_email, wrapper: :with_label
.fields-group
= form.input :dmca_address, wrapper: :with_label
.fields-group
= form.input :arbitration_address, wrapper: :with_label
.fields-group
= form.input :arbitration_website, wrapper: :with_label
.actions
= form.button :button, t('admin.terms_of_service.generates.action'), type: :submit

View File

@@ -0,0 +1,16 @@
- content_for :page_title do
= t('admin.terms_of_service.history')
- content_for :heading do
%h2= t('admin.terms_of_service.title')
= render partial: 'admin/terms_of_service/links'
- if @terms_of_service.empty?
%p= t('admin.terms_of_service.no_history')
- else
%ol.admin__terms-of-service__history
- @terms_of_service.each do |terms_of_service|
%li
.admin__terms-of-service__history__item
%h5= l(terms_of_service.published_at)
.prose= markdown(terms_of_service.changelog)

View File

@@ -0,0 +1,39 @@
- content_for :page_title do
= t('admin.terms_of_service.title')
- content_for :heading do
%h2= t('admin.terms_of_service.title')
= render partial: 'links'
- if @terms_of_service.present?
.admin__terms-of-service__container
.admin__terms-of-service__container__header
.dot-indicator.success
.dot-indicator__indicator
%span= t('admin.terms_of_service.live')
·
%span
= t('admin.terms_of_service.published_on_html', date: tag.time(l(@terms_of_service.published_at.to_date), class: 'formatted', date: @terms_of_service.published_at.to_date.iso8601))
·
- if @terms_of_service.notification_sent?
%span
= t('admin.terms_of_service.notified_on_html', date: tag.time(l(@terms_of_service.notification_sent_at.to_date), class: 'formatted', date: @terms_of_service.notification_sent_at.to_date.iso8601))
- else
= link_to t('admin.terms_of_service.notify_users'), admin_terms_of_service_preview_path(@terms_of_service), class: 'link-button'
.admin__terms-of-service__container__body
.prose
= markdown(@terms_of_service.text)
%hr.spacer/
%h3= t('admin.terms_of_service.changelog')
.prose
= markdown(@terms_of_service.changelog)
- else
%p.lead= t('admin.terms_of_service.no_terms_of_service_html')
.content__heading__actions
= link_to t('admin.terms_of_service.create'), admin_terms_of_service_draft_path, class: 'button'
= link_to t('admin.terms_of_service.generate'), admin_terms_of_service_generate_path, class: 'button button-secondary'

View File

@@ -0,0 +1,20 @@
- content_for :page_title do
= t('admin.terms_of_service.preview.title')
- content_for :heading_actions do
.back-link
= link_to admin_terms_of_service_index_path do
= material_symbol 'chevron_left'
= t('admin.terms_of_service.back')
%p.lead
= t('admin.terms_of_service.preview.explanation_html', count: @user_count, display_count: number_with_delimiter(@user_count), date: l(@terms_of_service.published_at.to_date))
.prose
= markdown(@terms_of_service.changelog)
%hr.spacer/
.content__heading__actions
= link_to t('admin.terms_of_service.preview.send_preview', email: current_user.email), admin_terms_of_service_test_path(@terms_of_service), method: :post, class: 'button button-secondary'
= link_to t('admin.terms_of_service.preview.send_to_all', count: @user_count, display_count: number_with_delimiter(@user_count)), admin_terms_of_service_distribution_path(@terms_of_service), method: :post, class: 'button', data: { confirm: t('admin.reports.are_you_sure') }

View File

@@ -6,7 +6,7 @@
.one-liner
= admin_account_link_to status.account
= link_to ActivityPub::TagManager.instance.url_for(status), target: '_blank', class: 'emojify', rel: 'noopener noreferrer' do
= link_to ActivityPub::TagManager.instance.url_for(status), target: '_blank', class: 'emojify', rel: 'noopener' do
= one_line_preview(status)
- status.ordered_media_attachments.each do |media_attachment|

View File

@@ -8,12 +8,12 @@
%br/
= link_to tag_path(tag), target: '_blank', rel: 'noopener noreferrer' do
= link_to tag_path(tag), target: '_blank', rel: 'noopener' do
= t('admin.trends.tags.used_by_over_week', count: tag.history.reduce(0) { |sum, day| sum + day.accounts })
- if tag.trendable? && (rank = Trends.tags.rank(tag.id))
- if tag.trendable?
·
%abbr{ title: t('admin.trends.tags.current_score', score: Trends.tags.score(tag.id)) }= t('admin.trends.tags.trending_rank', rank: rank + 1)
%abbr{ title: t('admin.trends.tags.current_score', score: tag.trend.score) }= t('admin.trends.tags.trending_rank', rank: tag.trend.rank + 1)
- if tag.decaying?
·