diff --git a/electron.js b/electron.js index 432b357..5175b7c 100644 --- a/electron.js +++ b/electron.js @@ -37,7 +37,7 @@ function createWindow() { loadUiSettings(); // Create the browser window. - const height = (process.env.ELECTRON_START_URL ? 400 : 380) - (os.platform() === 'win32' ? 0 : 24); + const height = (process.env.ELECTRON_START_URL ? 364 : 344) - ((os.platform() === 'win32') || (os.platform() === 'darwin') ? 0 : 24); mainWindow = new BrowserWindow({ width: 428 + (os.platform() === 'win32' ? 0 : 120), height: height, @@ -181,6 +181,13 @@ if (!instanceLock) { }); } +const clearManualMountDetection = (storageType) => { + if (manualMountDetection[storageType]) { + clearInterval(manualMountDetection[storageType]); + delete manualMountDetection[storageType]; + } +}; + const loadUiSettings = () => { const settingFile = path.join(helpers.resolvePath(Constants.DATA_LOCATIONS[os.platform()]), 'ui.json'); try { @@ -199,9 +206,7 @@ const monitorMount = (sender, storageType, dataDirectory, version, pid, location .then(result => { if (result[storageType].PID !== pid) { if (result[storageType].PID === -1) { - clearTimeout(manualMountDetection[storageType]); - delete manualMountDetection[storageType]; - + clearManualMountDetection(storageType); sender.send(Constants.IPC_Unmount_Drive_Reply, { data: { Expected: expectedUnmount[storageType], @@ -674,10 +679,7 @@ ipcMain.on(Constants.IPC_Shutdown, () => { }); ipcMain.on(Constants.IPC_Unmount_Drive, (event, data) => { - if (manualMountDetection[data.StorageType]) { - clearInterval(manualMountDetection[data.StorageType]); - delete manualMountDetection[data.StorageType]; - } + clearManualMountDetection(data.StorageType); const dataDirectory = helpers.resolvePath(data.Directory); expectedUnmount[data.StorageType] = true; diff --git a/package.json b/package.json index 0f8b972..ee8436a 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "linux": { "icon": "./build/icon.icns" }, - "mac": { + "mac": { "icon": "./build/icon.icns" }, "win": { diff --git a/src/App.js b/src/App.js index 1bd8781..816c872 100644 --- a/src/App.js +++ b/src/App.js @@ -684,7 +684,7 @@ class App extends Component { let key = 0; mainContent.push((
+ style={{height: '25%'}}> { - let optionsDisplay = null; + let optionsDisplay = []; + let key = 0; if (props.releaseExtracting) { - optionsDisplay = '}/> + optionsDisplay.push(( + (dimensions.columns / 3) * 2} + colSpan={'remain'} + key={key++} + rowSpan={4} + text={'Activating'} + textAlign={'left'} + type={'Heading2'}/> + )); + optionsDisplay.push(( + (dimensions.columns / 3) * 2} + colSpan={'remain'} + key={key++} + row={5} + rowSpan={7} + text={props.installedVersion} + textAlign={'left'}/> + )); + } else if (props.downloadDisabled) { + optionsDisplay.push(( + (dimensions.columns / 3) * 2} + colSpan={'remain'} + key={key++} + rowSpan={4} + text={'Installed'} + textAlign={'left'} + type={'Heading2'}/> + )); + + optionsDisplay.push(( + (dimensions.columns / 3) * 2} + colSpan={'remain'} + key={key++} + row={5} + rowSpan={7} + text={props.installedVersion} + textAlign={'left'}/> + )); } else { - optionsDisplay = ; + optionsDisplay.push(( + + )); } return ( @@ -56,18 +94,6 @@ export default CSSModules((props) => { row={5} rowSpan={7} selected={props.version}/> - (dimensions.columns / 3) * 2} - colSpan={'remain'} - rowSpan={4} - text={'Installed'} - textAlign={'left'} - type={'Heading2'}/> - (dimensions.columns / 3) * 2} - colSpan={'remain'} - row={5} - rowSpan={7} - text={props.installedVersion} - textAlign={'left'}/> {optionsDisplay} );