diff --git a/frontend/src/History/HistoryRow.css b/frontend/src/History/HistoryRow.css index 005e9ada9..3f0408b99 100644 --- a/frontend/src/History/HistoryRow.css +++ b/frontend/src/History/HistoryRow.css @@ -33,3 +33,10 @@ width: 70px; } + +.parameters { + composes: cell from '~Components/Table/Cells/TableRowCell.css'; + + display: flex; + flex-wrap: wrap; +} diff --git a/frontend/src/History/HistoryRow.js b/frontend/src/History/HistoryRow.js index 54499ba1c..b442ceb9b 100644 --- a/frontend/src/History/HistoryRow.js +++ b/frontend/src/History/HistoryRow.js @@ -7,6 +7,7 @@ import TableRow from 'Components/Table/TableRow'; import { icons } from 'Helpers/Props'; import HistoryDetailsModal from './Details/HistoryDetailsModal'; import HistoryEventTypeCell from './HistoryEventTypeCell'; +import HistoryRowParameter from './HistoryRowParameter'; import styles from './HistoryRow.css'; class HistoryRow extends Component { @@ -117,6 +118,134 @@ class HistoryRow extends Component { ); } + if (name === 'query') { + return ( + + {data.query} + + ); + } + + if (name === 'parameters') { + return ( + + { + data.imdbId ? + : + null + } + + { + data.tmdbId ? + : + null + } + + { + data.tvdbId ? + : + null + } + + { + data.traktId ? + : + null + } + + { + data.rId ? + : + null + } + + { + data.tvMazeId ? + : + null + } + + { + data.season ? + : + null + } + + { + data.episode ? + : + null + } + + { + data.artist ? + : + null + } + + { + data.album ? + : + null + } + + { + data.author ? + : + null + } + + { + data.bookTitle ? + : + null + } + + ); + } + if (name === 'categories') { return ( - {data.query} - - ); - } - if (name === 'date') { return ( +
+ + { + title + } + +
+ +
+ { + value + } +
+ + ); + } +} + +HistoryRowParameter.propTypes = { + title: PropTypes.string.isRequired, + value: PropTypes.string.isRequired +}; + +export default HistoryRowParameter; diff --git a/frontend/src/Store/Actions/historyActions.js b/frontend/src/Store/Actions/historyActions.js index b416b5c25..f75529dc4 100644 --- a/frontend/src/Store/Actions/historyActions.js +++ b/frontend/src/Store/Actions/historyActions.js @@ -46,6 +46,12 @@ export const defaultState = { isSortable: false, isVisible: true }, + { + name: 'parameters', + label: 'Parameters', + isSortable: false, + isVisible: false + }, { name: 'categories', label: 'Categories',