mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
UX: Replace all fa-bell instances with Notification icon (#17524)
* UX: Replace all fa-bell instances with Notification icon * Fix flask comment fencing * Fix import error
This commit is contained in:
parent
d79374189c
commit
7774ee6e2f
@ -39,8 +39,14 @@ import IconImport from '../../ui/icon/icon-import';
|
|||||||
import Button from '../../ui/button';
|
import Button from '../../ui/button';
|
||||||
import SearchIcon from '../../ui/icon/search-icon';
|
import SearchIcon from '../../ui/icon/search-icon';
|
||||||
import { SUPPORT_LINK } from '../../../../shared/lib/ui-utils';
|
import { SUPPORT_LINK } from '../../../../shared/lib/ui-utils';
|
||||||
import { Icon, ICON_NAMES } from '../../component-library';
|
|
||||||
import { Color } from '../../../helpers/constants/design-system';
|
import { Color } from '../../../helpers/constants/design-system';
|
||||||
|
import {
|
||||||
|
Icon,
|
||||||
|
ICON_NAMES,
|
||||||
|
///: BEGIN:ONLY_INCLUDE_IN(flask)
|
||||||
|
ICON_SIZES,
|
||||||
|
///: END:ONLY_INCLUDE_IN
|
||||||
|
} from '../../component-library';
|
||||||
import KeyRingLabel from './keyring-label';
|
import KeyRingLabel from './keyring-label';
|
||||||
|
|
||||||
export function AccountMenuItem(props) {
|
export function AccountMenuItem(props) {
|
||||||
@ -426,7 +432,7 @@ export default class AccountMenu extends Component {
|
|||||||
}}
|
}}
|
||||||
icon={
|
icon={
|
||||||
<div className="account-menu__notifications">
|
<div className="account-menu__notifications">
|
||||||
<i className="fa fa-bell fa-xl" />
|
<Icon name={ICON_NAMES.NOTIFICATION} size={ICON_SIZES.LG} />
|
||||||
{unreadNotificationsCount > 0 && (
|
{unreadNotificationsCount > 0 && (
|
||||||
<div className="account-menu__notifications__count">
|
<div className="account-menu__notifications__count">
|
||||||
{unreadNotificationsCount}
|
{unreadNotificationsCount}
|
||||||
|
@ -20,7 +20,7 @@ function getDescriptionNode(
|
|||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<div className="permission" key={`${permissionName}-${index}`}>
|
<div className="permission" key={`${permissionName}-${index}`}>
|
||||||
<i className={leftIcon} />
|
{typeof leftIcon === 'string' ? <i className={leftIcon} /> : leftIcon}
|
||||||
{label}
|
{label}
|
||||||
{rightIcon && <i className={rightIcon} />}
|
{rightIcon && <i className={rightIcon} />}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
import { Icon, ICON_NAMES } from '../../component-library';
|
||||||
import TabBar from '.';
|
import TabBar from '.';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -38,7 +39,7 @@ export default {
|
|||||||
key: 'securityAndPrivacy',
|
key: 'securityAndPrivacy',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: <i className="fa fa-bell" />,
|
icon: <Icon name={ICON_NAMES.NOTIFICATION} />,
|
||||||
content: 'Alerts',
|
content: 'Alerts',
|
||||||
key: 'alerts',
|
key: 'alerts',
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { ICON_NAMES } from '../../components/component-library';
|
||||||
import {
|
import {
|
||||||
ALERTS_ROUTE,
|
ALERTS_ROUTE,
|
||||||
ADVANCED_ROUTE,
|
ADVANCED_ROUTE,
|
||||||
@ -223,7 +224,7 @@ export const SETTINGS_CONSTANTS = [
|
|||||||
sectionMessage: (t) => t('alertSettingsUnconnectedAccount'),
|
sectionMessage: (t) => t('alertSettingsUnconnectedAccount'),
|
||||||
descriptionMessage: (t) => t('alertSettingsUnconnectedAccount'),
|
descriptionMessage: (t) => t('alertSettingsUnconnectedAccount'),
|
||||||
route: `${ALERTS_ROUTE}#unconnected-account`,
|
route: `${ALERTS_ROUTE}#unconnected-account`,
|
||||||
icon: 'fa fa-bell',
|
iconName: ICON_NAMES.NOTIFICATION,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabMessage: (t) => t('alerts'),
|
tabMessage: (t) => t('alerts'),
|
||||||
|
@ -14,6 +14,7 @@ import {
|
|||||||
} from '../../../shared/constants/permissions';
|
} from '../../../shared/constants/permissions';
|
||||||
///: BEGIN:ONLY_INCLUDE_IN(flask)
|
///: BEGIN:ONLY_INCLUDE_IN(flask)
|
||||||
import { SNAPS_METADATA } from '../../../shared/constants/snaps';
|
import { SNAPS_METADATA } from '../../../shared/constants/snaps';
|
||||||
|
import { Icon, ICON_NAMES } from '../../components/component-library';
|
||||||
import { coinTypeToProtocolName, getSnapDerivationPathName } from './util';
|
import { coinTypeToProtocolName, getSnapDerivationPathName } from './util';
|
||||||
///: END:ONLY_INCLUDE_IN
|
///: END:ONLY_INCLUDE_IN
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ const PERMISSION_DESCRIPTIONS = deepFreeze({
|
|||||||
weight: 3,
|
weight: 3,
|
||||||
}),
|
}),
|
||||||
[RestrictedMethods.snap_notify]: (t) => ({
|
[RestrictedMethods.snap_notify]: (t) => ({
|
||||||
leftIcon: 'fas fa-bell',
|
leftIcon: <Icon name={ICON_NAMES.NOTIFICATION} />,
|
||||||
label: t('permission_notifications'),
|
label: t('permission_notifications'),
|
||||||
rightIcon: null,
|
rightIcon: null,
|
||||||
weight: 3,
|
weight: 3,
|
||||||
|
@ -4,6 +4,7 @@ import classnames from 'classnames';
|
|||||||
import { highlightSearchedText } from '../../../helpers/utils/settings-search';
|
import { highlightSearchedText } from '../../../helpers/utils/settings-search';
|
||||||
import { I18nContext } from '../../../contexts/i18n';
|
import { I18nContext } from '../../../contexts/i18n';
|
||||||
import IconCaretRight from '../../../components/ui/icon/icon-caret-right';
|
import IconCaretRight from '../../../components/ui/icon/icon-caret-right';
|
||||||
|
import { Icon } from '../../../components/component-library';
|
||||||
|
|
||||||
export default function SettingsSearchList({ results, onClickSetting }) {
|
export default function SettingsSearchList({ results, onClickSetting }) {
|
||||||
const t = useContext(I18nContext);
|
const t = useContext(I18nContext);
|
||||||
@ -13,7 +14,7 @@ export default function SettingsSearchList({ results, onClickSetting }) {
|
|||||||
return (
|
return (
|
||||||
<div className="settings-page__header__search__list">
|
<div className="settings-page__header__search__list">
|
||||||
{results.slice(0, 5).map((result) => {
|
{results.slice(0, 5).map((result) => {
|
||||||
const { icon, tabMessage, sectionMessage, route } = result;
|
const { icon, iconName, tabMessage, sectionMessage, route } = result;
|
||||||
return (
|
return (
|
||||||
Boolean(icon || tabMessage || sectionMessage) && (
|
Boolean(icon || tabMessage || sectionMessage) && (
|
||||||
<div key={`settings_${route}`}>
|
<div key={`settings_${route}`}>
|
||||||
@ -21,13 +22,16 @@ export default function SettingsSearchList({ results, onClickSetting }) {
|
|||||||
className="settings-page__header__search__list__item"
|
className="settings-page__header__search__list__item"
|
||||||
onClick={() => onClickSetting(result)}
|
onClick={() => onClickSetting(result)}
|
||||||
>
|
>
|
||||||
<i
|
{iconName ? (
|
||||||
className={classnames(
|
<Icon name={iconName} />
|
||||||
'settings-page__header__search__list__item__icon',
|
) : (
|
||||||
icon,
|
<i
|
||||||
)}
|
className={classnames(
|
||||||
/>
|
'settings-page__header__search__list__item__icon',
|
||||||
|
icon,
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<span
|
<span
|
||||||
id={`menu-tab_${route}`}
|
id={`menu-tab_${route}`}
|
||||||
className={classnames(
|
className={classnames(
|
||||||
|
@ -28,6 +28,7 @@ import {
|
|||||||
|
|
||||||
import { getSettingsRoutes } from '../../helpers/utils/settings-search';
|
import { getSettingsRoutes } from '../../helpers/utils/settings-search';
|
||||||
import AddNetwork from '../../components/app/add-network/add-network';
|
import AddNetwork from '../../components/app/add-network/add-network';
|
||||||
|
import { Icon, ICON_NAMES } from '../../components/component-library';
|
||||||
import SettingsTab from './settings-tab';
|
import SettingsTab from './settings-tab';
|
||||||
import AlertsTab from './alerts-tab';
|
import AlertsTab from './alerts-tab';
|
||||||
import NetworksTab from './networks-tab';
|
import NetworksTab from './networks-tab';
|
||||||
@ -290,7 +291,7 @@ class SettingsPage extends PureComponent {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: t('alerts'),
|
content: t('alerts'),
|
||||||
icon: <i className="fa fa-bell" />,
|
icon: <Icon name={ICON_NAMES.NOTIFICATION} />,
|
||||||
key: ALERTS_ROUTE,
|
key: ALERTS_ROUTE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user