1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

New: Show relative file name when selecting episode in Manual Import

Closes #3197
This commit is contained in:
Mark McDowall 2019-07-11 19:32:11 -07:00
parent ec74e9bce0
commit c86309cfc0
3 changed files with 53 additions and 10 deletions

View File

@ -0,0 +1,32 @@
.footer {
composes: modalFooter from "~Components/Modal/ModalFooter.css";
display: flex;
justify-content: space-between;
overflow: hidden;
}
.path {
margin-right: 20px;
color: $dimColor;
}
.buttons {
display: flex;
}
@media only screen and (max-width: $breakpointSmall) {
.footer {
display: block;
}
.path {
margin-right: 0;
margin-bottom: 10px;
}
.buttons {
justify-content: space-between;
flex-grow: 1;
}
}

View File

@ -14,6 +14,7 @@ import ModalFooter from 'Components/Modal/ModalFooter';
import Table from 'Components/Table/Table'; import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody'; import TableBody from 'Components/Table/TableBody';
import SelectEpisodeRow from './SelectEpisodeRow'; import SelectEpisodeRow from './SelectEpisodeRow';
import styles from './SelectEpisodeModalContent.css';
const columns = [ const columns = [
{ {
@ -83,6 +84,7 @@ class SelectEpisodeModalContent extends Component {
isPopulated, isPopulated,
error, error,
items, items,
relativePath,
sortKey, sortKey,
sortDirection, sortDirection,
onSortPress, onSortPress,
@ -100,7 +102,10 @@ class SelectEpisodeModalContent extends Component {
return ( return (
<ModalContent onModalClose={onModalClose}> <ModalContent onModalClose={onModalClose}>
<ModalHeader> <ModalHeader>
Manual Import - Select Episode(s) <div className={styles.header}>
Manual Import - Select Episode(s)
</div>
</ModalHeader> </ModalHeader>
<ModalBody> <ModalBody>
@ -152,17 +157,21 @@ class SelectEpisodeModalContent extends Component {
} }
</ModalBody> </ModalBody>
<ModalFooter> <ModalFooter className={styles.footer}>
<Button onPress={onModalClose}> <div className={styles.path}>{relativePath}</div>
Cancel
</Button>
<Button <div className={styles.buttons}>
kind={kinds.SUCCESS} <Button onPress={onModalClose}>
onPress={this.onEpisodesSelect} Cancel
> </Button>
<Button
kind={kinds.SUCCESS}
onPress={this.onEpisodesSelect}
>
Select Episodes Select Episodes
</Button> </Button>
</div>
</ModalFooter> </ModalFooter>
</ModalContent> </ModalContent>
); );
@ -174,6 +183,7 @@ SelectEpisodeModalContent.propTypes = {
isPopulated: PropTypes.bool.isRequired, isPopulated: PropTypes.bool.isRequired,
error: PropTypes.object, error: PropTypes.object,
items: PropTypes.arrayOf(PropTypes.object).isRequired, items: PropTypes.arrayOf(PropTypes.object).isRequired,
relativePath: PropTypes.string.isRequired,
sortKey: PropTypes.string, sortKey: PropTypes.string,
sortDirection: PropTypes.string, sortDirection: PropTypes.string,
onSortPress: PropTypes.func.isRequired, onSortPress: PropTypes.func.isRequired,

View File

@ -340,6 +340,7 @@ class InteractiveImportRow extends Component {
id={id} id={id}
seriesId={series && series.id} seriesId={series && series.id}
seasonNumber={seasonNumber} seasonNumber={seasonNumber}
relativePath={relativePath}
onModalClose={this.onSelectEpisodeModalClose} onModalClose={this.onSelectEpisodeModalClose}
/> />