|
|
@ -5,6 +5,7 @@ import { icons, kinds } from 'Helpers/Props';
|
|
|
|
import formatDate from 'Utilities/Date/formatDate';
|
|
|
|
import formatDate from 'Utilities/Date/formatDate';
|
|
|
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
|
|
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
|
|
|
import SpinnerButton from 'Components/Link/SpinnerButton';
|
|
|
|
import SpinnerButton from 'Components/Link/SpinnerButton';
|
|
|
|
|
|
|
|
import InlineMarkdown from 'Components/Markdown/InlineMarkdown';
|
|
|
|
import Icon from 'Components/Icon';
|
|
|
|
import Icon from 'Components/Icon';
|
|
|
|
import Label from 'Components/Label';
|
|
|
|
import Label from 'Components/Label';
|
|
|
|
import PageContent from 'Components/Page/PageContent';
|
|
|
|
import PageContent from 'Components/Page/PageContent';
|
|
|
@ -28,6 +29,7 @@ class Updates extends Component {
|
|
|
|
isInstallingUpdate,
|
|
|
|
isInstallingUpdate,
|
|
|
|
updateMechanism,
|
|
|
|
updateMechanism,
|
|
|
|
isDocker,
|
|
|
|
isDocker,
|
|
|
|
|
|
|
|
updateMechanismMessage,
|
|
|
|
shortDateFormat,
|
|
|
|
shortDateFormat,
|
|
|
|
onInstallLatestPress
|
|
|
|
onInstallLatestPress
|
|
|
|
} = this.props;
|
|
|
|
} = this.props;
|
|
|
@ -38,10 +40,11 @@ class Updates extends Component {
|
|
|
|
const hasUpdateToInstall = hasUpdates && _.some(items, { installable: true, latest: true });
|
|
|
|
const hasUpdateToInstall = hasUpdates && _.some(items, { installable: true, latest: true });
|
|
|
|
const noUpdateToInstall = hasUpdates && !hasUpdateToInstall;
|
|
|
|
const noUpdateToInstall = hasUpdates && !hasUpdateToInstall;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const externalUpdaterPrefix = 'Unable to update Radarr directly,';
|
|
|
|
const externalUpdaterMessages = {
|
|
|
|
const externalUpdaterMessages = {
|
|
|
|
external: 'Unable to update Radarr directly, Radarr is configured to use an external update mechanism',
|
|
|
|
external: 'Radarr is configured to use an external update mechanism',
|
|
|
|
apt: 'Unable to update Radarr directly, use apt to install the update',
|
|
|
|
apt: 'use apt to install the update',
|
|
|
|
docker: 'Unable to update Radarr directly, update the docker container to receive the update'
|
|
|
|
docker: 'update the docker container to receive the update'
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
@ -79,7 +82,7 @@ class Updates extends Component {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<div className={styles.message}>
|
|
|
|
<div className={styles.message}>
|
|
|
|
{externalUpdaterMessages[updateMechanism] || externalUpdaterMessages.external}
|
|
|
|
{externalUpdaterPrefix} <InlineMarkdown data={updateMechanismMessage || externalUpdaterMessages[updateMechanism] || externalUpdaterMessages.external} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Fragment>
|
|
|
|
</Fragment>
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -212,6 +215,7 @@ Updates.propTypes = {
|
|
|
|
isInstallingUpdate: PropTypes.bool.isRequired,
|
|
|
|
isInstallingUpdate: PropTypes.bool.isRequired,
|
|
|
|
isDocker: PropTypes.bool.isRequired,
|
|
|
|
isDocker: PropTypes.bool.isRequired,
|
|
|
|
updateMechanism: PropTypes.string,
|
|
|
|
updateMechanism: PropTypes.string,
|
|
|
|
|
|
|
|
updateMechanismMessage: PropTypes.string,
|
|
|
|
shortDateFormat: PropTypes.string.isRequired,
|
|
|
|
shortDateFormat: PropTypes.string.isRequired,
|
|
|
|
onInstallLatestPress: PropTypes.func.isRequired
|
|
|
|
onInstallLatestPress: PropTypes.func.isRequired
|
|
|
|
};
|
|
|
|
};
|
|
|
|