From 84c3cc4e5bf3c148982231222baab9ccfcc107b3 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 7 Aug 2024 19:08:36 -0400 Subject: [PATCH] Replace more `font-awesome` icons in `views/admin` area (#30961) --- app/javascript/material-icons/400-24px/comment.svg | 1 + app/javascript/material-icons/400-24px/hourglass.svg | 1 + .../400-24px/keyboard_double_arrow_down.svg | 1 + .../material-icons/400-24px/photo_camera.svg | 1 + app/javascript/material-icons/400-24px/power.svg | 1 + app/javascript/material-icons/400-24px/power_off.svg | 1 + .../material-icons/400-24px/radio_button_checked.svg | 1 + .../material-icons/400-24px/radio_button_unchecked.svg | 1 + app/javascript/material-icons/400-24px/save.svg | 1 + app/javascript/styles/mastodon/admin.scss | 2 +- app/views/admin/custom_emojis/index.html.haml | 6 +++--- app/views/admin/instances/_instance.html.haml | 2 +- app/views/admin/relays/_relay.html.haml | 2 +- app/views/admin/reports/_status.html.haml | 2 +- app/views/admin/reports/index.html.haml | 4 ++-- app/views/admin/reports/show.html.haml | 2 +- app/views/admin/settings/appearance/show.html.haml | 2 +- app/views/admin/settings/branding/show.html.haml | 6 +++--- app/views/admin/settings/shared/_links.html.haml | 10 +++++----- app/views/admin/statuses/index.html.haml | 2 +- app/views/admin/webhooks/_webhook.html.haml | 2 +- app/views/admin/webhooks/show.html.haml | 2 +- 22 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 app/javascript/material-icons/400-24px/comment.svg create mode 100644 app/javascript/material-icons/400-24px/hourglass.svg create mode 100644 app/javascript/material-icons/400-24px/keyboard_double_arrow_down.svg create mode 100644 app/javascript/material-icons/400-24px/photo_camera.svg create mode 100644 app/javascript/material-icons/400-24px/power.svg create mode 100644 app/javascript/material-icons/400-24px/power_off.svg create mode 100644 app/javascript/material-icons/400-24px/radio_button_checked.svg create mode 100644 app/javascript/material-icons/400-24px/radio_button_unchecked.svg create mode 100644 app/javascript/material-icons/400-24px/save.svg diff --git a/app/javascript/material-icons/400-24px/comment.svg b/app/javascript/material-icons/400-24px/comment.svg new file mode 100644 index 0000000000..da1ae0392e --- /dev/null +++ b/app/javascript/material-icons/400-24px/comment.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/material-icons/400-24px/hourglass.svg b/app/javascript/material-icons/400-24px/hourglass.svg new file mode 100644 index 0000000000..07667a06e4 --- /dev/null +++ b/app/javascript/material-icons/400-24px/hourglass.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/material-icons/400-24px/keyboard_double_arrow_down.svg b/app/javascript/material-icons/400-24px/keyboard_double_arrow_down.svg new file mode 100644 index 0000000000..45b6e420f4 --- /dev/null +++ b/app/javascript/material-icons/400-24px/keyboard_double_arrow_down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/material-icons/400-24px/photo_camera.svg b/app/javascript/material-icons/400-24px/photo_camera.svg new file mode 100644 index 0000000000..4621435ce0 --- /dev/null +++ b/app/javascript/material-icons/400-24px/photo_camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/material-icons/400-24px/power.svg b/app/javascript/material-icons/400-24px/power.svg new file mode 100644 index 0000000000..023a3a31da --- /dev/null +++ b/app/javascript/material-icons/400-24px/power.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/material-icons/400-24px/power_off.svg b/app/javascript/material-icons/400-24px/power_off.svg new file mode 100644 index 0000000000..25edd4de10 --- /dev/null +++ b/app/javascript/material-icons/400-24px/power_off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/material-icons/400-24px/radio_button_checked.svg b/app/javascript/material-icons/400-24px/radio_button_checked.svg new file mode 100644 index 0000000000..a8ab2c9b9c --- /dev/null +++ b/app/javascript/material-icons/400-24px/radio_button_checked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/material-icons/400-24px/radio_button_unchecked.svg b/app/javascript/material-icons/400-24px/radio_button_unchecked.svg new file mode 100644 index 0000000000..37665285d5 --- /dev/null +++ b/app/javascript/material-icons/400-24px/radio_button_unchecked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/material-icons/400-24px/save.svg b/app/javascript/material-icons/400-24px/save.svg new file mode 100644 index 0000000000..a86028d995 --- /dev/null +++ b/app/javascript/material-icons/400-24px/save.svg @@ -0,0 +1 @@ + diff --git a/app/javascript/styles/mastodon/admin.scss b/app/javascript/styles/mastodon/admin.scss index 810f59b9a5..045a435de2 100644 --- a/app/javascript/styles/mastodon/admin.scss +++ b/app/javascript/styles/mastodon/admin.scss @@ -13,7 +13,7 @@ $content-width: 840px; .icon { width: 16px; height: 16px; - vertical-align: middle; + vertical-align: top; margin: 0 2px; } diff --git a/app/views/admin/custom_emojis/index.html.haml b/app/views/admin/custom_emojis/index.html.haml index 82fec554b0..6db97e2e8e 100644 --- a/app/views/admin/custom_emojis/index.html.haml +++ b/app/views/admin/custom_emojis/index.html.haml @@ -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') } diff --git a/app/views/admin/instances/_instance.html.haml b/app/views/admin/instances/_instance.html.haml index 522a2444bb..4cae3caf52 100644 --- a/app/views/admin/instances/_instance.html.haml +++ b/app/views/admin/instances/_instance.html.haml @@ -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 diff --git a/app/views/admin/relays/_relay.html.haml b/app/views/admin/relays/_relay.html.haml index 0960124ccf..2e76f54308 100644 --- a/app/views/admin/relays/_relay.html.haml +++ b/app/views/admin/relays/_relay.html.haml @@ -8,7 +8,7 @@   = t 'admin.relays.enabled' - elsif relay.pending? - = fa_icon('hourglass') + = material_symbol('hourglass')   = t 'admin.relays.pending' - else diff --git a/app/views/admin/reports/_status.html.haml b/app/views/admin/reports/_status.html.haml index 66820f0a6e..11be38ef84 100644 --- a/app/views/admin/reports/_status.html.haml +++ b/app/views/admin/reports/_status.html.haml @@ -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) diff --git a/app/views/admin/reports/index.html.haml b/app/views/admin/reports/index.html.haml index dae2c1aa5b..b476c6ccfa 100644 --- a/app/views/admin/reports/index.html.haml +++ b/app/views/admin/reports/index.html.haml @@ -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? diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index ca1edea0fe..69e9c02921 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -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 diff --git a/app/views/admin/settings/appearance/show.html.haml b/app/views/admin/settings/appearance/show.html.haml index 3ef4920cd5..c610f9f941 100644 --- a/app/views/admin/settings/appearance/show.html.haml +++ b/app/views/admin/settings/appearance/show.html.haml @@ -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 diff --git a/app/views/admin/settings/branding/show.html.haml b/app/views/admin/settings/branding/show.html.haml index 71aac5ead1..e03c16a25a 100644 --- a/app/views/admin/settings/branding/show.html.haml +++ b/app/views/admin/settings/branding/show.html.haml @@ -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 @@ -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 @@ -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 diff --git a/app/views/admin/settings/shared/_links.html.haml b/app/views/admin/settings/shared/_links.html.haml index 8b0678d4c9..c03e5cfd9f 100644 --- a/app/views/admin/settings/shared/_links.html.haml +++ b/app/views/admin/settings/shared/_links.html.haml @@ -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 diff --git a/app/views/admin/statuses/index.html.haml b/app/views/admin/statuses/index.html.haml index b03b8ac51b..4d5d037060 100644 --- a/app/views/admin/statuses/index.html.haml +++ b/app/views/admin/statuses/index.html.haml @@ -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, diff --git a/app/views/admin/webhooks/_webhook.html.haml b/app/views/admin/webhooks/_webhook.html.haml index 6b3e49eba0..39abb7dd2c 100644 --- a/app/views/admin/webhooks/_webhook.html.haml +++ b/app/views/admin/webhooks/_webhook.html.haml @@ -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 diff --git a/app/views/admin/webhooks/show.html.haml b/app/views/admin/webhooks/show.html.haml index 5ac809efc5..c2c4f55788 100644 --- a/app/views/admin/webhooks/show.html.haml +++ b/app/views/admin/webhooks/show.html.haml @@ -5,7 +5,7 @@ .content__heading__row %h2 %small - = fa_icon 'inbox' + = material_symbol 'inbox' = t('admin.webhooks.webhook') = @webhook.url .content__heading__actions