New: Use Goodreads directly, allow multiple editions of a book (new DB required)

This commit is contained in:
ta264
2020-06-30 21:46:01 +01:00
parent d83d2548e5
commit 45d49117ca
178 changed files with 3332 additions and 1786 deletions
@@ -4,6 +4,7 @@ import TextTruncate from 'react-text-truncate';
import { icons } from 'Helpers/Props';
import dimensions from 'Styles/Variables/dimensions';
import fonts from 'Styles/Variables/fonts';
import stripHtml from 'Utilities/String/stripHtml';
import IconButton from 'Components/Link/IconButton';
import Link from 'Components/Link/Link';
import SpinnerIconButton from 'Components/Link/SpinnerIconButton';
@@ -113,7 +114,8 @@ class AuthorIndexOverview extends Component {
const elementStyle = {
width: `${posterWidth}px`,
height: `${posterHeight}px`
height: `${posterHeight}px`,
objectFit: 'contain'
};
const contentHeight = getContentHeight(rowHeight, isSmallScreen);
@@ -203,7 +205,7 @@ class AuthorIndexOverview extends Component {
>
<TextTruncate
line={Math.floor(overviewHeight / (defaultFontSize * lineHeight))}
text={overview}
text={stripHtml(overview)}
/>
</Link>
@@ -110,9 +110,9 @@ class AuthorIndexPoster extends Component {
const elementStyle = {
width: `${posterWidth}px`,
height: `${posterHeight}px`
height: `${posterHeight}px`,
objectFit: 'contain'
};
elementStyle.objectFit = 'contain';
return (
<div className={styles.container}>
@@ -82,7 +82,6 @@ class AuthorIndexRow extends Component {
status,
authorName,
titleSlug,
authorType,
qualityProfile,
metadataProfile,
nextBook,
@@ -134,7 +133,6 @@ class AuthorIndexRow extends Component {
<AuthorStatusCell
key={name}
className={styles[name]}
authorType={authorType}
monitored={monitored}
status={status}
component={VirtualTableRowCell}
@@ -184,17 +182,6 @@ class AuthorIndexRow extends Component {
);
}
if (name === 'authorType') {
return (
<VirtualTableRowCell
key={name}
className={styles[name]}
>
{authorType}
</VirtualTableRowCell>
);
}
if (name === 'qualityProfileId') {
return (
<VirtualTableRowCell
@@ -421,7 +408,6 @@ AuthorIndexRow.propTypes = {
status: PropTypes.string.isRequired,
authorName: PropTypes.string.isRequired,
titleSlug: PropTypes.string.isRequired,
authorType: PropTypes.string,
qualityProfile: PropTypes.object.isRequired,
metadataProfile: PropTypes.object.isRequired,
nextBook: PropTypes.object,
@@ -8,15 +8,12 @@ import styles from './AuthorStatusCell.css';
function AuthorStatusCell(props) {
const {
className,
authorType,
monitored,
status,
component: Component,
...otherProps
} = props;
const endedString = authorType === 'Person' ? 'Deceased' : 'Ended';
return (
<Component
className={className}
@@ -31,7 +28,7 @@ function AuthorStatusCell(props) {
<Icon
className={styles.statusIcon}
name={status === 'ended' ? icons.AUTHOR_ENDED : icons.AUTHOR_CONTINUING}
title={status === 'ended' ? endedString : 'Continuing'}
title={status === 'ended' ? 'Deceased' : 'Continuing'}
/>
</Component>
);
@@ -39,7 +36,6 @@ function AuthorStatusCell(props) {
AuthorStatusCell.propTypes = {
className: PropTypes.string.isRequired,
authorType: PropTypes.string,
monitored: PropTypes.bool.isRequired,
status: PropTypes.string.isRequired,
component: PropTypes.elementType