Fixed: Add redirect to legend

pull/49/head
Qstick 4 years ago
parent c836b3c43c
commit be61fb40fd

@ -18,47 +18,31 @@
border-radius: 4px;
}
.queue {
composes: legendItemColor;
background-color: $queueColor;
}
.continuing {
composes: legendItemColor;
background-color: $primaryColor;
}
.availNotMonitored {
.disabled {
composes: legendItemColor;
background-color: $darkGray;
}
.ended {
.enabled {
composes: legendItemColor;
background-color: $successColor;
}
.missingMonitored {
.redirected {
composes: legendItemColor;
background-color: $dangerColor;
&:global(.colorImpaired) {
background: repeating-linear-gradient(90deg, color($dangerColor shade(5%)), color($dangerColor shade(5%)) 5px, color($dangerColor shade(15%)) 5px, color($dangerColor shade(15%)) 10px);
}
background-color: $infoColor;
}
.missingUnmonitored {
.error {
composes: legendItemColor;
background-color: $warningColor;
background-color: $dangerColor;
&:global(.colorImpaired) {
background: repeating-linear-gradient(45deg, $warningColor, $warningColor 5px, color($warningColor tint(15%)) 5px, color($warningColor tint(15%)) 10px);
background: repeating-linear-gradient(90deg, color($dangerColor shade(5%)), color($dangerColor shade(5%)) 5px, color($dangerColor shade(15%)) 5px, color($dangerColor shade(15%)) 10px);
}
}

@ -10,15 +10,15 @@ class IndexerIndexFooter extends PureComponent {
render() {
const {
movies,
indexers,
colorImpairedMode
} = this.props;
const count = movies.length;
const count = indexers.length;
let enabled = 0;
let torrent = 0;
movies.forEach((s) => {
indexers.forEach((s) => {
if (s.enable) {
enabled += 1;
@ -33,14 +33,21 @@ class IndexerIndexFooter extends PureComponent {
<div className={styles.footer}>
<div>
<div className={styles.legendItem}>
<div className={styles.ended} />
<div className={styles.enabled} />
<div>
Enabled
</div>
</div>
<div className={styles.legendItem}>
<div className={styles.availNotMonitored} />
<div className={styles.redirected} />
<div>
Enabled, Redirected
</div>
</div>
<div className={styles.legendItem}>
<div className={styles.disabled} />
<div>
Disabled
</div>
@ -48,7 +55,7 @@ class IndexerIndexFooter extends PureComponent {
<div className={styles.legendItem}>
<div className={classNames(
styles.missingMonitored,
styles.error,
colorImpairedMode && 'colorImpaired'
)}
/>
@ -89,7 +96,7 @@ class IndexerIndexFooter extends PureComponent {
}
IndexerIndexFooter.propTypes = {
movies: PropTypes.arrayOf(PropTypes.object).isRequired,
indexers: PropTypes.arrayOf(PropTypes.object).isRequired,
colorImpairedMode: PropTypes.bool.isRequired
};

@ -29,7 +29,7 @@ function createUnoptimizedSelector() {
function createMoviesSelector() {
return createDeepEqualSelector(
createUnoptimizedSelector(),
(movies) => movies
(indexers) => indexers
);
}
@ -37,9 +37,9 @@ function createMapStateToProps() {
return createSelector(
createMoviesSelector(),
createUISettingsSelector(),
(movies, uiSettings) => {
(indexers, uiSettings) => {
return {
movies,
indexers,
colorImpairedMode: uiSettings.enableColorImpairedMode
};
}

Loading…
Cancel
Save