mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +01:00
Adding missing series Deleted UI elements
This commit is contained in:
parent
41a63a5418
commit
b72fbe06f7
@ -181,6 +181,7 @@ export const SCORE = fasUserPlus;
|
||||
export const SEARCH = fasSearch;
|
||||
export const SERIES_CONTINUING = fasPlay;
|
||||
export const SERIES_ENDED = fasStop;
|
||||
export const SERIES_DELETED = fasExclamationTriangle;
|
||||
export const SETTINGS = fasCogs;
|
||||
export const SHUTDOWN = fasPowerOff;
|
||||
export const SORT = fasSort;
|
||||
|
@ -1,6 +1,5 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import Icon from 'Components/Icon';
|
||||
import MonitorToggleButton from 'Components/MonitorToggleButton';
|
||||
import TableRow from 'Components/Table/TableRow';
|
||||
@ -8,6 +7,7 @@ import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||
import SeriesTitleLink from 'Series/SeriesTitleLink';
|
||||
import SeasonPassSeason from './SeasonPassSeason';
|
||||
import { getSeriesStatusDetails } from 'Series/SeriesStatus';
|
||||
import styles from './SeasonPassRow.css';
|
||||
|
||||
class SeasonPassRow extends Component {
|
||||
@ -30,6 +30,8 @@ class SeasonPassRow extends Component {
|
||||
onSeasonMonitoredPress
|
||||
} = this.props;
|
||||
|
||||
const statusDetails = getSeriesStatusDetails(status);
|
||||
|
||||
return (
|
||||
<TableRow>
|
||||
<TableSelectCell
|
||||
@ -41,8 +43,8 @@ class SeasonPassRow extends Component {
|
||||
<TableRowCell className={styles.status}>
|
||||
<Icon
|
||||
className={styles.statusIcon}
|
||||
name={status === 'ended' ? icons.SERIES_ENDED : icons.SERIES_CONTINUING}
|
||||
title={status === 'ended' ? 'Ended' : 'Continuing'}
|
||||
name={statusDetails.icon}
|
||||
title={statusDetails.title}
|
||||
|
||||
/>
|
||||
</TableRowCell>
|
||||
|
@ -34,6 +34,7 @@ import SeriesAlternateTitles from './SeriesAlternateTitles';
|
||||
import SeriesDetailsSeasonConnector from './SeriesDetailsSeasonConnector';
|
||||
import SeriesTagsConnector from './SeriesTagsConnector';
|
||||
import SeriesDetailsLinks from './SeriesDetailsLinks';
|
||||
import { getSeriesStatusDetails } from 'Series/SeriesStatus';
|
||||
import styles from './SeriesDetails.css';
|
||||
|
||||
const defaultFontSize = parseInt(fonts.defaultFontSize);
|
||||
@ -216,7 +217,7 @@ class SeriesDetails extends Component {
|
||||
overviewHeight
|
||||
} = this.state;
|
||||
|
||||
const continuing = status === 'continuing';
|
||||
const statusDetails = getSeriesStatusDetails(status);
|
||||
|
||||
let episodeFilesCountMessage = 'No episode files';
|
||||
|
||||
@ -465,16 +466,16 @@ class SeriesDetails extends Component {
|
||||
|
||||
<Label
|
||||
className={styles.detailsLabel}
|
||||
title={continuing ? 'More episodes/another season is expected' : 'No additional episodes or or another season is expected'}
|
||||
title={statusDetails.message}
|
||||
size={sizes.LARGE}
|
||||
>
|
||||
<Icon
|
||||
name={continuing ? icons.SERIES_CONTINUING : icons.SERIES_ENDED}
|
||||
name={statusDetails.icon}
|
||||
size={17}
|
||||
/>
|
||||
|
||||
<span className={styles.qualityProfileName}>
|
||||
{continuing ? 'Continuing' : 'Ended'}
|
||||
{statusDetails.title}
|
||||
</span>
|
||||
</Label>
|
||||
|
||||
|
@ -3,6 +3,7 @@ import React from 'react';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import Icon from 'Components/Icon';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import { getSeriesStatusDetails } from 'Series/SeriesStatus';
|
||||
import styles from './SeriesStatusCell.css';
|
||||
|
||||
function SeriesStatusCell(props) {
|
||||
@ -14,6 +15,8 @@ function SeriesStatusCell(props) {
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
const statusDetails = getSeriesStatusDetails(status);
|
||||
|
||||
return (
|
||||
<Component
|
||||
className={className}
|
||||
@ -27,8 +30,8 @@ function SeriesStatusCell(props) {
|
||||
|
||||
<Icon
|
||||
className={styles.statusIcon}
|
||||
name={status === 'ended' ? icons.SERIES_ENDED : icons.SERIES_CONTINUING}
|
||||
title={status === 'ended' ? 'Ended' : 'Continuing'}
|
||||
name={statusDetails.icon}
|
||||
title={`${statusDetails.title}: ${statusDetails.message}`}
|
||||
|
||||
/>
|
||||
</Component>
|
||||
|
27
frontend/src/Series/SeriesStatus.js
Normal file
27
frontend/src/Series/SeriesStatus.js
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
import { icons } from 'Helpers/Props';
|
||||
|
||||
export function getSeriesStatusDetails(status) {
|
||||
|
||||
let statusDetails = {
|
||||
icon: icons.SERIES_CONTINUING,
|
||||
title: 'Continuing',
|
||||
message: 'More episodes/another season is expected'
|
||||
};
|
||||
|
||||
if (status === 'deleted') {
|
||||
statusDetails = {
|
||||
icon: icons.SERIES_DELETED,
|
||||
title: 'Deleted',
|
||||
message: 'Series was deleted from TheTVDB'
|
||||
};
|
||||
} else if (status === 'ended') {
|
||||
statusDetails = {
|
||||
icon: icons.SERIES_ENDED,
|
||||
title: 'Ended',
|
||||
message: 'No additional episodes or or another season is expected'
|
||||
};
|
||||
}
|
||||
|
||||
return statusDetails;
|
||||
}
|
Loading…
Reference in New Issue
Block a user