Merge commit '3f6887557b23d363e7f8f18518db4447739d64bb' into glitch-soc/merge-upstream

Conflicts:
- `app/javascript/entrypoints/common.js`:
  Upstream moved everything from `app/javascript/packs` to
  `app/javascript/entrypoints` while this file was a glitch-soc
  addition. Moved it like the rest.
- `tsconfig.json`:
  Conflict due to glitch-soc's flavor.
  Updated like upstream.

Also moved and updated the following files accordingly:
- `app/javascript/flavours/vanilla/theme.yml`
- `app/javascript/flavours/glitch/theme.yml`
- everything in `app/javascript/flavours/glitch/packs`
shrike
Claire 2024-05-04 14:59:00 +02:00
commit bceb45adda
60 changed files with 92 additions and 74 deletions

View File

@ -113,6 +113,14 @@ module ApplicationHelper
content_tag(:i, nil, attributes.merge(class: class_names.join(' '))) content_tag(:i, nil, attributes.merge(class: class_names.join(' ')))
end end
def material_symbol(icon, attributes = {})
inline_svg_tag(
"400-24px/#{icon}.svg",
class: %w(icon).concat(attributes[:class].to_s.split),
role: :img
)
end
def check_icon def check_icon
inline_svg_tag 'check.svg' inline_svg_tag 'check.svg'
end end

View File

@ -1,4 +1,4 @@
import 'packs/public-path'; import '@/entrypoints/public-path';
import { createRoot } from 'react-dom/client'; import { createRoot } from 'react-dom/client';
import Rails from '@rails/ujs'; import Rails from '@rails/ujs';

View File

@ -1,4 +1,4 @@
import 'packs/public-path'; import '@/entrypoints/public-path';
import { start } from 'flavours/glitch/common'; import { start } from 'flavours/glitch/common';
import { loadLocale } from 'flavours/glitch/locales'; import { loadLocale } from 'flavours/glitch/locales';

View File

@ -1,7 +1,7 @@
/* This file is a hack to have something more reliable than the upstream `common` tag /* This file is a hack to have something more reliable than the upstream `common` tag
that is implicitly generated as the common chunk through webpack's `splitChunks` config */ that is implicitly generated as the common chunk through webpack's `splitChunks` config */
import 'packs/public-path'; import '@/entrypoints/public-path';
import 'font-awesome/css/font-awesome.css'; import 'font-awesome/css/font-awesome.css';
// This is a hack to ensures that webpack compiles our images. // This is a hack to ensures that webpack compiles our images.

View File

@ -1,4 +1,4 @@
import 'packs/public-path'; import '@/entrypoints/public-path';
import ready from 'flavours/glitch/ready'; import ready from 'flavours/glitch/ready';
ready(() => { ready(() => {

View File

@ -1,6 +1,6 @@
import { createRoot } from 'react-dom/client'; import { createRoot } from 'react-dom/client';
import 'packs/public-path'; import '@/entrypoints/public-path';
import { IntlMessageFormat } from 'intl-messageformat'; import { IntlMessageFormat } from 'intl-messageformat';
import type { MessageDescriptor, PrimitiveType } from 'react-intl'; import type { MessageDescriptor, PrimitiveType } from 'react-intl';

View File

@ -8,7 +8,7 @@ and performs no other task.
*/ */
import 'packs/public-path'; import '@/entrypoints/public-path';
import axios from 'axios'; import axios from 'axios';

View File

@ -1,4 +1,4 @@
import 'packs/public-path'; import '@/entrypoints/public-path';
import { createRoot } from 'react-dom/client'; import { createRoot } from 'react-dom/client';
import { start } from 'flavours/glitch/common'; import { start } from 'flavours/glitch/common';

View File

@ -1,4 +1,4 @@
import 'packs/public-path'; import '@/entrypoints/public-path';
import axios from 'axios'; import axios from 'axios';
import ready from 'flavours/glitch/ready'; import ready from 'flavours/glitch/ready';

View File

@ -1,5 +1,5 @@
# (REQUIRED) The directory which contains the entry point files. # (REQUIRED) The directory which contains the entry point files.
pack_directory: app/javascript/flavours/glitch/packs pack_directory: app/javascript/flavours/glitch/entrypoints
# (OPTIONAL) Define files to be preloaded when a logged-in user is # (OPTIONAL) Define files to be preloaded when a logged-in user is
# visiting the main web app. # visiting the main web app.

View File

@ -1,5 +1,5 @@
# (REQUIRED) The directory which contains the pack files. # (REQUIRED) The directory which contains the pack files.
pack_directory: app/javascript/packs pack_directory: app/javascript/entrypoints
# (OPTIONAL) Define files to be preloaded when a logged-in user is # (OPTIONAL) Define files to be preloaded when a logged-in user is
# visiting the main web app. # visiting the main web app.

View File

@ -10,6 +10,13 @@ $content-width: 840px;
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
.icon {
width: 16px;
height: 16px;
vertical-align: middle;
margin: 0 2px;
}
.sidebar-wrapper { .sidebar-wrapper {
min-height: 100vh; min-height: 100vh;
overflow: hidden; overflow: hidden;

View File

@ -2,7 +2,7 @@
.log-entry__header .log-entry__header
.log-entry__avatar .log-entry__avatar
.indicator-icon{ class: account_warning.overruled? ? 'success' : 'failure' } .indicator-icon{ class: account_warning.overruled? ? 'success' : 'failure' }
= fa_icon 'warning' = material_symbol 'warning'
.log-entry__content .log-entry__content
.log-entry__title .log-entry__title
= t(account_warning.action, = t(account_warning.action,

View File

@ -2,14 +2,14 @@
%th= t('admin.accounts.inbox_url') %th= t('admin.accounts.inbox_url')
%td %td
= account.inbox_url = account.inbox_url
= fa_icon DeliveryFailureTracker.available?(account.inbox_url) ? 'check' : 'times' = material_symbol DeliveryFailureTracker.available?(account.inbox_url) ? 'check' : 'close'
%td %td
= table_link_to 'search', domain_block.present? ? t('admin.domain_blocks.view') : t('admin.accounts.view_domain'), admin_instance_path(account.domain) = table_link_to 'search', domain_block.present? ? t('admin.domain_blocks.view') : t('admin.accounts.view_domain'), admin_instance_path(account.domain)
%tr %tr
%th= t('admin.accounts.shared_inbox_url') %th= t('admin.accounts.shared_inbox_url')
%td %td
= account.shared_inbox_url = account.shared_inbox_url
= fa_icon DeliveryFailureTracker.available?(account.shared_inbox_url) ? 'check' : 'times' = material_symbol DeliveryFailureTracker.available?(account.shared_inbox_url) ? 'check' : 'close'
%td %td
- if domain_block.nil? - if domain_block.nil?
= table_link_to 'ban', t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: account.domain) = table_link_to 'ban', t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: account.domain)

View File

@ -53,19 +53,19 @@
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
- if @accounts.any?(&:user_pending?) - if @accounts.any?(&:user_pending?)
= f.button safe_join([fa_icon('check'), t('admin.accounts.approve')]), = f.button safe_join([material_symbol('check'), t('admin.accounts.approve')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :approve, name: :approve,
type: :submit type: :submit
= f.button safe_join([fa_icon('times'), t('admin.accounts.reject')]), = f.button safe_join([material_symbol('close'), t('admin.accounts.reject')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :reject, name: :reject,
type: :submit type: :submit
= f.button safe_join([fa_icon('lock'), t('admin.accounts.perform_full_suspension')]), = f.button safe_join([material_symbol('lock'), t('admin.accounts.perform_full_suspension')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :suspend, name: :suspend,

View File

@ -20,7 +20,7 @@
%dd{ title: field.value, class: custom_field_classes(field) } %dd{ title: field.value, class: custom_field_classes(field) }
- if field.verified? - if field.verified?
%span.verified__mark{ title: t('accounts.link_verified_on', date: l(field.verified_at)) } %span.verified__mark{ title: t('accounts.link_verified_on', date: l(field.verified_at)) }
= fa_icon 'check' = material_symbol 'check'
= prerender_custom_emojis(account_field_value_format(field, with_rel_me: false), account.emojis) = prerender_custom_emojis(account_field_value_format(field, with_rel_me: false), account.emojis)
- if account.note.present? - if account.note.present?

View File

@ -48,19 +48,19 @@
- if params[:local] == '1' - if params[:local] == '1'
= f.button safe_join([fa_icon('save'), t('generic.save_changes')]), name: :update, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } = f.button safe_join([fa_icon('save'), t('generic.save_changes')]), name: :update, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
= f.button safe_join([fa_icon('eye'), t('admin.custom_emojis.list')]), name: :list, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } = f.button safe_join([material_symbol('visibility'), t('admin.custom_emojis.list')]), name: :list, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
= f.button safe_join([fa_icon('eye-slash'), t('admin.custom_emojis.unlist')]), name: :unlist, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } = f.button safe_join([material_symbol('visibility_off'), t('admin.custom_emojis.unlist')]), name: :unlist, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
= f.button safe_join([fa_icon('power-off'), t('admin.custom_emojis.enable')]), name: :enable, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } = f.button safe_join([fa_icon('power-off'), t('admin.custom_emojis.enable')]), name: :enable, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
= f.button safe_join([fa_icon('power-off'), t('admin.custom_emojis.disable')]), name: :disable, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } = f.button safe_join([fa_icon('power-off'), t('admin.custom_emojis.disable')]), name: :disable, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
- if can?(:destroy, :custom_emoji) - if can?(:destroy, :custom_emoji)
= f.button safe_join([fa_icon('times'), t('admin.custom_emojis.delete')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } = f.button safe_join([material_symbol('close'), t('admin.custom_emojis.delete')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
- if can?(:copy, :custom_emoji) && params[:local] != '1' - if can?(:copy, :custom_emoji) && params[:local] != '1'
= f.button safe_join([fa_icon('copy'), t('admin.custom_emojis.copy')]), name: :copy, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } = f.button safe_join([material_symbol('content_copy'), t('admin.custom_emojis.copy')]), name: :copy, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
- if params[:local] == '1' - if params[:local] == '1'
.batch-table__form.simple_form .batch-table__form.simple_form

View File

@ -57,19 +57,19 @@
.dashboard__item .dashboard__item
= link_to admin_reports_path, class: 'dashboard__quick-access' do = link_to admin_reports_path, class: 'dashboard__quick-access' do
%span= t('admin.dashboard.pending_reports_html', count: @pending_reports_count) %span= t('admin.dashboard.pending_reports_html', count: @pending_reports_count)
= fa_icon 'chevron-right fw' = material_symbol 'chevron_right'
= link_to admin_accounts_path(status: 'pending'), class: 'dashboard__quick-access' do = link_to admin_accounts_path(status: 'pending'), class: 'dashboard__quick-access' do
%span= t('admin.dashboard.pending_users_html', count: @pending_users_count) %span= t('admin.dashboard.pending_users_html', count: @pending_users_count)
= fa_icon 'chevron-right fw' = material_symbol 'chevron_right'
= link_to admin_trends_tags_path(status: 'pending_review'), class: 'dashboard__quick-access' do = link_to admin_trends_tags_path(status: 'pending_review'), class: 'dashboard__quick-access' do
%span= t('admin.dashboard.pending_tags_html', count: @pending_tags_count) %span= t('admin.dashboard.pending_tags_html', count: @pending_tags_count)
= fa_icon 'chevron-right fw' = material_symbol 'chevron_right'
= link_to admin_disputes_appeals_path(status: 'pending'), class: 'dashboard__quick-access' do = link_to admin_disputes_appeals_path(status: 'pending'), class: 'dashboard__quick-access' do
%span= t('admin.dashboard.pending_appeals_html', count: @pending_appeals_count) %span= t('admin.dashboard.pending_appeals_html', count: @pending_appeals_count)
= fa_icon 'chevron-right fw' = material_symbol 'chevron_right'
.dashboard__item .dashboard__item
= react_admin_component :dimension, = react_admin_component :dimension,
dimension: 'sources', dimension: 'sources',

View File

@ -12,7 +12,7 @@
%label.batch-table__toolbar__select.batch-checkbox-all %label.batch-table__toolbar__select.batch-checkbox-all
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
= f.button safe_join([fa_icon('times'), t('admin.email_domain_blocks.delete')]), = f.button safe_join([material_symbol('close'), t('admin.email_domain_blocks.delete')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :delete, name: :delete,

View File

@ -23,5 +23,5 @@
= f.object.public_comment = f.object.public_comment
- if existing_relationships - if existing_relationships
· ·
= fa_icon 'warning fw' = material_symbol 'warning'
= t('admin.export_domain_blocks.import.existing_relationships_warning') = t('admin.export_domain_blocks.import.existing_relationships_warning')

View File

@ -12,7 +12,7 @@
%label.batch-table__toolbar__select.batch-checkbox-all %label.batch-table__toolbar__select.batch-checkbox-all
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
= f.button safe_join([fa_icon('copy'), t('admin.domain_blocks.import')]), = f.button safe_join([material_symbol('content_copy'), t('admin.domain_blocks.import')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :save, name: :save,

View File

@ -31,13 +31,13 @@
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
- if params[:status].blank? && can?(:suppress, :follow_recommendation) - if params[:status].blank? && can?(:suppress, :follow_recommendation)
= f.button safe_join([fa_icon('times'), t('admin.follow_recommendations.suppress')]), = f.button safe_join([material_symbol('close'), t('admin.follow_recommendations.suppress')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :suppress, name: :suppress,
type: :submit type: :submit
- if params[:status] == 'suppressed' && can?(:unsuppress, :follow_recommendation) - if params[:status] == 'suppressed' && can?(:unsuppress, :follow_recommendation)
= f.button safe_join([fa_icon('plus'), t('admin.follow_recommendations.unsuppress')]), = f.button safe_join([material_symbol('add'), t('admin.follow_recommendations.unsuppress')]),
class: 'table-action-link', class: 'table-action-link',
name: :unsuppress, name: :unsuppress,
type: :submit type: :submit

View File

@ -9,7 +9,7 @@
- if @instance.persisted? - if @instance.persisted?
%p %p
= fa_icon 'info fw' = material_symbol 'info'
= t('admin.instances.totals_time_period_hint_html') = t('admin.instances.totals_time_period_hint_html')
.dashboard .dashboard

View File

@ -12,7 +12,7 @@
- if invite.valid_for_use? - if invite.valid_for_use?
%td %td
= fa_icon 'user fw' = material_symbol 'person'
= invite.uses = invite.uses
= " / #{invite.max_uses}" unless invite.max_uses.nil? = " / #{invite.max_uses}" unless invite.max_uses.nil?
%td %td

View File

@ -14,7 +14,7 @@
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
- if can?(:destroy, :ip_block) - if can?(:destroy, :ip_block)
= f.button safe_join([fa_icon('times'), t('admin.ip_blocks.delete')]), = f.button safe_join([material_symbol('close'), t('admin.ip_blocks.delete')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :delete, name: :delete,

View File

@ -19,7 +19,7 @@
.back-link .back-link
= link_to admin_account_path(@account.id) do = link_to admin_account_path(@account.id) do
= fa_icon 'chevron-left fw' = material_symbol 'chevron_left'
= t('admin.statuses.back_to_account') = t('admin.statuses.back_to_account')
%hr.spacer/ %hr.spacer/
@ -30,7 +30,7 @@
%label.batch-table__toolbar__select.batch-checkbox-all %label.batch-table__toolbar__select.batch-checkbox-all
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
= f.button safe_join([fa_icon('lock'), t('admin.accounts.perform_full_suspension')]), = f.button safe_join([material_symbol('lock'), t('admin.accounts.perform_full_suspension')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :suspend, name: :suspend,

View File

@ -4,7 +4,7 @@
%td %td
- if relay.accepted? - if relay.accepted?
%span.positive-hint %span.positive-hint
= fa_icon('check') = material_symbol('check')
   
= t 'admin.relays.enabled' = t 'admin.relays.enabled'
- elsif relay.pending? - elsif relay.pending?
@ -13,7 +13,7 @@
= t 'admin.relays.pending' = t 'admin.relays.pending'
- else - else
%span.negative-hint %span.negative-hint
= fa_icon('times') = material_symbol('close')
   
= t 'admin.relays.disabled' = t 'admin.relays.disabled'
%td %td

View File

@ -16,7 +16,7 @@
%strong.emojify.p-name= display_name(report.target_account, custom_emojify: true) %strong.emojify.p-name= display_name(report.target_account, custom_emojify: true)
%span %span
= acct(report.target_account) = acct(report.target_account)
= fa_icon('lock') if report.target_account.locked? = material_symbol('lock') if report.target_account.locked?
- if report.target_account.note.present? - if report.target_account.note.present?
.account-card__bio.emojify .account-card__bio.emojify
= prerender_custom_emojis(account_bio_format(report.target_account), report.target_account.emojis) = prerender_custom_emojis(account_bio_format(report.target_account), report.target_account.emojis)

View File

@ -37,5 +37,5 @@
= t("statuses.visibilities.#{status.visibility}") = t("statuses.visibilities.#{status.visibility}")
- if status.proper.sensitive? - if status.proper.sensitive?
· ·
= fa_icon('eye-slash fw') = material_symbol('visibility_off')
= t('stream_entries.sensitive_content') = t('stream_entries.sensitive_content')

View File

@ -58,7 +58,7 @@
- status.ordered_media_attachments.each do |media_attachment| - status.ordered_media_attachments.each do |media_attachment|
%abbr{ title: media_attachment.description } %abbr{ title: media_attachment.description }
= fa_icon 'link' = material_symbol 'link'
= media_attachment.file_file_name = media_attachment.file_file_name
.strike-card__statuses-list__item__meta .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 noreferrer' do

View File

@ -41,7 +41,7 @@
%p %p
= t 'admin.reports.statuses_description_html' = t 'admin.reports.statuses_description_html'
= link_to safe_join([fa_icon('plus'), t('admin.reports.add_to_report')]), = link_to safe_join([material_symbol('add'), t('admin.reports.add_to_report')]),
admin_account_statuses_path(@report.target_account_id, report_id: @report.id), admin_account_statuses_path(@report.target_account_id, report_id: @report.id),
class: 'table-action-link' class: 'table-action-link'
@ -52,7 +52,7 @@
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
- if !@statuses.empty? && @report.unresolved? - if !@statuses.empty? && @report.unresolved?
= f.button safe_join([fa_icon('times'), t('admin.statuses.batch.remove_from_report')]), name: :remove_from_report, class: 'table-action-link', type: :submit = f.button safe_join([material_symbol('close'), t('admin.statuses.batch.remove_from_report')]), name: :remove_from_report, class: 'table-action-link', type: :submit
.batch-table__body .batch-table__body
- if @statuses.empty? - if @statuses.empty?
= nothing_here 'nothing-here--under-tabs' = nothing_here 'nothing-here--under-tabs'

View File

@ -2,7 +2,7 @@
- if can?(:update, role) - if can?(:update, role)
= link_to edit_admin_role_path(role), class: 'announcements-list__item__title' do = link_to edit_admin_role_path(role), class: 'announcements-list__item__title' do
%span.user-role{ class: "user-role-#{role.id}" } %span.user-role{ class: "user-role-#{role.id}" }
= fa_icon 'users fw' = material_symbol 'group'
- if role.everyone? - if role.everyone?
= t('admin.roles.everyone') = t('admin.roles.everyone')
@ -11,7 +11,7 @@
- else - else
%span.announcements-list__item__title %span.announcements-list__item__title
%span.user-role{ class: "user-role-#{role.id}" } %span.user-role{ class: "user-role-#{role.id}" }
= fa_icon 'users fw' = material_symbol 'group'
- if role.everyone? - if role.everyone?
= t('admin.roles.everyone') = t('admin.roles.everyone')

View File

@ -3,7 +3,7 @@
:ruby :ruby
primary.item :branding, safe_join([fa_icon('pencil fw'), t('admin.settings.branding.title')]), admin_settings_branding_path primary.item :branding, safe_join([fa_icon('pencil fw'), t('admin.settings.branding.title')]), admin_settings_branding_path
primary.item :about, safe_join([fa_icon('file-text fw'), t('admin.settings.about.title')]), admin_settings_about_path primary.item :about, safe_join([fa_icon('file-text fw'), t('admin.settings.about.title')]), admin_settings_about_path
primary.item :registrations, safe_join([fa_icon('users fw'), t('admin.settings.registrations.title')]), admin_settings_registrations_path primary.item :registrations, safe_join([material_symbol('group'), t('admin.settings.registrations.title')]), admin_settings_registrations_path
primary.item :discovery, safe_join([fa_icon('search fw'), t('admin.settings.discovery.title')]), admin_settings_discovery_path primary.item :discovery, safe_join([fa_icon('search fw'), t('admin.settings.discovery.title')]), admin_settings_discovery_path
primary.item :content_retention, safe_join([fa_icon('history fw'), t('admin.settings.content_retention.title')]), admin_settings_content_retention_path primary.item :content_retention, safe_join([fa_icon('history fw'), t('admin.settings.content_retention.title')]), admin_settings_content_retention_path
primary.item :appearance, safe_join([fa_icon('desktop fw'), t('admin.settings.appearance.title')]), admin_settings_appearance_path primary.item :appearance, safe_join([fa_icon('desktop fw'), t('admin.settings.appearance.title')]), admin_settings_appearance_path

View File

@ -26,5 +26,5 @@
- if status_edit.sensitive? - if status_edit.sensitive?
· ·
= fa_icon('eye-slash fw') = material_symbol('visibility_off')
= t('stream_entries.sensitive_content') = t('stream_entries.sensitive_content')

View File

@ -12,11 +12,11 @@
.back-link .back-link
- if params[:report_id] - if params[:report_id]
= link_to admin_report_path(params[:report_id].to_i) do = link_to admin_report_path(params[:report_id].to_i) do
= fa_icon 'chevron-left fw' = material_symbol 'chevron_left'
= t('admin.statuses.back_to_report') = t('admin.statuses.back_to_report')
- else - else
= link_to admin_account_path(@account.id) do = link_to admin_account_path(@account.id) do
= fa_icon 'chevron-left fw' = material_symbol 'chevron_left'
= t('admin.statuses.back_to_account') = t('admin.statuses.back_to_account')
%hr.spacer/ %hr.spacer/

View File

@ -52,26 +52,26 @@
= link_to admin_tag_path(@tag.id), class: ['dashboard__quick-access', @tag.usable? ? 'positive' : 'negative'] do = link_to admin_tag_path(@tag.id), class: ['dashboard__quick-access', @tag.usable? ? 'positive' : 'negative'] do
- if @tag.usable? - if @tag.usable?
%span= t('admin.trends.tags.usable') %span= t('admin.trends.tags.usable')
= fa_icon 'check fw' = material_symbol 'check'
- else - else
%span= t('admin.trends.tags.not_usable') %span= t('admin.trends.tags.not_usable')
= fa_icon 'lock fw' = material_symbol 'lock'
= link_to admin_tag_path(@tag.id), class: ['dashboard__quick-access', @tag.trendable? ? 'positive' : 'negative'] do = link_to admin_tag_path(@tag.id), class: ['dashboard__quick-access', @tag.trendable? ? 'positive' : 'negative'] do
- if @tag.trendable? - if @tag.trendable?
%span= t('admin.trends.tags.trendable') %span= t('admin.trends.tags.trendable')
= fa_icon 'check fw' = material_symbol 'check'
- else - else
%span= t('admin.trends.tags.not_trendable') %span= t('admin.trends.tags.not_trendable')
= fa_icon 'lock fw' = material_symbol 'lock'
= link_to admin_tag_path(@tag.id), class: ['dashboard__quick-access', @tag.listable? ? 'positive' : 'negative'] do = link_to admin_tag_path(@tag.id), class: ['dashboard__quick-access', @tag.listable? ? 'positive' : 'negative'] do
- if @tag.listable? - if @tag.listable?
%span= t('admin.trends.tags.listable') %span= t('admin.trends.tags.listable')
= fa_icon 'check fw' = material_symbol 'check'
- else - else
%span= t('admin.trends.tags.not_listable') %span= t('admin.trends.tags.not_listable')
= fa_icon 'lock fw' = material_symbol 'lock'
%hr.spacer/ %hr.spacer/

View File

@ -24,7 +24,7 @@
.back-link .back-link
= link_to admin_trends_links_preview_card_providers_path do = link_to admin_trends_links_preview_card_providers_path do
= t('admin.trends.preview_card_providers.title') = t('admin.trends.preview_card_providers.title')
= fa_icon 'chevron-right fw' = material_symbol 'chevron_right'
= form_for(@form, url: batch_admin_trends_links_path) do |f| = form_for(@form, url: batch_admin_trends_links_path) do |f|
= hidden_field_tag :page, params[:page] || 1 = hidden_field_tag :page, params[:page] || 1
@ -37,22 +37,22 @@
%label.batch-table__toolbar__select.batch-checkbox-all %label.batch-table__toolbar__select.batch-checkbox-all
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
= f.button safe_join([fa_icon('check'), t('admin.trends.links.allow')]), = f.button safe_join([material_symbol('check'), t('admin.trends.links.allow')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :approve, name: :approve,
type: :submit type: :submit
= f.button safe_join([fa_icon('check'), t('admin.trends.links.allow_provider')]), = f.button safe_join([material_symbol('check'), t('admin.trends.links.allow_provider')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :approve_providers, name: :approve_providers,
type: :submit type: :submit
= f.button safe_join([fa_icon('times'), t('admin.trends.links.disallow')]), = f.button safe_join([material_symbol('close'), t('admin.trends.links.disallow')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :reject, name: :reject,
type: :submit type: :submit
= f.button safe_join([fa_icon('times'), t('admin.trends.links.disallow_provider')]), = f.button safe_join([material_symbol('close'), t('admin.trends.links.disallow_provider')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :reject_providers, name: :reject_providers,

View File

@ -15,7 +15,7 @@
%li= filter_link_to safe_join([t('admin.accounts.moderation.pending'), "(#{PreviewCardProvider.pending_review.count})"], ' '), status: 'pending_review' %li= filter_link_to safe_join([t('admin.accounts.moderation.pending'), "(#{PreviewCardProvider.pending_review.count})"], ' '), status: 'pending_review'
.back-link .back-link
= link_to admin_trends_links_path do = link_to admin_trends_links_path do
= fa_icon 'chevron-left fw' = material_symbol 'chevron_left'
= t('admin.trends.links.title') = t('admin.trends.links.title')
%hr.spacer/ %hr.spacer/
@ -31,12 +31,12 @@
%label.batch-table__toolbar__select.batch-checkbox-all %label.batch-table__toolbar__select.batch-checkbox-all
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
= f.button safe_join([fa_icon('check'), t('admin.trends.allow')]), = f.button safe_join([material_symbol('check'), t('admin.trends.allow')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :approve, name: :approve,
type: :submit type: :submit
= f.button safe_join([fa_icon('times'), t('admin.trends.disallow')]), = f.button safe_join([material_symbol('close'), t('admin.trends.disallow')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :reject, name: :reject,

View File

@ -11,7 +11,7 @@
- status.ordered_media_attachments.each do |media_attachment| - status.ordered_media_attachments.each do |media_attachment|
%abbr{ title: media_attachment.description } %abbr{ title: media_attachment.description }
= fa_icon 'link' = material_symbol 'link'
= media_attachment.file_file_name = media_attachment.file_file_name
= t 'admin.trends.statuses.shared_by', = t 'admin.trends.statuses.shared_by',

View File

@ -31,22 +31,22 @@
%label.batch-table__toolbar__select.batch-checkbox-all %label.batch-table__toolbar__select.batch-checkbox-all
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
= f.button safe_join([fa_icon('check'), t('admin.trends.statuses.allow')]), = f.button safe_join([material_symbol('check'), t('admin.trends.statuses.allow')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :approve, name: :approve,
type: :submit type: :submit
= f.button safe_join([fa_icon('check'), t('admin.trends.statuses.allow_account')]), = f.button safe_join([material_symbol('check'), t('admin.trends.statuses.allow_account')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :approve_accounts, name: :approve_accounts,
type: :submit type: :submit
= f.button safe_join([fa_icon('times'), t('admin.trends.statuses.disallow')]), = f.button safe_join([material_symbol('close'), t('admin.trends.statuses.disallow')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :reject, name: :reject,
type: :submit type: :submit
= f.button safe_join([fa_icon('times'), t('admin.trends.statuses.disallow_account')]), = f.button safe_join([material_symbol('close'), t('admin.trends.statuses.disallow_account')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :reject_accounts, name: :reject_accounts,

View File

@ -5,7 +5,7 @@
.batch-table__row__content.pending-account .batch-table__row__content.pending-account
.pending-account__header .pending-account__header
= link_to admin_tag_path(tag.id) do = link_to admin_tag_path(tag.id) do
= fa_icon 'hashtag' = material_symbol 'tag'
= tag.display_name = tag.display_name
%br/ %br/

View File

@ -25,12 +25,12 @@
%label.batch-table__toolbar__select.batch-checkbox-all %label.batch-table__toolbar__select.batch-checkbox-all
= check_box_tag :batch_checkbox_all, nil, false = check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions .batch-table__toolbar__actions
= f.button safe_join([fa_icon('check'), t('admin.trends.allow')]), = f.button safe_join([material_symbol('check'), t('admin.trends.allow')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :approve, name: :approve,
type: :submit type: :submit
= f.button safe_join([fa_icon('times'), t('admin.trends.disallow')]), = f.button safe_join([material_symbol('close'), t('admin.trends.disallow')]),
class: 'table-action-link', class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') }, data: { confirm: t('admin.reports.are_you_sure') },
name: :reject, name: :reject,

View File

@ -1,3 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
# SVG icons
Rails.application.config.assets.paths << Rails.root.join('app', 'javascript', 'images') Rails.application.config.assets.paths << Rails.root.join('app', 'javascript', 'images')
# Material Design icons
Rails.application.config.assets.paths << Rails.root.join('app', 'javascript', 'material-icons')

View File

@ -2,7 +2,7 @@
default: &default default: &default
source_path: app/javascript source_path: app/javascript
source_entry_path: packs source_entry_path: entrypoints
public_root_path: public public_root_path: public
public_output_path: packs public_output_path: packs
cache_path: tmp/cache/webpacker cache_path: tmp/cache/webpacker

View File

@ -25,9 +25,8 @@
}, },
"include": [ "include": [
"app/javascript/mastodon", "app/javascript/mastodon",
"app/javascript/packs", "app/javascript/entrypoints",
"app/javascript/types", "app/javascript/types",
"app/javascript/flavours/glitch", "app/javascript/flavours/glitch"
"app/javascript/core"
] ]
} }