mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 01:19:15 +00:00
Link to author from book details
Co-authored-by: plmcgrn <889547+plmcgrn@users.noreply.github.com> Closes #3356
This commit is contained in:
@@ -2,11 +2,11 @@ import PropTypes from 'prop-types';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Link from 'Components/Link/Link';
|
import Link from 'Components/Link/Link';
|
||||||
|
|
||||||
function AuthorNameLink({ titleSlug, authorName }) {
|
function AuthorNameLink({ titleSlug, authorName, ...otherProps }) {
|
||||||
const link = `/author/${titleSlug}`;
|
const link = `/author/${titleSlug}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link to={link}>
|
<Link to={link} {...otherProps}>
|
||||||
{authorName}
|
{authorName}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -84,9 +84,15 @@
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.authorLink {
|
||||||
|
composes: link from '~Components/Link/Link.css';
|
||||||
|
|
||||||
|
margin-right: 15px;
|
||||||
|
color: var(--white);
|
||||||
|
}
|
||||||
|
|
||||||
.duration {
|
.duration {
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
margin-left: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailsLabel {
|
.detailsLabel {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// Please do not change this file!
|
// Please do not change this file!
|
||||||
interface CssExports {
|
interface CssExports {
|
||||||
'alternateTitlesIconContainer': string;
|
'alternateTitlesIconContainer': string;
|
||||||
|
'authorLink': string;
|
||||||
'backdrop': string;
|
'backdrop': string;
|
||||||
'backdropOverlay': string;
|
'backdropOverlay': string;
|
||||||
'cover': string;
|
'cover': string;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import moment from 'moment';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import TextTruncate from 'react-text-truncate';
|
import TextTruncate from 'react-text-truncate';
|
||||||
|
import AuthorNameLink from 'Author/AuthorNameLink';
|
||||||
import BookCover from 'Book/BookCover';
|
import BookCover from 'Book/BookCover';
|
||||||
import HeartRating from 'Components/HeartRating';
|
import HeartRating from 'Components/HeartRating';
|
||||||
import Icon from 'Components/Icon';
|
import Icon from 'Components/Icon';
|
||||||
@@ -113,7 +114,7 @@ class BookDetailsHeader extends Component {
|
|||||||
className={styles.monitorToggleButton}
|
className={styles.monitorToggleButton}
|
||||||
monitored={monitored}
|
monitored={monitored}
|
||||||
isSaving={isSaving}
|
isSaving={isSaving}
|
||||||
size={isSmallScreen ? 30: 40}
|
size={isSmallScreen ? 30 : 40}
|
||||||
onPress={onMonitorTogglePress}
|
onPress={onMonitorTogglePress}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,7 +132,12 @@ class BookDetailsHeader extends Component {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{author.authorName}
|
<AuthorNameLink
|
||||||
|
className={styles.authorLink}
|
||||||
|
titleSlug={author.titleSlug}
|
||||||
|
authorName={author.authorName}
|
||||||
|
/>
|
||||||
|
|
||||||
{
|
{
|
||||||
!!pageCount &&
|
!!pageCount &&
|
||||||
<span className={styles.duration}>
|
<span className={styles.duration}>
|
||||||
|
|||||||
@@ -2,3 +2,7 @@
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
color: var(--themeRed);
|
color: var(--themeRed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rating {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|||||||
1
frontend/src/Components/HeartRating.css.d.ts
vendored
1
frontend/src/Components/HeartRating.css.d.ts
vendored
@@ -2,6 +2,7 @@
|
|||||||
// Please do not change this file!
|
// Please do not change this file!
|
||||||
interface CssExports {
|
interface CssExports {
|
||||||
'heart': string;
|
'heart': string;
|
||||||
|
'rating': string;
|
||||||
}
|
}
|
||||||
export const cssExports: CssExports;
|
export const cssExports: CssExports;
|
||||||
export default cssExports;
|
export default cssExports;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import styles from './HeartRating.css';
|
|||||||
|
|
||||||
function HeartRating({ rating, iconSize }) {
|
function HeartRating({ rating, iconSize }) {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span className={styles.rating}>
|
||||||
<Icon
|
<Icon
|
||||||
className={styles.heart}
|
className={styles.heart}
|
||||||
name={icons.HEART}
|
name={icons.HEART}
|
||||||
|
|||||||
Reference in New Issue
Block a user