From 134de736dcbc6aa613fd5aec21d983d92d8b0be8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 24 Oct 2023 19:45:08 +0200 Subject: [PATCH] Change icons in web UI (#27385) Co-authored-by: Renaud Chaput --- app/javascript/__mocks__/svg.js | 3 + .../mastodon/components/account.jsx | 14 +- .../mastodon/components/attachment_list.jsx | 6 +- app/javascript/mastodon/components/badge.jsx | 6 +- app/javascript/mastodon/components/check.tsx | 13 - .../components/column_back_button.jsx | 4 +- .../components/column_back_button_slim.jsx | 4 +- .../mastodon/components/column_header.jsx | 26 +- .../components/dismissable_banner.tsx | 3 + app/javascript/mastodon/components/domain.tsx | 3 + .../mastodon/components/dropdown_menu.jsx | 13 +- .../components/edited_timestamp/index.jsx | 4 +- app/javascript/mastodon/components/icon.tsx | 52 ++- .../mastodon/components/icon_button.tsx | 20 +- .../mastodon/components/icon_with_badge.tsx | 5 +- .../mastodon/components/load_gap.tsx | 4 +- .../mastodon/components/media_gallery.jsx | 3 +- .../picture_in_picture_placeholder.jsx | 4 +- app/javascript/mastodon/components/poll.jsx | 3 +- app/javascript/mastodon/components/status.jsx | 24 +- .../mastodon/components/status_action_bar.jsx | 45 +- .../mastodon/components/status_content.jsx | 4 +- .../mastodon/components/verified_badge.tsx | 4 +- .../mastodon/components/visibility_icon.tsx | 62 +++ .../mastodon/features/about/index.jsx | 5 +- .../components/follow_request_note.jsx | 7 +- .../features/account/components/header.jsx | 14 +- .../account_gallery/components/media_item.jsx | 10 +- .../mastodon/features/audio/index.jsx | 14 +- .../features/bookmarked_statuses/index.jsx | 4 +- .../features/community_timeline/index.jsx | 3 + .../compose/components/action_bar.jsx | 4 +- .../compose/components/compose_form.jsx | 3 +- .../compose/components/poll_button.jsx | 4 + .../features/compose/components/poll_form.jsx | 7 +- .../compose/components/privacy_dropdown.jsx | 51 ++- .../compose/components/reply_indicator.jsx | 4 +- .../features/compose/components/search.jsx | 10 +- .../compose/components/search_results.jsx | 13 +- .../features/compose/components/upload.jsx | 9 +- .../compose/components/upload_button.jsx | 4 +- .../compose/components/upload_progress.jsx | 3 +- .../mastodon/features/compose/index.jsx | 21 +- .../components/conversation.jsx | 5 +- .../features/direct_timeline/index.jsx | 3 + .../mastodon/features/directory/index.jsx | 3 + .../mastodon/features/domain_blocks/index.jsx | 2 +- .../mastodon/features/explore/index.jsx | 4 + .../mastodon/features/explore/results.jsx | 10 +- .../features/favourited_statuses/index.jsx | 2 + .../mastodon/features/favourites/index.jsx | 3 +- .../features/filters/select_filter.jsx | 3 +- .../mastodon/features/firehose/index.jsx | 3 + .../components/account_authorize.jsx | 7 +- .../mastodon/features/followed_tags/index.jsx | 2 + .../components/announcements.jsx | 9 +- .../features/getting_started/index.jsx | 34 +- .../features/hashtag_timeline/index.jsx | 2 + .../mastodon/features/home_timeline/index.jsx | 6 +- .../features/interaction_modal/index.jsx | 12 +- .../features/keyboard_shortcuts/index.jsx | 5 +- .../features/list_adder/components/list.jsx | 10 +- .../list_editor/components/account.jsx | 7 +- .../list_editor/components/edit_list_form.jsx | 3 + .../list_editor/components/search.jsx | 7 +- .../mastodon/features/list_timeline/index.jsx | 8 +- .../mastodon/features/lists/index.jsx | 6 +- .../mastodon/features/mutes/index.jsx | 3 +- .../components/clear_column_button.jsx | 4 +- .../notifications/components/filter_bar.jsx | 19 +- .../components/follow_request.jsx | 7 +- .../notifications/components/notification.jsx | 44 +- .../notifications_permission_banner.jsx | 7 +- .../mastodon/features/notifications/index.jsx | 5 +- .../components/arrow_small_right.jsx | 7 - .../components/progress_indicator.jsx | 6 +- .../features/onboarding/components/step.jsx | 13 +- .../mastodon/features/onboarding/index.jsx | 19 +- .../mastodon/features/onboarding/share.jsx | 10 +- .../picture_in_picture/components/footer.jsx | 18 +- .../picture_in_picture/components/header.jsx | 4 +- .../features/pinned_statuses/index.jsx | 4 +- .../features/public_timeline/index.jsx | 3 + .../mastodon/features/reblogs/index.jsx | 3 +- .../features/report/components/option.jsx | 6 +- .../report/components/status_check_box.jsx | 26 +- .../features/status/components/action_bar.jsx | 22 +- .../features/status/components/card.jsx | 10 +- .../status/components/detailed_status.jsx | 41 +- .../mastodon/features/status/index.jsx | 4 +- .../subscribed_languages_modal/index.jsx | 4 +- .../features/ui/components/actions_modal.jsx | 4 +- .../features/ui/components/boost_modal.jsx | 20 +- .../ui/components/bundle_modal_error.jsx | 4 +- .../features/ui/components/column.jsx | 5 +- .../features/ui/components/column_header.jsx | 2 +- .../features/ui/components/column_link.jsx | 5 +- .../features/ui/components/column_loading.jsx | 32 -- .../features/ui/components/column_loading.tsx | 13 + .../features/ui/components/columns_area.jsx | 2 +- .../ui/components/compare_history_modal.jsx | 3 +- .../features/ui/components/embed_modal.jsx | 4 +- .../features/ui/components/filter_modal.jsx | 4 +- .../ui/components/focal_point_modal.jsx | 3 +- .../follow_requests_column_link.jsx | 4 +- .../features/ui/components/header.jsx | 4 +- .../features/ui/components/image_modal.jsx | 4 +- .../features/ui/components/list_panel.jsx | 4 +- .../features/ui/components/media_modal.jsx | 9 +- .../ui/components/navigation_panel.jsx | 31 +- .../components/notifications_counter_icon.js | 4 + .../features/ui/components/report_modal.jsx | 4 +- .../features/ui/components/zoomable_image.jsx | 4 + .../features/ui/util/react_router_helpers.jsx | 2 +- .../mastodon/features/video/index.jsx | 20 +- app/javascript/styles/application.scss | 1 - app/javascript/styles/mastodon/boost.scss | 44 -- .../styles/mastodon/components.scss | 428 ++++++++---------- app/javascript/types/image.d.ts | 8 + config/webpack/rules/material_icons.js | 3 +- jest.config.js | 3 + package.json | 2 +- yarn.lock | 8 +- 123 files changed, 927 insertions(+), 725 deletions(-) create mode 100644 app/javascript/__mocks__/svg.js delete mode 100644 app/javascript/mastodon/components/check.tsx create mode 100644 app/javascript/mastodon/components/visibility_icon.tsx delete mode 100644 app/javascript/mastodon/features/onboarding/components/arrow_small_right.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/column_loading.jsx create mode 100644 app/javascript/mastodon/features/ui/components/column_loading.tsx delete mode 100644 app/javascript/styles/mastodon/boost.scss diff --git a/app/javascript/__mocks__/svg.js b/app/javascript/__mocks__/svg.js new file mode 100644 index 000000000..e725dc2da --- /dev/null +++ b/app/javascript/__mocks__/svg.js @@ -0,0 +1,3 @@ +// eslint-disable-next-line import/no-anonymous-default-export +export default 'SvgrURL'; +export const ReactComponent = 'div'; diff --git a/app/javascript/mastodon/components/account.jsx b/app/javascript/mastodon/components/account.jsx index 69189a84b..e4e3c88b6 100644 --- a/app/javascript/mastodon/components/account.jsx +++ b/app/javascript/mastodon/components/account.jsx @@ -18,7 +18,6 @@ import { Avatar } from './avatar'; import { Button } from './button'; import { FollowersCounter } from './counters'; import { DisplayName } from './display_name'; -import { IconButton } from './icon_button'; import { RelativeTimestamp } from './relative_timestamp'; const messages = defineMessages({ @@ -45,10 +44,7 @@ class Account extends ImmutablePureComponent { intl: PropTypes.object.isRequired, hidden: PropTypes.bool, minimal: PropTypes.bool, - actionIcon: PropTypes.string, - actionTitle: PropTypes.string, defaultAction: PropTypes.string, - onActionClick: PropTypes.func, withBio: PropTypes.bool, }; @@ -76,12 +72,8 @@ class Account extends ImmutablePureComponent { this.props.onMuteNotifications(this.props.account, false); }; - handleAction = () => { - this.props.onActionClick(this.props.account); - }; - render () { - const { account, intl, hidden, withBio, onActionClick, actionIcon, actionTitle, defaultAction, size, minimal } = this.props; + const { account, intl, hidden, withBio, defaultAction, size, minimal } = this.props; if (!account) { return ; @@ -98,9 +90,7 @@ class Account extends ImmutablePureComponent { let buttons; - if (actionIcon && onActionClick) { - buttons = ; - } else if (!actionIcon && account.get('id') !== me && account.get('relationship', null) !== null) { + if (account.get('id') !== me && account.get('relationship', null) !== null) { const following = account.getIn(['relationship', 'following']); const requested = account.getIn(['relationship', 'requested']); const blocking = account.getIn(['relationship', 'blocking']); diff --git a/app/javascript/mastodon/components/attachment_list.jsx b/app/javascript/mastodon/components/attachment_list.jsx index 71cb645c5..ebf092b83 100644 --- a/app/javascript/mastodon/components/attachment_list.jsx +++ b/app/javascript/mastodon/components/attachment_list.jsx @@ -7,6 +7,8 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { ReactComponent as LinkIcon } from '@material-symbols/svg-600/outlined/link.svg'; + import { Icon } from 'mastodon/components/icon'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; @@ -25,7 +27,7 @@ export default class AttachmentList extends ImmutablePureComponent {
{!compact && (
- +
)} @@ -36,7 +38,7 @@ export default class AttachmentList extends ImmutablePureComponent { return (
  • - {compact && } + {compact && } {compact && ' ' } {displayUrl ? filename(displayUrl) : } diff --git a/app/javascript/mastodon/components/badge.jsx b/app/javascript/mastodon/components/badge.jsx index 235aef0c2..2f762fed5 100644 --- a/app/javascript/mastodon/components/badge.jsx +++ b/app/javascript/mastodon/components/badge.jsx @@ -2,9 +2,9 @@ import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; -import { ReactComponent as GroupsIcon } from '@material-design-icons/svg/outlined/group.svg'; -import { ReactComponent as PersonIcon } from '@material-design-icons/svg/outlined/person.svg'; -import { ReactComponent as SmartToyIcon } from '@material-design-icons/svg/outlined/smart_toy.svg'; +import { ReactComponent as GroupsIcon } from '@material-symbols/svg-600/outlined/group.svg'; +import { ReactComponent as PersonIcon } from '@material-symbols/svg-600/outlined/person.svg'; +import { ReactComponent as SmartToyIcon } from '@material-symbols/svg-600/outlined/smart_toy.svg'; export const Badge = ({ icon, label, domain }) => ( diff --git a/app/javascript/mastodon/components/check.tsx b/app/javascript/mastodon/components/check.tsx deleted file mode 100644 index 901f89fc5..000000000 --- a/app/javascript/mastodon/components/check.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export const Check: React.FC = () => ( - - - -); diff --git a/app/javascript/mastodon/components/column_back_button.jsx b/app/javascript/mastodon/components/column_back_button.jsx index b47718ed8..fac6ed981 100644 --- a/app/javascript/mastodon/components/column_back_button.jsx +++ b/app/javascript/mastodon/components/column_back_button.jsx @@ -6,6 +6,8 @@ import { FormattedMessage } from 'react-intl'; import { withRouter } from 'react-router-dom'; +import { ReactComponent as ArrowBackIcon } from '@material-symbols/svg-600/outlined/arrow_back.svg'; + import { Icon } from 'mastodon/components/icon'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -34,7 +36,7 @@ class ColumnBackButton extends PureComponent { const component = ( ); diff --git a/app/javascript/mastodon/components/column_back_button_slim.jsx b/app/javascript/mastodon/components/column_back_button_slim.jsx index f8060e5a5..6d66041cd 100644 --- a/app/javascript/mastodon/components/column_back_button_slim.jsx +++ b/app/javascript/mastodon/components/column_back_button_slim.jsx @@ -1,5 +1,7 @@ import { FormattedMessage } from 'react-intl'; +import { ReactComponent as ArrowBackIcon } from '@material-symbols/svg-600/outlined/arrow_back.svg'; + import { Icon } from 'mastodon/components/icon'; import ColumnBackButton from './column_back_button'; @@ -10,7 +12,7 @@ export default class ColumnBackButtonSlim extends ColumnBackButton { return (
    - +
    diff --git a/app/javascript/mastodon/components/column_header.jsx b/app/javascript/mastodon/components/column_header.jsx index 2896a501b..f60b17d9b 100644 --- a/app/javascript/mastodon/components/column_header.jsx +++ b/app/javascript/mastodon/components/column_header.jsx @@ -7,6 +7,13 @@ import { FormattedMessage, injectIntl, defineMessages } from 'react-intl'; import classNames from 'classnames'; import { withRouter } from 'react-router-dom'; +import { ReactComponent as AddIcon } from '@material-symbols/svg-600/outlined/add.svg'; +import { ReactComponent as ArrowBackIcon } from '@material-symbols/svg-600/outlined/arrow_back.svg'; +import { ReactComponent as ChevronLeftIcon } from '@material-symbols/svg-600/outlined/chevron_left.svg'; +import { ReactComponent as ChevronRightIcon } from '@material-symbols/svg-600/outlined/chevron_right.svg'; +import { ReactComponent as CloseIcon } from '@material-symbols/svg-600/outlined/close.svg'; +import { ReactComponent as TuneIcon } from '@material-symbols/svg-600/outlined/tune.svg'; + import { Icon } from 'mastodon/components/icon'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -27,6 +34,7 @@ class ColumnHeader extends PureComponent { intl: PropTypes.object.isRequired, title: PropTypes.node, icon: PropTypes.string, + iconComponent: PropTypes.func, active: PropTypes.bool, multiColumn: PropTypes.bool, extraButton: PropTypes.node, @@ -87,7 +95,7 @@ class ColumnHeader extends PureComponent { }; render () { - const { title, icon, active, children, pinned, multiColumn, extraButton, showBackButton, intl: { formatMessage }, placeholder, appendContent, collapseIssues, history } = this.props; + const { title, icon, iconComponent, active, children, pinned, multiColumn, extraButton, showBackButton, intl: { formatMessage }, placeholder, appendContent, collapseIssues, history } = this.props; const { collapsed, animating } = this.state; const wrapperClassName = classNames('column-header__wrapper', { @@ -118,22 +126,22 @@ class ColumnHeader extends PureComponent { } if (multiColumn && pinned) { - pinButton = ; + pinButton = ; moveButtons = (
    - - + +
    ); } else if (multiColumn && this.props.onPin) { - pinButton = ; + pinButton = ; } if (!pinned && ((multiColumn && history.location?.state?.fromMastodon) || showBackButton)) { backButton = ( ); @@ -157,21 +165,21 @@ class ColumnHeader extends PureComponent { onClick={this.handleToggleClick} > - + {collapseIssues && } ); } - const hasTitle = icon && title; + const hasTitle = (icon || iconComponent) && title; const component = (

    {hasTitle && ( )} diff --git a/app/javascript/mastodon/components/dismissable_banner.tsx b/app/javascript/mastodon/components/dismissable_banner.tsx index 04a28e3cb..4feb74a3a 100644 --- a/app/javascript/mastodon/components/dismissable_banner.tsx +++ b/app/javascript/mastodon/components/dismissable_banner.tsx @@ -3,6 +3,8 @@ import { useCallback, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; +import { ReactComponent as CloseIcon } from '@material-symbols/svg-600/outlined/close.svg'; + import { bannerSettings } from 'mastodon/settings'; import { IconButton } from './icon_button'; @@ -36,6 +38,7 @@ export const DismissableBanner: React.FC> = ({
    diff --git a/app/javascript/mastodon/components/domain.tsx b/app/javascript/mastodon/components/domain.tsx index f4a3b9d4b..34c376f53 100644 --- a/app/javascript/mastodon/components/domain.tsx +++ b/app/javascript/mastodon/components/domain.tsx @@ -2,6 +2,8 @@ import { useCallback } from 'react'; import { defineMessages, useIntl } from 'react-intl'; +import { ReactComponent as LockOpenIcon } from '@material-symbols/svg-600/outlined/lock_open.svg'; + import { IconButton } from './icon_button'; const messages = defineMessages({ @@ -34,6 +36,7 @@ export const Domain: React.FC = ({ domain, onUnblockDomain }) => { diff --git a/app/javascript/mastodon/components/dropdown_menu.jsx b/app/javascript/mastodon/components/dropdown_menu.jsx index 31a5ed311..de540b392 100644 --- a/app/javascript/mastodon/components/dropdown_menu.jsx +++ b/app/javascript/mastodon/components/dropdown_menu.jsx @@ -6,6 +6,7 @@ import { withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; +import { ReactComponent as CloseIcon } from '@material-symbols/svg-600/outlined/close.svg'; import { supportsPassiveEvents } from 'detect-passive-events'; import Overlay from 'react-overlays/Overlay'; @@ -163,6 +164,7 @@ class Dropdown extends PureComponent { static propTypes = { children: PropTypes.node, icon: PropTypes.string, + iconComponent: PropTypes.func, items: PropTypes.oneOfType([PropTypes.array, ImmutablePropTypes.list]).isRequired, loading: PropTypes.bool, size: PropTypes.number, @@ -255,7 +257,7 @@ class Dropdown extends PureComponent { }; findTarget = () => { - return this.target; + return this.target?.buttonRef?.current; }; componentWillUnmount = () => { @@ -271,6 +273,7 @@ class Dropdown extends PureComponent { render () { const { icon, + iconComponent, items, size, title, @@ -291,9 +294,11 @@ class Dropdown extends PureComponent { onMouseDown: this.handleMouseDown, onKeyDown: this.handleButtonKeyDown, onKeyPress: this.handleKeyPress, + ref: this.setTargetRef, }) : ( ); return ( <> - - {button} - + {button} + {({ props, arrowProps, placement }) => (
    diff --git a/app/javascript/mastodon/components/edited_timestamp/index.jsx b/app/javascript/mastodon/components/edited_timestamp/index.jsx index 987b7c827..4375166bc 100644 --- a/app/javascript/mastodon/components/edited_timestamp/index.jsx +++ b/app/javascript/mastodon/components/edited_timestamp/index.jsx @@ -5,6 +5,8 @@ import { FormattedMessage, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; +import { ReactComponent as ArrowDropDownIcon } from '@material-symbols/svg-600/outlined/arrow_drop_down.svg'; + import { openModal } from 'mastodon/actions/modal'; import { Icon } from 'mastodon/components/icon'; import InlineAccount from 'mastodon/components/inline_account'; @@ -66,7 +68,7 @@ class EditedTimestamp extends PureComponent { return ( ); diff --git a/app/javascript/mastodon/components/icon.tsx b/app/javascript/mastodon/components/icon.tsx index 3d091c705..d53675e41 100644 --- a/app/javascript/mastodon/components/icon.tsx +++ b/app/javascript/mastodon/components/icon.tsx @@ -1,20 +1,50 @@ import classNames from 'classnames'; -interface Props extends React.HTMLAttributes { - id: string; - className?: string; - fixedWidth?: boolean; +import { ReactComponent as CheckBoxOutlineBlankIcon } from '@material-symbols/svg-600/outlined/check_box_outline_blank.svg'; + +interface SVGPropsWithTitle extends React.SVGProps { + title?: string; +} + +export type IconProp = React.FC; + +interface Props extends React.SVGProps { children?: never; + id: string; + icon: IconProp; + title?: string; } export const Icon: React.FC = ({ id, + icon: IconComponent, className, - fixedWidth, + title: titleProp, ...other -}) => ( - -); +}) => { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (!IconComponent) { + if (process.env.NODE_ENV !== 'production') { + throw new Error(` is missing an "icon" prop.`); + } + + IconComponent = CheckBoxOutlineBlankIcon; + } + + const ariaHidden = titleProp ? undefined : true; + const role = !ariaHidden ? 'img' : undefined; + + // Set the title to an empty string to remove the built-in SVG one if any + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + const title = titleProp || ''; + + return ( + + ); +}; diff --git a/app/javascript/mastodon/components/icon_button.tsx b/app/javascript/mastodon/components/icon_button.tsx index da6f19e9e..e38e38771 100644 --- a/app/javascript/mastodon/components/icon_button.tsx +++ b/app/javascript/mastodon/components/icon_button.tsx @@ -1,19 +1,20 @@ -import { PureComponent } from 'react'; +import { PureComponent, createRef } from 'react'; import classNames from 'classnames'; import { AnimatedNumber } from './animated_number'; +import type { IconProp } from './icon'; import { Icon } from './icon'; interface Props { className?: string; title: string; icon: string; + iconComponent: IconProp; onClick?: React.MouseEventHandler; onMouseDown?: React.MouseEventHandler; onKeyDown?: React.KeyboardEventHandler; onKeyPress?: React.KeyboardEventHandler; - size: number; active: boolean; expanded?: boolean; style?: React.CSSProperties; @@ -32,8 +33,9 @@ interface States { deactivate: boolean; } export class IconButton extends PureComponent { + buttonRef = createRef(); + static defaultProps = { - size: 18, active: false, disabled: false, animate: false, @@ -85,10 +87,6 @@ export class IconButton extends PureComponent { render() { const style = { - fontSize: `${this.props.size}px`, - width: `${this.props.size * 1.28571429}px`, - height: `${this.props.size * 1.28571429}px`, - lineHeight: `${this.props.size}px`, ...this.props.style, ...(this.props.active ? this.props.activeStyle : {}), }; @@ -99,6 +97,7 @@ export class IconButton extends PureComponent { disabled, expanded, icon, + iconComponent, inverted, overlay, tabIndex, @@ -120,13 +119,9 @@ export class IconButton extends PureComponent { 'icon-button--with-counter': typeof counter !== 'undefined', }); - if (typeof counter !== 'undefined') { - style.width = 'auto'; - } - let contents = ( <> -
    @@ -448,7 +454,7 @@ class Header extends ImmutablePureComponent {
    - {pair.get('verified_at') && } + {pair.get('verified_at') && }
    ))} diff --git a/app/javascript/mastodon/features/account_gallery/components/media_item.jsx b/app/javascript/mastodon/features/account_gallery/components/media_item.jsx index 63fbac679..657b17d43 100644 --- a/app/javascript/mastodon/features/account_gallery/components/media_item.jsx +++ b/app/javascript/mastodon/features/account_gallery/components/media_item.jsx @@ -5,6 +5,10 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { ReactComponent as AudiotrackIcon } from '@material-symbols/svg-600/outlined/music_note.svg'; +import { ReactComponent as PlayArrowIcon } from '@material-symbols/svg-600/outlined/play_arrow.svg'; +import { ReactComponent as VisibilityOffIcon } from '@material-symbols/svg-600/outlined/visibility_off.svg'; + import { Blurhash } from 'mastodon/components/blurhash'; import { Icon } from 'mastodon/components/icon'; import { autoPlayGif, displayMedia, useBlurhash } from 'mastodon/initial_state'; @@ -69,7 +73,7 @@ export default class MediaItem extends ImmutablePureComponent { if (!visible) { icon = ( - + ); } else { @@ -84,9 +88,9 @@ export default class MediaItem extends ImmutablePureComponent { ); if (attachment.get('type') === 'audio') { - label = ; + label = ; } else { - label = ; + label = ; } } else if (attachment.get('type') === 'image') { const focusX = attachment.getIn(['meta', 'focus', 'x']) || 0; diff --git a/app/javascript/mastodon/features/audio/index.jsx b/app/javascript/mastodon/features/audio/index.jsx index 103ef5782..60d599b97 100644 --- a/app/javascript/mastodon/features/audio/index.jsx +++ b/app/javascript/mastodon/features/audio/index.jsx @@ -7,6 +7,12 @@ import classNames from 'classnames'; import { is } from 'immutable'; +import { ReactComponent as DownloadIcon } from '@material-symbols/svg-600/outlined/download.svg'; +import { ReactComponent as PauseIcon } from '@material-symbols/svg-600/outlined/pause.svg'; +import { ReactComponent as PlayArrowIcon } from '@material-symbols/svg-600/outlined/play_arrow.svg'; +import { ReactComponent as VisibilityOffIcon } from '@material-symbols/svg-600/outlined/visibility_off.svg'; +import { ReactComponent as VolumeOffIcon } from '@material-symbols/svg-600/outlined/volume_off.svg'; +import { ReactComponent as VolumeUpIcon } from '@material-symbols/svg-600/outlined/volume_up.svg'; import { throttle, debounce } from 'lodash'; import { Icon } from 'mastodon/components/icon'; @@ -554,8 +560,8 @@ class Audio extends PureComponent {
    - - + +
    @@ -575,9 +581,9 @@ class Audio extends PureComponent {
    - {!editable && } + {!editable && } - +
    diff --git a/app/javascript/mastodon/features/bookmarked_statuses/index.jsx b/app/javascript/mastodon/features/bookmarked_statuses/index.jsx index b0c90a430..be6110b0d 100644 --- a/app/javascript/mastodon/features/bookmarked_statuses/index.jsx +++ b/app/javascript/mastodon/features/bookmarked_statuses/index.jsx @@ -8,6 +8,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; +import { ReactComponent as BookmarksIcon } from '@material-symbols/svg-600/outlined/bookmarks-fill.svg'; import { debounce } from 'lodash'; import { fetchBookmarkedStatuses, expandBookmarkedStatuses } from 'mastodon/actions/bookmarks'; @@ -79,7 +80,8 @@ class Bookmarks extends ImmutablePureComponent { return (
    - +
    ); diff --git a/app/javascript/mastodon/features/compose/components/compose_form.jsx b/app/javascript/mastodon/features/compose/components/compose_form.jsx index 32b7c176d..60fb6b7e1 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.jsx +++ b/app/javascript/mastodon/features/compose/components/compose_form.jsx @@ -7,6 +7,7 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { ReactComponent as LockIcon } from '@material-symbols/svg-600/outlined/lock.svg'; import { length } from 'stringz'; import { Icon } from 'mastodon/components/icon'; @@ -229,7 +230,7 @@ class ComposeForm extends ImmutablePureComponent { if (this.props.isEditing) { publishText = intl.formatMessage(messages.saveChanges); } else if (this.props.privacy === 'private' || this.props.privacy === 'direct') { - publishText = {intl.formatMessage(messages.publish)}; + publishText = <> {intl.formatMessage(messages.publish)}; } else { publishText = this.props.privacy !== 'unlisted' ? intl.formatMessage(messages.publishLoud, { publish: intl.formatMessage(messages.publish) }) : intl.formatMessage(messages.publish); } diff --git a/app/javascript/mastodon/features/compose/components/poll_button.jsx b/app/javascript/mastodon/features/compose/components/poll_button.jsx index daf48ba41..f722815b5 100644 --- a/app/javascript/mastodon/features/compose/components/poll_button.jsx +++ b/app/javascript/mastodon/features/compose/components/poll_button.jsx @@ -3,8 +3,11 @@ import { PureComponent } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; +import { ReactComponent as InsertChartIcon } from '@material-symbols/svg-600/outlined/insert_chart.svg'; + import { IconButton } from '../../../components/icon_button'; + const messages = defineMessages({ add_poll: { id: 'poll_button.add_poll', defaultMessage: 'Add a poll' }, remove_poll: { id: 'poll_button.remove_poll', defaultMessage: 'Remove poll' }, @@ -40,6 +43,7 @@ class PollButton extends PureComponent {
    - +

  • ); @@ -164,7 +167,7 @@ class PollForm extends ImmutablePureComponent {
    - + {/* eslint-disable-next-line jsx-a11y/no-onchange */}
    - +
    diff --git a/app/javascript/mastodon/features/compose/index.jsx b/app/javascript/mastodon/features/compose/index.jsx index 8997f1bc6..65650ffe0 100644 --- a/app/javascript/mastodon/features/compose/index.jsx +++ b/app/javascript/mastodon/features/compose/index.jsx @@ -9,6 +9,13 @@ import { Link } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; +import { ReactComponent as PeopleIcon } from '@material-symbols/svg-600/outlined/group.svg'; +import { ReactComponent as HomeIcon } from '@material-symbols/svg-600/outlined/home-fill.svg'; +import { ReactComponent as LogoutIcon } from '@material-symbols/svg-600/outlined/logout.svg'; +import { ReactComponent as MenuIcon } from '@material-symbols/svg-600/outlined/menu.svg'; +import { ReactComponent as NotificationsIcon } from '@material-symbols/svg-600/outlined/notifications-fill.svg'; +import { ReactComponent as PublicIcon } from '@material-symbols/svg-600/outlined/public.svg'; +import { ReactComponent as SettingsIcon } from '@material-symbols/svg-600/outlined/settings-fill.svg'; import spring from 'react-motion/lib/spring'; import { openModal } from 'mastodon/actions/modal'; @@ -101,21 +108,21 @@ class Compose extends PureComponent { return (
    {multiColumn && } diff --git a/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx b/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx index 9afad455c..005edc5c2 100644 --- a/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx +++ b/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx @@ -8,6 +8,8 @@ import { Link, withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { ReactComponent as MoreHorizIcon } from '@material-symbols/svg-600/outlined/more_horiz.svg'; +import { ReactComponent as ReplyIcon } from '@material-symbols/svg-600/outlined/reply.svg'; import { HotKeys } from 'react-hotkeys'; import AttachmentList from 'mastodon/components/attachment_list'; @@ -178,7 +180,7 @@ class Conversation extends ImmutablePureComponent { )}
    - +
    ; return ( - + 0 ? ( <> {accounts.size > 0 && ( - } onClickMore={this.handleLoadMoreAccounts}> + } onClickMore={this.handleLoadMoreAccounts}> {accounts.take(INITIAL_DISPLAY).map(id => )} )} {hashtags.size > 0 && ( - } onClickMore={this.handleLoadMoreHashtags}> + } onClickMore={this.handleLoadMoreHashtags}> {hashtags.take(INITIAL_DISPLAY).map(hashtag => )} )} {statuses.size > 0 && ( - } onClickMore={this.handleLoadMoreStatuses}> + } onClickMore={this.handleLoadMoreStatuses}> {statuses.take(INITIAL_DISPLAY).map(id => )} )} diff --git a/app/javascript/mastodon/features/favourited_statuses/index.jsx b/app/javascript/mastodon/features/favourited_statuses/index.jsx index 76cff7f8d..d3c3cc9f0 100644 --- a/app/javascript/mastodon/features/favourited_statuses/index.jsx +++ b/app/javascript/mastodon/features/favourited_statuses/index.jsx @@ -8,6 +8,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; +import { ReactComponent as StarIcon } from '@material-symbols/svg-600/outlined/star-fill.svg'; import { debounce } from 'lodash'; import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns'; @@ -80,6 +81,7 @@ class Favourites extends ImmutablePureComponent { + )} /> diff --git a/app/javascript/mastodon/features/filters/select_filter.jsx b/app/javascript/mastodon/features/filters/select_filter.jsx index 79ada6f58..9e8f87e00 100644 --- a/app/javascript/mastodon/features/filters/select_filter.jsx +++ b/app/javascript/mastodon/features/filters/select_filter.jsx @@ -5,6 +5,7 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; +import { ReactComponent as AddIcon } from '@material-symbols/svg-600/outlined/add.svg'; import fuzzysort from 'fuzzysort'; import { Icon } from 'mastodon/components/icon'; @@ -78,7 +79,7 @@ class SelectFilter extends PureComponent { renderCreateNew (name) { return (
    - +
    ); } diff --git a/app/javascript/mastodon/features/firehose/index.jsx b/app/javascript/mastodon/features/firehose/index.jsx index 849ee38f5..0ed8aa11a 100644 --- a/app/javascript/mastodon/features/firehose/index.jsx +++ b/app/javascript/mastodon/features/firehose/index.jsx @@ -6,6 +6,8 @@ import { useIntl, defineMessages, FormattedMessage } from 'react-intl'; import { Helmet } from 'react-helmet'; import { NavLink } from 'react-router-dom'; +import { ReactComponent as PublicIcon } from '@material-symbols/svg-600/outlined/public.svg'; + import { addColumn } from 'mastodon/actions/columns'; import { changeSetting } from 'mastodon/actions/settings'; import { connectPublicStream, connectCommunityStream } from 'mastodon/actions/streaming'; @@ -160,6 +162,7 @@ const Firehose = ({ feedType, multiColumn }) => {
    -
    -
    +
    +
    ); diff --git a/app/javascript/mastodon/features/followed_tags/index.jsx b/app/javascript/mastodon/features/followed_tags/index.jsx index 52414982a..7042f2438 100644 --- a/app/javascript/mastodon/features/followed_tags/index.jsx +++ b/app/javascript/mastodon/features/followed_tags/index.jsx @@ -8,6 +8,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; +import { ReactComponent as TagIcon } from '@material-symbols/svg-600/outlined/tag.svg'; import { debounce } from 'lodash'; import { expandFollowedHashtags, fetchFollowedHashtags } from 'mastodon/actions/tags'; @@ -55,6 +56,7 @@ class FollowedTags extends ImmutablePureComponent { ))} - {visibleReactions.size < 8 && } />} + {visibleReactions.size < 8 && } />}
    )} @@ -440,9 +443,9 @@ class Announcements extends ImmutablePureComponent { {announcements.size > 1 && (
    - + {index + 1} / {announcements.size} - +
    )}
    diff --git a/app/javascript/mastodon/features/getting_started/index.jsx b/app/javascript/mastodon/features/getting_started/index.jsx index cfe7b0cee..5994e88ed 100644 --- a/app/javascript/mastodon/features/getting_started/index.jsx +++ b/app/javascript/mastodon/features/getting_started/index.jsx @@ -9,6 +9,18 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; +import { ReactComponent as AlternateEmailIcon } from '@material-symbols/svg-600/outlined/alternate_email.svg'; +import { ReactComponent as BookmarksIcon } from '@material-symbols/svg-600/outlined/bookmarks-fill.svg'; +import { ReactComponent as PeopleIcon } from '@material-symbols/svg-600/outlined/group.svg'; +import { ReactComponent as HomeIcon } from '@material-symbols/svg-600/outlined/home-fill.svg'; +import { ReactComponent as ListAltIcon } from '@material-symbols/svg-600/outlined/list_alt.svg'; +import { ReactComponent as MenuIcon } from '@material-symbols/svg-600/outlined/menu.svg'; +import { ReactComponent as PersonAddIcon } from '@material-symbols/svg-600/outlined/person_add.svg'; +import { ReactComponent as PublicIcon } from '@material-symbols/svg-600/outlined/public.svg'; +import { ReactComponent as SettingsIcon } from '@material-symbols/svg-600/outlined/settings-fill.svg'; +import { ReactComponent as StarIcon } from '@material-symbols/svg-600/outlined/star.svg'; +import { ReactComponent as TagIcon } from '@material-symbols/svg-600/outlined/tag.svg'; + import { fetchFollowRequests } from 'mastodon/actions/accounts'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; @@ -101,38 +113,38 @@ class GettingStarted extends ImmutablePureComponent { if (showTrends) { navItems.push( - , + , ); } navItems.push( - , - , + , + , ); if (signedIn) { navItems.push( , - , - , - , - , - , + , + , + , + , + , ); if (myAccount.get('locked') || unreadFollowRequests > 0) { - navItems.push(); + navItems.push(); } navItems.push( , - , + , ); } return ( - {(signedIn && !multiColumn) ? : } + {(signedIn && !multiColumn) ? : }
    diff --git a/app/javascript/mastodon/features/hashtag_timeline/index.jsx b/app/javascript/mastodon/features/hashtag_timeline/index.jsx index 7079f55e9..d39d550a1 100644 --- a/app/javascript/mastodon/features/hashtag_timeline/index.jsx +++ b/app/javascript/mastodon/features/hashtag_timeline/index.jsx @@ -8,6 +8,7 @@ import { Helmet } from 'react-helmet'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; +import { ReactComponent as TagIcon } from '@material-symbols/svg-600/outlined/tag.svg'; import { isEqual } from 'lodash'; import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns'; @@ -190,6 +191,7 @@ class HashtagTimeline extends PureComponent { - + ); } @@ -198,6 +201,7 @@ class HomeTimeline extends PureComponent { ; + icon = ; title = ; actionDescription = ; break; case 'reblog': - icon = ; + icon = ; title = ; actionDescription = ; break; case 'favourite': - icon = ; + icon = ; title = ; actionDescription = ; break; case 'follow': - icon = ; + icon = ; title = ; actionDescription = ; break; diff --git a/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx index 3dc21f7e8..7552e1799 100644 --- a/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx +++ b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx @@ -6,6 +6,8 @@ import { Helmet } from 'react-helmet'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { ReactComponent as InfoIcon } from '@material-symbols/svg-600/outlined/info.svg'; + import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; @@ -27,7 +29,8 @@ class KeyboardShortcuts extends ImmutablePureComponent { diff --git a/app/javascript/mastodon/features/list_adder/components/list.jsx b/app/javascript/mastodon/features/list_adder/components/list.jsx index faade6f61..6c5aab85d 100644 --- a/app/javascript/mastodon/features/list_adder/components/list.jsx +++ b/app/javascript/mastodon/features/list_adder/components/list.jsx @@ -6,6 +6,10 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; +import { ReactComponent as AddIcon } from '@material-symbols/svg-600/outlined/add.svg'; +import { ReactComponent as CloseIcon } from '@material-symbols/svg-600/outlined/close.svg'; +import { ReactComponent as ListAltIcon } from '@material-symbols/svg-600/outlined/list_alt.svg'; + import { Icon } from 'mastodon/components/icon'; import { removeFromListAdder, addToListAdder } from '../../../actions/lists'; @@ -46,16 +50,16 @@ class List extends ImmutablePureComponent { let button; if (added) { - button = ; + button = ; } else { - button = ; + button = ; } return (
    - + {list.get('title')}
    diff --git a/app/javascript/mastodon/features/list_editor/components/account.jsx b/app/javascript/mastodon/features/list_editor/components/account.jsx index 4618bd1c1..f38c7d93a 100644 --- a/app/javascript/mastodon/features/list_editor/components/account.jsx +++ b/app/javascript/mastodon/features/list_editor/components/account.jsx @@ -6,6 +6,9 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; +import { ReactComponent as AddIcon } from '@material-symbols/svg-600/outlined/add.svg'; +import { ReactComponent as CloseIcon } from '@material-symbols/svg-600/outlined/close.svg'; + import { removeFromListEditor, addToListEditor } from '../../../actions/lists'; import { Avatar } from '../../../components/avatar'; import { DisplayName } from '../../../components/display_name'; @@ -53,9 +56,9 @@ class Account extends ImmutablePureComponent { let button; if (added) { - button = ; + button = ; } else { - button = ; + button = ; } return ( diff --git a/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx b/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx index 9e087a97d..1e2446f92 100644 --- a/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx +++ b/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx @@ -5,6 +5,8 @@ import { defineMessages, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; +import { ReactComponent as CheckIcon } from '@material-symbols/svg-600/outlined/check.svg'; + import { changeListEditorTitle, submitListEditor } from '../../../actions/lists'; import { IconButton } from '../../../components/icon_button'; @@ -61,6 +63,7 @@ class ListForm extends PureComponent { diff --git a/app/javascript/mastodon/features/list_editor/components/search.jsx b/app/javascript/mastodon/features/list_editor/components/search.jsx index 021bc450a..093af5cd4 100644 --- a/app/javascript/mastodon/features/list_editor/components/search.jsx +++ b/app/javascript/mastodon/features/list_editor/components/search.jsx @@ -7,6 +7,9 @@ import classNames from 'classnames'; import { connect } from 'react-redux'; +import { ReactComponent as CancelIcon } from '@material-symbols/svg-600/outlined/cancel.svg'; +import { ReactComponent as SearchIcon } from '@material-symbols/svg-600/outlined/search.svg'; + import { Icon } from 'mastodon/components/icon'; import { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists'; @@ -69,8 +72,8 @@ class Search extends PureComponent {
    - - + +
    ); diff --git a/app/javascript/mastodon/features/list_timeline/index.jsx b/app/javascript/mastodon/features/list_timeline/index.jsx index d8fcb5616..aadb6ecd5 100644 --- a/app/javascript/mastodon/features/list_timeline/index.jsx +++ b/app/javascript/mastodon/features/list_timeline/index.jsx @@ -9,6 +9,9 @@ import { withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; +import { ReactComponent as DeleteIcon } from '@material-symbols/svg-600/outlined/delete.svg'; +import { ReactComponent as EditIcon } from '@material-symbols/svg-600/outlined/edit.svg'; +import { ReactComponent as ListAltIcon } from '@material-symbols/svg-600/outlined/list_alt.svg'; import Toggle from 'react-toggle'; import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns'; @@ -181,6 +184,7 @@ class ListTimeline extends PureComponent {
    diff --git a/app/javascript/mastodon/features/lists/index.jsx b/app/javascript/mastodon/features/lists/index.jsx index e947a40b8..58e85b4d2 100644 --- a/app/javascript/mastodon/features/lists/index.jsx +++ b/app/javascript/mastodon/features/lists/index.jsx @@ -9,6 +9,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; +import { ReactComponent as ListAltIcon } from '@material-symbols/svg-600/outlined/list_alt.svg'; + import { fetchLists } from 'mastodon/actions/lists'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; @@ -65,7 +67,7 @@ class Lists extends ImmutablePureComponent { return ( - + @@ -76,7 +78,7 @@ class Lists extends ImmutablePureComponent { bindToDocument={!multiColumn} > {lists.map(list => - , + , )} diff --git a/app/javascript/mastodon/features/mutes/index.jsx b/app/javascript/mastodon/features/mutes/index.jsx index 947fe4c9b..da69bc547 100644 --- a/app/javascript/mastodon/features/mutes/index.jsx +++ b/app/javascript/mastodon/features/mutes/index.jsx @@ -8,6 +8,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; +import { ReactComponent as VolumeOffIcon } from '@material-symbols/svg-600/outlined/volume_off.svg'; import { debounce } from 'lodash'; import { fetchMutes, expandMutes } from '../../actions/mutes'; @@ -61,7 +62,7 @@ class Mutes extends ImmutablePureComponent { const emptyMessage = ; return ( - + + ); } diff --git a/app/javascript/mastodon/features/notifications/components/filter_bar.jsx b/app/javascript/mastodon/features/notifications/components/filter_bar.jsx index 773fe9a8f..84bd4791c 100644 --- a/app/javascript/mastodon/features/notifications/components/filter_bar.jsx +++ b/app/javascript/mastodon/features/notifications/components/filter_bar.jsx @@ -3,6 +3,13 @@ import { PureComponent } from 'react'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; +import { ReactComponent as HomeIcon } from '@material-symbols/svg-600/outlined/home-fill.svg'; +import { ReactComponent as InsertChartIcon } from '@material-symbols/svg-600/outlined/insert_chart.svg'; +import { ReactComponent as PersonAddIcon } from '@material-symbols/svg-600/outlined/person_add.svg'; +import { ReactComponent as RepeatIcon } from '@material-symbols/svg-600/outlined/repeat.svg'; +import { ReactComponent as ReplyAllIcon } from '@material-symbols/svg-600/outlined/reply_all.svg'; +import { ReactComponent as StarIcon } from '@material-symbols/svg-600/outlined/star.svg'; + import { Icon } from 'mastodon/components/icon'; const tooltips = defineMessages({ @@ -66,42 +73,42 @@ class FilterBar extends PureComponent { onClick={this.onClick('mention')} title={intl.formatMessage(tooltips.mentions)} > - +
    ); diff --git a/app/javascript/mastodon/features/notifications/components/follow_request.jsx b/app/javascript/mastodon/features/notifications/components/follow_request.jsx index 8a5c997c6..c10633bee 100644 --- a/app/javascript/mastodon/features/notifications/components/follow_request.jsx +++ b/app/javascript/mastodon/features/notifications/components/follow_request.jsx @@ -7,6 +7,9 @@ import { Link } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { ReactComponent as CheckIcon } from '@material-symbols/svg-600/outlined/check.svg'; +import { ReactComponent as CloseIcon } from '@material-symbols/svg-600/outlined/close.svg'; + import { Avatar } from 'mastodon/components/avatar'; import { DisplayName } from 'mastodon/components/display_name'; import { IconButton } from 'mastodon/components/icon_button'; @@ -50,8 +53,8 @@ class FollowRequest extends ImmutablePureComponent {
    - - + +
    diff --git a/app/javascript/mastodon/features/notifications/components/notification.jsx b/app/javascript/mastodon/features/notifications/components/notification.jsx index d19d17d9b..ad7308b26 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.jsx +++ b/app/javascript/mastodon/features/notifications/components/notification.jsx @@ -8,6 +8,14 @@ import { Link, withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { ReactComponent as EditIcon } from '@material-symbols/svg-600/outlined/edit.svg'; +import { ReactComponent as FlagIcon } from '@material-symbols/svg-600/outlined/flag-fill.svg'; +import { ReactComponent as HomeIcon } from '@material-symbols/svg-600/outlined/home-fill.svg'; +import { ReactComponent as InsertChartIcon } from '@material-symbols/svg-600/outlined/insert_chart.svg'; +import { ReactComponent as PersonIcon } from '@material-symbols/svg-600/outlined/person-fill.svg'; +import { ReactComponent as PersonAddIcon } from '@material-symbols/svg-600/outlined/person_add-fill.svg'; +import { ReactComponent as RepeatIcon } from '@material-symbols/svg-600/outlined/repeat.svg'; +import { ReactComponent as StarIcon } from '@material-symbols/svg-600/outlined/star-fill.svg'; import { HotKeys } from 'react-hotkeys'; import { Icon } from 'mastodon/components/icon'; @@ -128,9 +136,7 @@ class Notification extends ImmutablePureComponent {
    -
    - -
    + @@ -150,9 +156,7 @@ class Notification extends ImmutablePureComponent {
    -
    - -
    + @@ -190,9 +194,7 @@ class Notification extends ImmutablePureComponent {
    -
    - -
    + @@ -222,9 +224,7 @@ class Notification extends ImmutablePureComponent {
    -
    - -
    + @@ -258,9 +258,7 @@ class Notification extends ImmutablePureComponent {
    -
    - -
    + @@ -295,9 +293,7 @@ class Notification extends ImmutablePureComponent {
    -
    - -
    + @@ -334,9 +330,7 @@ class Notification extends ImmutablePureComponent {
    -
    - -
    + {ownPoll ? ( @@ -371,9 +365,7 @@ class Notification extends ImmutablePureComponent {
    -
    - -
    + @@ -401,9 +393,7 @@ class Notification extends ImmutablePureComponent {
    -
    - -
    + diff --git a/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx b/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx index 9ce014d25..b7ebb4c46 100644 --- a/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx +++ b/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx @@ -5,6 +5,9 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; +import { ReactComponent as CloseIcon } from '@material-symbols/svg-600/outlined/close.svg'; +import { ReactComponent as TuneIcon } from '@material-symbols/svg-600/outlined/tune.svg'; + import { requestBrowserPermission } from 'mastodon/actions/notifications'; import { changeSetting } from 'mastodon/actions/settings'; import { Button } from 'mastodon/components/button'; @@ -36,11 +39,11 @@ class NotificationsPermissionBanner extends PureComponent { return (
    - +

    -

    }} />

    +

    }} />

    ); diff --git a/app/javascript/mastodon/features/notifications/index.jsx b/app/javascript/mastodon/features/notifications/index.jsx index 9fd2cf4b1..379932b7b 100644 --- a/app/javascript/mastodon/features/notifications/index.jsx +++ b/app/javascript/mastodon/features/notifications/index.jsx @@ -10,6 +10,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; +import { ReactComponent as DoneAllIcon } from '@material-symbols/svg-600/outlined/done_all.svg'; +import { ReactComponent as NotificationsIcon } from '@material-symbols/svg-600/outlined/notifications-fill.svg'; import { debounce } from 'lodash'; import { compareId } from 'mastodon/compare_id'; @@ -260,7 +262,7 @@ class Notifications extends PureComponent { onClick={this.handleMarkAsRead} className='column-header__button' > - + ); } @@ -269,6 +271,7 @@ class Notifications extends PureComponent { ( - - - -); - -export default ArrowSmallRight; \ No newline at end of file diff --git a/app/javascript/mastodon/features/onboarding/components/progress_indicator.jsx b/app/javascript/mastodon/features/onboarding/components/progress_indicator.jsx index 32d1754ff..37288a286 100644 --- a/app/javascript/mastodon/features/onboarding/components/progress_indicator.jsx +++ b/app/javascript/mastodon/features/onboarding/components/progress_indicator.jsx @@ -3,7 +3,9 @@ import { Fragment } from 'react'; import classNames from 'classnames'; -import { Check } from 'mastodon/components/check'; +import { ReactComponent as CheckIcon } from '@material-symbols/svg-600/outlined/done.svg'; + +import { Icon } from 'mastodon/components/icon'; const ProgressIndicator = ({ steps, completed }) => (
    @@ -12,7 +14,7 @@ const ProgressIndicator = ({ steps, completed }) => ( {i > 0 &&
    i })} />}
    i })}> - {completed > i && } + {completed > i && }
    ))} diff --git a/app/javascript/mastodon/features/onboarding/components/step.jsx b/app/javascript/mastodon/features/onboarding/components/step.jsx index 379f43304..1f42d9d49 100644 --- a/app/javascript/mastodon/features/onboarding/components/step.jsx +++ b/app/javascript/mastodon/features/onboarding/components/step.jsx @@ -1,15 +1,15 @@ import PropTypes from 'prop-types'; -import { Check } from 'mastodon/components/check'; +import { ReactComponent as ArrowRightAltIcon } from '@material-symbols/svg-600/outlined/arrow_right_alt.svg'; +import { ReactComponent as CheckIcon } from '@material-symbols/svg-600/outlined/done.svg'; + import { Icon } from 'mastodon/components/icon'; -import ArrowSmallRight from './arrow_small_right'; - -const Step = ({ label, description, icon, completed, onClick, href }) => { +const Step = ({ label, description, icon, iconComponent, completed, onClick, href }) => { const content = ( <>
    - +
    @@ -18,7 +18,7 @@ const Step = ({ label, description, icon, completed, onClick, href }) => {
    - {completed ? : } + {completed ? : }
    ); @@ -42,6 +42,7 @@ Step.propTypes = { label: PropTypes.node, description: PropTypes.node, icon: PropTypes.string, + iconComponent: PropTypes.func, completed: PropTypes.bool, href: PropTypes.string, onClick: PropTypes.func, diff --git a/app/javascript/mastodon/features/onboarding/index.jsx b/app/javascript/mastodon/features/onboarding/index.jsx index 78f2444db..0be1512ad 100644 --- a/app/javascript/mastodon/features/onboarding/index.jsx +++ b/app/javascript/mastodon/features/onboarding/index.jsx @@ -9,19 +9,24 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; +import { ReactComponent as AccountCircleIcon } from '@material-symbols/svg-600/outlined/account_circle.svg'; +import { ReactComponent as ArrowRightAltIcon } from '@material-symbols/svg-600/outlined/arrow_right_alt.svg'; +import { ReactComponent as ContentCopyIcon } from '@material-symbols/svg-600/outlined/content_copy.svg'; +import { ReactComponent as EditNoteIcon } from '@material-symbols/svg-600/outlined/edit_note.svg'; +import { ReactComponent as PersonAddIcon } from '@material-symbols/svg-600/outlined/person_add.svg'; import { debounce } from 'lodash'; import illustration from 'mastodon/../images/elephant_ui_conversation.svg'; import { fetchAccount } from 'mastodon/actions/accounts'; import { focusCompose } from 'mastodon/actions/compose'; import { closeOnboarding } from 'mastodon/actions/onboarding'; +import { Icon } from 'mastodon/components/icon'; import Column from 'mastodon/features/ui/components/column'; import { me } from 'mastodon/initial_state'; import { makeGetAccount } from 'mastodon/selectors'; import { assetHost } from 'mastodon/utils/config'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; -import ArrowSmallRight from './components/arrow_small_right'; import Step from './components/step'; import Follows from './follows'; import Share from './share'; @@ -115,10 +120,10 @@ class Onboarding extends ImmutablePureComponent {
    - 0 && account.get('note').length > 0)} icon='address-book-o' label={} description={} /> - = 7} icon='user-plus' label={} description={} /> - = 1} icon='pencil-square-o' label={} description={ }} />} /> - } description={} /> + 0 && account.get('note').length > 0)} icon='address-book-o' iconComponent={AccountCircleIcon} label={} description={} /> + = 7} icon='user-plus' iconComponent={PersonAddIcon} label={} description={} /> + = 1} icon='pencil-square-o' iconComponent={EditNoteIcon} label={} description={ }} />} /> + } description={} />

    @@ -126,12 +131,12 @@ class Onboarding extends ImmutablePureComponent {
    - + - +
    diff --git a/app/javascript/mastodon/features/onboarding/share.jsx b/app/javascript/mastodon/features/onboarding/share.jsx index c5b185a24..c9d58c4e6 100644 --- a/app/javascript/mastodon/features/onboarding/share.jsx +++ b/app/javascript/mastodon/features/onboarding/share.jsx @@ -9,6 +9,8 @@ import { Link } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; +import { ReactComponent as ArrowRightAltIcon } from '@material-symbols/svg-600/outlined/arrow_right_alt.svg'; +import { ReactComponent as ContentCopyIcon } from '@material-symbols/svg-600/outlined/content_copy.svg'; import SwipeableViews from 'react-swipeable-views'; import Column from 'mastodon/components/column'; @@ -16,8 +18,6 @@ import ColumnBackButton from 'mastodon/components/column_back_button'; import { Icon } from 'mastodon/components/icon'; import { me, domain } from 'mastodon/initial_state'; -import ArrowSmallRight from './components/arrow_small_right'; - const messages = defineMessages({ shareableMessage: { id: 'onboarding.share.message', defaultMessage: 'I\'m {username} on #Mastodon! Come follow me at {url}' }, }); @@ -79,7 +79,7 @@ class CopyPasteText extends PureComponent {