prettier
This commit is contained in:
48
src/App.jsx
48
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';
|
||||
@@ -196,40 +196,40 @@ class App extends IPCContainer {
|
||||
remoteSupported={remoteSupported}
|
||||
/>
|
||||
);
|
||||
const addEditHostDisplay = createModalConditionally(showAddEditHost, <AddEditHost />);
|
||||
const addEditHostDisplay = createModalConditionally(showAddEditHost, <AddEditHost/>);
|
||||
const pinnedManagerDisplay = createModalConditionally(
|
||||
showPinnedManager,
|
||||
<PinnedManager version={selectedVersion} />
|
||||
<PinnedManager version={selectedVersion}/>
|
||||
);
|
||||
const confirmDisplay = createModalConditionally(this.props.DisplayConfirmYesNo, <YesNo />);
|
||||
const confirmDisplay = createModalConditionally(this.props.DisplayConfirmYesNo, <YesNo/>);
|
||||
const dependencyDisplay = createModalConditionally(
|
||||
showDependencies,
|
||||
<DependencyList />,
|
||||
<DependencyList/>,
|
||||
false,
|
||||
this.props.InstallActive
|
||||
);
|
||||
const downloadDisplay = createModalConditionally(
|
||||
this.props.DownloadActive,
|
||||
<DownloadProgress />,
|
||||
<DownloadProgress/>,
|
||||
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 upgradeDisplay = createModalConditionally(showUpgrade, <UpgradeUI />);
|
||||
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 upgradeDisplay = createModalConditionally(showUpgrade, <UpgradeUI/>);
|
||||
const importDisplay = createModalConditionally(
|
||||
showSkynetImport,
|
||||
<SkynetImport version={selectedVersion} />
|
||||
<SkynetImport version={selectedVersion}/>
|
||||
);
|
||||
const exportDisplay = createModalConditionally(
|
||||
showSkynetExport,
|
||||
<SkynetExport version={selectedVersion} />
|
||||
<SkynetExport version={selectedVersion}/>
|
||||
);
|
||||
const appBusyDisplay = createModalConditionally(
|
||||
this.props.AppBusy,
|
||||
<ApplicationBusy />,
|
||||
<ApplicationBusy/>,
|
||||
false,
|
||||
true,
|
||||
this.props.AppBusyTransparent
|
||||
@@ -239,7 +239,7 @@ class App extends IPCContainer {
|
||||
if (!this.props.AppReady) {
|
||||
mainContent = (
|
||||
<Box col={0} colSpan={'remain'} row={10} rowSpan={'remain'}>
|
||||
<Loading />
|
||||
<Loading/>
|
||||
</Box>
|
||||
);
|
||||
} else {
|
||||
@@ -251,8 +251,8 @@ class App extends IPCContainer {
|
||||
row={10}
|
||||
rowSpan={17}
|
||||
key={'md_' + key++}
|
||||
dxStyle={{ padding: 'var(--default_spacing)' }}>
|
||||
<ReleaseVersionDisplay downloadDisabled={!downloadEnabled} version={selectedVersion} />
|
||||
dxStyle={{padding: 'var(--default_spacing)'}}>
|
||||
<ReleaseVersionDisplay downloadDisabled={!downloadEnabled} version={selectedVersion}/>
|
||||
</Box>
|
||||
);
|
||||
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++}>
|
||||
<MountItems
|
||||
s3Supported={s3Supported}
|
||||
@@ -279,9 +279,9 @@ class App extends IPCContainer {
|
||||
colSpan={'remain'}
|
||||
row={29}
|
||||
rowSpan={'remain'}
|
||||
dxStyle={{ padding: 'var(--default_spacing)' }}
|
||||
dxStyle={{padding: 'var(--default_spacing)'}}
|
||||
key={'md_' + key++}>
|
||||
<Loading />
|
||||
<Loading/>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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 (
|
||||
<Box dxDark dxStyle={{ padding: 'var(--default_spacing)' }}>
|
||||
<Text text={title || 'Please Wait...'} textAlign={'center'} type={'Heading1'} />
|
||||
<Box dxDark dxStyle={{padding: 'var(--default_spacing)'}}>
|
||||
<Text text={title || 'Please Wait...'} textAlign={'center'} type={'Heading1'}/>
|
||||
<div
|
||||
style={{
|
||||
paddingLeft: 'calc(50% - 16px)',
|
||||
paddingTop: 'var(--default_spacing)',
|
||||
}}>
|
||||
<Loader color={'var(--heading_text_color)'} height={32} width={32} type="TailSpin" />
|
||||
<Loader color={'var(--heading_text_color)'} height={32} width={32} type="TailSpin"/>
|
||||
</div>
|
||||
</Box>
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@ 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 (
|
||||
|
||||
@@ -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 (
|
||||
<Box dxStyle={{ width: '300px', height: 'auto', padding: '5px' }}>
|
||||
<Box dxStyle={{width: '300px', height: 'auto', padding: '5px'}}>
|
||||
{createDismissDisplay(
|
||||
() => props.setDismissDependencies(true),
|
||||
!props.AllowDismissDependencies
|
||||
|
||||
@@ -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 (
|
||||
<Box dxStyle={{ width: width, height: 'auto', padding: '5px' }}>
|
||||
<div style={{ width: '100%', height: 'auto' }}>
|
||||
<h1 style={{ width: '100%', textAlign: 'center' }}>
|
||||
<Box dxStyle={{width: width, height: 'auto', padding: '5px'}}>
|
||||
<div style={{width: '100%', height: 'auto'}}>
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>
|
||||
{'Downloading ' + props.DownloadName}
|
||||
</h1>
|
||||
</div>
|
||||
<progress
|
||||
max={100.0}
|
||||
id={'download_progress'}
|
||||
style={{ width: '100%' }}
|
||||
style={{width: '100%'}}
|
||||
value={props.DownloadProgress}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
@@ -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 (
|
||||
<Box dxDark dxStyle={{ padding: 'var(--default_spacing)' }}>
|
||||
<Box dxDark dxStyle={{padding: 'var(--default_spacing)'}}>
|
||||
<h1 className={'ErrorDetailsHeading'}>Application Error</h1>
|
||||
<div className={'ErrorDetailsContent'}>
|
||||
<p>{props.ErrorMessage}</p>
|
||||
|
||||
@@ -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 (
|
||||
<Box dxDark dxStyle={{ padding: 'var(--default_spacing)' }}>
|
||||
<Box dxDark dxStyle={{padding: 'var(--default_spacing)'}}>
|
||||
<h1 className={'InfoDetailsHeading'}>{props.InfoMessage.title}</h1>
|
||||
<div className={classes.join(' ')}>
|
||||
{copyable ? (
|
||||
<textarea
|
||||
autoFocus
|
||||
rows={9}
|
||||
onChange={() => {}}
|
||||
onChange={() => {
|
||||
}}
|
||||
value={msg}
|
||||
className={'SkynetImportTextArea'}
|
||||
onClick={(e) => scrollToTop(e.target)}
|
||||
/>
|
||||
) : (
|
||||
<p style={{ textAlign: 'left' }}>{msg}</p>
|
||||
<p style={{textAlign: 'left'}}>{msg}</p>
|
||||
)}
|
||||
</div>
|
||||
{props.InfoMessage.saveToFile ? (
|
||||
<div className={'InfoButtonOwner'}>
|
||||
<Button clicked={props.dismissInfo}>Dismiss</Button>
|
||||
<Button
|
||||
buttonStyles={{ marginLeft: 'var(--default_spacing)' }}
|
||||
buttonStyles={{marginLeft: 'var(--default_spacing)'}}
|
||||
clicked={() => {
|
||||
if (
|
||||
promptLocationAndSaveFile(
|
||||
|
||||
@@ -2,11 +2,11 @@ import React from 'react';
|
||||
import * as Constants from '../../../constants';
|
||||
import Button from '../../UI/Button/Button';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import { formatLinesForDisplay, getChangesForRepertoryVersion } from '../../../utils.jsx';
|
||||
import { notifyError, notifyInfo } from '../../../redux/actions/error_actions';
|
||||
import { setActiveRelease } from '../../../redux/actions/release_version_actions';
|
||||
import { unmountAll } from '../../../redux/actions/mount_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import {formatLinesForDisplay, getChangesForRepertoryVersion} from '../../../utils.jsx';
|
||||
import {notifyError, notifyInfo} from '../../../redux/actions/error_actions';
|
||||
import {setActiveRelease} from '../../../redux/actions/release_version_actions';
|
||||
import {unmountAll} from '../../../redux/actions/mount_actions';
|
||||
|
||||
const NewRelease = ({
|
||||
ActiveRelease,
|
||||
@@ -18,7 +18,7 @@ const NewRelease = ({
|
||||
notifyInfo,
|
||||
setActiveRelease,
|
||||
unmountAll,
|
||||
}) => {
|
||||
}) => {
|
||||
const title = '[' + Constants.RELEASE_TYPES[release.Release] + '] ' + release.Display;
|
||||
const displayChanges = async () => {
|
||||
try {
|
||||
@@ -42,25 +42,25 @@ const NewRelease = ({
|
||||
<h2>{title}</h2>
|
||||
<table cellSpacing={0} cellPadding={0} width="97%">
|
||||
<tbody>
|
||||
<tr style={{ height: '4px' }} />
|
||||
<tr style={{height: '4px'}}/>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<Button buttonStyles={{ width: '100%' }} clicked={displayChanges}>
|
||||
<Button buttonStyles={{width: '100%'}} clicked={displayChanges}>
|
||||
Changes
|
||||
</Button>
|
||||
</td>
|
||||
<td>
|
||||
<div style={{ width: 'var(--default_spacing)' }} />
|
||||
<div style={{width: 'var(--default_spacing)'}}/>
|
||||
</td>
|
||||
<td width="50%">
|
||||
{!isActiveRelease ? (
|
||||
<Button buttonStyles={{ width: '100%' }} clicked={setReleaseAndVersion}>
|
||||
<Button buttonStyles={{width: '100%'}} clicked={setReleaseAndVersion}>
|
||||
Activate
|
||||
</Button>
|
||||
) : null}
|
||||
</td>
|
||||
</tr>
|
||||
{lastItem ? null : <tr style={{ height: 'var(--default_spacing)' }} />}
|
||||
{lastItem ? null : <tr style={{height: 'var(--default_spacing)'}}/>}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -4,8 +4,8 @@ import Box from '../UI/Box/Box';
|
||||
import Button from '../UI/Button/Button';
|
||||
import NewRelease from './NewRelease/NewRelease.jsx';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import { setDismissNewReleasesAvailable } from '../../redux/actions/release_version_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import {setDismissNewReleasesAvailable} from '../../redux/actions/release_version_actions';
|
||||
|
||||
const NewReleases = (props) => {
|
||||
const newReleases = props.NewReleasesAvailable.map((i, idx) => {
|
||||
@@ -20,7 +20,7 @@ const NewReleases = (props) => {
|
||||
});
|
||||
|
||||
return (
|
||||
<Box dxDark dxStyle={{ padding: 'var(--default_spacing)' }}>
|
||||
<Box dxDark dxStyle={{padding: 'var(--default_spacing)'}}>
|
||||
<h1 className={'NewReleasesHeading'}>New Repertory Versions Available</h1>
|
||||
<div className={'NewReleasesContent'}>{newReleases}</div>
|
||||
<Button clicked={props.dismissNewReleasesAvailable}>Dismiss</Button>
|
||||
|
||||
@@ -3,12 +3,12 @@ import './Reboot.css';
|
||||
import Box from '../UI/Box/Box';
|
||||
import Button from '../UI/Button/Button';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import { rebootSystem } from '../../redux/actions/common_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import {rebootSystem} from '../../redux/actions/common_actions';
|
||||
|
||||
const Reboot = (props) => {
|
||||
return (
|
||||
<Box dxDark dxStyle={{ padding: 'var(--default_spacing)' }}>
|
||||
<Box dxDark dxStyle={{padding: 'var(--default_spacing)'}}>
|
||||
<h1 className={'RebootHeading'}>Reboot System</h1>
|
||||
<div className={'RebootContent'}>
|
||||
<p>Repertory requires a system reboot to continue.</p>
|
||||
|
||||
@@ -7,9 +7,9 @@ import Grid from '../UI/Grid/Grid';
|
||||
import PropTypes from 'prop-types';
|
||||
import Text from '../UI/Text/Text';
|
||||
import UpgradeIcon from '../UpgradeIcon/UpgradeIcon';
|
||||
import { connect } from 'react-redux';
|
||||
import { downloadItem } from '../../redux/actions/download_actions';
|
||||
import { setActiveRelease } from '../../redux/actions/release_version_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import {downloadItem} from '../../redux/actions/download_actions';
|
||||
import {setActiveRelease} from '../../redux/actions/release_version_actions';
|
||||
|
||||
const ReleaseVersionDisplay = (props) => {
|
||||
const getSelectedVersion = () => {
|
||||
|
||||
@@ -18,7 +18,7 @@ const Box = (props) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div onClick={props.clicked} className={styleList.join(' ')} style={{ ...props.dxStyle }}>
|
||||
<div onClick={props.clicked} className={styleList.join(' ')} style={{...props.dxStyle}}>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -14,7 +14,7 @@ const CheckBox = (props) => {
|
||||
onChange={props.changed}
|
||||
type="checkbox"
|
||||
/>
|
||||
<span className="CheckBoxCheckMark" />
|
||||
<span className="CheckBoxCheckMark"/>
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { Component } from 'react';
|
||||
import React, {Component} from 'react';
|
||||
import './Grid.css';
|
||||
import GridComponent from './GridComponent/GridComponent';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
@@ -6,7 +6,7 @@ const Loading = () => {
|
||||
return (
|
||||
<div className={'Loading'}>
|
||||
<div className={'LoadingContent'}>
|
||||
<Loader color={'var(--heading_text_color)'} height={28} width={28} type="ThreeDots" />
|
||||
<Loader color={'var(--heading_text_color)'} height={28} width={28} type="ThreeDots"/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
||||
|
||||
const RootElem = (props) => {
|
||||
return (
|
||||
<div style={{ margin: 0, padding: 0 }} {...props}>
|
||||
<div style={{margin: 0, padding: 0}} {...props}>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -9,7 +9,7 @@ const Text = (props) => {
|
||||
styleList.push('Text' + props.type);
|
||||
}
|
||||
|
||||
let style = { ...props.style };
|
||||
let style = {...props.style};
|
||||
if (props.textAlign) {
|
||||
style['textAlign'] = props.textAlign.toLowerCase();
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ import './UpgradeIcon.css';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faExclamationTriangle} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
const UpgradeIcon = (props) => {
|
||||
const styles = ['UpgradeIcon'];
|
||||
@@ -22,7 +22,7 @@ const UpgradeIcon = (props) => {
|
||||
<div className={'UpgradeIconOwner'}>
|
||||
<p data-tip="" data-for={placement}>
|
||||
<a href={'#'} className={styles.join(' ')} onClick={props.clicked}>
|
||||
<FontAwesomeIcon icon={faExclamationTriangle} />
|
||||
<FontAwesomeIcon icon={faExclamationTriangle}/>
|
||||
</a>
|
||||
</p>
|
||||
<ReactTooltip id={placement} place={placement}>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {connect} from 'react-redux';
|
||||
import './UpgradeUI.css';
|
||||
import * as Constants from '../../constants';
|
||||
import Box from '../UI/Box/Box';
|
||||
import Button from '../UI/Button/Button';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { downloadItem } from '../../redux/actions/download_actions';
|
||||
import { setDismissUIUpgrade } from '../../redux/actions/release_version_actions';
|
||||
import {downloadItem} from '../../redux/actions/download_actions';
|
||||
import {setDismissUIUpgrade} from '../../redux/actions/release_version_actions';
|
||||
|
||||
const UpgradeUI = (props) => {
|
||||
const handleDownload = () => {
|
||||
@@ -20,21 +20,21 @@ const UpgradeUI = (props) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<Box dxStyle={{ width: '180px', height: 'auto', padding: '5px' }}>
|
||||
<div style={{ width: '100%', height: 'auto' }}>
|
||||
<h1 style={{ width: '100%', textAlign: 'center' }}>UI Upgrade Available</h1>
|
||||
<Box dxStyle={{width: '180px', height: 'auto', padding: '5px'}}>
|
||||
<div style={{width: '100%', height: 'auto'}}>
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>UI Upgrade Available</h1>
|
||||
</div>
|
||||
<table cellSpacing={5} width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<Button buttonStyles={{ width: '100%' }} clicked={handleDownload}>
|
||||
<Button buttonStyles={{width: '100%'}} clicked={handleDownload}>
|
||||
Install
|
||||
</Button>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<Button
|
||||
buttonStyles={{ width: '100%' }}
|
||||
buttonStyles={{width: '100%'}}
|
||||
clicked={() => props.setDismissUIUpgrade(true)}>
|
||||
Cancel
|
||||
</Button>
|
||||
|
||||
@@ -3,8 +3,8 @@ import './YesNo.css';
|
||||
import Box from '../UI/Box/Box';
|
||||
import Button from '../UI/Button/Button';
|
||||
import PropTypes from 'prop-types';
|
||||
import { confirmYesNoAction } from '../../redux/actions/common_actions';
|
||||
import { connect } from 'react-redux';
|
||||
import {confirmYesNoAction} from '../../redux/actions/common_actions';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
const YesNo = (props) => {
|
||||
return (
|
||||
@@ -14,19 +14,19 @@ const YesNo = (props) => {
|
||||
height: 'auto',
|
||||
padding: 'var(--default_spacing)',
|
||||
}}>
|
||||
<div style={{ width: '100%', height: 'auto' }}>
|
||||
<h1 style={{ width: '100%', textAlign: 'center' }}>{props.Title}</h1>
|
||||
<div style={{width: '100%', height: 'auto'}}>
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>{props.Title}</h1>
|
||||
</div>
|
||||
<table cellSpacing={5} width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<Button buttonStyles={{ width: '100%' }} clicked={() => props.confirm(true)}>
|
||||
<Button buttonStyles={{width: '100%'}} clicked={() => props.confirm(true)}>
|
||||
Yes
|
||||
</Button>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<Button buttonStyles={{ width: '100%' }} clicked={() => props.confirm(false)}>
|
||||
<Button buttonStyles={{width: '100%'}} clicked={() => props.confirm(false)}>
|
||||
No
|
||||
</Button>
|
||||
</td>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
exports.DEV_PUBLIC_KEY =
|
||||
'-----BEGIN PUBLIC KEY-----\n' +
|
||||
'MIIEIjANBgkqhkiG9w0BAQEFAAOCBA8AMIIECgKCBAEKfZmq5mMAtD4kSt2Gc/5J\n' +
|
||||
|
||||
@@ -5,11 +5,11 @@ import DropDown from '../../components/UI/DropDown/DropDown';
|
||||
import IPCContainer from '../IPCContainer/IPCContainer';
|
||||
import PropTypes from 'prop-types';
|
||||
import Text from '../../components/UI/Text/Text';
|
||||
import { addEditHostAction } from '../../redux/actions/host_actions';
|
||||
import { connect } from 'react-redux';
|
||||
import { createDismissDisplay } from '../../utils.jsx';
|
||||
import { notifyApplicationBusy } from '../../redux/actions/common_actions';
|
||||
import { notifyError, notifyInfo } from '../../redux/actions/error_actions';
|
||||
import {addEditHostAction} from '../../redux/actions/host_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import {createDismissDisplay} from '../../utils.jsx';
|
||||
import {notifyApplicationBusy} from '../../redux/actions/common_actions';
|
||||
import {notifyError, notifyInfo} from '../../redux/actions/error_actions';
|
||||
|
||||
const Constants = require('../../constants');
|
||||
|
||||
@@ -31,7 +31,7 @@ class AddEditHost extends IPCContainer {
|
||||
this.setRequestHandler(Constants.IPC_Skynet_Test_Logon_Reply, this.onSkynetTestLogonReply);
|
||||
|
||||
if (this.props.HostData) {
|
||||
this.setState({ ...this.state, ...this.props.HostData });
|
||||
this.setState({...this.state, ...this.props.HostData});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class AddEditHost extends IPCContainer {
|
||||
const allowTestLogon = this.state.AuthURL && this.state.AuthUser;
|
||||
|
||||
return (
|
||||
<Box dxDark dxStyle={{ width: '430px', height: 'auto', padding: '5px' }}>
|
||||
<Box dxDark dxStyle={{width: '430px', height: 'auto', padding: '5px'}}>
|
||||
{createDismissDisplay(this.props.Close)}
|
||||
<div
|
||||
style={{
|
||||
@@ -115,86 +115,86 @@ class AddEditHost extends IPCContainer {
|
||||
}}>
|
||||
Portal Settings
|
||||
</h1>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<Text text={'Host / IP'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Text text={'Host / IP'} textAlign={'left'} type={'Heading2'}/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<input
|
||||
onChange={(e) => this.setState({ HostNameOrIp: e.target.value.trim() })}
|
||||
onChange={(e) => this.setState({HostNameOrIp: e.target.value.trim()})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ width: '100%' }}
|
||||
style={{width: '100%'}}
|
||||
type={'text'}
|
||||
value={this.state.HostNameOrIp}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ height: 'var(--default_spacing)' }} />
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<Text text={'Protocol'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<Text text={'Port'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<Text text={'Timeout (ms)'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{height: 'var(--default_spacing)'}}/>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Text text={'Protocol'} textAlign={'left'} type={'Heading2'}/>
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<Text text={'Port'} textAlign={'left'} type={'Heading2'}/>
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<Text text={'Timeout (ms)'} textAlign={'left'} type={'Heading2'}/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<DropDown
|
||||
changed={(e) => this.setState({ Protocol: e.target.value })}
|
||||
changed={(e) => this.setState({Protocol: e.target.value})}
|
||||
items={['https', 'http']}
|
||||
selected={this.state.Protocol}
|
||||
/>
|
||||
<div style={{ width: 'var(--default_spacing)' }} />
|
||||
<div style={{ width: 'var(--default_spacing)' }} />
|
||||
<div style={{width: 'var(--default_spacing)'}}/>
|
||||
<div style={{width: 'var(--default_spacing)'}}/>
|
||||
<input
|
||||
onChange={(e) => this.setState({ ApiPort: parseInt(e.target.value) })}
|
||||
onChange={(e) => this.setState({ApiPort: parseInt(e.target.value)})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ width: '100%' }}
|
||||
style={{width: '100%'}}
|
||||
type={'number'}
|
||||
min={1}
|
||||
max={65535}
|
||||
value={this.state.ApiPort}
|
||||
/>
|
||||
<div style={{ width: 'var(--default_spacing)' }} />
|
||||
<div style={{ width: 'var(--default_spacing)' }} />
|
||||
<div style={{width: 'var(--default_spacing)'}}/>
|
||||
<div style={{width: 'var(--default_spacing)'}}/>
|
||||
<input
|
||||
onChange={(e) => this.setState({ TimeoutMs: parseInt(e.target.value) })}
|
||||
onChange={(e) => this.setState({TimeoutMs: parseInt(e.target.value)})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ width: '100%' }}
|
||||
style={{width: '100%'}}
|
||||
type={'number'}
|
||||
min={1000}
|
||||
step={1000}
|
||||
value={this.state.TimeoutMs}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ height: 'var(--default_spacing)' }} />
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<Text text={'Agent String (optional)'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{ width: 'var(--default_spacing)' }} />
|
||||
<Text text={'API Key (optional)'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{height: 'var(--default_spacing)'}}/>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Text text={'Agent String (optional)'} textAlign={'left'} type={'Heading2'}/>
|
||||
<div style={{width: 'var(--default_spacing)'}}/>
|
||||
<Text text={'API Key (optional)'} textAlign={'left'} type={'Heading2'}/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<input
|
||||
onChange={(e) => this.setState({ AgentString: e.target.value })}
|
||||
onChange={(e) => this.setState({AgentString: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ flex: '1' }}
|
||||
style={{flex: '1'}}
|
||||
type={'text'}
|
||||
value={this.state.AgentString}
|
||||
/>
|
||||
<div style={{ width: 'var(--default_spacing)' }} />
|
||||
<div style={{width: 'var(--default_spacing)'}}/>
|
||||
<input
|
||||
onChange={(e) => this.setState({ ApiPassword: e.target.value })}
|
||||
onChange={(e) => this.setState({ApiPassword: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ flex: '1' }}
|
||||
style={{flex: '1'}}
|
||||
type={'text'}
|
||||
value={this.state.ApiPassword}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ height: 'var(--default_spacing)' }} />
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{height: 'var(--default_spacing)'}}/>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Text
|
||||
noOwner
|
||||
text={'Authentication URL (premium)'}
|
||||
textAlign={'left'}
|
||||
type={'Heading2'}
|
||||
style={{ marginRight: 'auto' }}
|
||||
style={{marginRight: 'auto'}}
|
||||
/>
|
||||
{allowTestLogon ? (
|
||||
<a
|
||||
@@ -207,38 +207,38 @@ class AddEditHost extends IPCContainer {
|
||||
</a>
|
||||
) : null}
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'column'}}>
|
||||
<input
|
||||
onChange={(e) => this.setState({ AuthURL: e.target.value })}
|
||||
onChange={(e) => this.setState({AuthURL: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
type={'text'}
|
||||
value={this.state.AuthURL}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ height: 'var(--default_spacing)' }} />
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<Text text={'User Name (premium)'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{ width: 'var(--default_spacing)' }} />
|
||||
<Text text={'Password (premium)'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{height: 'var(--default_spacing)'}}/>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Text text={'User Name (premium)'} textAlign={'left'} type={'Heading2'}/>
|
||||
<div style={{width: 'var(--default_spacing)'}}/>
|
||||
<Text text={'Password (premium)'} textAlign={'left'} type={'Heading2'}/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<input
|
||||
onChange={(e) => this.setState({ AuthUser: e.target.value })}
|
||||
onChange={(e) => this.setState({AuthUser: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ flex: '1' }}
|
||||
style={{flex: '1'}}
|
||||
type={'text'}
|
||||
value={this.state.AuthUser}
|
||||
/>
|
||||
<div style={{ width: 'var(--default_spacing)' }} />
|
||||
<div style={{width: 'var(--default_spacing)'}}/>
|
||||
<input
|
||||
onChange={(e) => this.setState({ AuthPassword: e.target.value })}
|
||||
onChange={(e) => this.setState({AuthPassword: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ flex: '1' }}
|
||||
style={{flex: '1'}}
|
||||
type={'text'}
|
||||
value={this.state.AuthPassword}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ height: 'var(--default_spacing)' }} />
|
||||
<div style={{height: 'var(--default_spacing)'}}/>
|
||||
<p>
|
||||
<b>
|
||||
{'Portal URL: ' +
|
||||
@@ -251,7 +251,7 @@ class AddEditHost extends IPCContainer {
|
||||
: '')}
|
||||
</b>
|
||||
</p>
|
||||
<div style={{ height: 'var(--default_spacing)' }} />
|
||||
<div style={{height: 'var(--default_spacing)'}}/>
|
||||
</div>
|
||||
<Button clicked={this.handleSave}>Save</Button>
|
||||
</Box>
|
||||
@@ -270,7 +270,7 @@ const mapStateToProps = (state) => {
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
Close: () => dispatch(addEditHostAction.complete(false)),
|
||||
completeAddEditHost: (host_data) => dispatch(addEditHostAction.complete(true, { host_data })),
|
||||
completeAddEditHost: (host_data) => dispatch(addEditHostAction.complete(true, {host_data})),
|
||||
notifyApplicationBusy: (busy) => dispatch(notifyApplicationBusy(busy, true)),
|
||||
notifyError: (msg) => dispatch(notifyError(msg)),
|
||||
notifyInfo: (msg) => dispatch(notifyInfo(msg)),
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Component } from 'react';
|
||||
import {Component} from 'react';
|
||||
import './AddMount.css';
|
||||
import { connect } from 'react-redux';
|
||||
import {connect} from 'react-redux';
|
||||
import Button from '../../components/UI/Button/Button';
|
||||
import Box from '../../components/UI/Box/Box';
|
||||
import Text from '../../components/UI/Text/Text';
|
||||
import { notifyError } from '../../redux/actions/error_actions';
|
||||
import { addRemoteMount, addS3Mount } from '../../redux/actions/mount_actions';
|
||||
import { createModalConditionally } from '../../utils.jsx';
|
||||
import {notifyError} from '../../redux/actions/error_actions';
|
||||
import {addRemoteMount, addS3Mount} from '../../redux/actions/mount_actions';
|
||||
import {createModalConditionally} from '../../utils.jsx';
|
||||
import DropDown from '../../components/UI/DropDown/DropDown';
|
||||
import * as Constants from '../../constants';
|
||||
|
||||
@@ -129,40 +129,40 @@ class AddMount extends Component {
|
||||
}}>
|
||||
Add Remote Mount
|
||||
</h1>
|
||||
<Text text={'Hostname or IP'} textAlign={'left'} type={'Heading2'} />
|
||||
<Text text={'Hostname or IP'} textAlign={'left'} type={'Heading2'}/>
|
||||
<input
|
||||
onChange={(e) => this.setState({ HostNameOrIp: e.target.value.trim() })}
|
||||
onChange={(e) => this.setState({HostNameOrIp: e.target.value.trim()})}
|
||||
className={'ConfigurationItemInput'}
|
||||
type={'text'}
|
||||
value={this.state.HostNameOrIp}
|
||||
/>
|
||||
<div style={{ paddingTop: 'var(--default_spacing)' }} />
|
||||
<Text text={'Port'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{paddingTop: 'var(--default_spacing)'}}/>
|
||||
<Text text={'Port'} textAlign={'left'} type={'Heading2'}/>
|
||||
<input
|
||||
max={65535}
|
||||
min={1025}
|
||||
onChange={(e) => this.setState({ Port: e.target.value })}
|
||||
onChange={(e) => this.setState({Port: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
type={'number'}
|
||||
value={this.state.Port}
|
||||
/>
|
||||
<div style={{ paddingTop: 'var(--default_spacing)' }} />
|
||||
<Text text={'Remote Token'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{paddingTop: 'var(--default_spacing)'}}/>
|
||||
<Text text={'Remote Token'} textAlign={'left'} type={'Heading2'}/>
|
||||
<input
|
||||
onChange={(e) => this.setState({ Token: e.target.value })}
|
||||
onChange={(e) => this.setState({Token: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
type={'text'}
|
||||
value={this.state.Token}
|
||||
/>
|
||||
<div style={{ paddingTop: 'var(--default_spacing)' }} />
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<Button buttonStyles={{ width: '100%' }} clicked={() => this.addRemoteMount()}>
|
||||
<div style={{paddingTop: 'var(--default_spacing)'}}/>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Button buttonStyles={{width: '100%'}} clicked={() => this.addRemoteMount()}>
|
||||
OK
|
||||
</Button>
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<Button
|
||||
buttonStyles={{ width: '100%' }}
|
||||
clicked={() => this.setState({ DisplayRemote: false })}>
|
||||
buttonStyles={{width: '100%'}}
|
||||
clicked={() => this.setState({DisplayRemote: false})}>
|
||||
Cancel
|
||||
</Button>
|
||||
</div>
|
||||
@@ -185,20 +185,20 @@ class AddMount extends Component {
|
||||
}}>
|
||||
Add S3 Mount
|
||||
</h1>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<Text text={'Name'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<Text text={'Provider'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Text text={'Name'} textAlign={'left'} type={'Heading2'}/>
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<Text text={'Provider'} textAlign={'left'} type={'Heading2'}/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<input
|
||||
onChange={(e) => this.setState({ Name: e.target.value.trim() })}
|
||||
onChange={(e) => this.setState({Name: e.target.value.trim()})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ width: '100%' }}
|
||||
style={{width: '100%'}}
|
||||
type={'text'}
|
||||
value={this.state.Name}
|
||||
/>
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<DropDown
|
||||
changed={(e) =>
|
||||
this.setState({
|
||||
@@ -213,38 +213,38 @@ class AddMount extends Component {
|
||||
selected={this.state.Provider}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ paddingTop: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingTop: 'var(--default_spacing)'}}/>
|
||||
{this.state.Provider === Constants.S3_CUSTOM_PROVIDER ? (
|
||||
<div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<Text text={'Custom URL'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Text text={'Custom URL'} textAlign={'left'} type={'Heading2'}/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<input
|
||||
onChange={(e) => this.setState({ CustomURL: e.target.value })}
|
||||
onChange={(e) => this.setState({CustomURL: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ width: '100%' }}
|
||||
style={{width: '100%'}}
|
||||
type={'text'}
|
||||
value={this.state.CustomURL}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ paddingTop: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingTop: 'var(--default_spacing)'}}/>
|
||||
</div>
|
||||
) : null}
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<Text text={'Bucket Name (optional)'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<Text text={'Region'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Text text={'Bucket Name (optional)'} textAlign={'left'} type={'Heading2'}/>
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<Text text={'Region'} textAlign={'left'} type={'Heading2'}/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<input
|
||||
onChange={(e) => this.setState({ BucketName: e.target.value })}
|
||||
onChange={(e) => this.setState({BucketName: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ width: '100%' }}
|
||||
style={{width: '100%'}}
|
||||
type={'text'}
|
||||
value={this.state.BucketName}
|
||||
/>
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<DropDown
|
||||
changed={(e) =>
|
||||
this.setState({
|
||||
@@ -259,56 +259,56 @@ class AddMount extends Component {
|
||||
selected={this.state.Region}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ paddingTop: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingTop: 'var(--default_spacing)'}}/>
|
||||
{this.state.Region === Constants.S3_CUSTOM_REGION ? (
|
||||
<div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)', width: '100%' }} />
|
||||
<Text text={'Custom Region'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<div style={{paddingLeft: 'var(--default_spacing)', width: '100%'}}/>
|
||||
<Text text={'Custom Region'} textAlign={'left'} type={'Heading2'}/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)', width: '100%' }} />
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<div style={{paddingLeft: 'var(--default_spacing)', width: '100%'}}/>
|
||||
<input
|
||||
onChange={(e) => this.setState({ CustomRegion: e.target.value })}
|
||||
onChange={(e) => this.setState({CustomRegion: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ width: '100%' }}
|
||||
style={{width: '100%'}}
|
||||
type={'text'}
|
||||
value={this.state.CustomRegion}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ paddingTop: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingTop: 'var(--default_spacing)'}}/>
|
||||
</div>
|
||||
) : null}
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<Text text={'Access Key'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<Text text={'Secret Key'} textAlign={'left'} type={'Heading2'} />
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<Text text={'Access Key'} textAlign={'left'} type={'Heading2'}/>
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<Text text={'Secret Key'} textAlign={'left'} type={'Heading2'}/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<input
|
||||
onChange={(e) => this.setState({ AccessKey: e.target.value })}
|
||||
onChange={(e) => this.setState({AccessKey: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
type={'text'}
|
||||
value={this.state.AccessKey}
|
||||
/>
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<input
|
||||
onChange={(e) => this.setState({ SecretKey: e.target.value })}
|
||||
onChange={(e) => this.setState({SecretKey: e.target.value})}
|
||||
className={'ConfigurationItemInput'}
|
||||
type={'text'}
|
||||
value={this.state.SecretKey}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ paddingTop: 'calc(var(--default_spacing) * 2)' }} />
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{ width: '200%' }} />
|
||||
<Button buttonStyles={{ width: '100%' }} clicked={() => this.addS3Mount()}>
|
||||
<div style={{paddingTop: 'calc(var(--default_spacing) * 2)'}}/>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<div style={{width: '200%'}}/>
|
||||
<Button buttonStyles={{width: '100%'}} clicked={() => this.addS3Mount()}>
|
||||
OK
|
||||
</Button>
|
||||
<div style={{ paddingLeft: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingLeft: 'var(--default_spacing)'}}/>
|
||||
<Button
|
||||
buttonStyles={{ width: '100%' }}
|
||||
clicked={() => this.setState({ DisplayS3: false })}>
|
||||
buttonStyles={{width: '100%'}}
|
||||
clicked={() => this.setState({DisplayS3: false})}>
|
||||
Cancel
|
||||
</Button>
|
||||
</div>
|
||||
@@ -326,7 +326,7 @@ class AddMount extends Component {
|
||||
</Button>
|
||||
) : null}
|
||||
{this.props.remoteSupported && this.props.s3Supported ? (
|
||||
<div style={{ paddingRight: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingRight: 'var(--default_spacing)'}}/>
|
||||
) : null}
|
||||
{this.props.s3Supported ? (
|
||||
<Button className={'AddMountButton'} clicked={this.handleAddS3Mount}>
|
||||
|
||||
@@ -6,11 +6,11 @@ import ConfigurationItem from './ConfigurationItem/ConfigurationItem';
|
||||
import IPCContainer from '../IPCContainer/IPCContainer';
|
||||
import Modal from '../../components/UI/Modal/Modal';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import { createDismissDisplay } from '../../utils.jsx';
|
||||
import { displayConfiguration } from '../../redux/actions/mount_actions';
|
||||
import { displayPinnedManager } from '../../redux/actions/pinned_manager_actions';
|
||||
import { notifyError } from '../../redux/actions/error_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import {createDismissDisplay} from '../../utils.jsx';
|
||||
import {displayConfiguration} from '../../redux/actions/mount_actions';
|
||||
import {displayPinnedManager} from '../../redux/actions/pinned_manager_actions';
|
||||
import {notifyError} from '../../redux/actions/error_actions';
|
||||
|
||||
const Constants = require('../../constants');
|
||||
|
||||
@@ -205,7 +205,8 @@ class Configuration extends IPCContainer {
|
||||
OriginalItemList: itemListCopy,
|
||||
OriginalObjectLookup: objectLookupCopy,
|
||||
},
|
||||
() => {}
|
||||
() => {
|
||||
}
|
||||
);
|
||||
} else {
|
||||
this.props.notifyError(arg.data.Error);
|
||||
@@ -316,8 +317,8 @@ class Configuration extends IPCContainer {
|
||||
if (this.state.ChangedItems.length > 0 || this.state.ChangedObjectLookup) {
|
||||
confirmSave = (
|
||||
<Modal>
|
||||
<Box dxStyle={{ width: '40vw', padding: 'var(--default_spacing)' }}>
|
||||
<h1 style={{ width: '100%', textAlign: 'center' }}>Save Changes?</h1>
|
||||
<Box dxStyle={{width: '40vw', padding: 'var(--default_spacing)'}}>
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>Save Changes?</h1>
|
||||
<table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -404,16 +405,16 @@ class Configuration extends IPCContainer {
|
||||
return (
|
||||
<div className={'Configuration'}>
|
||||
{confirmSave}
|
||||
<Box dxDark dxStyle={{ padding: '5px' }}>
|
||||
<Box dxDark dxStyle={{padding: '5px'}}>
|
||||
{createDismissDisplay(this.checkSaveRequired)}
|
||||
<h1 style={{ width: '100%', textAlign: 'center' }}>
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>
|
||||
{(this.props.DisplayRemoteConfiguration
|
||||
? this.props.DisplayConfiguration.substr(6)
|
||||
: this.props.DisplayS3Configuration
|
||||
? this.props.DisplayConfiguration.substr(2)
|
||||
: this.props.DisplayConfiguration) + ' Configuration '}
|
||||
</h1>
|
||||
<div style={{ overflowY: 'auto', height: '90%' }}>
|
||||
<div style={{overflowY: 'auto', height: '90%'}}>
|
||||
{this.props.MState.Mounted && configurationItems.length > 0 ? (
|
||||
<Button
|
||||
buttonStyles={{
|
||||
@@ -429,7 +430,7 @@ class Configuration extends IPCContainer {
|
||||
Pinned File Manager...
|
||||
</Button>
|
||||
) : null}
|
||||
<div style={{ marginBottom: '4px' }} />
|
||||
<div style={{marginBottom: '4px'}}/>
|
||||
{objectItems}
|
||||
{configurationItems.length > 0 ? <h2>Settings</h2> : null}
|
||||
{configurationItems}
|
||||
|
||||
@@ -6,10 +6,10 @@ import HostList from '../../HostList/HostList';
|
||||
import Password from '../../../containers/UI/Password/Password';
|
||||
import PropTypes from 'prop-types';
|
||||
import settings from '../../../assets/settings';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { connect } from 'react-redux';
|
||||
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
||||
import { notifyError, notifyInfo } from '../../../redux/actions/error_actions';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {connect} from 'react-redux';
|
||||
import {faInfoCircle} from '@fortawesome/free-solid-svg-icons';
|
||||
import {notifyError, notifyInfo} from '../../../redux/actions/error_actions';
|
||||
|
||||
const ConfigurationItem = (props) => {
|
||||
const handleChanged = (e) => {
|
||||
@@ -37,7 +37,7 @@ const ConfigurationItem = (props) => {
|
||||
displayInfo();
|
||||
return false;
|
||||
}}>
|
||||
<FontAwesomeIcon icon={faInfoCircle} />
|
||||
<FontAwesomeIcon icon={faInfoCircle}/>
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { addEditHostAction } from '../../../redux/actions/host_actions';
|
||||
import { connect } from 'react-redux';
|
||||
import { faTrashAlt, faEdit } from '@fortawesome/free-solid-svg-icons';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {addEditHostAction} from '../../../redux/actions/host_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import {faTrashAlt, faEdit} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
editHost: (host_list, host_data, cb) =>
|
||||
dispatch(addEditHostAction.display(true, cb, { host_list, host_data })),
|
||||
dispatch(addEditHostAction.display(true, cb, {host_list, host_data})),
|
||||
};
|
||||
};
|
||||
|
||||
const Host = ({ allowDelete, editHost, host_list, host_data, onChange, onDelete }) => {
|
||||
const Host = ({allowDelete, editHost, host_list, host_data, onChange, onDelete}) => {
|
||||
const handleEditHost = () => {
|
||||
editHost(host_list, host_data, (changed, { host_data }) => {
|
||||
editHost(host_list, host_data, (changed, {host_data}) => {
|
||||
if (changed) {
|
||||
onChange(host_data);
|
||||
}
|
||||
@@ -33,14 +33,14 @@ const Host = ({ allowDelete, editHost, host_list, host_data, onChange, onDelete
|
||||
|
||||
const premium = host_data.AuthURL && host_data.AuthUser;
|
||||
return (
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'row'}}>
|
||||
<div
|
||||
style={{
|
||||
flex: 0,
|
||||
paddingRight: 'calc(var(--default_spacing) * 1.25)',
|
||||
}}>
|
||||
<a href={'#'} onClick={handleEditHost}>
|
||||
<FontAwesomeIcon icon={faEdit} />
|
||||
<FontAwesomeIcon icon={faEdit}/>
|
||||
</a>
|
||||
</div>
|
||||
{allowDelete ? (
|
||||
@@ -50,7 +50,7 @@ const Host = ({ allowDelete, editHost, host_list, host_data, onChange, onDelete
|
||||
paddingRight: 'calc(var(--default_spacing) * 1.25)',
|
||||
}}>
|
||||
<a href={'#'} onClick={onDelete}>
|
||||
<FontAwesomeIcon icon={faTrashAlt} />
|
||||
<FontAwesomeIcon icon={faTrashAlt}/>
|
||||
</a>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
@@ -2,12 +2,12 @@ import React from 'react';
|
||||
import './HostList.css';
|
||||
import Host from './Host/Host';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Component } from 'react';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { confirmYesNoAction } from '../../redux/actions/common_actions';
|
||||
import { connect } from 'react-redux';
|
||||
import { addEditHostAction } from '../../redux/actions/host_actions';
|
||||
import { faPlusCircle } from '@fortawesome/free-solid-svg-icons';
|
||||
import {Component} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {confirmYesNoAction} from '../../redux/actions/common_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import {addEditHostAction} from '../../redux/actions/host_actions';
|
||||
import {faPlusCircle} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
class HostList extends Component {
|
||||
state = {
|
||||
@@ -18,13 +18,14 @@ class HostList extends Component {
|
||||
// type={props.template.subtype}
|
||||
|
||||
componentDidMount() {
|
||||
this.setState({ items: this.props.value });
|
||||
this.setState({items: this.props.value});
|
||||
}
|
||||
|
||||
componentWillUnmount() {}
|
||||
componentWillUnmount() {
|
||||
}
|
||||
|
||||
handleAddHost = () => {
|
||||
this.props.AddHost(this.state.items, (changed, { host_data }) => {
|
||||
this.props.AddHost(this.state.items, (changed, {host_data}) => {
|
||||
if (changed) {
|
||||
const items = [...this.state.items, host_data];
|
||||
this.updateItems(items);
|
||||
@@ -65,7 +66,7 @@ class HostList extends Component {
|
||||
render() {
|
||||
let idx = 0;
|
||||
return (
|
||||
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
||||
<div style={{display: 'flex', flexDirection: 'column'}}>
|
||||
<div
|
||||
style={{
|
||||
maxHeight: '80px',
|
||||
@@ -94,7 +95,7 @@ class HostList extends Component {
|
||||
style={{
|
||||
marginTop: 'var(--default_spacing)',
|
||||
}}>
|
||||
<FontAwesomeIcon icon={faPlusCircle} />
|
||||
<FontAwesomeIcon icon={faPlusCircle}/>
|
||||
<b>{' Add Portal '}</b>
|
||||
</a>
|
||||
</div>
|
||||
@@ -104,8 +105,8 @@ class HostList extends Component {
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
AddHost: (host_list, cb) => dispatch(addEditHostAction.display(true, cb, { host_list })),
|
||||
ConfirmRemoveHost: (title, cb) => dispatch(confirmYesNoAction.display(true, cb, { title })),
|
||||
AddHost: (host_list, cb) => dispatch(addEditHostAction.display(true, cb, {host_list})),
|
||||
ConfirmRemoveHost: (title, cb) => dispatch(confirmYesNoAction.display(true, cb, {title})),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component } from 'react';
|
||||
import { getIPCRenderer } from '../../utils.jsx';
|
||||
import {Component} from 'react';
|
||||
import {getIPCRenderer} from '../../utils.jsx';
|
||||
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@ import PropTypes from 'prop-types';
|
||||
import RootElem from '../../../components/UI/RootElem/RootElem';
|
||||
import Text from '../../../components/UI/Text/Text';
|
||||
import configureImage from '../../../assets/images/configure.png';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { connect } from 'react-redux';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {connect} from 'react-redux';
|
||||
import {
|
||||
displayConfiguration,
|
||||
removeMount,
|
||||
setProviderState,
|
||||
} from '../../../redux/actions/mount_actions';
|
||||
import { displaySkynetExport, displaySkynetImport } from '../../../redux/actions/skynet_actions';
|
||||
import { faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import {displaySkynetExport, displaySkynetImport} from '../../../redux/actions/skynet_actions';
|
||||
import {faTrashAlt} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
const MountItem = (props) => {
|
||||
const handleAutoMountChanged = (e) => {
|
||||
@@ -37,7 +37,7 @@ const MountItem = (props) => {
|
||||
};
|
||||
|
||||
let secondRow = 6;
|
||||
const pointer = { cursor: props.MState.AllowMount ? 'pointer' : 'no-drop' };
|
||||
const pointer = {cursor: props.MState.AllowMount ? 'pointer' : 'no-drop'};
|
||||
const configButton = (
|
||||
<RootElem colSpan={4} rowSpan={6}>
|
||||
<img
|
||||
@@ -51,7 +51,7 @@ const MountItem = (props) => {
|
||||
}
|
||||
}
|
||||
src={configureImage}
|
||||
style={{ padding: 0, border: 0, margin: 0, ...pointer }}
|
||||
style={{padding: 0, border: 0, margin: 0, ...pointer}}
|
||||
width={'16px'}
|
||||
/>
|
||||
</RootElem>
|
||||
@@ -111,7 +111,7 @@ const MountItem = (props) => {
|
||||
'Mount'
|
||||
)
|
||||
) : (
|
||||
<Loader color={'var(--heading_text_color)'} height={19} type="Circles" width={19} />
|
||||
<Loader color={'var(--heading_text_color)'} height={19} type="Circles" width={19}/>
|
||||
);
|
||||
|
||||
const actionsDisplay = (
|
||||
@@ -168,7 +168,7 @@ const MountItem = (props) => {
|
||||
removeControl = (
|
||||
<RootElem col={(dimensions) => dimensions.columns - 6} row={secondRow + 3}>
|
||||
<a href={'#'} onClick={handleRemoveMount} style={removeStyle}>
|
||||
<FontAwesomeIcon icon={faTrashAlt} />
|
||||
<FontAwesomeIcon icon={faTrashAlt}/>
|
||||
</a>
|
||||
</RootElem>
|
||||
);
|
||||
@@ -207,7 +207,7 @@ const MountItem = (props) => {
|
||||
}
|
||||
}
|
||||
rowSpan={5}
|
||||
style={{ ...pointer, fontWeight: 'normal' }}>
|
||||
style={{...pointer, fontWeight: 'normal'}}>
|
||||
<u>Export</u>
|
||||
</a>
|
||||
) : null}
|
||||
@@ -223,7 +223,7 @@ const MountItem = (props) => {
|
||||
}
|
||||
}
|
||||
rowSpan={5}
|
||||
style={{ ...pointer, fontWeight: 'normal' }}>
|
||||
style={{...pointer, fontWeight: 'normal'}}>
|
||||
<u>Import</u>
|
||||
</a>
|
||||
) : null}
|
||||
|
||||
@@ -6,8 +6,8 @@ import Button from '../../components/UI/Button/Button';
|
||||
import IPCContainer from '../IPCContainer/IPCContainer';
|
||||
import Modal from '../../components/UI/Modal/Modal';
|
||||
import MountItem from './MountItem/MountItem';
|
||||
import { connect } from 'react-redux';
|
||||
import { notifyError } from '../../redux/actions/error_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import {notifyError} from '../../redux/actions/error_actions';
|
||||
import {
|
||||
resetMountsState,
|
||||
setAllowMount,
|
||||
@@ -164,7 +164,7 @@ class MountItems extends IPCContainer {
|
||||
if (mount) {
|
||||
let result =
|
||||
remote || s3 || provider === 'Skynet'
|
||||
? { Valid: true, Success: true }
|
||||
? {Valid: true, Success: true}
|
||||
: this.sendSyncRequest(Constants.IPC_Check_Daemon_Version, {
|
||||
Provider: provider,
|
||||
Remote: remote,
|
||||
@@ -367,14 +367,14 @@ class MountItems extends IPCContainer {
|
||||
);
|
||||
if (++retryCount < Object.keys(this.state.RetryItems).length) {
|
||||
retryList.push(
|
||||
<div style={{ paddingTop: 'var(--default_spacing)' }} key={'rl_' + retryList.length} />
|
||||
<div style={{paddingTop: 'var(--default_spacing)'}} key={'rl_' + retryList.length}/>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
retryDisplay = (
|
||||
<Modal>
|
||||
<Box dxDark dxStyle={{ padding: 'var(--default_spacing)', minWidth: '70vw' }}>
|
||||
<Box dxDark dxStyle={{padding: 'var(--default_spacing)', minWidth: '70vw'}}>
|
||||
<h1
|
||||
style={{
|
||||
textAlign: 'center',
|
||||
@@ -399,7 +399,7 @@ class MountItems extends IPCContainer {
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
footerItems.push(<div key={'hi_' + footerItems.length} style={{ height: '27px' }} />);
|
||||
footerItems.push(<div key={'hi_' + footerItems.length} style={{height: '27px'}}/>);
|
||||
}
|
||||
|
||||
const mountItems = [];
|
||||
@@ -408,7 +408,7 @@ class MountItems extends IPCContainer {
|
||||
mountItems.push(
|
||||
<div
|
||||
key={'it_' + mountItems.length}
|
||||
style={{ paddingTop: 'calc(var(--default_spacing) * 2.5)' }}
|
||||
style={{paddingTop: 'calc(var(--default_spacing) * 2.5)'}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -438,7 +438,7 @@ class MountItems extends IPCContainer {
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{ margin: 0, padding: 0 }}>
|
||||
<div style={{margin: 0, padding: 0}}>
|
||||
{retryDisplay}
|
||||
<div
|
||||
className={
|
||||
@@ -446,7 +446,7 @@ class MountItems extends IPCContainer {
|
||||
}>
|
||||
{mountItems}
|
||||
</div>
|
||||
<div style={{ paddingTop: 'var(--default_spacing)' }} />
|
||||
<div style={{paddingTop: 'var(--default_spacing)'}}/>
|
||||
{footerItems}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -4,12 +4,12 @@ import Box from '../../components/UI/Box/Box';
|
||||
import Button from '../../components/UI/Button/Button';
|
||||
import CheckBox from '../../components/UI/CheckBox/CheckBox';
|
||||
import IPCContainer from '../IPCContainer/IPCContainer';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { connect } from 'react-redux';
|
||||
import { displayPinnedManager } from '../../redux/actions/pinned_manager_actions';
|
||||
import { faFolder } from '@fortawesome/free-solid-svg-icons';
|
||||
import { notifyApplicationBusy } from '../../redux/actions/common_actions';
|
||||
import { notifyError, notifyInfo } from '../../redux/actions/error_actions';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {connect} from 'react-redux';
|
||||
import {displayPinnedManager} from '../../redux/actions/pinned_manager_actions';
|
||||
import {faFolder} from '@fortawesome/free-solid-svg-icons';
|
||||
import {notifyApplicationBusy} from '../../redux/actions/common_actions';
|
||||
import {notifyError, notifyInfo} from '../../redux/actions/error_actions';
|
||||
|
||||
const Constants = require('../../constants');
|
||||
|
||||
@@ -39,7 +39,7 @@ class PinnedManager extends IPCContainer {
|
||||
});
|
||||
};
|
||||
|
||||
onGetDirectoryItemsReply = (_, { data }) => {
|
||||
onGetDirectoryItemsReply = (_, {data}) => {
|
||||
if (data.Success) {
|
||||
const items = data.Items.filter(
|
||||
(i) =>
|
||||
@@ -70,9 +70,9 @@ class PinnedManager extends IPCContainer {
|
||||
style.marginBottom = '4px';
|
||||
}
|
||||
return (
|
||||
<div key={'dir_' + idx} style={{ ...style }}>
|
||||
<div key={'dir_' + idx} style={{...style}}>
|
||||
<Button
|
||||
buttonStyles={{ textAlign: 'left' }}
|
||||
buttonStyles={{textAlign: 'left'}}
|
||||
clicked={() => {
|
||||
const previous = [...this.state.previous];
|
||||
if (path === '..') {
|
||||
@@ -95,7 +95,7 @@ class PinnedManager extends IPCContainer {
|
||||
icon={faFolder}
|
||||
fixedWidth
|
||||
color={'var(--heading_text_color)'}
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
{name}
|
||||
</Button>
|
||||
@@ -104,12 +104,12 @@ class PinnedManager extends IPCContainer {
|
||||
};
|
||||
|
||||
createFile = (name, path, pinned, idx, total, item_idx) => {
|
||||
const style = { textAlign: 'left' };
|
||||
const style = {textAlign: 'left'};
|
||||
if (item_idx + 1 !== total) {
|
||||
style.marginBottom = '2px';
|
||||
}
|
||||
return (
|
||||
<div key={'file_' + idx} style={{ ...style }}>
|
||||
<div key={'file_' + idx} style={{...style}}>
|
||||
<CheckBox
|
||||
checked={pinned}
|
||||
changed={() => {
|
||||
@@ -153,11 +153,11 @@ class PinnedManager extends IPCContainer {
|
||||
<a
|
||||
href={'#'}
|
||||
onClick={() => this.props.displayPinnedManager(false)}
|
||||
style={{ cursor: 'pointer', flex: '0' }}>
|
||||
style={{cursor: 'pointer', flex: '0'}}>
|
||||
X
|
||||
</a>
|
||||
</div>
|
||||
<h1 style={{ width: '100%', textAlign: 'center' }}>{'Pinned File Manager'}</h1>
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>{'Pinned File Manager'}</h1>
|
||||
<div className={'PinnedManagerActiveDirectory'}>
|
||||
<b> {this.state.active_directory}</b>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React from 'react';
|
||||
import './SkynetExport.css';
|
||||
import CheckboxTree from 'react-checkbox-tree';
|
||||
import { connect } from 'react-redux';
|
||||
import {connect} from 'react-redux';
|
||||
import IPCContainer from '../IPCContainer/IPCContainer';
|
||||
import { notifyApplicationBusy } from '../../redux/actions/common_actions';
|
||||
import { notifyError, notifyInfo } from '../../redux/actions/error_actions';
|
||||
import {notifyApplicationBusy} from '../../redux/actions/common_actions';
|
||||
import {notifyError, notifyInfo} from '../../redux/actions/error_actions';
|
||||
import Box from '../../components/UI/Box/Box';
|
||||
import { displaySkynetExport } from '../../redux/actions/skynet_actions';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import {displaySkynetExport} from '../../redux/actions/skynet_actions';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {
|
||||
faCheckSquare,
|
||||
faChevronDown,
|
||||
@@ -158,7 +158,7 @@ export default connect(
|
||||
|
||||
render() {
|
||||
return this.props.AppBusy ? (
|
||||
<div />
|
||||
<div/>
|
||||
) : (
|
||||
<Box
|
||||
dxDark
|
||||
@@ -179,7 +179,7 @@ export default connect(
|
||||
<a
|
||||
href={'#'}
|
||||
onClick={() => this.props.displaySkynetExport(false)}
|
||||
style={{ cursor: 'pointer' }}>
|
||||
style={{cursor: 'pointer'}}>
|
||||
X
|
||||
</a>
|
||||
</div>
|
||||
@@ -214,45 +214,45 @@ export default connect(
|
||||
<FontAwesomeIcon
|
||||
icon={faCheckSquare}
|
||||
fixedWidth
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
),
|
||||
uncheck: (
|
||||
<FontAwesomeIcon icon={faSquare} fixedWidth style={{ padding: 0, margin: 0 }} />
|
||||
<FontAwesomeIcon icon={faSquare} fixedWidth style={{padding: 0, margin: 0}}/>
|
||||
),
|
||||
halfCheck: (
|
||||
<FontAwesomeIcon
|
||||
icon={faHSquare}
|
||||
fixedWidth
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
),
|
||||
expandClose: (
|
||||
<FontAwesomeIcon
|
||||
icon={faChevronRight}
|
||||
fixedWidth
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
),
|
||||
expandOpen: (
|
||||
<FontAwesomeIcon
|
||||
icon={faChevronDown}
|
||||
fixedWidth
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
),
|
||||
expandAll: (
|
||||
<FontAwesomeIcon
|
||||
icon={faPlusSquare}
|
||||
fixedWidth
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
),
|
||||
collapseAll: (
|
||||
<FontAwesomeIcon
|
||||
icon={faMinusSquare}
|
||||
fixedWidth
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
),
|
||||
parentClose: (
|
||||
@@ -260,7 +260,7 @@ export default connect(
|
||||
icon={faFolder}
|
||||
fixedWidth
|
||||
color={'var(--heading_text_color)'}
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
),
|
||||
parentOpen: (
|
||||
@@ -268,7 +268,7 @@ export default connect(
|
||||
icon={faFolderOpen}
|
||||
fixedWidth
|
||||
color={'var(--heading_text_color)'}
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
),
|
||||
leaf: (
|
||||
@@ -276,18 +276,18 @@ export default connect(
|
||||
icon={faFile}
|
||||
fixedWidth
|
||||
color={'var(--text_color)'}
|
||||
style={{ padding: 0, margin: 0 }}
|
||||
style={{padding: 0, margin: 0}}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
nodes={this.state.nodes}
|
||||
onClick={(clicked) => this.setState({ clicked })}
|
||||
onCheck={(checked) => this.setState({ checked })}
|
||||
onExpand={(expanded) => this.setState({ expanded })}
|
||||
onClick={(clicked) => this.setState({clicked})}
|
||||
onCheck={(checked) => this.setState({checked})}
|
||||
onExpand={(expanded) => this.setState({expanded})}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||
<div style={{display: 'flex', justifyContent: 'flex-end'}}>
|
||||
{this.state.second_stage ? (
|
||||
<Button
|
||||
buttonStyles={{
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import './Import.css';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const Import = ({ data }) => {
|
||||
const Import = ({data}) => {
|
||||
return (
|
||||
<div className={'ImportOwner'}>
|
||||
<input
|
||||
@@ -18,7 +18,7 @@ const Import = ({ data }) => {
|
||||
<input
|
||||
readOnly
|
||||
className={'ConfigurationItemInput'}
|
||||
style={{ maxWidth: 'calc(33.33% - calc(var(--default_spacing) / 2))' }}
|
||||
style={{maxWidth: 'calc(33.33% - calc(var(--default_spacing) / 2))'}}
|
||||
type={'text'}
|
||||
value={data.skylink}
|
||||
/>
|
||||
|
||||
@@ -4,7 +4,7 @@ import Import from './Import/Import';
|
||||
import PropTypes from 'prop-types';
|
||||
import Text from '../../../components/UI/Text/Text';
|
||||
|
||||
const ImportList = ({ imports_array }) => {
|
||||
const ImportList = ({imports_array}) => {
|
||||
let key = 0;
|
||||
return (
|
||||
<div>
|
||||
@@ -12,21 +12,21 @@ const ImportList = ({ imports_array }) => {
|
||||
<Text
|
||||
type={'Heading1'}
|
||||
text={'Directory'}
|
||||
style={{ minWidth: '33.33%', maxWidth: '33.33%' }}
|
||||
style={{minWidth: '33.33%', maxWidth: '33.33%'}}
|
||||
/>
|
||||
<Text
|
||||
type={'Heading1'}
|
||||
text={'Skylink'}
|
||||
style={{ minWidth: '33.33%', maxWidth: '33.33%' }}
|
||||
style={{minWidth: '33.33%', maxWidth: '33.33%'}}
|
||||
/>
|
||||
<Text type={'Heading1'} text={'Token'} style={{ minWidth: '33.33%', maxWidth: '33.33%' }} />
|
||||
<Text type={'Heading1'} text={'Token'} style={{minWidth: '33.33%', maxWidth: '33.33%'}}/>
|
||||
</div>
|
||||
<hr />
|
||||
<hr/>
|
||||
<div className={'ImportListOwner'}>
|
||||
{imports_array.map((data) => {
|
||||
return (
|
||||
<div key={'import_' + key++}>
|
||||
<Import data={data} />
|
||||
<Import data={data}/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import {connect} from 'react-redux';
|
||||
import './SkynetImport.css';
|
||||
import Box from '../../components/UI/Box/Box';
|
||||
import Button from '../../components/UI/Button/Button';
|
||||
import { displaySkynetImport } from '../../redux/actions/skynet_actions';
|
||||
import {displaySkynetImport} from '../../redux/actions/skynet_actions';
|
||||
import ImportList from './ImportList/ImportList';
|
||||
import IPCContainer from '../IPCContainer/IPCContainer';
|
||||
import { notifyApplicationBusy } from '../../redux/actions/common_actions';
|
||||
import { notifyError, notifyInfo } from '../../redux/actions/error_actions';
|
||||
import { promptLocationAndReadFile } from '../../utils';
|
||||
import {notifyApplicationBusy} from '../../redux/actions/common_actions';
|
||||
import {notifyError, notifyInfo} from '../../redux/actions/error_actions';
|
||||
import {promptLocationAndReadFile} from '../../utils';
|
||||
|
||||
const Constants = require('../../constants');
|
||||
|
||||
@@ -79,7 +79,7 @@ export default connect(
|
||||
handleLoadFile = () => {
|
||||
const data = promptLocationAndReadFile(this.props.notifyError);
|
||||
if (data) {
|
||||
this.setState({ import_text: data });
|
||||
this.setState({import_text: data});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -176,7 +176,7 @@ export default connect(
|
||||
|
||||
render() {
|
||||
return this.props.AppBusy ? (
|
||||
<div />
|
||||
<div/>
|
||||
) : (
|
||||
<Box
|
||||
dxDark
|
||||
@@ -197,7 +197,7 @@ export default connect(
|
||||
<a
|
||||
href={'#'}
|
||||
onClick={() => this.props.displaySkynetImport(false)}
|
||||
style={{ cursor: 'pointer' }}>
|
||||
style={{cursor: 'pointer'}}>
|
||||
X
|
||||
</a>
|
||||
</div>
|
||||
@@ -205,7 +205,7 @@ export default connect(
|
||||
{this.state.second_stage ? 'Verify Imports' : 'Import List'}
|
||||
</h1>
|
||||
{this.state.second_stage ? (
|
||||
<ImportList imports_array={this.state.imports_array} />
|
||||
<ImportList imports_array={this.state.imports_array}/>
|
||||
) : (
|
||||
<textarea
|
||||
autoFocus={true}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { Component } from 'react';
|
||||
import React, {Component} from 'react';
|
||||
import './Password.css';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faEye, faEyeSlash} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
class Password extends Component {
|
||||
state = {
|
||||
@@ -115,7 +115,7 @@ class Password extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={'PasswordOwner'} style={{ ...this.props.style }}>
|
||||
<div className={'PasswordOwner'} style={{...this.props.style}}>
|
||||
{this.props.readOnly ? null : (
|
||||
<a href={'#'} className={'PasswordLink'} onClick={this.handleActionClick}>
|
||||
<u>{this.state.button_text}</u>
|
||||
@@ -132,7 +132,7 @@ class Password extends Component {
|
||||
value={this.state.button_text === 'confirm' ? this.state.password2 : this.state.password}
|
||||
/>
|
||||
<a href={'#'} className={'PasswordShowHide'} onClick={this.handleShowHideClick}>
|
||||
<FontAwesomeIcon icon={this.state.show_password ? faEye : faEyeSlash} fixedWidth />
|
||||
<FontAwesomeIcon icon={this.state.show_password ? faEye : faEyeSlash} fixedWidth/>
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -317,7 +317,7 @@ module.exports.cleanupOldReleases = (versionList) => {
|
||||
if (versionList && versionList.length > 0) {
|
||||
const dataDir = _getDataDirectory();
|
||||
const directoryList = fs
|
||||
.readdirSync(dataDir, { withFileTypes: true })
|
||||
.readdirSync(dataDir, {withFileTypes: true})
|
||||
.filter((dirent) => dirent.isDirectory())
|
||||
.map((dirent) => dirent);
|
||||
|
||||
@@ -823,7 +823,7 @@ module.exports.getMissingDependencies = (dependencies) => {
|
||||
}
|
||||
|
||||
const key = dep.registry[index].substr(hiveName.length);
|
||||
const regKey = new Registry({ hive: hive, key: key });
|
||||
const regKey = new Registry({hive: hive, key: key});
|
||||
regKey.valueExists('DisplayName', (err, exists) => {
|
||||
if (err || !exists) {
|
||||
regKey.valueExists('ProductName', (err, exists) => {
|
||||
@@ -1002,7 +1002,7 @@ module.exports.importSkylinks = (version, jsonArray) => {
|
||||
};
|
||||
|
||||
// https://stackoverflow.com/questions/31645738/how-to-create-full-path-with-nodes-fs-mkdirsync
|
||||
module.exports.mkDirByPathSync = (targetDir, { isRelativeToScript = false } = {}) => {
|
||||
module.exports.mkDirByPathSync = (targetDir, {isRelativeToScript = false} = {}) => {
|
||||
const sep = path.sep;
|
||||
const initDir = path.isAbsolute(targetDir) ? sep : '';
|
||||
const baseDir = isRelativeToScript ? __dirname : '.';
|
||||
|
||||
@@ -45,7 +45,7 @@ test('create temp signature files', () => {
|
||||
.replace(/(\r\n|\n|\r)/gm, '');
|
||||
expect(b64signature2).toEqual(b64signature);
|
||||
|
||||
expect(fs.readFileSync(data.PublicKeyFile, { encoding: 'utf8' })).toEqual(
|
||||
expect(fs.readFileSync(data.PublicKeyFile, {encoding: 'utf8'})).toEqual(
|
||||
Constants.DEV_PUBLIC_KEY
|
||||
);
|
||||
fs.unlinkSync(data.PublicKeyFile);
|
||||
|
||||
10
src/index.js
10
src/index.js
@@ -3,16 +3,16 @@ import 'react-checkbox-tree/lib/react-checkbox-tree.css';
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import {Provider} from 'react-redux';
|
||||
|
||||
import packageJson from '../package.json';
|
||||
|
||||
import App from './App.jsx';
|
||||
import { setProviderState } from './redux/actions/mount_actions';
|
||||
import { setActiveRelease } from './redux/actions/release_version_actions';
|
||||
import {setProviderState} from './redux/actions/mount_actions';
|
||||
import {setActiveRelease} from './redux/actions/release_version_actions';
|
||||
import createAppStore from './redux/store/createAppStore';
|
||||
import * as serviceWorker from './serviceWorker';
|
||||
import { getIPCRenderer } from './utils.jsx';
|
||||
import {getIPCRenderer} from './utils.jsx';
|
||||
|
||||
const Constants = require('./constants');
|
||||
|
||||
@@ -51,7 +51,7 @@ if (ipcRenderer) {
|
||||
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<App />
|
||||
<App/>
|
||||
</Provider>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import { createResponseDialogAction } from '../utils';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
import {createResponseDialogAction} from '../utils';
|
||||
|
||||
export const confirmYesNoAction = createResponseDialogAction('common', 'confirmYesNo');
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import { getIPCRenderer } from '../../utils.jsx';
|
||||
import {getIPCRenderer} from '../../utils.jsx';
|
||||
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
|
||||
@@ -12,7 +12,7 @@ export const NOTIFY_APPLICATION_BUSY = 'common/notifyApplicationBusy';
|
||||
export const notifyApplicationBusy = (busy, transparent) => {
|
||||
return {
|
||||
type: NOTIFY_APPLICATION_BUSY,
|
||||
payload: { busy, transparent },
|
||||
payload: {busy, transparent},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ export const saveState = () => {
|
||||
}
|
||||
|
||||
if (ipcRenderer) {
|
||||
ipcRenderer.send(Constants.IPC_Save_State, { State: currentState });
|
||||
ipcRenderer.send(Constants.IPC_Save_State, {State: currentState});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import { getIPCRenderer } from '../../utils.jsx';
|
||||
import {getIPCRenderer} from '../../utils.jsx';
|
||||
|
||||
import { notifyError } from './error_actions';
|
||||
import { installDependency, installRelease, installUpgrade } from './install_actions';
|
||||
import {notifyError} from './error_actions';
|
||||
import {installDependency, installRelease, installUpgrade} from './install_actions';
|
||||
|
||||
export const setAllowDownload = createAction('download/setAllowDownload');
|
||||
|
||||
export const SET_DOWNLOAD_BEGIN = 'download/setDownloadBegin';
|
||||
export const setDownloadBegin = (name, type, url) => {
|
||||
return { type: SET_DOWNLOAD_BEGIN, payload: { name, type, url } };
|
||||
return {type: SET_DOWNLOAD_BEGIN, payload: {name, type, url}};
|
||||
};
|
||||
|
||||
export const setDownloadEnd = createAction('download/setDownloadEnd');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { showWindow, shutdownApplication } from './common_actions';
|
||||
import {showWindow, shutdownApplication} from './common_actions';
|
||||
|
||||
let ErrorActions = [];
|
||||
|
||||
@@ -57,13 +57,13 @@ export const notifyInfo = (title, msg, saveToFile, fileName, extension) => {
|
||||
|
||||
export const SET_ERROR_INFO = 'error/setErrorInfo';
|
||||
export const setErrorInfo = (msg, critical) => {
|
||||
return { type: SET_ERROR_INFO, payload: { msg, critical } };
|
||||
return {type: SET_ERROR_INFO, payload: {msg, critical}};
|
||||
};
|
||||
|
||||
export const SET_INFO = 'error/setInfo';
|
||||
export const setInfo = (title, msg, saveToFile, fileName, extension) => {
|
||||
return {
|
||||
type: SET_INFO,
|
||||
payload: { title, msg, saveToFile, fileName, extension },
|
||||
payload: {title, msg, saveToFile, fileName, extension},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { createResponseDialogAction } from '../utils';
|
||||
import {createResponseDialogAction} from '../utils';
|
||||
|
||||
export const addEditHostAction = createResponseDialogAction('host', 'displayAddEditHost');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import { getIPCRenderer, getSelectedVersionFromState } from '../../utils.jsx';
|
||||
import {getIPCRenderer, getSelectedVersionFromState} from '../../utils.jsx';
|
||||
|
||||
import {
|
||||
confirmYesNoAction,
|
||||
@@ -11,9 +11,9 @@ import {
|
||||
showWindow,
|
||||
shutdownApplication,
|
||||
} from './common_actions';
|
||||
import { downloadItem, setAllowDownload } from './download_actions';
|
||||
import { notifyError } from './error_actions';
|
||||
import { unmountAll } from './mount_actions';
|
||||
import {downloadItem, setAllowDownload} from './download_actions';
|
||||
import {notifyError} from './error_actions';
|
||||
import {unmountAll} from './mount_actions';
|
||||
import {
|
||||
setActiveRelease,
|
||||
setInstalledVersion,
|
||||
@@ -166,8 +166,8 @@ export const installReleaseByVersion = (release, version) => {
|
||||
};
|
||||
|
||||
if (getState().mounts.MountsBusy) {
|
||||
dispatch(confirmYesNoAction.display(true, null, { title: 'Unmount all drives?' }))
|
||||
.then(({ changed }) => {
|
||||
dispatch(confirmYesNoAction.display(true, null, {title: 'Unmount all drives?'}))
|
||||
.then(({changed}) => {
|
||||
if (changed) {
|
||||
dispatch(unmountAll(install));
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import { getIPCRenderer } from '../../utils.jsx';
|
||||
import {getIPCRenderer} from '../../utils.jsx';
|
||||
|
||||
import { confirmYesNoAction, saveState } from './common_actions';
|
||||
import { notifyError } from './error_actions';
|
||||
import {confirmYesNoAction, saveState} from './common_actions';
|
||||
import {notifyError} from './error_actions';
|
||||
|
||||
export const addRemoteMount = (hostNameOrIp, port, token) => {
|
||||
return (dispatch, getState) => {
|
||||
@@ -30,10 +30,10 @@ export const addRemoteMount = (hostNameOrIp, port, token) => {
|
||||
|
||||
ipcRenderer.send(Constants.IPC_Set_Config_Values, {
|
||||
Items: [
|
||||
{ Name: 'RemoteMount.RemoteHostNameOrIp', Value: hostNameOrIp },
|
||||
{ Name: 'RemoteMount.RemoteToken', Value: token },
|
||||
{ Name: 'RemoteMount.RemotePort', Value: port.toString() },
|
||||
{ Name: 'RemoteMount.IsRemoteMount', Value: 'true' },
|
||||
{Name: 'RemoteMount.RemoteHostNameOrIp', Value: hostNameOrIp},
|
||||
{Name: 'RemoteMount.RemoteToken', Value: token},
|
||||
{Name: 'RemoteMount.RemotePort', Value: port.toString()},
|
||||
{Name: 'RemoteMount.IsRemoteMount', Value: 'true'},
|
||||
],
|
||||
Provider: provider,
|
||||
Remote: true,
|
||||
@@ -65,11 +65,11 @@ export const addS3Mount = (name, accessKey, secretKey, region, bucketName, url)
|
||||
|
||||
ipcRenderer.send(Constants.IPC_Set_Config_Values, {
|
||||
Items: [
|
||||
{ Name: 'S3Config.AccessKey', Value: accessKey },
|
||||
{ Name: 'S3Config.SecretKey', Value: secretKey },
|
||||
{ Name: 'S3Config.Region', Value: region },
|
||||
{ Name: 'S3Config.BucketName', Value: bucketName },
|
||||
{ Name: 'S3Config.URL', Value: url },
|
||||
{Name: 'S3Config.AccessKey', Value: accessKey},
|
||||
{Name: 'S3Config.SecretKey', Value: secretKey},
|
||||
{Name: 'S3Config.Region', Value: region},
|
||||
{Name: 'S3Config.BucketName', Value: bucketName},
|
||||
{Name: 'S3Config.URL', Value: url},
|
||||
],
|
||||
Provider: provider,
|
||||
S3: true,
|
||||
@@ -100,7 +100,7 @@ export const removeMount = (provider) => {
|
||||
confirmYesNoAction.display(true, null, {
|
||||
title: 'Delete [' + provider.substr(isRemote ? 6 : 2) + ']?',
|
||||
})
|
||||
).then(({ changed }) => {
|
||||
).then(({changed}) => {
|
||||
if (changed) {
|
||||
dispatch(removeMount2(provider));
|
||||
}
|
||||
@@ -129,34 +129,34 @@ export const removeMount3 = createAction('mounts/removeMount3');
|
||||
|
||||
export const RESET_MOUNTS_STATE = 'mounts/resetMountsState';
|
||||
export const resetMountsState = () => {
|
||||
return { type: RESET_MOUNTS_STATE, payload: null };
|
||||
return {type: RESET_MOUNTS_STATE, payload: null};
|
||||
};
|
||||
|
||||
export const SET_ALLOW_MOUNT = 'mounts/setAllowMount';
|
||||
export const setAllowMount = (provider, allow) => {
|
||||
return { type: SET_ALLOW_MOUNT, payload: { provider, allow } };
|
||||
return {type: SET_ALLOW_MOUNT, payload: {provider, allow}};
|
||||
};
|
||||
|
||||
export const SET_AUTO_MOUNT_PROCESSED = 'mounts/setAutoMountProcessed';
|
||||
export const setAutoMountProcessed = (provider, processed) => {
|
||||
return { type: SET_AUTO_MOUNT_PROCESSED, payload: { provider, processed } };
|
||||
return {type: SET_AUTO_MOUNT_PROCESSED, payload: {provider, processed}};
|
||||
};
|
||||
|
||||
export const setBusy = createAction('mounts/setBusy');
|
||||
|
||||
export const SET_MOUNT_STATE = 'mounts/setMountState';
|
||||
export const setMountState = (provider, state) => {
|
||||
return { type: SET_MOUNT_STATE, payload: { provider, state } };
|
||||
return {type: SET_MOUNT_STATE, payload: {provider, state}};
|
||||
};
|
||||
|
||||
export const SET_MOUNTED = 'mounts/setMounted';
|
||||
export const setMounted = (provider, mounted) => {
|
||||
return { type: SET_MOUNTED, payload: { provider, mounted } };
|
||||
return {type: SET_MOUNTED, payload: {provider, mounted}};
|
||||
};
|
||||
|
||||
export const SET_PROVIDER_STATE = 'mounts/setProviderState';
|
||||
export const setProviderState = (provider, state) => {
|
||||
return { type: SET_PROVIDER_STATE, payload: { provider, state } };
|
||||
return {type: SET_PROVIDER_STATE, payload: {provider, state}};
|
||||
};
|
||||
|
||||
export const unmountAll = (completedCallback) => {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
|
||||
export const displayPinnedManager = createAction('pinned/displayPinnedManager');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
import axios from 'axios';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
@@ -9,10 +9,10 @@ import {
|
||||
getSelectedVersionFromState,
|
||||
} from '../../utils.jsx';
|
||||
|
||||
import { saveState, setAllowMount, setApplicationReady, showWindow } from './common_actions';
|
||||
import { notifyError } from './error_actions';
|
||||
import { checkVersionInstalled, setDismissDependencies } from './install_actions';
|
||||
import { unmountAll } from './mount_actions';
|
||||
import {saveState, setAllowMount, setApplicationReady, showWindow} from './common_actions';
|
||||
import {notifyError} from './error_actions';
|
||||
import {checkVersionInstalled, setDismissDependencies} from './install_actions';
|
||||
import {unmountAll} from './mount_actions';
|
||||
|
||||
export const CLEAR_UI_UPGRADE = 'relver/clearUIUpgrade';
|
||||
export const clearUIUpgrade = () => {
|
||||
@@ -183,7 +183,7 @@ export const NOTIFY_ACTIVE_RELEASE = 'relver/notifyActiveRelease';
|
||||
export const notifyActiveRelease = (release, version) => {
|
||||
return {
|
||||
type: NOTIFY_ACTIVE_RELEASE,
|
||||
payload: { release: release, version: version },
|
||||
payload: {release: release, version: version},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
|
||||
export const displaySkynetExport = createAction('skynet/displaySkynetExport');
|
||||
export const displaySkynetImport = createAction('skynet/displaySkynetImport');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import {createReducer} from '@reduxjs/toolkit';
|
||||
import {
|
||||
confirmYesNoAction,
|
||||
NOTIFY_APPLICATION_BUSY,
|
||||
@@ -31,7 +31,7 @@ export const createCommonReducer = (platformInfo, version) => {
|
||||
};
|
||||
},
|
||||
[setAllowMount]: (state, action) => {
|
||||
return { ...state, AllowMount: action.payload };
|
||||
return {...state, AllowMount: action.payload};
|
||||
},
|
||||
[setApplicationReady]: (state, action) => {
|
||||
return {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import {createReducer} from '@reduxjs/toolkit';
|
||||
|
||||
import {
|
||||
SET_DOWNLOAD_BEGIN,
|
||||
@@ -48,7 +48,7 @@ export const downloadReducer = createReducer(
|
||||
};
|
||||
},
|
||||
[setDownloadProgress]: (state, action) => {
|
||||
return { ...state, DownloadProgress: action.payload };
|
||||
return {...state, DownloadProgress: action.payload};
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import { CLEAR_ERROR, CLEAR_INFO, SET_ERROR_INFO, SET_INFO } from '../actions/error_actions';
|
||||
import {createReducer} from '@reduxjs/toolkit';
|
||||
import {CLEAR_ERROR, CLEAR_INFO, SET_ERROR_INFO, SET_INFO} from '../actions/error_actions';
|
||||
|
||||
export const errorReducer = createReducer(
|
||||
{
|
||||
@@ -46,7 +46,7 @@ export const errorReducer = createReducer(
|
||||
},
|
||||
...state.InfoStack,
|
||||
];
|
||||
return { ...state, DisplayInfo: true, InfoStack: infoStack };
|
||||
return {...state, DisplayInfo: true, InfoStack: infoStack};
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import { addEditHostAction } from '../actions/host_actions';
|
||||
import {createReducer} from '@reduxjs/toolkit';
|
||||
import {addEditHostAction} from '../actions/host_actions';
|
||||
|
||||
export const hostReducer = createReducer(
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import {createReducer} from '@reduxjs/toolkit';
|
||||
import {
|
||||
setAutoInstallRelease,
|
||||
setDismissDependencies,
|
||||
@@ -20,10 +20,10 @@ export const installReducer = createReducer(
|
||||
},
|
||||
{
|
||||
[setAutoInstallRelease]: (state, action) => {
|
||||
return { ...state, AutoInstallRelease: action.payload };
|
||||
return {...state, AutoInstallRelease: action.payload};
|
||||
},
|
||||
[setDismissDependencies]: (state, action) => {
|
||||
return { ...state, DismissDependencies: action.payload };
|
||||
return {...state, DismissDependencies: action.payload};
|
||||
},
|
||||
[setInstallActive]: (state, action) => {
|
||||
return {
|
||||
@@ -42,10 +42,10 @@ export const installReducer = createReducer(
|
||||
};
|
||||
},
|
||||
[setInstallTestActive]: (state, action) => {
|
||||
return { ...state, InstallTestActive: action.payload };
|
||||
return {...state, InstallTestActive: action.payload};
|
||||
},
|
||||
[setMissingDependencies]: (state, action) => {
|
||||
return { ...state, MissingDependencies: action.payload };
|
||||
return {...state, MissingDependencies: action.payload};
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import {createReducer} from '@reduxjs/toolkit';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import {
|
||||
@@ -32,7 +32,7 @@ export const createMountReducer = (state) => {
|
||||
};
|
||||
})
|
||||
.reduce((map, obj) => {
|
||||
return { ...map, ...obj };
|
||||
return {...map, ...obj};
|
||||
});
|
||||
|
||||
const mountState = providerList
|
||||
@@ -46,15 +46,15 @@ export const createMountReducer = (state) => {
|
||||
};
|
||||
})
|
||||
.reduce((map, obj) => {
|
||||
return { ...map, ...obj };
|
||||
return {...map, ...obj};
|
||||
});
|
||||
|
||||
const autoMountProcessed = providerList
|
||||
.map((provider) => {
|
||||
return { [provider]: false };
|
||||
return {[provider]: false};
|
||||
})
|
||||
.reduce((map, obj) => {
|
||||
return { ...map, ...obj };
|
||||
return {...map, ...obj};
|
||||
});
|
||||
|
||||
return createReducer(
|
||||
@@ -71,21 +71,21 @@ export const createMountReducer = (state) => {
|
||||
},
|
||||
{
|
||||
[addRemoteMount2]: (state, action) => {
|
||||
let mountState = { ...state.MountState };
|
||||
let mountState = {...state.MountState};
|
||||
mountState[action.payload] = {
|
||||
AllowMount: false,
|
||||
DriveLetters: [],
|
||||
Mounted: false,
|
||||
};
|
||||
|
||||
let providerState = { ...state.ProviderState };
|
||||
let providerState = {...state.ProviderState};
|
||||
providerState[action.payload] = {
|
||||
AutoMount: false,
|
||||
AutoRestart: false,
|
||||
MountLocation: '',
|
||||
};
|
||||
|
||||
let autoMountProcessed = { ...state.AutoMountProcessed };
|
||||
let autoMountProcessed = {...state.AutoMountProcessed};
|
||||
autoMountProcessed[action.payload] = true;
|
||||
|
||||
return {
|
||||
@@ -97,21 +97,21 @@ export const createMountReducer = (state) => {
|
||||
};
|
||||
},
|
||||
[addS3Mount2]: (state, action) => {
|
||||
let mountState = { ...state.MountState };
|
||||
let mountState = {...state.MountState};
|
||||
mountState[action.payload] = {
|
||||
AllowMount: false,
|
||||
DriveLetters: [],
|
||||
Mounted: false,
|
||||
};
|
||||
|
||||
let providerState = { ...state.ProviderState };
|
||||
let providerState = {...state.ProviderState};
|
||||
providerState[action.payload] = {
|
||||
AutoMount: false,
|
||||
AutoRestart: false,
|
||||
MountLocation: '',
|
||||
};
|
||||
|
||||
let autoMountProcessed = { ...state.AutoMountProcessed };
|
||||
let autoMountProcessed = {...state.AutoMountProcessed};
|
||||
autoMountProcessed[action.payload] = true;
|
||||
|
||||
return {
|
||||
@@ -131,13 +131,13 @@ export const createMountReducer = (state) => {
|
||||
};
|
||||
},
|
||||
[removeMount3]: (state, action) => {
|
||||
let mountState = { ...state.MountState };
|
||||
let mountState = {...state.MountState};
|
||||
delete mountState[action.payload];
|
||||
|
||||
let providerState = { ...state.ProviderState };
|
||||
let providerState = {...state.ProviderState};
|
||||
delete providerState[action.payload];
|
||||
|
||||
let autoMountProcessed = { ...state.AutoMountProcessed };
|
||||
let autoMountProcessed = {...state.AutoMountProcessed};
|
||||
delete autoMountProcessed[action.payload];
|
||||
|
||||
const remoteMounts = state.RemoteMounts.filter((i) => i !== action.payload);
|
||||
@@ -152,7 +152,7 @@ export const createMountReducer = (state) => {
|
||||
};
|
||||
},
|
||||
[RESET_MOUNTS_STATE]: (state) => {
|
||||
return { ...state, MountsBusy: false, MountState: mountState };
|
||||
return {...state, MountsBusy: false, MountState: mountState};
|
||||
},
|
||||
[SET_AUTO_MOUNT_PROCESSED]: (state, action) => {
|
||||
return {
|
||||
@@ -176,7 +176,7 @@ export const createMountReducer = (state) => {
|
||||
};
|
||||
},
|
||||
[setBusy]: (state, action) => {
|
||||
return { ...state, MountsBusy: action.payload };
|
||||
return {...state, MountsBusy: action.payload};
|
||||
},
|
||||
[SET_MOUNT_STATE]: (state, action) => {
|
||||
return {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import { displayPinnedManager } from '../actions/pinned_manager_actions';
|
||||
import {createReducer} from '@reduxjs/toolkit';
|
||||
import {displayPinnedManager} from '../actions/pinned_manager_actions';
|
||||
|
||||
export const pinnedManagerReducer = createReducer(
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import {createReducer} from '@reduxjs/toolkit';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import * as Actions from '../actions/release_version_actions';
|
||||
|
||||
const versionLookup = Constants.RELEASE_TYPES.map((k) => {
|
||||
return { [k]: ['unavailable'] };
|
||||
return {[k]: ['unavailable']};
|
||||
}).reduce((map, obj) => {
|
||||
return {
|
||||
...map,
|
||||
@@ -65,7 +65,7 @@ export const releaseVersionReducer = createReducer(
|
||||
};
|
||||
},
|
||||
[Actions.setInstalledVersion]: (state, action) => {
|
||||
return { ...state, InstalledVersion: action.payload };
|
||||
return {...state, InstalledVersion: action.payload};
|
||||
},
|
||||
[Actions.setNewReleasesAvailable]: (state, action) => {
|
||||
return {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import {createReducer} from '@reduxjs/toolkit';
|
||||
import * as Actions from '../actions/skynet_actions';
|
||||
|
||||
export const skynetReducer = createReducer(
|
||||
@@ -8,10 +8,10 @@ export const skynetReducer = createReducer(
|
||||
},
|
||||
{
|
||||
[Actions.displaySkynetExport]: (state, action) => {
|
||||
return { ...state, DisplayExport: action.payload };
|
||||
return {...state, DisplayExport: action.payload};
|
||||
},
|
||||
[Actions.displaySkynetImport]: (state, action) => {
|
||||
return { ...state, DisplayImport: action.payload };
|
||||
return {...state, DisplayImport: action.payload};
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit';
|
||||
import {configureStore, getDefaultMiddleware} from '@reduxjs/toolkit';
|
||||
|
||||
import { createCommonReducer } from '../reducers/common_reducer';
|
||||
import { downloadReducer } from '../reducers/download_reducer';
|
||||
import { errorReducer } from '../reducers/error_reducer';
|
||||
import { installReducer } from '../reducers/install_reducer';
|
||||
import { createMountReducer } from '../reducers/mount_reducer';
|
||||
import { pinnedManagerReducer } from '../reducers/pinned_manager_reducer';
|
||||
import { releaseVersionReducer } from '../reducers/release_version_reducer';
|
||||
import { skynetReducer } from '../reducers/skynet_reducer';
|
||||
import { hostReducer } from '../reducers/host_reducer';
|
||||
import {createCommonReducer} from '../reducers/common_reducer';
|
||||
import {downloadReducer} from '../reducers/download_reducer';
|
||||
import {errorReducer} from '../reducers/error_reducer';
|
||||
import {installReducer} from '../reducers/install_reducer';
|
||||
import {createMountReducer} from '../reducers/mount_reducer';
|
||||
import {pinnedManagerReducer} from '../reducers/pinned_manager_reducer';
|
||||
import {releaseVersionReducer} from '../reducers/release_version_reducer';
|
||||
import {skynetReducer} from '../reducers/skynet_reducer';
|
||||
import {hostReducer} from '../reducers/host_reducer';
|
||||
|
||||
export default function createAppStore(platformInfo, version, state) {
|
||||
const reducer = {
|
||||
|
||||
@@ -4,7 +4,7 @@ export const createResponseDialogAction = (type, name) => {
|
||||
const display = (show, cb, data) => {
|
||||
return (dispatch) => {
|
||||
if (cb) {
|
||||
dispatch(display(show, null, data)).then(({ changed, data }) => cb(changed, data));
|
||||
dispatch(display(show, null, data)).then(({changed, data}) => cb(changed, data));
|
||||
} else {
|
||||
return new Promise((resolve) => {
|
||||
dispatch(handleDisplay(show, data, resolve));
|
||||
@@ -27,7 +27,7 @@ export const createResponseDialogAction = (type, name) => {
|
||||
const complete = (changed, data) => {
|
||||
return (dispatch) => {
|
||||
if (changed) {
|
||||
resolverList[0]({ changed, data });
|
||||
resolverList[0]({changed, data});
|
||||
}
|
||||
resolverList.splice(0, 1);
|
||||
dispatch(displayAction(false));
|
||||
@@ -36,7 +36,7 @@ export const createResponseDialogAction = (type, name) => {
|
||||
|
||||
const DISPLAY_ACTION = type + '/' + name;
|
||||
const displayAction = (display, data) => {
|
||||
return { type: DISPLAY_ACTION, payload: { display, data } };
|
||||
return {type: DISPLAY_ACTION, payload: {display, data}};
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const Constants = require('../../constants');
|
||||
|
||||
const addListeners = (ipcMain, { closeApplication, setWindowVisibility }) => {
|
||||
const addListeners = (ipcMain, {closeApplication, setWindowVisibility}) => {
|
||||
ipcMain.on(Constants.IPC_Shutdown, () => {
|
||||
closeApplication();
|
||||
});
|
||||
@@ -15,4 +15,4 @@ const addListeners = (ipcMain, { closeApplication, setWindowVisibility }) => {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const Constants = require('../../constants');
|
||||
const helpers = require('../../helpers');
|
||||
|
||||
const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
const addListeners = (ipcMain, {standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Get_Config, (event, data) => {
|
||||
helpers
|
||||
.getConfig(data.Version, data.Provider, data.Remote, data.S3)
|
||||
@@ -58,4 +58,4 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const Constants = require('../../constants');
|
||||
const helpers = require('../../helpers');
|
||||
|
||||
const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
const addListeners = (ipcMain, {standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Check_Daemon_Version, (event, data) => {
|
||||
helpers
|
||||
.checkDaemonVersion(data.Version, data.Provider)
|
||||
@@ -37,10 +37,10 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
})
|
||||
.catch((e) => {
|
||||
event.returnValue = {
|
||||
data: { Error: e.toString(), Success: false, Valid: false },
|
||||
data: {Error: e.toString(), Success: false, Valid: false},
|
||||
};
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -2,7 +2,7 @@ const Constants = require('../../constants');
|
||||
const fs = require('fs');
|
||||
const helpers = require('../../helpers');
|
||||
|
||||
const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
const addListeners = (ipcMain, {standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Check_Dependency_Installed, (event, data) => {
|
||||
try {
|
||||
const exists = fs.lstatSync(data.File).isFile();
|
||||
@@ -30,7 +30,7 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
};
|
||||
} catch (e) {
|
||||
event.returnValue = {
|
||||
data: { Exists: false },
|
||||
data: {Exists: false},
|
||||
};
|
||||
}
|
||||
});
|
||||
@@ -110,4 +110,4 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -2,7 +2,7 @@ const Constants = require('../../constants');
|
||||
const helpers = require('../../helpers');
|
||||
const path = require('path');
|
||||
|
||||
const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
const addListeners = (ipcMain, {standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Download_File, (event, data) => {
|
||||
const destination = path.join(helpers.getDataDirectory(), data.Filename);
|
||||
helpers.downloadFile(
|
||||
@@ -30,4 +30,4 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const Constants = require('../../constants');
|
||||
const fs = require('fs');
|
||||
|
||||
const addListeners = (ipcMain, { getMainWindow, dialog }) => {
|
||||
const addListeners = (ipcMain, {getMainWindow, dialog}) => {
|
||||
ipcMain.on(Constants.IPC_Browse_Directory + '_sync', (event, data) => {
|
||||
dialog.showOpenDialog(
|
||||
getMainWindow(),
|
||||
@@ -43,7 +43,8 @@ const addListeners = (ipcMain, { getMainWindow, dialog }) => {
|
||||
if (fs.existsSync(data.FilePath)) {
|
||||
fs.unlinkSync(data.FilePath);
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Select_File + '_sync', (event, data) => {
|
||||
@@ -67,20 +68,20 @@ const addListeners = (ipcMain, { getMainWindow, dialog }) => {
|
||||
ipcMain.on(Constants.IPC_Read_File + '_sync', (event, data) => {
|
||||
try {
|
||||
const contents = fs.readFileSync(data.Location, 'utf8').toString();
|
||||
event.returnValue = { success: true, contents };
|
||||
event.returnValue = {success: true, contents};
|
||||
} catch (err) {
|
||||
event.returnValue = { success: false, error: err.toString() };
|
||||
event.returnValue = {success: false, error: err.toString()};
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Save_File + '_sync', (event, data) => {
|
||||
try {
|
||||
fs.writeFileSync(data.Location, data.Data, 'utf8');
|
||||
event.returnValue = { success: true };
|
||||
event.returnValue = {success: true};
|
||||
} catch (err) {
|
||||
event.returnValue = { success: false, error: err.toString() };
|
||||
event.returnValue = {success: false, error: err.toString()};
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -62,9 +62,9 @@ const unmountAllDrives = () => {
|
||||
mountedData = {};
|
||||
};
|
||||
|
||||
const addListeners = (ipcMain, { setTrayImage, standardIPCReply }) => {
|
||||
const addListeners = (ipcMain, {setTrayImage, standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Check_Mount_Location + '_sync', (event, data) => {
|
||||
let response = { Success: true, Error: '' };
|
||||
let response = {Success: true, Error: ''};
|
||||
|
||||
try {
|
||||
if (fs.existsSync(data.Location) && fs.statSync(data.Location).isDirectory()) {
|
||||
@@ -109,7 +109,8 @@ const addListeners = (ipcMain, { setTrayImage, standardIPCReply }) => {
|
||||
driveLetters[provider].push(drive);
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +277,7 @@ const addListeners = (ipcMain, { setTrayImage, standardIPCReply }) => {
|
||||
standardIPCReply(
|
||||
event,
|
||||
Constants.IPC_Remove_Mount_Reply,
|
||||
{ DataDirectory: dataDirectory },
|
||||
{DataDirectory: dataDirectory},
|
||||
e
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const Constants = require('../../constants');
|
||||
const helpers = require('../../helpers');
|
||||
|
||||
const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
const addListeners = (ipcMain, {standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Get_Directory_Items, (event, data) => {
|
||||
helpers
|
||||
.grabDirectoryItems(data.Path, data.Version, data.Provider, data.Remote, data.S3)
|
||||
@@ -28,7 +28,8 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Get_Pinned_Files_Status, (event, data) => {});
|
||||
ipcMain.on(Constants.IPC_Get_Pinned_Files_Status, (event, data) => {
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Set_Pinned + '_sync', (event, data) => {
|
||||
helpers
|
||||
@@ -42,4 +43,4 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -4,7 +4,7 @@ const helpers = require('../../helpers');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
|
||||
const addListeners = (ipcMain, { detectScript }) => {
|
||||
const addListeners = (ipcMain, {detectScript}) => {
|
||||
ipcMain.on(Constants.IPC_Get_Platform, (event) => {
|
||||
const sendResponse = (appPlatform, platform) => {
|
||||
event.sender.send(Constants.IPC_Get_Platform_Reply, {
|
||||
|
||||
@@ -5,7 +5,7 @@ const os = require('os');
|
||||
const path = require('path');
|
||||
const unzip = require('unzipper');
|
||||
|
||||
const addListeners = (ipcMain, { getCleanupReleases, standardIPCReply }) => {
|
||||
const addListeners = (ipcMain, {getCleanupReleases, standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Check_Installed, (event, data) => {
|
||||
const destination = path.join(helpers.getDataDirectory(), data.Version);
|
||||
helpers
|
||||
@@ -14,7 +14,8 @@ const addListeners = (ipcMain, { getCleanupReleases, standardIPCReply }) => {
|
||||
let exists = false;
|
||||
try {
|
||||
exists = fs.existsSync(destination) && fs.lstatSync(destination).isDirectory();
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
}
|
||||
standardIPCReply(event, Constants.IPC_Check_Installed_Reply, {
|
||||
Dependencies: dependencies,
|
||||
Exists: exists,
|
||||
@@ -49,11 +50,12 @@ const addListeners = (ipcMain, { getCleanupReleases, standardIPCReply }) => {
|
||||
|
||||
const stream = fs.createReadStream(data.Source);
|
||||
stream
|
||||
.pipe(unzip.Extract({ path: destination }))
|
||||
.pipe(unzip.Extract({path: destination}))
|
||||
.on('error', (error) => {
|
||||
try {
|
||||
helpers.removeDirectoryRecursively(destination);
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
}
|
||||
stream.close();
|
||||
standardIPCReply(
|
||||
event,
|
||||
@@ -104,4 +106,4 @@ const addListeners = (ipcMain, { getCleanupReleases, standardIPCReply }) => {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const Constants = require('../../constants');
|
||||
const helpers = require('../../helpers');
|
||||
|
||||
const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
const addListeners = (ipcMain, {standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Export_Skylinks, (event, data) => {
|
||||
helpers
|
||||
.exportSkylinks(data.Version, data.Paths)
|
||||
@@ -57,4 +57,4 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -6,7 +6,7 @@ const path = require('path');
|
||||
const getDirectories = (source) => {
|
||||
try {
|
||||
return fs
|
||||
.readdirSync(source, { withFileTypes: true })
|
||||
.readdirSync(source, {withFileTypes: true})
|
||||
.filter((dirent) => dirent.isDirectory())
|
||||
.map((dirent) => dirent.name);
|
||||
} catch {
|
||||
@@ -77,4 +77,4 @@ const addListeners = (ipcMain) => {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -2,7 +2,7 @@ const Constants = require('../../constants');
|
||||
const os = require('os');
|
||||
const helpers = require('../../helpers');
|
||||
|
||||
const addListeners = (ipcMain, { closeApplication }) => {
|
||||
const addListeners = (ipcMain, {closeApplication}) => {
|
||||
ipcMain.on(Constants.IPC_Reboot_System, () => {
|
||||
if (os.platform() === 'win32') {
|
||||
helpers.executeAsync('shutdown.exe', ['/r', '/t', '30']);
|
||||
@@ -11,4 +11,4 @@ const addListeners = (ipcMain, { closeApplication }) => {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
@@ -3,7 +3,7 @@ const fs = require('fs');
|
||||
const helpers = require('../../helpers');
|
||||
const os = require('os');
|
||||
|
||||
const addListeners = (ipcMain, { setIsInstalling, unmountAllDrives, standardIPCReply }) => {
|
||||
const addListeners = (ipcMain, {setIsInstalling, unmountAllDrives, standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Install_Upgrade, (event, data) => {
|
||||
let allowSkipVerification = true;
|
||||
|
||||
@@ -19,7 +19,8 @@ const addListeners = (ipcMain, { setIsInstalling, unmountAllDrives, standardIPCR
|
||||
if (tempPub) {
|
||||
fs.unlinkSync(tempPub);
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
}
|
||||
};
|
||||
|
||||
const errorHandler = (err) => {
|
||||
@@ -117,4 +118,4 @@ const addListeners = (ipcMain, { setIsInstalling, unmountAllDrives, standardIPCR
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = { addListeners };
|
||||
module.exports = {addListeners};
|
||||
|
||||
Reference in New Issue
Block a user