mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
[UI Work] Misc UI Fixes and Tweaks
This commit is contained in:
@@ -24,15 +24,15 @@ class ArtistIndexActionsCell extends Component {
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onEditSeriesPress = () => {
|
||||
onEditArtistPress = () => {
|
||||
this.setState({ isEditArtistModalOpen: true });
|
||||
}
|
||||
|
||||
onEditSeriesModalClose = () => {
|
||||
onEditArtistModalClose = () => {
|
||||
this.setState({ isEditArtistModalOpen: false });
|
||||
}
|
||||
|
||||
onDeleteSeriesPress = () => {
|
||||
onDeleteArtistPress = () => {
|
||||
this.setState({
|
||||
isEditArtistModalOpen: false,
|
||||
isDeleteArtistModalOpen: true
|
||||
@@ -49,7 +49,7 @@ class ArtistIndexActionsCell extends Component {
|
||||
render() {
|
||||
const {
|
||||
id,
|
||||
isRefreshingSeries,
|
||||
isRefreshingArtist,
|
||||
onRefreshArtistPress,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
@@ -66,21 +66,21 @@ class ArtistIndexActionsCell extends Component {
|
||||
<SpinnerIconButton
|
||||
name={icons.REFRESH}
|
||||
title="Refresh Artist"
|
||||
isSpinning={isRefreshingSeries}
|
||||
isSpinning={isRefreshingArtist}
|
||||
onPress={onRefreshArtistPress}
|
||||
/>
|
||||
|
||||
<IconButton
|
||||
name={icons.EDIT}
|
||||
title="Edit Artist"
|
||||
onPress={this.onEditSeriesPress}
|
||||
onPress={this.onEditArtistPress}
|
||||
/>
|
||||
|
||||
<EditArtistModalConnector
|
||||
isOpen={isEditArtistModalOpen}
|
||||
artistId={id}
|
||||
onModalClose={this.onEditSeriesModalClose}
|
||||
onDeleteSeriesPress={this.onDeleteSeriesPress}
|
||||
onModalClose={this.onEditArtistModalClose}
|
||||
onDeleteArtistPress={this.onDeleteArtistPress}
|
||||
/>
|
||||
|
||||
<DeleteArtistModal
|
||||
@@ -95,7 +95,7 @@ class ArtistIndexActionsCell extends Component {
|
||||
|
||||
ArtistIndexActionsCell.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
isRefreshingSeries: PropTypes.bool.isRequired,
|
||||
isRefreshingArtist: PropTypes.bool.isRequired,
|
||||
onRefreshArtistPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
||||
@@ -10,12 +10,6 @@
|
||||
flex: 4 0 110px;
|
||||
}
|
||||
|
||||
.network {
|
||||
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
|
||||
|
||||
flex: 2 0 90px;
|
||||
}
|
||||
|
||||
.qualityProfileId,
|
||||
.languageProfileId {
|
||||
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
|
||||
@@ -38,7 +32,7 @@
|
||||
}
|
||||
|
||||
.trackProgress,
|
||||
.latestSeason {
|
||||
.latestAlbum {
|
||||
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
|
||||
|
||||
flex: 0 0 150px;
|
||||
|
||||
@@ -10,12 +10,6 @@
|
||||
flex: 4 0 110px;
|
||||
}
|
||||
|
||||
.network {
|
||||
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
|
||||
|
||||
flex: 2 0 90px;
|
||||
}
|
||||
|
||||
.qualityProfileId,
|
||||
.languageProfileId {
|
||||
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
|
||||
@@ -38,7 +32,7 @@
|
||||
}
|
||||
|
||||
.trackProgress,
|
||||
.latestSeason {
|
||||
.latestAlbum {
|
||||
composes: cell from 'Components/Table/Cells/VirtualTableRowCell.css';
|
||||
|
||||
display: flex;
|
||||
|
||||
@@ -31,15 +31,15 @@ class ArtistIndexRow extends Component {
|
||||
};
|
||||
}
|
||||
|
||||
onEditSeriesPress = () => {
|
||||
onEditArtistPress = () => {
|
||||
this.setState({ isEditArtistModalOpen: true });
|
||||
}
|
||||
|
||||
onEditSeriesModalClose = () => {
|
||||
onEditArtistModalClose = () => {
|
||||
this.setState({ isEditArtistModalOpen: false });
|
||||
}
|
||||
|
||||
onDeleteSeriesPress = () => {
|
||||
onDeleteArtistPress = () => {
|
||||
this.setState({
|
||||
isEditArtistModalOpen: false,
|
||||
isDeleteArtistModalOpen: true
|
||||
@@ -66,7 +66,6 @@ class ArtistIndexRow extends Component {
|
||||
status,
|
||||
artistName,
|
||||
nameSlug,
|
||||
network,
|
||||
qualityProfile,
|
||||
languageProfile,
|
||||
nextAiring,
|
||||
@@ -76,13 +75,13 @@ class ArtistIndexRow extends Component {
|
||||
trackCount,
|
||||
trackFileCount,
|
||||
totalTrackCount,
|
||||
latestSeason,
|
||||
latestAlbum,
|
||||
path,
|
||||
sizeOnDisk,
|
||||
tags,
|
||||
// useSceneNumbering,
|
||||
columns,
|
||||
isRefreshingSeries,
|
||||
isRefreshingArtist,
|
||||
onRefreshArtistPress
|
||||
} = this.props;
|
||||
|
||||
@@ -130,17 +129,6 @@ class ArtistIndexRow extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'network') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={name}
|
||||
className={styles[name]}
|
||||
>
|
||||
{network}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'qualityProfileId') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
@@ -227,9 +215,9 @@ class ArtistIndexRow extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'latestSeason') {
|
||||
const seasonStatistics = latestSeason.statistics;
|
||||
const progress = seasonStatistics.episodeCount ? seasonStatistics.episodeFileCount / seasonStatistics.episodeCount * 100 : 100;
|
||||
if (name === 'latestAlbum') {
|
||||
const albumStatistics = latestAlbum.statistics;
|
||||
const progress = albumStatistics.trackCount ? albumStatistics.trackFileCount / albumStatistics.trackCount * 100 : 100;
|
||||
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
@@ -240,8 +228,8 @@ class ArtistIndexRow extends Component {
|
||||
progress={progress}
|
||||
kind={getProgressBarKind(status, monitored, progress)}
|
||||
showText={true}
|
||||
text={`${seasonStatistics.episodeFileCount} / ${seasonStatistics.episodeCount}`}
|
||||
title={`${seasonStatistics.episodeFileCount} / ${seasonStatistics.episodeCount} (Total: ${seasonStatistics.totalEpisodeCount})`}
|
||||
text={`${albumStatistics.trackFileCount} / ${albumStatistics.trackCount}`}
|
||||
title={`${albumStatistics.trackFileCount} / ${albumStatistics.trackCount} (Total: ${albumStatistics.totalTrackCount})`}
|
||||
width={125}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
@@ -320,14 +308,14 @@ class ArtistIndexRow extends Component {
|
||||
<SpinnerIconButton
|
||||
name={icons.REFRESH}
|
||||
title="Refresh Artist"
|
||||
isSpinning={isRefreshingSeries}
|
||||
isSpinning={isRefreshingArtist}
|
||||
onPress={onRefreshArtistPress}
|
||||
/>
|
||||
|
||||
<IconButton
|
||||
name={icons.EDIT}
|
||||
title="Edit Artist"
|
||||
onPress={this.onEditSeriesPress}
|
||||
onPress={this.onEditArtistPress}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
@@ -340,8 +328,8 @@ class ArtistIndexRow extends Component {
|
||||
<EditArtistModalConnector
|
||||
isOpen={isEditArtistModalOpen}
|
||||
artistId={id}
|
||||
onModalClose={this.onEditSeriesModalClose}
|
||||
onDeleteSeriesPress={this.onDeleteSeriesPress}
|
||||
onModalClose={this.onEditArtistModalClose}
|
||||
onDeleteArtistPress={this.onDeleteArtistPress}
|
||||
/>
|
||||
|
||||
<DeleteArtistModal
|
||||
@@ -361,7 +349,6 @@ ArtistIndexRow.propTypes = {
|
||||
status: PropTypes.string.isRequired,
|
||||
artistName: PropTypes.string.isRequired,
|
||||
nameSlug: PropTypes.string.isRequired,
|
||||
network: PropTypes.string,
|
||||
qualityProfile: PropTypes.object.isRequired,
|
||||
languageProfile: PropTypes.object.isRequired,
|
||||
nextAiring: PropTypes.string,
|
||||
@@ -371,13 +358,13 @@ ArtistIndexRow.propTypes = {
|
||||
trackCount: PropTypes.number,
|
||||
trackFileCount: PropTypes.number,
|
||||
totalTrackCount: PropTypes.number,
|
||||
latestSeason: PropTypes.object,
|
||||
latestAlbum: PropTypes.object,
|
||||
path: PropTypes.string.isRequired,
|
||||
sizeOnDisk: PropTypes.number,
|
||||
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
// useSceneNumbering: PropTypes.bool.isRequired,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
isRefreshingSeries: PropTypes.bool.isRequired,
|
||||
isRefreshingArtist: PropTypes.bool.isRequired,
|
||||
onRefreshArtistPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class ArtistIndexTable extends Component {
|
||||
const items = this.props.items;
|
||||
|
||||
const row = _.findIndex(items, (item) => {
|
||||
const firstCharacter = item.sortTitle.charAt(0);
|
||||
const firstCharacter = item.sortName.charAt(0);
|
||||
|
||||
if (character === '#') {
|
||||
return !isNaN(firstCharacter);
|
||||
|
||||
@@ -30,5 +30,5 @@ export default connectSection(
|
||||
createMapDispatchToProps,
|
||||
undefined,
|
||||
{ withRef: true },
|
||||
{ section: 'series', uiSection: 'seriesIndex' }
|
||||
{ section: 'series', uiSection: 'artistIndex' }
|
||||
)(ArtistIndexTable);
|
||||
|
||||
@@ -23,7 +23,6 @@ export default function artistIndexCellRenderers(cellProps) {
|
||||
status,
|
||||
name,
|
||||
nameSlug,
|
||||
network,
|
||||
qualityProfileId,
|
||||
nextAiring,
|
||||
previousAiring,
|
||||
@@ -46,7 +45,7 @@ export default function artistIndexCellRenderers(cellProps) {
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'sortTitle') {
|
||||
if (dataKey === 'sortName') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={cellKey}
|
||||
@@ -61,18 +60,6 @@ export default function artistIndexCellRenderers(cellProps) {
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'network') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={cellKey}
|
||||
{...otherProps}
|
||||
>
|
||||
{network}
|
||||
</VirtualTableRowCell>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'qualityProfileId') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
@@ -97,7 +84,7 @@ export default function artistIndexCellRenderers(cellProps) {
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'seasonCount') {
|
||||
if (dataKey === 'albumCount') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={cellKey}
|
||||
@@ -108,7 +95,7 @@ export default function artistIndexCellRenderers(cellProps) {
|
||||
);
|
||||
}
|
||||
|
||||
if (dataKey === 'episodeProgress') {
|
||||
if (dataKey === 'trackProgress') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={cellKey}
|
||||
|
||||
Reference in New Issue
Block a user