More release blockers #1490
|
@ -36,6 +36,7 @@
|
||||||
"func-names": ["warn", "as-needed"],
|
"func-names": ["warn", "as-needed"],
|
||||||
"jsx-a11y/label-has-for": 0,
|
"jsx-a11y/label-has-for": 0,
|
||||||
"import/prefer-default-export": 0,
|
"import/prefer-default-export": 0,
|
||||||
"no-return-assign": 0
|
"no-return-assign": 0,
|
||||||
|
"react/require-default-props": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
"formik": "^0.10.4",
|
"formik": "^0.10.4",
|
||||||
"hast-util-sanitize": "^1.1.2",
|
"hast-util-sanitize": "^1.1.2",
|
||||||
"keytar": "^4.2.1",
|
"keytar": "^4.2.1",
|
||||||
"lbry-redux": "lbryio/lbry-redux#30c18725d8c6c141c30c57f0a324d0abb8963b99",
|
"lbry-redux": "lbryio/lbry-redux#c41899e78415cae6fcb7bfca0e6ba48bb6bfe6c4",
|
||||||
"localforage": "^1.7.1",
|
"localforage": "^1.7.1",
|
||||||
"mixpanel-browser": "^2.17.1",
|
"mixpanel-browser": "^2.17.1",
|
||||||
"moment": "^2.22.0",
|
"moment": "^2.22.0",
|
||||||
|
|
|
@ -22,6 +22,7 @@ type Props = {
|
||||||
button: ?string, // primary, secondary, alt, link
|
button: ?string, // primary, secondary, alt, link
|
||||||
noPadding: ?boolean, // to remove padding and allow circular buttons
|
noPadding: ?boolean, // to remove padding and allow circular buttons
|
||||||
uppercase: ?boolean,
|
uppercase: ?boolean,
|
||||||
|
iconColor: ?string,
|
||||||
};
|
};
|
||||||
|
|
||||||
class Button extends React.PureComponent<Props> {
|
class Button extends React.PureComponent<Props> {
|
||||||
|
@ -48,6 +49,7 @@ class Button extends React.PureComponent<Props> {
|
||||||
type,
|
type,
|
||||||
noPadding,
|
noPadding,
|
||||||
uppercase,
|
uppercase,
|
||||||
|
iconColor,
|
||||||
...otherProps
|
...otherProps
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -82,10 +84,10 @@ class Button extends React.PureComponent<Props> {
|
||||||
|
|
||||||
const content = (
|
const content = (
|
||||||
<span className="btn__content">
|
<span className="btn__content">
|
||||||
{icon && <Icon icon={icon} />}
|
{icon && <Icon icon={icon} iconColor={iconColor} />}
|
||||||
{label && <span className="btn__label">{label}</span>}
|
{label && <span className="btn__label">{label}</span>}
|
||||||
{children && children}
|
{children && children}
|
||||||
{iconRight && <Icon icon={iconRight} />}
|
{iconRight && <Icon icon={iconRight} iconColor={iconColor} />}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,6 @@ export class FormFieldPrice extends React.PureComponent<Props> {
|
||||||
name={`${name}_currency`}
|
name={`${name}_currency`}
|
||||||
type="select"
|
type="select"
|
||||||
id={`${name}_currency`}
|
id={`${name}_currency`}
|
||||||
className="form-field"
|
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onChange={this.handleCurrencyChange}
|
onChange={this.handleCurrencyChange}
|
||||||
value={price.currency}
|
value={price.currency}
|
||||||
|
|
|
@ -42,7 +42,7 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
if (type) {
|
if (type) {
|
||||||
if (type === 'select') {
|
if (type === 'select') {
|
||||||
input = (
|
input = (
|
||||||
<select id={name} {...inputProps}>
|
<select className="form-field__select" id={name} {...inputProps}>
|
||||||
{children}
|
{children}
|
||||||
</select>
|
</select>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,26 +1,52 @@
|
||||||
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
// import * as icons from 'constants/icons';
|
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
import * as FeatherIcons from 'react-feather';
|
import * as FeatherIcons from 'react-feather';
|
||||||
import * as icons from 'constants/icons';
|
import * as icons from 'constants/icons';
|
||||||
|
import Tooltip from 'component/common/tooltip';
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
|
||||||
const RED_COLOR = '#e2495e';
|
const RED_COLOR = '#e2495e';
|
||||||
|
const PURPLE_COLOR = '#8165b0';
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
icon: string,
|
icon: string,
|
||||||
|
tooltip?: string, // tooltip direction
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
iconColor?: string,
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
};
|
};
|
||||||
|
|
||||||
class IconComponent extends React.PureComponent<Props> {
|
class IconComponent extends React.PureComponent<Props> {
|
||||||
// TODO: Move all icons to constants and add titles for all
|
getTooltip = (icon: string) => {
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
// Add some some sort of hover flyout with the title?
|
switch (icon) {
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
This may not scale too well, also icons may render different colors based on context This may not scale too well, also icons may render different colors based on context
👍 I'll create a 👍 I'll create a `color` prop and use that instead. Then any icon can have a color.
|
|||||||
|
case icons.FEATURED:
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
return __('Featured content. Earn rewards for watching.');
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
case icons.LOCAL:
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
return __('This file is downloaded.');
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
default:
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
return null;
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
}
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
};
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
getIconColor = (color: string) => {
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
switch (color) {
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
case 'red':
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
return RED_COLOR;
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
case 'purple':
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
return PURPLE_COLOR;
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
default:
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
return null;
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
}
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
};
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { icon } = this.props;
|
const { icon, tooltip, iconColor } = this.props;
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
const Icon = FeatherIcons[icon];
|
const Icon = FeatherIcons[icon];
|
||||||
|
|
||||||
|
if (!Icon) {
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
return null;
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
}
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
let color;
|
let color;
|
||||||
if (icon === icons.HEART || icon === icons.FEATURED) {
|
if (iconColor) {
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
color = RED_COLOR;
|
color = this.getIconColor(iconColor);
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
}
|
}
|
||||||
|
|
||||||
let size = 14;
|
let size = 14;
|
||||||
|
@ -28,7 +54,19 @@ class IconComponent extends React.PureComponent<Props> {
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
size = 20;
|
size = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Icon ? <Icon size={size} className="icon" color={color} /> : null;
|
let tooltipText;
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
if (tooltip) {
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
tooltipText = this.getTooltip(icon);
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
}
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
const inner = <Icon size={size} className="icon" color={color} />;
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
return tooltip ? (
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
<Tooltip icon body={tooltipText} direction={tooltip}>
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
{inner}
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
</Tooltip>
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
) : (
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
inner
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
|
);
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
Would be great to have a common color palette shared that's paired with a style guide. Would be great to have a common color palette shared that's paired with a style guide.
I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app. I agree. Currently just copying them from our scss variables file. The values should probably live somewhere outside the app.
|
|
@ -1,55 +1,38 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import * as React from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import Icon from 'component/common/icon';
|
|
||||||
import Button from 'component/button';
|
|
||||||
import * as icons from 'constants/icons';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
body: string,
|
body: string,
|
||||||
label: string,
|
label?: string,
|
||||||
|
children: ?React.Node,
|
||||||
|
icon: ?boolean,
|
||||||
|
direction: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
type State = {
|
class ToolTip extends React.PureComponent<Props> {
|
||||||
showTooltip: boolean,
|
static defaultProps = {
|
||||||
};
|
direction: 'bottom',
|
||||||
|
|
||||||
class ToolTip extends React.PureComponent<Props, State> {
|
|
||||||
constructor(props: Props) {
|
|
||||||
super(props);
|
|
||||||
|
|
||||||
this.state = {
|
|
||||||
showTooltip: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
(this: any).handleClick = this.handleClick.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleClick() {
|
|
||||||
const { showTooltip } = this.state;
|
|
||||||
|
|
||||||
if (!showTooltip) {
|
|
||||||
document.addEventListener('click', this.handleClick);
|
|
||||||
} else {
|
|
||||||
document.removeEventListener('click', this.handleClick);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setState({
|
|
||||||
showTooltip: !showTooltip,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { label, body } = this.props;
|
const { children, label, body, icon, direction } = this.props;
|
||||||
const { showTooltip } = this.state;
|
|
||||||
|
const tooltipContent = children || label;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className="tooltip">
|
<span
|
||||||
<Button button="link" className="help tooltip__link" onClick={this.handleClick}>
|
className={classnames('tooltip', {
|
||||||
{label}
|
'tooltip--label': label && !icon,
|
||||||
{showTooltip && <Icon icon={icons.CLOSE} />}
|
'tooltip--icon': icon,
|
||||||
</Button>
|
'tooltip--top': direction === 'top',
|
||||||
<div className={classnames('tooltip__body', { hidden: !showTooltip })}>{body}</div>
|
'tooltip--right': direction === 'right',
|
||||||
|
'tooltip--bottom': direction === 'bottom',
|
||||||
|
'tooltip--left': direction === 'left',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{tooltipContent}
|
||||||
|
<span className="tooltip__body">{body}</span>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import FileDownloadLink from 'component/fileDownloadLink';
|
|
||||||
import { MODALS } from 'lbry-redux';
|
import { MODALS } from 'lbry-redux';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import * as icons from 'constants/icons';
|
import * as icons from 'constants/icons';
|
||||||
|
@ -27,21 +26,21 @@ class FileActions extends React.PureComponent<Props> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={classnames('card__actions', { 'card__actions--vertical': vertical })}>
|
<section className={classnames('card__actions', { 'card__actions--vertical': vertical })}>
|
||||||
<FileDownloadLink uri={uri} />
|
|
||||||
{showDelete && (
|
{showDelete && (
|
||||||
<Button
|
<Button
|
||||||
className="btn--file-actions"
|
button="alt"
|
||||||
icon={icons.TRASH}
|
icon={icons.TRASH}
|
||||||
description={__('Delete')}
|
iconColor="red"
|
||||||
|
label={__('Delete')}
|
||||||
onClick={() => openModal({ id: MODALS.CONFIRM_FILE_REMOVE }, { uri })}
|
onClick={() => openModal({ id: MODALS.CONFIRM_FILE_REMOVE }, { uri })}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{!claimIsMine && (
|
{!claimIsMine && (
|
||||||
<Button
|
<Button
|
||||||
className="btn--file-actions"
|
button="alt"
|
||||||
icon={icons.REPORT}
|
icon={icons.REPORT}
|
||||||
href={`https://lbry.io/dmca?claim_id=${claimId}`}
|
href={`https://lbry.io/dmca?claim_id=${claimId}`}
|
||||||
description={__('Report content')}
|
label={__('Report content')}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -98,14 +98,16 @@ class FileCard extends React.PureComponent<Props> {
|
||||||
<div className="card__title--small">
|
<div className="card__title--small">
|
||||||
<TruncatedText lines={3}>{title}</TruncatedText>
|
<TruncatedText lines={3}>{title}</TruncatedText>
|
||||||
</div>
|
</div>
|
||||||
<div className="card__subtitle card__subtitle--file-info">
|
<div className="card__subtitle">
|
||||||
{pending ? (
|
{pending ? (
|
||||||
<div>Pending...</div>
|
<div>Pending...</div>
|
||||||
) : (
|
) : (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<UriIndicator uri={uri} link />
|
<UriIndicator uri={uri} link />
|
||||||
{isRewardContent && <Icon icon={icons.FEATURED} />}
|
<div>
|
||||||
|
{isRewardContent && <Icon iconColor="red" icon={icons.FEATURED} />}
|
||||||
{fileInfo && <Icon icon={icons.LOCAL} />}
|
{fileInfo && <Icon icon={icons.LOCAL} />}
|
||||||
|
</div>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,6 @@ import {
|
||||||
makeSelectLoadingForUri,
|
makeSelectLoadingForUri,
|
||||||
makeSelectCostInfoForUri,
|
makeSelectCostInfoForUri,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import { doFetchAvailability } from 'redux/actions/availability';
|
|
||||||
import { doOpenFileInShell } from 'redux/actions/file';
|
import { doOpenFileInShell } from 'redux/actions/file';
|
||||||
import { doPurchaseUri, doStartDownload } from 'redux/actions/content';
|
import { doPurchaseUri, doStartDownload } from 'redux/actions/content';
|
||||||
import { doPause } from 'redux/actions/media';
|
import { doPause } from 'redux/actions/media';
|
||||||
|
@ -20,7 +19,6 @@ const select = (state, props) => ({
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
checkAvailability: uri => dispatch(doFetchAvailability(uri)),
|
|
||||||
openInShell: path => dispatch(doOpenFileInShell(path)),
|
openInShell: path => dispatch(doOpenFileInShell(path)),
|
||||||
purchaseUri: uri => dispatch(doPurchaseUri(uri)),
|
purchaseUri: uri => dispatch(doPurchaseUri(uri)),
|
||||||
restartDownload: (uri, outpoint) => dispatch(doStartDownload(uri, outpoint)),
|
restartDownload: (uri, outpoint) => dispatch(doStartDownload(uri, outpoint)),
|
||||||
|
|
|
@ -1,21 +1,29 @@
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
// @flow
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import classnames from 'classnames';
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
import * as icons from 'constants/icons';
|
import * as icons from 'constants/icons';
|
||||||
|
|
||||||
class FileDownloadLink extends React.PureComponent {
|
type Props = {
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
componentWillMount() {
|
uri: string,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
this.checkAvailability(this.props.uri);
|
downloading: boolean,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
}
|
fileInfo: ?{
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
written_bytes: number,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
componentWillReceiveProps(nextProps) {
|
total_bytes: number,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
this.checkAvailability(nextProps.uri);
|
outpoint: number,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
this.restartDownload(nextProps);
|
download_path: string,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
}
|
completed: boolean,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
},
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
restartDownload(props) {
|
loading: boolean,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
const { downloading, fileInfo, uri, restartDownload } = props;
|
costInfo: ?{},
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
restartDownload: (string, number) => void,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
openInShell: string => void,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
purchaseUri: string => void,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
doPause: () => void,
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
};
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
|
||||||
|
class FileDownloadLink extends React.PureComponent<Props> {
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
componentWillUpdate() {
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
const { downloading, fileInfo, uri, restartDownload } = this.props;
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
if (
|
if (
|
||||||
!downloading &&
|
!downloading &&
|
||||||
fileInfo &&
|
fileInfo &&
|
||||||
|
@ -27,12 +35,7 @@ class FileDownloadLink extends React.PureComponent {
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkAvailability(uri) {
|
uri: ?string;
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
if (!this._uri || uri !== this._uri) {
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
this._uri = uri;
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
this.props.checkAvailability(uri);
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
}
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
}
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
@ -47,8 +50,10 @@ class FileDownloadLink extends React.PureComponent {
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const openFile = () => {
|
const openFile = () => {
|
||||||
|
if (fileInfo) {
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
openInShell(fileInfo.download_path);
|
openInShell(fileInfo.download_path);
|
||||||
doPause();
|
doPause();
|
||||||
|
}
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (loading || downloading) {
|
if (loading || downloading) {
|
||||||
|
@ -56,21 +61,11 @@ class FileDownloadLink extends React.PureComponent {
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
fileInfo && fileInfo.written_bytes
|
fileInfo && fileInfo.written_bytes
|
||||||
? fileInfo.written_bytes / fileInfo.total_bytes * 100
|
? fileInfo.written_bytes / fileInfo.total_bytes * 100
|
||||||
: 0;
|
: 0;
|
||||||
const label = fileInfo ? progress.toFixed(0) + __('% complete') : __('Connecting...');
|
const label = fileInfo
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
? __('Downloading: ') + progress.toFixed(0) + __('% complete')
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
: __('Connecting...');
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
|
||||||
return (
|
return <span className="file-download">{label}</span>;
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
<div className="file-download btn__content">
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
<div
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
className={classnames('file-download__overlay', {
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
btn__content: !!progress,
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
})}
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
style={{ width: `${progress}%` }}
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
>
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
{label}
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
</div>
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
{label}
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
</div>
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
);
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
} else if (fileInfo === null && !downloading) {
|
} else if (fileInfo === null && !downloading) {
|
||||||
if (!costInfo) {
|
if (!costInfo) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -78,9 +73,10 @@ class FileDownloadLink extends React.PureComponent {
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
className="btn--file-actions"
|
button="alt"
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
description={__('Download')}
|
label={__('Download')}
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
icon={icons.DOWNLOAD}
|
icon={icons.DOWNLOAD}
|
||||||
|
iconColor="purple"
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
purchaseUri(uri);
|
purchaseUri(uri);
|
||||||
This isn't currently doing anything. The action is disabled so I figured we can just remove it until that is fixed. This isn't currently doing anything. The action is disabled so I figured we can just remove it until that is fixed.
|
|||||||
}}
|
}}
|
||||||
|
@ -89,8 +85,9 @@ class FileDownloadLink extends React.PureComponent {
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
} else if (fileInfo && fileInfo.download_path) {
|
} else if (fileInfo && fileInfo.download_path) {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
className="btn--file-actions"
|
button="alt"
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
description={__('Open')}
|
iconColor="purple"
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
|
label={__('Open File')}
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|||||||
icon={icons.OPEN}
|
icon={icons.OPEN}
|
||||||
onClick={() => openFile()}
|
onClick={() => openFile()}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps componentWillReceiveProps is being deprecated in favor of getDerivedStateFromProps
|
|
@ -8,6 +8,7 @@ type FileInfo = {
|
||||||
name: string,
|
name: string,
|
||||||
channelName: ?string,
|
channelName: ?string,
|
||||||
pending?: boolean,
|
pending?: boolean,
|
||||||
|
channel_claim_id: string,
|
||||||
value?: {
|
value?: {
|
||||||
publisherSignature: {
|
publisherSignature: {
|
||||||
certificateId: string,
|
certificateId: string,
|
||||||
|
@ -139,6 +140,8 @@ class FileList extends React.PureComponent<Props, State> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sortFunctions: {};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { fileInfos, hideFilter, checkPending } = this.props;
|
const { fileInfos, hideFilter, checkPending } = this.props;
|
||||||
const { sortBy } = this.state;
|
const { sortBy } = this.state;
|
||||||
|
@ -149,27 +152,14 @@ class FileList extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sortFunctions[sortBy](fileInfos).forEach(fileInfo => {
|
this.sortFunctions[sortBy](fileInfos).forEach(fileInfo => {
|
||||||
const {
|
const { name: claimName, claim_name: claimNameDownloaded, claim_id: claimId } = fileInfo;
|
||||||
channel_name: channelName,
|
|
||||||
name: claimName,
|
|
||||||
claim_name: claimNameDownloaded,
|
|
||||||
claim_id: claimId,
|
|
||||||
} = fileInfo;
|
|
||||||
const uriParams = {};
|
const uriParams = {};
|
||||||
|
|
||||||
// This is unfortunate
|
// This is unfortunate
|
||||||
// https://github.com/lbryio/lbry/issues/1159
|
// https://github.com/lbryio/lbry/issues/1159
|
||||||
const name = claimName || claimNameDownloaded;
|
const name = claimName || claimNameDownloaded;
|
||||||
|
|
||||||
if (channelName) {
|
|
||||||
uriParams.channelName = channelName;
|
|
||||||
uriParams.contentName = name;
|
uriParams.contentName = name;
|
||||||
uriParams.claimId = this.getChannelSignature(fileInfo);
|
|
||||||
} else {
|
|
||||||
uriParams.claimId = claimId;
|
uriParams.claimId = claimId;
|
||||||
uriParams.claimName = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
const uri = buildURI(uriParams);
|
const uri = buildURI(uriParams);
|
||||||
|
|
||||||
content.push(<FileCard key={uri} uri={uri} checkPending={checkPending} />);
|
content.push(<FileCard key={uri} uri={uri} checkPending={checkPending} />);
|
||||||
|
|
|
@ -37,8 +37,9 @@ export default (props: Props) => {
|
||||||
|
|
||||||
return channelName && uri ? (
|
return channelName && uri ? (
|
||||||
<Button
|
<Button
|
||||||
|
iconColor="red"
|
||||||
icon={isSubscribed ? undefined : icons.HEART}
|
icon={isSubscribed ? undefined : icons.HEART}
|
||||||
button={isSubscribed ? 'danger' : 'alt'}
|
button="alt"
|
||||||
label={subscriptionLabel}
|
label={subscriptionLabel}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscriptions.length) {
|
if (!subscriptions.length) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ class VideoPlayButton extends React.PureComponent<Props> {
|
||||||
const label = doesPlayback ? 'Play' : 'View';
|
const label = doesPlayback ? 'Play' : 'View';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button button="secondary" disabled={disabled} label={label} icon={icon} onClick={play} />
|
<Button button="primary" disabled={disabled} label={label} icon={icon} onClick={play} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,16 +25,13 @@ const ModalCreditIntro = props => {
|
||||||
can take are limited.
|
can take are limited.
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
{totalRewardValue && (
|
||||||
<p>
|
<p>
|
||||||
There are a variety of ways to get credits, including more than{' '}
|
There are a variety of ways to get credits, including more than{' '}
|
||||||
{totalRewardValue ? (
|
<CreditAmount noStyle amount={totalRewardRounded} />{' '}
|
||||||
<CreditAmount noStyle amount={totalRewardRounded} />
|
{__('in free rewards for participating in the LBRY beta.')}
|
||||||
) : (
|
|
||||||
<span className="credit-amount">{__('?? credits')}</span>
|
|
||||||
)}{' '}
|
|
||||||
{__(' in free rewards for participating in the LBRY beta.')}
|
|
||||||
</p>
|
</p>
|
||||||
|
)}
|
||||||
<div className="card__actions card__actions--center">
|
<div className="card__actions card__actions--center">
|
||||||
<Button button="primary" onClick={addBalance} label={__('Get Credits')} />
|
<Button button="primary" onClick={addBalance} label={__('Get Credits')} />
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -17,6 +17,8 @@ import Page from 'component/page';
|
||||||
import player from 'render-media';
|
import player from 'render-media';
|
||||||
import * as settings from 'constants/settings';
|
import * as settings from 'constants/settings';
|
||||||
import type { Claim } from 'types/claim';
|
import type { Claim } from 'types/claim';
|
||||||
|
import type { Subscription } from 'types/subscription';
|
||||||
|
import FileDownloadLink from 'component/fileDownloadLink';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
claim: Claim,
|
claim: Claim,
|
||||||
|
@ -39,10 +41,10 @@ type Props = {
|
||||||
openModal: ({ id: string }, { uri: string }) => void,
|
openModal: ({ id: string }, { uri: string }) => void,
|
||||||
fetchFileInfo: string => void,
|
fetchFileInfo: string => void,
|
||||||
fetchCostInfo: string => void,
|
fetchCostInfo: string => void,
|
||||||
prepareEdit: ({}) => void,
|
prepareEdit: ({}, string) => void,
|
||||||
setClientSetting: (string, boolean | string) => void,
|
setClientSetting: (string, boolean | string) => void,
|
||||||
checkSubscription: ({ channelName: string, uri: string }) => void,
|
checkSubscription: ({ channelName: string, uri: string }) => void,
|
||||||
subscriptions: Array<{}>,
|
subscriptions: Array<Subscription>,
|
||||||
};
|
};
|
||||||
|
|
||||||
class FilePage extends React.Component<Props> {
|
class FilePage extends React.Component<Props> {
|
||||||
|
@ -151,17 +153,12 @@ class FilePage extends React.Component<Props> {
|
||||||
) : (
|
) : (
|
||||||
<Thumbnail shouldObscure={shouldObscureThumbnail} src={thumbnail} />
|
<Thumbnail shouldObscure={shouldObscureThumbnail} src={thumbnail} />
|
||||||
)}
|
)}
|
||||||
{!isPlaying && (
|
|
||||||
<div className="card-media__internal-links">
|
|
||||||
<FileActions uri={uri} vertical />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
<div className="card__title-identity--file">
|
<div className="card__title-identity--file">
|
||||||
<h1 className="card__title card__title--file">{title}</h1>
|
<h1 className="card__title card__title--file">{title}</h1>
|
||||||
<div className="card__title-identity-icons">
|
<div className="card__title-identity-icons">
|
||||||
<FilePrice uri={normalizeURI(uri)} />
|
<FilePrice uri={normalizeURI(uri)} />
|
||||||
{isRewardContent && <Icon icon={icons.FEATURED} />}
|
{isRewardContent && <Icon iconColor="red" tooltip="bottom" icon={icons.FEATURED} />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span className="card__subtitle card__subtitle--file">
|
<span className="card__subtitle card__subtitle--file">
|
||||||
|
@ -171,6 +168,7 @@ class FilePage extends React.Component<Props> {
|
||||||
{metadata.nsfw && <div>NSFW</div>}
|
{metadata.nsfw && <div>NSFW</div>}
|
||||||
<div className="card__channel-info">
|
<div className="card__channel-info">
|
||||||
<UriIndicator uri={uri} link />
|
<UriIndicator uri={uri} link />
|
||||||
|
|
||||||
<div className="card__actions card__actions--no-margin">
|
<div className="card__actions card__actions--no-margin">
|
||||||
{claimIsMine ? (
|
{claimIsMine ? (
|
||||||
<Button
|
<Button
|
||||||
|
@ -207,6 +205,11 @@ class FilePage extends React.Component<Props> {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
|
<FileDownloadLink uri={uri} />
|
||||||
|
<FileActions uri={uri} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="card__content--extra-padding">
|
||||||
<FileDetails uri={uri} />
|
<FileDetails uri={uri} />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -5,6 +5,8 @@ import FileTile from 'component/fileTile';
|
||||||
import FileListSearch from 'component/fileListSearch';
|
import FileListSearch from 'component/fileListSearch';
|
||||||
import ToolTip from 'component/common/tooltip';
|
import ToolTip from 'component/common/tooltip';
|
||||||
import Page from 'component/page';
|
import Page from 'component/page';
|
||||||
|
import Icon from 'component/common/icon';
|
||||||
|
import * as icons from 'constants/icons';
|
||||||
|
|
||||||
const MODAL_ANIMATION_TIME = 250;
|
const MODAL_ANIMATION_TIME = 250;
|
||||||
|
|
||||||
|
@ -50,10 +52,11 @@ class SearchPage extends React.PureComponent<Props> {
|
||||||
<div className="file-list__header">
|
<div className="file-list__header">
|
||||||
{__('Exact URL')}
|
{__('Exact URL')}
|
||||||
<ToolTip
|
<ToolTip
|
||||||
label="?"
|
icon
|
||||||
body={__('This is the resolution of a LBRY URL and not controlled by LBRY Inc.')}
|
body={__('This is the resolution of a LBRY URL and not controlled by LBRY Inc.')}
|
||||||
className="tooltip--header"
|
>
|
||||||
/>
|
<Icon icon={icons.HELP} />
|
||||||
|
</ToolTip>
|
||||||
</div>
|
</div>
|
||||||
<FileTile fullWidth uri={normalizeURI(query)} showUri />
|
<FileTile fullWidth uri={normalizeURI(query)} showUri />
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
|
@ -35,6 +35,7 @@ $large-breakpoint: 1760px;
|
||||||
--color-green-light: #effbe4;
|
--color-green-light: #effbe4;
|
||||||
--color-green-blue: #2ec1a8;
|
--color-green-blue: #2ec1a8;
|
||||||
--color-purple: #8165b0;
|
--color-purple: #8165b0;
|
||||||
|
--color-blue-grey: #203049;
|
||||||
|
|
||||||
/* Colors */
|
/* Colors */
|
||||||
--color-divider: #e3e3e3;
|
--color-divider: #e3e3e3;
|
||||||
|
@ -73,6 +74,8 @@ $large-breakpoint: 1760px;
|
||||||
--input-copyable-bg: #f6f6f6;
|
--input-copyable-bg: #f6f6f6;
|
||||||
--input-copyable-color: var(--color-grey-dark);
|
--input-copyable-color: var(--color-grey-dark);
|
||||||
--input-copyable-border: var(--color-grey);
|
--input-copyable-border: var(--color-grey);
|
||||||
|
--input-select-bg-color: var(--color-grey);
|
||||||
|
--input-select-color: var(--text-color);
|
||||||
|
|
||||||
/* input:disabled */
|
/* input:disabled */
|
||||||
--input-disabled-border-color: rgba(0, 0, 0, 0.42);
|
--input-disabled-border-color: rgba(0, 0, 0, 0.42);
|
||||||
|
@ -158,9 +161,8 @@ $large-breakpoint: 1760px;
|
||||||
--modal-btn-bg-color: var(--btn-bg-alt);
|
--modal-btn-bg-color: var(--btn-bg-alt);
|
||||||
|
|
||||||
// /* Tooltip */
|
// /* Tooltip */
|
||||||
--tooltip-width: 300px;
|
--tooltip-bg: #555;
|
||||||
--tooltip-bg: var(--color-bg);
|
--tooltip-color: var(--color-white);
|
||||||
--tooltip-color: var(--text-color);
|
|
||||||
|
|
||||||
/* Scrollbar */
|
/* Scrollbar */
|
||||||
--scrollbar-radius: 10px;
|
--scrollbar-radius: 10px;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
border-radius: var(--card-radius);
|
border-radius: var(--card-radius);
|
||||||
overflow: auto;
|
|
||||||
user-select: text;
|
user-select: text;
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -18,7 +17,6 @@
|
||||||
|
|
||||||
.card--small {
|
.card--small {
|
||||||
width: var(--card-small-width);
|
width: var(--card-small-width);
|
||||||
overflow-x: hidden;
|
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
|
||||||
.card__media {
|
.card__media {
|
||||||
|
@ -87,8 +85,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.credit-amount,
|
.credit-amount,
|
||||||
.icon {
|
.icon {
|
||||||
margin-top: $spacing-vertical * 1/3;
|
margin: $spacing-vertical * 1/3;
|
||||||
margin-left: $spacing-vertical * 2/3;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +124,11 @@
|
||||||
color: var(--card-text-color);
|
color: var(--card-text-color);
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
margin-left: $spacing-vertical * 1/3;
|
margin-top: $spacing-vertical * 1/6;
|
||||||
|
|
||||||
|
&:not(:first-of-type) {
|
||||||
|
margin: 0 $spacing-vertical * 1/3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,11 +136,6 @@
|
||||||
padding-top: $spacing-vertical * 1/3;
|
padding-top: $spacing-vertical * 1/3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card__subtitle--file-info {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card__subtitle--block {
|
.card__subtitle--block {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
@ -184,6 +180,10 @@
|
||||||
margin-top: $spacing-vertical * 2/3;
|
margin-top: $spacing-vertical * 2/3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card__content--extra-padding {
|
||||||
|
margin-top: $spacing-vertical;
|
||||||
|
}
|
||||||
|
|
||||||
.card__subtext-title {
|
.card__subtext-title {
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
font-size: calc(var(--font-size-subtext-multiple) * 1.5em);
|
font-size: calc(var(--font-size-subtext-multiple) * 1.5em);
|
||||||
|
@ -240,12 +240,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
.card-row is used on the discover/subscriptions page
|
.card-row is used on the discover page
|
||||||
It is a list of cards that extend past the right edge of the screen
|
It is a list of cards that extend past the right edge of the screen
|
||||||
There are left/right arrows to scroll the cards and view hidden content
|
There are left/right arrows to scroll the cards and view hidden content
|
||||||
*/
|
*/
|
||||||
.card-row {
|
.card-row {
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: var(--card-small-width);
|
min-width: var(--card-small-width);
|
||||||
|
@ -286,6 +285,18 @@
|
||||||
padding-top: $spacing-vertical * 2/3;
|
padding-top: $spacing-vertical * 2/3;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
.card {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
overflow-y: visible;
|
||||||
|
// 31 px to handle to padding between cards
|
||||||
|
width: calc((100% / 4) - 31px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card:not(:first-of-type) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.card:first-of-type {
|
.card:first-of-type {
|
||||||
margin-left: $spacing-width;
|
margin-left: $spacing-width;
|
||||||
}
|
}
|
||||||
|
@ -324,27 +335,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-row__scrollhouse {
|
|
||||||
padding-top: $spacing-vertical * 2/3;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.card {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: top;
|
|
||||||
overflow: visible;
|
|
||||||
// 31 px to handle to padding between cards
|
|
||||||
width: calc((100% / 4) - 31px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card:not(:first-of-type) {
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card:last-of-type {
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card__success-msg {
|
.card__success-msg {
|
||||||
border-left: 2px solid var(--success-msg-border);
|
border-left: 2px solid var(--success-msg-border);
|
||||||
color: var(--success-msg-color);
|
color: var(--success-msg-color);
|
||||||
|
|
|
@ -1,26 +1,3 @@
|
||||||
.file-download,
|
|
||||||
.file-download__overlay {
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.file-download {
|
.file-download {
|
||||||
position: relative;
|
font-size: 0.8em;
|
||||||
background-color: var(--color-black);
|
|
||||||
border-radius: var(--btn-radius);
|
|
||||||
color: var(--color-download);
|
|
||||||
font-size: 12px;
|
|
||||||
opacity: 0.8;
|
|
||||||
font-family: 'metropolis-medium';
|
|
||||||
}
|
|
||||||
|
|
||||||
.file-download__overlay {
|
|
||||||
background: var(--color-download);
|
|
||||||
color: var(--color-download-overlay);
|
|
||||||
border-radius: var(--btn-radius);
|
|
||||||
position: absolute;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 1;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
.file-list__header {
|
.file-list__header {
|
||||||
margin-top: $spacing-vertical * 4/3;
|
margin-top: $spacing-vertical * 4/3;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
|
||||||
|
.tooltip {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-tile {
|
.file-tile {
|
||||||
|
|
|
@ -100,10 +100,23 @@
|
||||||
padding-left: $spacing-vertical * 1/3;
|
padding-left: $spacing-vertical * 1/3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-field__select {
|
||||||
|
min-width: 60px;
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: var(--input-select-bg-color);
|
||||||
|
font: normal 12px/30px 'metropolis-medium';
|
||||||
|
color: var(--input-select-color);
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Not sure if I like these
|
// Not sure if I like these
|
||||||
// Maybe this should be in gui.scss?
|
// Maybe this should be in gui.scss?
|
||||||
.input--price-amount {
|
.input--price-amount {
|
||||||
width: 60px;
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input--address {
|
.input--address {
|
||||||
|
|
|
@ -1,30 +1,97 @@
|
||||||
@import '../mixin/link.scss';
|
|
||||||
|
|
||||||
.tooltip {
|
.tooltip {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 $spacing-vertical / 3;
|
display: inline-block;
|
||||||
font-size: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip__body {
|
// When there is a label for the tooltip and not just using a button or icon
|
||||||
|
.tooltip.tooltip--label {
|
||||||
|
font-size: 12px;
|
||||||
|
padding-left: $spacing-vertical * 1/3;
|
||||||
|
|
||||||
|
.tooltip__body {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip.tooltip--icon {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tooltip text */
|
||||||
|
.tooltip .tooltip__body {
|
||||||
|
background-color: var(--tooltip-bg);
|
||||||
|
font-family: 'metropolis-medium';
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--tooltip-color);
|
||||||
|
border-radius: 8px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
left: 50%;
|
width: 200px;
|
||||||
margin-left: calc(var(--tooltip-width) * -1 / 2);
|
text-align: center;
|
||||||
white-space: normal;
|
white-space: pre-wrap;
|
||||||
box-sizing: border-box;
|
padding: $spacing-vertical * 1/3;
|
||||||
padding: $spacing-vertical / 2;
|
visibility: hidden;
|
||||||
width: var(--tooltip-width);
|
|
||||||
color: var(--tooltip-color);
|
|
||||||
background-color: var(--tooltip-bg);
|
|
||||||
font-size: calc(var(--font-size) * 7 / 8);
|
|
||||||
line-height: var(--font-line-height);
|
|
||||||
box-shadow: var(--box-shadow-layer);
|
|
||||||
border-radius: var(--card-radius);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip__link {
|
.tooltip .tooltip__body::after {
|
||||||
font-size: calc(var(--font-size) * 3 / 4);
|
content: ' ';
|
||||||
margin-left: var(--button-padding);
|
width: 0;
|
||||||
vertical-align: middle;
|
height: 0;
|
||||||
|
position: absolute;
|
||||||
|
border-width: 5px;
|
||||||
|
border-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip.tooltip--top .tooltip__body {
|
||||||
|
bottom: 100%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -100px;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
top: 100%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -5px;
|
||||||
|
border-color: var(--tooltip-bg) transparent transparent transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip.tooltip--right .tooltip__body {
|
||||||
|
margin-top: -5px;
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
top: 17px;
|
||||||
|
right: 100%; /* To the left of the tooltip */
|
||||||
|
margin-top: -5px;
|
||||||
|
border-color: transparent var(--tooltip-bg) transparent transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip.tooltip--bottom .tooltip__body {
|
||||||
|
top: 90%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -100px;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
bottom: 100%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -5px;
|
||||||
|
border-color: transparent transparent var(--tooltip-bg) transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip.tooltip--left .tooltip__body {
|
||||||
|
top: -5px;
|
||||||
|
right: 105%;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
top: 17px;
|
||||||
|
left: 100%;
|
||||||
|
margin-top: -5px;
|
||||||
|
border-color: transparent transparent transparent var(--tooltip-bg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip:hover .tooltip__body {
|
||||||
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
@mixin text-link($color: var(--color-primary), $hover-opacity: 0.7) {
|
|
||||||
.icon {
|
|
||||||
&:first-child {
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
&:last-child:not(:only-child) {
|
|
||||||
padding-left: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(.no-underline) {
|
|
||||||
text-decoration: underline;
|
|
||||||
.icon {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
opacity: $hover-opacity;
|
|
||||||
transition: opacity var(--transition-duration) var(--transition-type);
|
|
||||||
text-decoration: underline;
|
|
||||||
.icon {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
color: $color;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
|
@ -7,7 +7,7 @@
|
||||||
--color-help: #8696AF;
|
--color-help: #8696AF;
|
||||||
--color-download: rgba(255, 255, 255, 0.75);
|
--color-download: rgba(255, 255, 255, 0.75);
|
||||||
--color-download-overlay: var(--color-black);
|
--color-download-overlay: var(--color-black);
|
||||||
--color-bg: #203049;
|
--color-bg: var(--color-blue-grey);
|
||||||
--color-bg-alt: #2D3D56;
|
--color-bg-alt: #2D3D56;
|
||||||
--color-placeholder: var(--color-bg-alt);
|
--color-placeholder: var(--color-bg-alt);
|
||||||
|
|
||||||
|
@ -26,9 +26,11 @@
|
||||||
--input-border-size: 1px;
|
--input-border-size: 1px;
|
||||||
--input-border-color: rgba(255,255,255, 0.5);
|
--input-border-color: rgba(255,255,255, 0.5);
|
||||||
--input-hover-border-color: rgba(255, 255, 255, 1);
|
--input-hover-border-color: rgba(255, 255, 255, 1);
|
||||||
--input-copyable-bg: #203049;
|
--input-copyable-bg: var(--color-blue-grey);
|
||||||
--input-copyable-color: #8696AF;
|
--input-copyable-color: #8696AF;
|
||||||
--input-copyable-border: #53637C;
|
--input-copyable-border: #53637C;
|
||||||
|
--input-select-bg-color: var(--color-bg-alt);
|
||||||
|
--input-select-color: var(--color-white);
|
||||||
|
|
||||||
/* input:disabled */
|
/* input:disabled */
|
||||||
--input-disabled-border-color: rgba(255, 255, 255, 0.42);
|
--input-disabled-border-color: rgba(255, 255, 255, 0.42);
|
||||||
|
|
|
@ -5837,9 +5837,9 @@ lazy-val@^1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.3.tgz#bb97b200ef00801d94c317e29dc6ed39e31c5edc"
|
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.3.tgz#bb97b200ef00801d94c317e29dc6ed39e31c5edc"
|
||||||
|
|
||||||
lbry-redux@lbryio/lbry-redux#30c18725d8c6c141c30c57f0a324d0abb8963b99:
|
lbry-redux@lbryio/lbry-redux#c41899e78415cae6fcb7bfca0e6ba48bb6bfe6c4:
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/30c18725d8c6c141c30c57f0a324d0abb8963b99"
|
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/c41899e78415cae6fcb7bfca0e6ba48bb6bfe6c4"
|
||||||
dependencies:
|
dependencies:
|
||||||
proxy-polyfill "0.1.6"
|
proxy-polyfill "0.1.6"
|
||||||
reselect "^3.0.0"
|
reselect "^3.0.0"
|
||||||
|
|
Would be great to have a common color palette shared that's paired with a style guide.