Skip to content

Commit

Permalink
Replace more font-awesome icons in views/admin area (mastodon#30961)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski authored Aug 7, 2024
1 parent 52a626f commit 84c3cc4
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 22 deletions.
1 change: 1 addition & 0 deletions app/javascript/material-icons/400-24px/comment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/javascript/material-icons/400-24px/hourglass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/javascript/material-icons/400-24px/photo_camera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/javascript/material-icons/400-24px/power.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/javascript/material-icons/400-24px/power_off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/javascript/material-icons/400-24px/save.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/javascript/styles/mastodon/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $content-width: 840px;
.icon {
width: 16px;
height: 16px;
vertical-align: middle;
vertical-align: top;
margin: 0 2px;
}

Expand Down
6 changes: 3 additions & 3 deletions app/views/admin/custom_emojis/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
= check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions
- 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([material_symbol('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([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([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([material_symbol('radio_button_checked'), 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([material_symbol('radio_button_unchecked'), 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)
= 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') }
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/instances/_instance.html.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.directory__tag
= link_to admin_instance_path(instance) do
%h4
= fa_icon 'warning fw', title: t('admin.instances.availability.warning') if instance.failing?
= material_symbol 'warning', title: t('admin.instances.availability.warning') if instance.failing?
= instance.domain

%small
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/relays/_relay.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
 
= t 'admin.relays.enabled'
- elsif relay.pending?
= fa_icon('hourglass')
= material_symbol('hourglass')
 
= t 'admin.relays.pending'
- else
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/reports/_status.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
%span.negative-hint= t('admin.statuses.deleted')
·
- if status.reblog?
= fa_icon('retweet fw')
= material_symbol('repeat_active')
= t('statuses.boosted_from_html', acct_link: admin_account_inline_link_to(status.proper.account))
- else
= fa_visibility_icon(status)
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/reports/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
.one-line= report.comment.presence || t('admin.reports.comment.none')

%span.report-card__summary__item__content__icon{ title: t('admin.accounts.statuses') }
= fa_icon('comment')
= material_symbol('comment')
= report.status_ids.size

%span.report-card__summary__item__content__icon{ title: t('admin.accounts.media_attachments') }
= fa_icon('camera')
= material_symbol('photo_camera')
= report.media_attachments_count

- if report.forwarded?
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/reports/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
= t 'admin.reports.statuses'
%small.section-skip-link
= link_to '#actions' do
= fa_icon 'angle-double-down'
= material_symbol 'keyboard_double_arrow_down'
= t('admin.reports.skip_to_actions')

%p
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/settings/appearance/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
- if @admin_settings.mascot.persisted?
= image_tag @admin_settings.mascot.file.url, class: 'fields-group__thumbnail'
= link_to admin_site_upload_path(@admin_settings.mascot), data: { method: :delete }, class: 'link-button link-button--destructive' do
= fa_icon 'trash fw'
= material_symbol 'delete'
= t('admin.site_uploads.delete')

.actions
Expand Down
6 changes: 3 additions & 3 deletions app/views/admin/settings/branding/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
- if @admin_settings.thumbnail.persisted?
= image_tag @admin_settings.thumbnail.file.url(:'@1x'), class: 'fields-group__thumbnail'
= link_to admin_site_upload_path(@admin_settings.thumbnail), data: { method: :delete }, class: 'link-button link-button--destructive' do
= fa_icon 'trash fw'
= material_symbol 'delete'
= t('admin.site_uploads.delete')

.fields-row
Expand All @@ -51,7 +51,7 @@
- if @admin_settings.favicon.persisted?
= image_tag @admin_settings.favicon.file.url('48'), class: 'fields-group__thumbnail'
= link_to admin_site_upload_path(@admin_settings.favicon), data: { method: :delete }, class: 'link-button link-button--destructive' do
= fa_icon 'trash fw'
= material_symbol 'delete'
= t('admin.site_uploads.delete')

.fields-row
Expand All @@ -65,7 +65,7 @@
- if @admin_settings.app_icon.persisted?
= image_tag @admin_settings.app_icon.file.url('48'), class: 'fields-group__thumbnail'
= link_to admin_site_upload_path(@admin_settings.app_icon), data: { method: :delete }, class: 'link-button link-button--destructive' do
= fa_icon 'trash fw'
= material_symbol 'delete'
= t('admin.site_uploads.delete')

.actions
Expand Down
10 changes: 5 additions & 5 deletions app/views/admin/settings/shared/_links.html.haml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.content__heading__tabs
= render_navigation renderer: :links do |primary|
:ruby
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 :branding, safe_join([material_symbol('edit'), t('admin.settings.branding.title')]), admin_settings_branding_path
primary.item :about, safe_join([material_symbol('description'), t('admin.settings.about.title')]), admin_settings_about_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 :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 :discovery, safe_join([material_symbol('search'), t('admin.settings.discovery.title')]), admin_settings_discovery_path
primary.item :content_retention, safe_join([material_symbol('history'), t('admin.settings.content_retention.title')]), admin_settings_content_retention_path
primary.item :appearance, safe_join([material_symbol('computer'), t('admin.settings.appearance.title')]), admin_settings_appearance_path
2 changes: 1 addition & 1 deletion app/views/admin/statuses/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
= check_box_tag :batch_checkbox_all, nil, false
.batch-table__toolbar__actions
- unless @statuses.empty?
= f.button safe_join([fa_icon('flag'), t('admin.statuses.batch.report')]),
= f.button safe_join([material_symbol('flag'), t('admin.statuses.batch.report')]),
class: 'table-action-link',
data: { confirm: t('admin.reports.are_you_sure') },
name: :report,
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/webhooks/_webhook.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.applications-list__item
= link_to admin_webhook_path(webhook), class: 'announcements-list__item__title' do
= fa_icon 'inbox'
= material_symbol 'inbox'
= webhook.url

.announcements-list__item__action-bar
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/webhooks/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.content__heading__row
%h2
%small
= fa_icon 'inbox'
= material_symbol 'inbox'
= t('admin.webhooks.webhook')
= @webhook.url
.content__heading__actions
Expand Down

0 comments on commit 84c3cc4

Please sign in to comment.