mirror of
https://github.com/Readarr/Readarr
synced 2026-05-08 12:42:51 +02:00
Adding missing series Deleted UI elements
This commit is contained in:
parent
0b7ce67635
commit
3a389476e5
6 changed files with 45 additions and 11 deletions
27
frontend/src/Author/AuthorStatus.js
Normal file
27
frontend/src/Author/AuthorStatus.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { icons } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
|
||||
export function getAuthorStatusDetails(status) {
|
||||
|
||||
let statusDetails = {
|
||||
icon: icons.AUTHOR_CONTINUING,
|
||||
title: translate('StatusEndedContinuing'),
|
||||
message: translate('ContinuingMoreBooksAreExpected')
|
||||
};
|
||||
|
||||
if (status === 'deleted') {
|
||||
statusDetails = {
|
||||
icon: icons.AUTHOR_DELETED,
|
||||
title: translate('StatusEndedDeceased'),
|
||||
message: translate('NotContinuingAuthorDeceased')
|
||||
};
|
||||
} else if (status === 'ended') {
|
||||
statusDetails = {
|
||||
icon: icons.AUTHOR_ENDED,
|
||||
title: translate('StatusEndedEnded'),
|
||||
message: translate('ContinuingNoAdditionalBooksAreExpected')
|
||||
};
|
||||
}
|
||||
|
||||
return statusDetails;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
|||
import React, { Component } from 'react';
|
||||
import TextTruncate from 'react-text-truncate';
|
||||
import AuthorPoster from 'Author/AuthorPoster';
|
||||
import { getAuthorStatusDetails } from 'Author/AuthorStatus';
|
||||
import HeartRating from 'Components/HeartRating';
|
||||
import Icon from 'Components/Icon';
|
||||
import Label from 'Components/Label';
|
||||
|
|
@ -87,11 +88,11 @@ class AuthorDetailsHeader extends Component {
|
|||
titleWidth
|
||||
} = this.state;
|
||||
|
||||
const statusDetails = getAuthorStatusDetails(status);
|
||||
|
||||
const fanartUrl = getFanartUrl(images);
|
||||
const marqueeWidth = titleWidth - (isSmallScreen ? 85 : 160);
|
||||
|
||||
const continuing = status === 'continuing';
|
||||
|
||||
let bookFilesCountMessage = translate('BookFilesCountMessage');
|
||||
|
||||
if (bookFileCount === 1) {
|
||||
|
|
@ -236,16 +237,16 @@ class AuthorDetailsHeader extends Component {
|
|||
|
||||
<Label
|
||||
className={styles.detailsLabel}
|
||||
title={continuing ? translate('ContinuingMoreBooksAreExpected') : translate('ContinuingNoAdditionalBooksAreExpected')}
|
||||
title={statusDetails.message}
|
||||
size={sizes.LARGE}
|
||||
>
|
||||
<Icon
|
||||
name={continuing ? icons.AUTHOR_CONTINUING : icons.AUTHOR_ENDED}
|
||||
name={statusDetails.icon}
|
||||
size={17}
|
||||
/>
|
||||
|
||||
<span className={styles.qualityProfileName}>
|
||||
{continuing ? 'Continuing' : 'Deceased'}
|
||||
{statusDetails.title}
|
||||
</span>
|
||||
</Label>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { getAuthorStatusDetails } from 'Author/AuthorStatus';
|
||||
import Icon from 'Components/Icon';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import { icons } from 'Helpers/Props';
|
||||
|
|
@ -15,6 +16,8 @@ function AuthorStatusCell(props) {
|
|||
...otherProps
|
||||
} = props;
|
||||
|
||||
const statusDetails = getAuthorStatusDetails(status);
|
||||
|
||||
return (
|
||||
<Component
|
||||
className={className}
|
||||
|
|
@ -28,8 +31,8 @@ function AuthorStatusCell(props) {
|
|||
|
||||
<Icon
|
||||
className={styles.statusIcon}
|
||||
name={status === 'ended' ? icons.AUTHOR_ENDED : icons.AUTHOR_CONTINUING}
|
||||
title={status === 'ended' ? translate('StatusEndedDeceased') : translate('StatusEndedContinuing')}
|
||||
name={statusDetails.icon}
|
||||
title={`${statusDetails.title}: ${statusDetails.message}`}
|
||||
/>
|
||||
</Component>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import AuthorNameLink from 'Author/AuthorNameLink';
|
||||
import { getAuthorStatusDetails } from 'Author/AuthorStatus';
|
||||
import Icon from 'Components/Icon';
|
||||
import MonitorToggleButton from 'Components/MonitorToggleButton';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
|
||||
import VirtualTableSelectCell from 'Components/Table/Cells/VirtualTableSelectCell';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import BookshelfBook from './BookshelfBook';
|
||||
import styles from './BookshelfRow.css';
|
||||
|
||||
|
|
@ -30,6 +29,8 @@ class BookshelfRow extends Component {
|
|||
onBookMonitoredPress
|
||||
} = this.props;
|
||||
|
||||
const statusDetails = getAuthorStatusDetails(status);
|
||||
|
||||
return (
|
||||
<>
|
||||
<VirtualTableSelectCell
|
||||
|
|
@ -52,8 +53,8 @@ class BookshelfRow extends Component {
|
|||
<VirtualTableRowCell className={styles.status}>
|
||||
<Icon
|
||||
className={styles.statusIcon}
|
||||
name={status === 'ended' ? icons.AUTHOR_ENDED : icons.AUTHOR_CONTINUING}
|
||||
title={status === 'ended' ? translate('StatusEndedEnded') : translate('StatusEndedContinuing')}
|
||||
name={statusDetails.icon}
|
||||
title={statusDetails.title}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ export const SCORE = fasUserPlus;
|
|||
export const SEARCH = fasSearch;
|
||||
export const AUTHOR_CONTINUING = fasPlay;
|
||||
export const AUTHOR_ENDED = fasStop;
|
||||
export const AUTHOR_DELETED = fasExclamationTriangle;
|
||||
export const SETTINGS = fasCogs;
|
||||
export const SHUTDOWN = fasPowerOff;
|
||||
export const SORT = fasSort;
|
||||
|
|
|
|||
|
|
@ -654,6 +654,7 @@
|
|||
"NoUpdatesAreAvailable": "No updates are available",
|
||||
"None": "None",
|
||||
"NotAvailable": "Not Available",
|
||||
"NotContinuingAuthorDeceased": "Author is deceased. No more books are expected.",
|
||||
"NotMonitored": "Not Monitored",
|
||||
"NotificationStatusAllClientHealthCheckMessage": "All notifications are unavailable due to failures",
|
||||
"NotificationStatusSingleClientHealthCheckMessage": "Notifications unavailable due to failures: {0}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue