[Added tooltips] [IPC constants]

This commit is contained in:
Scott E. Graves
2018-10-02 16:13:45 -05:00
parent f2a7d1c188
commit 85d8dc8c01
12 changed files with 187 additions and 115 deletions

View File

@@ -3,10 +3,11 @@ import styles from './Configuration.css';
import Box from '../../components/UI/Box/Box';
import Button from '../../components/UI/Button/Button';
import ConfigurationItem from '../../components/ConfigurationItem/ConfigurationItem';
import * as Constants from '../../constants';
import CSSModules from 'react-css-modules';
import Modal from '../../components/UI/Modal/Modal';
const Constants = require('../../constants');
let ipcRenderer = null;
if (!process.versions.hasOwnProperty('electron')) {
ipcRenderer = ((window && window.require) ? window.require('electron').ipcRenderer : null);

View File

@@ -1,4 +1,5 @@
.MountItems {
margin-top: 10px;
padding: 0;
margin: 0;
width: 100%;
}

View File

@@ -1,12 +1,10 @@
import React from 'react';
import {Component} from 'react';
import * as Constants from '../../constants';
import CSSModules from 'react-css-modules';
import styles from './MountItems.css';
import MountItem from '../../components/MountItem/MountItem';
import {IPC_Detect_Mounts} from "../../constants";
import {IPC_Mount_Drive} from "../../constants";
import {IPC_Unmount_Drive} from "../../constants";
const Constants = require('../../constants');
let ipcRenderer = null;
if (!process.versions.hasOwnProperty('electron')) {
@@ -50,7 +48,7 @@ class MountItems extends Component {
detectMounts = ()=> {
this.props.mountsBusy(true);
ipcRenderer.send(IPC_Detect_Mounts, {
ipcRenderer.send(Constants.IPC_Detect_Mounts, {
Directory: this.props.directory,
Version: this.props.version,
});
@@ -78,14 +76,14 @@ class MountItems extends Component {
this.props.mountsBusy(true);
if (mount) {
ipcRenderer.send(IPC_Mount_Drive, {
ipcRenderer.send(Constants.IPC_Mount_Drive, {
Directory: this.props.directory,
Location: location,
StorageType: storageType,
Version: this.props.version,
});
} else {
ipcRenderer.send(IPC_Unmount_Drive, {
ipcRenderer.send(Constants.IPC_Unmount_Drive, {
Directory: this.props.directory,
Location: location,
PID: pid,