diff --git a/frontend/src/component/feature/feature-list-item-component.jsx b/frontend/src/component/feature/feature-list-item-component.jsx index 75f7d7f5cd..7de2e0e4ac 100644 --- a/frontend/src/component/feature/feature-list-item-component.jsx +++ b/frontend/src/component/feature/feature-list-item-component.jsx @@ -1,6 +1,6 @@ import React, { PropTypes } from 'react'; import { Link } from 'react-router'; -import { Switch, Icon, Chip, ListItem } from 'react-mdl'; +import { Switch, Chip, ListItem } from 'react-mdl'; import Progress from './progress'; import { calc, styles as commonStyles } from '../common'; @@ -34,17 +34,7 @@ const Feature = ({ return ( -
- { - isStale ? - : -
- -
- } -
+
toggleFeature(name)} checked={enabled} /> diff --git a/frontend/src/component/feature/feature.scss b/frontend/src/component/feature/feature.scss index 5df0a8ef4d..05730919e3 100644 --- a/frontend/src/component/feature/feature.scss +++ b/frontend/src/component/feature/feature.scss @@ -11,14 +11,15 @@ } .listItemMetric { - float: left; + width: 40px; + flex-shrink: 0; margin-right: 16px; } .listItemToggle { - margin-right: 16px; - width: 40px; + width: 36px; flex-shrink: 0; + margin-right: 16px; } .listItemLink { diff --git a/frontend/src/component/feature/metric-component.jsx b/frontend/src/component/feature/metric-component.jsx index e27889e8d1..eace8be022 100644 --- a/frontend/src/component/feature/metric-component.jsx +++ b/frontend/src/component/feature/metric-component.jsx @@ -57,27 +57,22 @@ export default class MetricComponent extends React.Component { return (
- - { - lastMinute.isFallback ? - : -
- -
+ + + {lastMinute.isFallback ? +

No metrics available

: +

Last minute
Yes {lastMinute.yes}, No: {lastMinute.no}

} -

Last minute
Yes {lastMinute.yes}, No: {lastMinute.no}

- - { - lastHour.isFallback ? - : -
- -
+ + + {lastHour.isFallback ? +

No metrics available

: +

Last hour
Yes {lastHour.yes}, No: {lastHour.no}

} -

Last hour
Yes {lastHour.yes}, No: {lastHour.no}

- + {seenApps.length > 0 ? (
Seen in applications:
) :
diff --git a/frontend/src/component/feature/progress-styles.scss b/frontend/src/component/feature/progress-styles.scss index b7a00a2a1b..c052fd33c3 100644 --- a/frontend/src/component/feature/progress-styles.scss +++ b/frontend/src/component/feature/progress-styles.scss @@ -1,17 +1,17 @@ .path { - stroke: #3f51b5; + stroke: currentColor; stroke-linecap: round; transition: stroke-dashoffset 5s ease 0s; } .trail { - stroke: #d6d6d6; + stroke: currentColor; } .text { - fill: rgba(0, 0, 0, 0.7); - font-size: 25px; - line-height: 25px; + fill: currentColor; + font-size: 24px; + line-height: 24px; dominant-baseline: middle; text-anchor: middle; } diff --git a/frontend/src/component/feature/progress.jsx b/frontend/src/component/feature/progress.jsx index 16e1a76268..e239d82cce 100644 --- a/frontend/src/component/feature/progress.jsx +++ b/frontend/src/component/feature/progress.jsx @@ -82,7 +82,7 @@ class Progress extends Component { } render () { - const { strokeWidth, color } = this.props; + const { strokeWidth, colorClassName, isFallback } = this.props; const radius = (50 - strokeWidth / 2); const pathDescription = ` M 50,50 m 0,-${radius} @@ -92,33 +92,38 @@ class Progress extends Component { const diameter = Math.PI * 2 * radius; const progressStyle = { - stroke: color, strokeDasharray: `${diameter}px ${diameter}px`, strokeDashoffset: `${((100 - this.state.percentage) / 100 * diameter)}px`, }; - return ( - + return (isFallback ? + { + // eslint-disable-next-line max-len + } + : + + - + - {this.state.percentageText}% - ); + {this.state.percentageText}% + + ); } } @@ -128,12 +133,16 @@ Progress.propTypes = { initialAnimation: PropTypes.bool, animatePercentageText: PropTypes.bool, textForPercentage: PropTypes.func, + colorClassName: PropTypes.string, + isFallback: PropTypes.bool, }; Progress.defaultProps = { - strokeWidth: 8, + strokeWidth: 10, animatePercentageText: false, initialAnimation: false, + colorClassName: 'mdl-color-text--primary', + isFallback: false, }; export default Progress;