From e23c0086c24115cad33df2df168807670435e63a Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 4 Aug 2021 17:17:16 -0500 Subject: [PATCH] prettier --- src/App.jsx | 50 ++--- .../ApplicationBusy/ApplicationBusy.js | 8 +- .../DependencyList/Dependency/Dependency.js | 42 ++-- .../DependencyList/DependencyList.js | 12 +- .../DownloadProgress/DownloadProgress.js | 10 +- src/components/ErrorDetails/ErrorDetails.js | 6 +- src/components/InfoDetails/InfoDetails.js | 15 +- .../NewReleases/NewRelease/NewRelease.jsx | 66 +++--- src/components/NewReleases/NewReleases.jsx | 6 +- src/components/Reboot/Reboot.js | 6 +- .../ReleaseVersionDisplay.js | 6 +- src/components/UI/Box/Box.js | 2 +- src/components/UI/CheckBox/CheckBox.js | 2 +- src/components/UI/Grid/Grid.js | 2 +- src/components/UI/Loading/Loading.js | 2 +- src/components/UI/RootElem/RootElem.js | 2 +- src/components/UI/Text/Text.js | 2 +- src/components/UpgradeIcon/UpgradeIcon.js | 6 +- src/components/UpgradeUI/UpgradeUI.js | 44 ++-- src/components/YesNo/YesNo.js | 32 +-- src/constants.js | 2 +- src/containers/AddEditHost/AddEditHost.js | 132 +++++------ src/containers/AddMount/AddMount.js | 138 ++++++------ src/containers/Configuration/Configuration.js | 177 +++++++-------- .../ConfigurationItem/ConfigurationItem.js | 34 +-- src/containers/HostList/Host/Host.js | 20 +- src/containers/HostList/HostList.js | 27 +-- src/containers/IPCContainer/IPCContainer.js | 4 +- .../MountItems/MountItem/MountItem.js | 40 ++-- src/containers/MountItems/MountItems.js | 28 +-- src/containers/PinnedManager/PinnedManager.js | 42 ++-- src/containers/SkynetExport/SkynetExport.js | 42 ++-- .../SkynetImport/ImportList/Import/Import.js | 4 +- .../SkynetImport/ImportList/ImportList.js | 12 +- src/containers/SkynetImport/SkynetImport.js | 18 +- src/containers/UI/Password/Password.js | 10 +- src/helpers.js | 6 +- src/helpers.test.js | 32 +-- src/index.js | 10 +- src/redux/actions/common_actions.js | 10 +- src/redux/actions/download_actions.js | 10 +- src/redux/actions/error_actions.js | 6 +- src/redux/actions/host_actions.js | 2 +- src/redux/actions/install_actions.js | 26 +-- src/redux/actions/mount_actions.js | 40 ++-- src/redux/actions/pinned_manager_actions.js | 2 +- src/redux/actions/release_version_actions.js | 168 +++++++------- src/redux/actions/skynet_actions.js | 2 +- src/redux/reducers/common_reducer.js | 4 +- src/redux/reducers/download_reducer.js | 4 +- src/redux/reducers/error_reducer.js | 6 +- src/redux/reducers/host_reducer.js | 4 +- src/redux/reducers/install_reducer.js | 10 +- src/redux/reducers/mount_reducer.js | 84 +++---- src/redux/reducers/pinned_manager_reducer.js | 4 +- src/redux/reducers/release_version_reducer.js | 6 +- src/redux/reducers/skynet_reducer.js | 6 +- src/redux/store/createAppStore.js | 20 +- src/redux/utils.js | 6 +- src/renderer/ipc/AppIPC.js | 4 +- src/renderer/ipc/ConfigIPC.js | 74 +++--- src/renderer/ipc/DaemonIPC.js | 66 +++--- src/renderer/ipc/DependencyIPC.js | 96 ++++---- src/renderer/ipc/DownloadIPC.js | 4 +- src/renderer/ipc/FilesystemIPC.js | 15 +- src/renderer/ipc/MountsIPC.js | 211 +++++++++--------- src/renderer/ipc/PinnedIPC.js | 53 ++--- src/renderer/ipc/PlatformIPC.js | 52 ++--- src/renderer/ipc/ReleaseIPC.js | 140 ++++++------ src/renderer/ipc/SkynetIPC.js | 4 +- src/renderer/ipc/StateIPC.js | 8 +- src/renderer/ipc/SystemIPC.js | 4 +- src/renderer/ipc/UpgradeIPC.js | 53 ++--- src/serviceWorker.js | 120 +++++----- src/utils.jsx | 78 +++---- 75 files changed, 1255 insertions(+), 1246 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 22bc1c2..30a6d51 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,7 +3,7 @@ import './App.css'; import AddEditHost from './containers/AddEditHost/AddEditHost'; import Box from './components/UI/Box/Box'; import Configuration from './containers/Configuration/Configuration'; -import { connect } from 'react-redux'; +import {connect} from 'react-redux'; import DependencyList from './components/DependencyList/DependencyList'; import DownloadProgress from './components/DownloadProgress/DownloadProgress'; import ErrorDetails from './components/ErrorDetails/ErrorDetails'; @@ -13,20 +13,20 @@ import IPCContainer from './containers/IPCContainer/IPCContainer'; import Loading from './components/UI/Loading/Loading'; import MountItems from './containers/MountItems/MountItems'; import NewReleases from './components/NewReleases/NewReleases.jsx'; -import { notifyError } from './redux/actions/error_actions'; +import {notifyError} from './redux/actions/error_actions'; import Reboot from './components/Reboot/Reboot'; import { setDismissNewReleasesAvailable, setNewReleasesAvailable, } from './redux/actions/release_version_actions'; import ReleaseVersionDisplay from './components/ReleaseVersionDisplay/ReleaseVersionDisplay'; -import { saveState } from './redux/actions/common_actions'; +import {saveState} from './redux/actions/common_actions'; 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 {createModalConditionally} from './utils.jsx'; import SkynetImport from './containers/SkynetImport/SkynetImport'; import ApplicationBusy from './components/ApplicationBusy/ApplicationBusy'; import SkynetExport from './containers/SkynetExport/SkynetExport'; @@ -73,7 +73,7 @@ class App extends IPCContainer { return this.props.ReleaseVersion === -1 ? 'unavailable' : this.props.VersionLookup[Constants.RELEASE_TYPES[this.props.Release]][ - this.props.ReleaseVersion + this.props.ReleaseVersion ]; }; @@ -196,40 +196,40 @@ class App extends IPCContainer { remoteSupported={remoteSupported} /> ); - const addEditHostDisplay = createModalConditionally(showAddEditHost, ); + const addEditHostDisplay = createModalConditionally(showAddEditHost, ); const pinnedManagerDisplay = createModalConditionally( showPinnedManager, - + ); - const confirmDisplay = createModalConditionally(this.props.DisplayConfirmYesNo, ); + const confirmDisplay = createModalConditionally(this.props.DisplayConfirmYesNo, ); const dependencyDisplay = createModalConditionally( showDependencies, - , + , false, this.props.InstallActive ); const downloadDisplay = createModalConditionally( this.props.DownloadActive, - , + , false, true ); - const errorDisplay = createModalConditionally(this.props.DisplayError, , true); - const infoDisplay = createModalConditionally(this.props.DisplayInfo, , true); - const newReleasesDisplay = createModalConditionally(showNewReleases, ); - const rebootDisplay = createModalConditionally(this.props.RebootRequired, ); - const upgradeDisplay = createModalConditionally(showUpgrade, ); + const errorDisplay = createModalConditionally(this.props.DisplayError, , true); + const infoDisplay = createModalConditionally(this.props.DisplayInfo, , true); + const newReleasesDisplay = createModalConditionally(showNewReleases, ); + const rebootDisplay = createModalConditionally(this.props.RebootRequired, ); + const upgradeDisplay = createModalConditionally(showUpgrade, ); const importDisplay = createModalConditionally( showSkynetImport, - + ); const exportDisplay = createModalConditionally( showSkynetExport, - + ); const appBusyDisplay = createModalConditionally( this.props.AppBusy, - , + , false, true, this.props.AppBusyTransparent @@ -239,7 +239,7 @@ class App extends IPCContainer { if (!this.props.AppReady) { mainContent = ( - + ); } else { @@ -251,8 +251,8 @@ class App extends IPCContainer { row={10} rowSpan={17} key={'md_' + key++} - dxStyle={{ padding: 'var(--default_spacing)' }}> - + dxStyle={{padding: 'var(--default_spacing)'}}> + ); if (allowMount) { @@ -261,7 +261,7 @@ class App extends IPCContainer { row={29} rowSpan={'remain'} colSpan={'remain'} - dxStyle={{ padding: 'var(--default_spacing)' }} + dxStyle={{padding: 'var(--default_spacing)'}} key={'md_' + key++}> - + ); } diff --git a/src/components/ApplicationBusy/ApplicationBusy.js b/src/components/ApplicationBusy/ApplicationBusy.js index 6e3f81e..7df9b1a 100644 --- a/src/components/ApplicationBusy/ApplicationBusy.js +++ b/src/components/ApplicationBusy/ApplicationBusy.js @@ -4,16 +4,16 @@ import Loader from 'react-loader-spinner'; import Text from '../UI/Text/Text'; import PropTypes from 'prop-types'; -const ApplicationBusy = ({ title }) => { +const ApplicationBusy = ({title}) => { return ( - - + +
- +
); diff --git a/src/components/DependencyList/Dependency/Dependency.js b/src/components/DependencyList/Dependency/Dependency.js index 2a5113a..37218e8 100644 --- a/src/components/DependencyList/Dependency/Dependency.js +++ b/src/components/DependencyList/Dependency/Dependency.js @@ -2,33 +2,33 @@ import React from 'react'; import './Dependency.css'; import * as Constants from '../../../constants'; import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; +import {connect} from 'react-redux'; const Dependency = (props) => { return (
- - - - + + + +
-

{props.name}

-
- {props.AllowDownload ? ( - { - props.onDownload(); - return false; - }}> - Install - - ) : ( - 'Installing...' - )} -
+

{props.name}

+
+ {props.AllowDownload ? ( + { + props.onDownload(); + return false; + }}> + Install + + ) : ( + 'Installing...' + )} +
diff --git a/src/components/DependencyList/DependencyList.js b/src/components/DependencyList/DependencyList.js index d2d620a..88c3998 100644 --- a/src/components/DependencyList/DependencyList.js +++ b/src/components/DependencyList/DependencyList.js @@ -4,11 +4,11 @@ import * as Constants from '../../constants'; import Box from '../UI/Box/Box'; import Dependency from './Dependency/Dependency'; import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { createDismissDisplay } from '../../utils.jsx'; -import { downloadItem } from '../../redux/actions/download_actions'; -import { extractFileNameFromURL } from '../../utils.jsx'; -import { setDismissDependencies } from '../../redux/actions/install_actions'; +import {connect} from 'react-redux'; +import {createDismissDisplay} from '../../utils.jsx'; +import {downloadItem} from '../../redux/actions/download_actions'; +import {extractFileNameFromURL} from '../../utils.jsx'; +import {setDismissDependencies} from '../../redux/actions/install_actions'; const DependencyList = (props) => { const items = props.MissingDependencies.map((k, i) => { @@ -29,7 +29,7 @@ const DependencyList = (props) => { }); return ( - + {createDismissDisplay( () => props.setDismissDependencies(true), !props.AllowDismissDependencies diff --git a/src/components/DownloadProgress/DownloadProgress.js b/src/components/DownloadProgress/DownloadProgress.js index 2b5cece..51936ca 100644 --- a/src/components/DownloadProgress/DownloadProgress.js +++ b/src/components/DownloadProgress/DownloadProgress.js @@ -2,21 +2,21 @@ import Box from '../UI/Box/Box'; import './DownloadProgress.css'; import PropTypes from 'prop-types'; import React from 'react'; -import { connect } from 'react-redux'; +import {connect} from 'react-redux'; const DownloadProgress = (props) => { const width = props.Platform === 'linux' ? '480px' : '380px'; return ( - -
-

+ +
+

{'Downloading ' + props.DownloadName}

diff --git a/src/components/ErrorDetails/ErrorDetails.js b/src/components/ErrorDetails/ErrorDetails.js index dbd9593..12ef881 100644 --- a/src/components/ErrorDetails/ErrorDetails.js +++ b/src/components/ErrorDetails/ErrorDetails.js @@ -3,12 +3,12 @@ import './ErrorDetails.css'; import Box from '../UI/Box/Box'; import Button from '../UI/Button/Button'; import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { dismissError } from '../../redux/actions/error_actions'; +import {connect} from 'react-redux'; +import {dismissError} from '../../redux/actions/error_actions'; const ErrorDetails = (props) => { return ( - +

Application Error

{props.ErrorMessage}

diff --git a/src/components/InfoDetails/InfoDetails.js b/src/components/InfoDetails/InfoDetails.js index 4aa45d2..95c1b16 100644 --- a/src/components/InfoDetails/InfoDetails.js +++ b/src/components/InfoDetails/InfoDetails.js @@ -3,9 +3,9 @@ import './InfoDetails.css'; import Box from '../UI/Box/Box'; import Button from '../UI/Button/Button'; import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { dismissInfo, notifyError } from '../../redux/actions/error_actions'; -import { promptLocationAndSaveFile } from '../../utils'; +import {connect} from 'react-redux'; +import {dismissInfo, notifyError} from '../../redux/actions/error_actions'; +import {promptLocationAndSaveFile} from '../../utils'; const InfoDetails = (props) => { let msg = props.InfoMessage.message; @@ -36,27 +36,28 @@ const InfoDetails = (props) => { }; return ( - +

{props.InfoMessage.title}

{copyable ? (