Fix warnings

This commit is contained in:
2021-03-09 10:56:15 -06:00
parent bd190d30cb
commit 617d78ae24
18 changed files with 65 additions and 34 deletions

View File

@@ -98,7 +98,6 @@ class App extends IPCContainer {
!this.props.DownloadActive &&
(selectedVersion !== 'unavailable') &&
(selectedVersion !== this.props.InstalledVersion);
console.log(selectedVersion);
const missingDependencies = (this.props.MissingDependencies.length > 0) &&
this.props.AllowMount;

View File

@@ -3,7 +3,7 @@ import Box from '../UI/Box/Box';
import Loader from 'react-loader-spinner';
import Text from '../UI/Text/Text';
export default ({title}) => {
const ApplicationBusy = ({title}) => {
return (
<Box dxStyle={{padding: 'var(--default_spacing)'}}>
<Text
@@ -18,4 +18,6 @@ export default ({title}) => {
</div>
</Box>
);
}
};
export default ApplicationBusy;

View File

@@ -1,7 +1,7 @@
import React from 'react';
import './Box.css';
export default props => {
const Box = props => {
const styleList = [];
styleList.push('Box');
if (props.dxDark) {
@@ -24,5 +24,6 @@ export default props => {
{props.children}
</div>
);
};
export default Box;

View File

@@ -1,7 +1,7 @@
import React from 'react';
import './Button.css';
export default props => {
const Button = props => {
return (
<button disabled={props.disabled}
autoFocus={props.autoFocus}
@@ -11,3 +11,4 @@ export default props => {
);
};
export default Button;

View File

@@ -1,7 +1,7 @@
import React from 'react';
import './CheckBox.css';
export default props => {
const CheckBox = props => {
return (
<div className={'CheckBoxOwner'}>
<label className='CheckBoxLabel'>{props.label}
@@ -15,3 +15,5 @@ export default props => {
</div>
);
};
export default CheckBox;

View File

@@ -1,7 +1,7 @@
import React from 'react';
import './DropDown.css';
export default props => {
const DropDown = props => {
const options = props.items.map((s, i) => {
return (
<option className={'DropDownOption'} key={i} value={s}>{s}</option>
@@ -10,14 +10,17 @@ export default props => {
return (
<div className={'DropDown'}>
<select className={'DropDownSelect' + (props.auto ? ' Auto ' : '') + (props.alt ? ' Alt ' : '') }
autoFocus={props.autoFocus}
disabled={props.disabled}
onChange={props.changed}
value={props.selected}>
<select
className={'DropDownSelect' + (props.auto ? ' Auto ' : '') + (props.alt ? ' Alt ' : '')}
autoFocus={props.autoFocus}
disabled={props.disabled}
onChange={props.changed}
value={props.selected}>
{options}
</select>
</div>
);
};
export default DropDown;

View File

@@ -4,7 +4,7 @@ import GridComponent from './GridComponent/GridComponent';
const DEFAULT_GRID_SIZE = 4;
export default class extends Component {
export default class Grid extends Component {
resizeTimeout;
state = {
calculated: false,

View File

@@ -1,7 +1,7 @@
import React from 'react';
import './GridComponent.css';
export default props => {
const GridComponent = props => {
const style = {
style: {
gridRowStart: Math.floor(props.row + 1),
@@ -18,3 +18,5 @@ export default props => {
);
};
export default GridComponent;

View File

@@ -2,7 +2,7 @@ import React from 'react';
import './Loading.css'
import Loader from 'react-loader-spinner';
export default () => {
const Loading = () => {
return (
<div
className={'Loading'}>
@@ -14,3 +14,5 @@ export default () => {
</div>
</div>);
};
export default Loading;

View File

@@ -3,7 +3,7 @@ import React from 'react';
import './Modal.css'
import FocusTrap from 'focus-trap-react';
export default props => {
const Modal = props => {
let modalStyles = [];
let contentStyles = [];
modalStyles.push('Modal');
@@ -29,3 +29,5 @@ export default props => {
</FocusTrap>
);
};
export default Modal;

View File

@@ -1,9 +1,11 @@
import React from 'react';
export default (props) => {
const RootElem = props => {
return (
<div style={{margin: 0, padding: 0}} {...props}>
{props.children}
</div>
)
};
export default RootElem;

View File

@@ -1,7 +1,7 @@
import React from 'react';
import './Text.css';
export default props => {
const Text = props => {
const styleList = [];
styleList.push('Text');
if (props.type) {
@@ -24,3 +24,5 @@ export default props => {
{text}
</div>);
};
export default Text;

View File

@@ -4,12 +4,12 @@ import ReactTooltip from 'react-tooltip';
import {faExclamationTriangle} from '@fortawesome/free-solid-svg-icons';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
export default props => {
const UpgradeIcon = props => {
const styles = ['UpgradeIcon'];
let placement = 'left';
let toolTipText = 'UI Upgrade Available';
if (props.release) {
placement='bottom';
placement = 'bottom';
styles.push('Release');
}
@@ -33,3 +33,5 @@ export default props => {
)
: null;
};
export default UpgradeIcon;

View File

@@ -3,7 +3,7 @@ import {getIPCRenderer} from '../../utils';
const ipcRenderer = getIPCRenderer();
export default class extends Component {
export default class IPCContainer extends Component {
handlerList = {};
componentWillUnmount() {

View File

@@ -1,12 +1,15 @@
import React from 'react'
import './Import.css'
export default ({data}) => {
const Import = ({data}) => {
return (
<div className={'ImportOwner'}>
<input readOnly
className={'ConfigurationItemInput'}
style={{maxWidth: 'calc(33.33% - var(--default_spacing)', marginRight: 'var(--default_spacing)'}}
style={{
maxWidth: 'calc(33.33% - var(--default_spacing)',
marginRight: 'var(--default_spacing)'
}}
type={'text'}
value={data.directory}/>
<input readOnly
@@ -16,9 +19,14 @@ export default ({data}) => {
value={data.skylink}/>
<input readOnly
className={'ConfigurationItemInput'}
style={{maxWidth: 'calc(33.33% - calc(var(--default_spacing) / 2))', marginLeft: 'var(--default_spacing)'}}
style={{
maxWidth: 'calc(33.33% - calc(var(--default_spacing) / 2))',
marginLeft: 'var(--default_spacing)'
}}
type={'text'}
value={data.token}/>
</div>
);
};
export default Import;

View File

@@ -3,12 +3,13 @@ import './ImportList.css'
import Import from './Import/Import'
import Text from '../../../components/UI/Text/Text';
export default ({imports_array}) => {
const ImportList = ({imports_array}) => {
let key = 0;
return (
<div>
<div className={'ImportListHeader'}>
<Text type={'Heading1'} text={'Directory'} style={{minWidth: '33.33%', maxWidth: '33.33%'}}/>
<Text type={'Heading1'} text={'Directory'}
style={{minWidth: '33.33%', maxWidth: '33.33%'}}/>
<Text type={'Heading1'} text={'Skylink'} style={{minWidth: '33.33%', maxWidth: '33.33%'}}/>
<Text type={'Heading1'} text={'Token'} style={{minWidth: '33.33%', maxWidth: '33.33%'}}/>
</div>
@@ -27,3 +28,5 @@ export default ({imports_array}) => {
</div>
);
};
export default ImportList;

View File

@@ -29,7 +29,7 @@ const mapDispatchToProps = dispatch => {
}
};
export default connect(mapStateToProps, mapDispatchToProps)(class extends IPCContainer {
export default connect(mapStateToProps, mapDispatchToProps)(class SkynetImport extends IPCContainer {
state = {
import_text: '',

View File

@@ -3,7 +3,7 @@ import './Password.css';
import {faEye, faEyeSlash} from '@fortawesome/free-solid-svg-icons';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
export default class extends Component {
export default class Password extends Component {
state = {
button_text: 'clear',
password: '',