diff --git a/src/ui/component/button/view.jsx b/src/ui/component/button/view.jsx index a71c85989..a92322175 100644 --- a/src/ui/component/button/view.jsx +++ b/src/ui/component/button/view.jsx @@ -107,9 +107,11 @@ class Button extends React.PureComponent { to={path} title={title} onClick={e => e.stopPropagation()} - getProps={({ isCurrent }) => ({ + getProps={({ isCurrent, isPartiallyCurrent }) => ({ className: - isCurrent && activeClass ? `${combinedClassName} ${activeClass}` : combinedClassName, + (path === '/' ? isCurrent : isPartiallyCurrent) && activeClass + ? `${combinedClassName} ${activeClass}` + : combinedClassName, })} > {content} diff --git a/src/ui/component/cardMedia/view.jsx b/src/ui/component/cardMedia/view.jsx index 54e692eee..6c9f41994 100644 --- a/src/ui/component/cardMedia/view.jsx +++ b/src/ui/component/cardMedia/view.jsx @@ -15,7 +15,7 @@ class CardMedia extends React.PureComponent { style={ thumbnail ? { backgroundImage: `url('${thumbnail}')` } - : { backgroundImage: `url(${Placeholder})` } + : { backgroundImage: `url(/${Placeholder})` } } className="media__thumb" /> diff --git a/src/ui/component/common/icon-custom.jsx b/src/ui/component/common/icon-custom.jsx index d409c31dc..723dd3182 100644 --- a/src/ui/component/common/icon-custom.jsx +++ b/src/ui/component/common/icon-custom.jsx @@ -1,6 +1,7 @@ // @flow +import type { Node } from 'react'; import * as ICONS from 'constants/icons'; -import React, { Fragment } from 'react'; +import React from 'react'; type IconProps = { size: number, @@ -8,7 +9,7 @@ type IconProps = { }; // Returns a react component -const buildIcon = iconStrokes => (props: IconProps) => { +const buildIcon = (iconStrokes: Node, options?: {} = {}) => (props: IconProps) => { const { size = 24, color = 'currentColor', ...otherProps } = props; return ( (props: IconProps) => { viewBox="0 0 24 24" width={size} height={size} - fill="solid" + fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" + {...options} {...otherProps} > {iconStrokes} @@ -114,16 +116,11 @@ export const customIcons = { [ICONS.UNSUBSCRIBE]: buildIcon( ), - [ICONS.LBRY]: buildIcon( - - - - + // The LBRY icon is different from the base icon set so don't use buildIcon() + [ICONS.LBRY]: props => ( + + + + ), }; diff --git a/src/ui/component/common/icon.jsx b/src/ui/component/common/icon.jsx index 4bd03fb34..15de1ba9b 100644 --- a/src/ui/component/common/icon.jsx +++ b/src/ui/component/common/icon.jsx @@ -2,6 +2,7 @@ import * as ICONS from 'constants/icons'; import React from 'react'; import Tooltip from 'component/common/tooltip'; +import classnames from 'classnames'; import { customIcons } from './icon-custom'; let featherIcons = false; @@ -35,6 +36,7 @@ type Props = { tooltip?: string, // tooltip direction iconColor?: string, size?: number, + className?: string, }; class IconComponent extends React.PureComponent { @@ -63,7 +65,7 @@ class IconComponent extends React.PureComponent { }; render() { - const { icon, tooltip, iconColor, size } = this.props; + const { icon, tooltip, iconColor, size, className } = this.props; const Icon = customIcons[this.props.icon] || LazyFeatherIcons[this.props.icon]; if (!Icon) { @@ -83,9 +85,16 @@ class IconComponent extends React.PureComponent { } const inner = ( } + fallback={ + + } > - + ); diff --git a/src/ui/component/header/view.jsx b/src/ui/component/header/view.jsx index 0e53da099..75d923e62 100644 --- a/src/ui/component/header/view.jsx +++ b/src/ui/component/header/view.jsx @@ -4,6 +4,7 @@ import * as React from 'react'; import Button from 'component/button'; import LbcSymbol from 'component/common/lbc-symbol'; import WunderBar from 'component/wunderbar'; +import Icon from 'component/common/icon'; type Props = { autoUpdateDownloaded: boolean, @@ -37,42 +38,26 @@ const Header = (props: Props) => {
{/* @if TARGET='app' */} -
+ {/* @endif */} {/* @if TARGET='web' */}