diff --git a/frontend/src/Author/History/AuthorHistoryModal.js b/frontend/src/Author/History/AuthorHistoryModal.js index eb197bf7a..b8b5b22a3 100644 --- a/frontend/src/Author/History/AuthorHistoryModal.js +++ b/frontend/src/Author/History/AuthorHistoryModal.js @@ -1,6 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; +import { sizes } from 'Helpers/Props'; import AuthorHistoryContentConnector from './AuthorHistoryContentConnector'; import AuthorHistoryModalContent from './AuthorHistoryModalContent'; @@ -14,6 +15,7 @@ function AuthorHistoryModal(props) { return ( - History + {translate('History')} @@ -31,7 +32,7 @@ class AuthorHistoryModalContent extends Component { diff --git a/frontend/src/Author/History/AuthorHistoryRow.css b/frontend/src/Author/History/AuthorHistoryRow.css index a62b9c2bb..33dba8df9 100644 --- a/frontend/src/Author/History/AuthorHistoryRow.css +++ b/frontend/src/Author/History/AuthorHistoryRow.css @@ -4,7 +4,6 @@ word-break: break-word; } -.details, .actions { composes: cell from '~Components/Table/Cells/TableRowCell.css'; diff --git a/frontend/src/Author/History/AuthorHistoryRow.css.d.ts b/frontend/src/Author/History/AuthorHistoryRow.css.d.ts index e3425487e..b0b91a6b8 100644 --- a/frontend/src/Author/History/AuthorHistoryRow.css.d.ts +++ b/frontend/src/Author/History/AuthorHistoryRow.css.d.ts @@ -2,7 +2,6 @@ // Please do not change this file! interface CssExports { 'actions': string; - 'details': string; 'sourceTitle': string; } export const cssExports: CssExports; diff --git a/frontend/src/Author/History/AuthorHistoryRow.js b/frontend/src/Author/History/AuthorHistoryRow.js index a03fc5f4e..0ea4bd871 100644 --- a/frontend/src/Author/History/AuthorHistoryRow.js +++ b/frontend/src/Author/History/AuthorHistoryRow.js @@ -2,6 +2,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import HistoryDetailsConnector from 'Activity/History/Details/HistoryDetailsConnector'; import HistoryEventTypeCell from 'Activity/History/HistoryEventTypeCell'; +import BookFormats from 'Book/BookFormats'; import BookQuality from 'Book/BookQuality'; import Icon from 'Components/Icon'; import IconButton from 'Components/Link/IconButton'; @@ -11,6 +12,7 @@ import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableRow from 'Components/Table/TableRow'; import Popover from 'Components/Tooltip/Popover'; import { icons, kinds, tooltipPositions } from 'Helpers/Props'; +import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore'; import translate from 'Utilities/String/translate'; import styles from './AuthorHistoryRow.css'; @@ -75,6 +77,8 @@ class AuthorHistoryRow extends Component { sourceTitle, quality, qualityCutoffNotMet, + customFormats, + customFormatScore, date, data, book @@ -106,11 +110,19 @@ class AuthorHistoryRow extends Component { /> + + + + + + {formatCustomFormatScore(customFormatScore, customFormats.length)} + + - + - - { eventType === 'grabbed' && } @@ -160,6 +171,8 @@ AuthorHistoryRow.propTypes = { sourceTitle: PropTypes.string.isRequired, quality: PropTypes.object.isRequired, qualityCutoffNotMet: PropTypes.bool.isRequired, + customFormats: PropTypes.arrayOf(PropTypes.object), + customFormatScore: PropTypes.number.isRequired, date: PropTypes.string.isRequired, data: PropTypes.object.isRequired, fullAuthor: PropTypes.bool.isRequired, diff --git a/frontend/src/Author/History/AuthorHistoryTableContent.js b/frontend/src/Author/History/AuthorHistoryTableContent.js index 14e8efd80..86448305d 100644 --- a/frontend/src/Author/History/AuthorHistoryTableContent.js +++ b/frontend/src/Author/History/AuthorHistoryTableContent.js @@ -1,10 +1,11 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import Alert from 'Components/Alert'; +import Icon from 'Components/Icon'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; -import { kinds } from 'Helpers/Props'; +import { icons, kinds } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; import AuthorHistoryRowConnector from './AuthorHistoryRowConnector'; import styles from './AuthorHistoryTableContent.css'; @@ -16,32 +17,41 @@ const columns = [ }, { name: 'book', - label: 'Book', + label: () => translate('Book'), isVisible: true }, { name: 'sourceTitle', - label: 'Source Title', + label: () => translate( 'SourceTitle'), isVisible: true }, { name: 'quality', - label: 'Quality', + label: () => translate('Quality'), isVisible: true }, { - name: 'date', - label: 'Date', + name: 'customFormats', + label: () => translate('CustomFormats'), + isSortable: false, isVisible: true }, { - name: 'details', - label: 'Details', + name: 'customFormatScore', + label: React.createElement(Icon, { + name: icons.SCORE, + title: () => translate('CustomFormatScore') + }), + isSortable: true, + isVisible: true + }, + { + name: 'date', + label: () => translate('Date'), isVisible: true }, { name: 'actions', - label: 'Actions', isVisible: true } ]; diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index e08f3c4c4..ac681f26e 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -870,6 +870,7 @@ "SorryThatBookCannotBeFound": "Sorry, that book cannot be found.", "Source": "Source", "SourcePath": "Source Path", + "SourceTitle": "Source Title", "SpecificBook": "Specific Book", "SslCertPasswordHelpText": "Password for pfx file", "SslCertPasswordHelpTextWarning": "Requires restart to take effect",