Update prettier/eslint
This commit is contained in:
69
src/App.jsx
69
src/App.jsx
@@ -20,18 +20,12 @@ import {
|
||||
setNewReleasesAvailable,
|
||||
} from './redux/actions/release_version_actions';
|
||||
import ReleaseVersionDisplay from './components/ReleaseVersionDisplay/ReleaseVersionDisplay';
|
||||
import {
|
||||
displaySelectAppPlatform,
|
||||
saveState,
|
||||
} from './redux/actions/common_actions';
|
||||
import { displaySelectAppPlatform, saveState } from './redux/actions/common_actions';
|
||||
import SelectAppPlatform from './containers/SelectAppPlatform/SelectAppPlatform';
|
||||
import Text from './components/UI/Text/Text';
|
||||
import UpgradeIcon from './components/UpgradeIcon/UpgradeIcon';
|
||||
import UpgradeUI from './components/UpgradeUI/UpgradeUI';
|
||||
import {
|
||||
loadReleases,
|
||||
setDismissUIUpgrade,
|
||||
} from './redux/actions/release_version_actions';
|
||||
import { loadReleases, setDismissUIUpgrade } from './redux/actions/release_version_actions';
|
||||
import YesNo from './components/YesNo/YesNo';
|
||||
import { createModalConditionally } from './utils.jsx';
|
||||
import SkynetImport from './containers/SkynetImport/SkynetImport';
|
||||
@@ -106,8 +100,7 @@ class App extends IPCContainer {
|
||||
!this.props.DownloadActive &&
|
||||
selectedVersion !== 'unavailable' &&
|
||||
selectedVersion !== this.props.InstalledVersion;
|
||||
const missingDependencies =
|
||||
this.props.MissingDependencies.length > 0 && this.props.AllowMount;
|
||||
const missingDependencies = this.props.MissingDependencies.length > 0 && this.props.AllowMount;
|
||||
|
||||
const allowMount =
|
||||
this.props.AllowMount &&
|
||||
@@ -142,9 +135,7 @@ class App extends IPCContainer {
|
||||
!this.props.RebootRequired;
|
||||
|
||||
const showPinnedManager =
|
||||
!missingDependencies &&
|
||||
!this.props.RebootRequired &&
|
||||
this.props.DisplayPinnedManager;
|
||||
!missingDependencies && !this.props.RebootRequired && this.props.DisplayPinnedManager;
|
||||
|
||||
const showUpgrade =
|
||||
this.props.UpgradeAvailable &&
|
||||
@@ -214,18 +205,12 @@ class App extends IPCContainer {
|
||||
remoteSupported={remoteSupported}
|
||||
/>
|
||||
);
|
||||
const addEditHostDisplay = createModalConditionally(
|
||||
showAddEditHost,
|
||||
<AddEditHost />
|
||||
);
|
||||
const addEditHostDisplay = createModalConditionally(showAddEditHost, <AddEditHost />);
|
||||
const pinnedManagerDisplay = createModalConditionally(
|
||||
showPinnedManager,
|
||||
<PinnedManager version={selectedVersion} />
|
||||
);
|
||||
const confirmDisplay = createModalConditionally(
|
||||
this.props.DisplayConfirmYesNo,
|
||||
<YesNo />
|
||||
);
|
||||
const confirmDisplay = createModalConditionally(this.props.DisplayConfirmYesNo, <YesNo />);
|
||||
const dependencyDisplay = createModalConditionally(
|
||||
showDependencies,
|
||||
<DependencyList />,
|
||||
@@ -238,24 +223,10 @@ class App extends IPCContainer {
|
||||
false,
|
||||
true
|
||||
);
|
||||
const errorDisplay = createModalConditionally(
|
||||
this.props.DisplayError,
|
||||
<ErrorDetails />,
|
||||
true
|
||||
);
|
||||
const infoDisplay = createModalConditionally(
|
||||
this.props.DisplayInfo,
|
||||
<InfoDetails />,
|
||||
true
|
||||
);
|
||||
const newReleasesDisplay = createModalConditionally(
|
||||
showNewReleases,
|
||||
<NewReleases />
|
||||
);
|
||||
const rebootDisplay = createModalConditionally(
|
||||
this.props.RebootRequired,
|
||||
<Reboot />
|
||||
);
|
||||
const errorDisplay = createModalConditionally(this.props.DisplayError, <ErrorDetails />, true);
|
||||
const infoDisplay = createModalConditionally(this.props.DisplayInfo, <InfoDetails />, true);
|
||||
const newReleasesDisplay = createModalConditionally(showNewReleases, <NewReleases />);
|
||||
const rebootDisplay = createModalConditionally(this.props.RebootRequired, <Reboot />);
|
||||
const selectAppPlatformDisplay = createModalConditionally(
|
||||
this.props.DisplaySelectAppPlatform,
|
||||
<SelectAppPlatform />
|
||||
@@ -294,10 +265,7 @@ class App extends IPCContainer {
|
||||
rowSpan={'17'}
|
||||
key={'md_' + key++}
|
||||
dxStyle={{ padding: 'var(--default_spacing)' }}>
|
||||
<ReleaseVersionDisplay
|
||||
downloadDisabled={!downloadEnabled}
|
||||
version={selectedVersion}
|
||||
/>
|
||||
<ReleaseVersionDisplay downloadDisabled={!downloadEnabled} version={selectedVersion} />
|
||||
</Box>
|
||||
);
|
||||
if (allowMount) {
|
||||
@@ -349,8 +317,7 @@ class App extends IPCContainer {
|
||||
<UpgradeIcon
|
||||
available={
|
||||
!missingDependencies &&
|
||||
(this.props.UpgradeAvailable ||
|
||||
this.props.NewReleasesAvailable2.length > 0)
|
||||
(this.props.UpgradeAvailable || this.props.NewReleasesAvailable2.length > 0)
|
||||
}
|
||||
newReleases={
|
||||
!missingDependencies &&
|
||||
@@ -428,16 +395,12 @@ const mapStateToProps = (state) => {
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
displaySelectAppPlatform: (display) =>
|
||||
dispatch(displaySelectAppPlatform(display)),
|
||||
displaySelectAppPlatform: (display) => dispatch(displaySelectAppPlatform(display)),
|
||||
loadReleases: () => dispatch(loadReleases()),
|
||||
notifyError: (msg, critical, callback) =>
|
||||
dispatch(notifyError(msg, critical, callback)),
|
||||
notifyError: (msg, critical, callback) => dispatch(notifyError(msg, critical, callback)),
|
||||
saveState: () => dispatch(saveState()),
|
||||
setDismissNewReleasesAvailable: (dismiss) =>
|
||||
dispatch(setDismissNewReleasesAvailable(dismiss)),
|
||||
setNewReleasesAvailable: (items) =>
|
||||
dispatch(setNewReleasesAvailable(items)),
|
||||
setDismissNewReleasesAvailable: (dismiss) => dispatch(setDismissNewReleasesAvailable(dismiss)),
|
||||
setNewReleasesAvailable: (items) => dispatch(setNewReleasesAvailable(items)),
|
||||
setDismissUIUpgrade: (dismiss) => dispatch(setDismissUIUpgrade(dismiss)),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user