[UI Work] Add Artist, Import Artist, Calendar

This commit is contained in:
Qstick 2017-09-07 23:09:52 -04:00
parent a747c5f135
commit 77f1d2e64c
109 changed files with 891 additions and 1082 deletions

View file

@ -5,7 +5,7 @@ import Icon from 'Components/Icon';
import Link from 'Components/Link/Link';
import CaptchaInputConnector from './CaptchaInputConnector';
import CheckInput from './CheckInput';
import MonitorEpisodesSelectInput from './MonitorEpisodesSelectInput';
import MonitorAlbumsSelectInput from './MonitorAlbumsSelectInput';
import NumberInput from './NumberInput';
import OAuthInputConnector from './OAuthInputConnector';
import PasswordInput from './PasswordInput';
@ -29,8 +29,8 @@ function getComponent(type) {
case inputTypes.CHECK:
return CheckInput;
case inputTypes.MONITOR_EPISODES_SELECT:
return MonitorEpisodesSelectInput;
case inputTypes.MONITOR_ALBUMS_SELECT:
return MonitorAlbumsSelectInput;
case inputTypes.NUMBER:
return NumberInput;

View file

@ -3,16 +3,16 @@ import React from 'react';
import SelectInput from './SelectInput';
const monitorOptions = [
{ key: 'all', value: 'All Episodes' },
{ key: 'future', value: 'Future Episodes' },
{ key: 'missing', value: 'Missing Episodes' },
{ key: 'existing', value: 'Existing Episodes' },
{ key: 'first', value: 'Only First Season' },
{ key: 'latest', value: 'Only Latest Season' },
{ key: 'all', value: 'All Albums' },
{ key: 'future', value: 'Future Albums' },
{ key: 'missing', value: 'Missing Albums' },
{ key: 'existing', value: 'Existing Albums' },
{ key: 'first', value: 'Only First Album' },
{ key: 'latest', value: 'Only Latest Album' },
{ key: 'none', value: 'None' }
];
function MonitorEpisodesSelectInput(props) {
function MonitorAlbumsSelectInput(props) {
const {
includeNoChange,
includeMixed,
@ -45,15 +45,15 @@ function MonitorEpisodesSelectInput(props) {
);
}
MonitorEpisodesSelectInput.propTypes = {
MonitorAlbumsSelectInput.propTypes = {
includeNoChange: PropTypes.bool.isRequired,
includeMixed: PropTypes.bool.isRequired,
onChange: PropTypes.func.isRequired
};
MonitorEpisodesSelectInput.defaultProps = {
MonitorAlbumsSelectInput.defaultProps = {
includeNoChange: false,
includeMixed: false
};
export default MonitorEpisodesSelectInput;
export default MonitorAlbumsSelectInput;

View file

@ -4,7 +4,7 @@ import styles from './LoadingMessage.css';
const messages = [
'Downloading more RAM',
'Now in Technicolor',
'Previously on Sonarr...',
'Previously on Lidarr...',
'Bleep Bloop.',
'Locating the required gigapixels to render...',
'Spinning up the hamster wheel...',

View file

@ -13,7 +13,7 @@ function ErrorPage(props) {
uiSettingsError
} = props;
let errorMessage = 'Failed to load Sonarr';
let errorMessage = 'Failed to load Lidarr';
if (!isLocalStorageSupported) {
errorMessage = 'Local Storage is not supported or disabled. A plugin or private browsing may have disabled it.';

View file

@ -111,7 +111,7 @@ class SeriesSearchInput extends Component {
} = this._autosuggest.state;
if (!suggestions.length || highlightedSectionIndex) {
this.props.onGoToAddNewSeries(value);
this.props.onGoToAddNewArtist(value);
this._autosuggest.input.blur();
return;
@ -153,7 +153,7 @@ class SeriesSearchInput extends Component {
onSuggestionSelected = (event, { suggestion, sectionIndex }) => {
if (suggestion.type === ADD_NEW_TYPE) {
this.props.onGoToAddNewSeries(this.state.value);
this.props.onGoToAddNewArtist(this.state.value);
} else {
this.goToSeries(suggestion);
}
@ -243,7 +243,7 @@ class SeriesSearchInput extends Component {
SeriesSearchInput.propTypes = {
series: PropTypes.arrayOf(PropTypes.object).isRequired,
onGoToSeries: PropTypes.func.isRequired,
onGoToAddNewSeries: PropTypes.func.isRequired,
onGoToAddNewArtist: PropTypes.func.isRequired,
bindShortcut: PropTypes.func.isRequired
};

View file

@ -22,7 +22,7 @@ function createMapDispatchToProps(dispatch, props) {
dispatch(push(`${window.Sonarr.urlBase}/series/${titleSlug}`));
},
onGoToAddNewSeries(query) {
onGoToAddNewArtist(query) {
dispatch(push(`${window.Sonarr.urlBase}/add/new?term=${encodeURIComponent(query)}`));
}
};