Layout changes

This commit is contained in:
Scott E. Graves
2018-12-13 13:30:40 -06:00
parent add2797fda
commit 98e06b4498
4 changed files with 61 additions and 33 deletions

View File

@@ -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;

View File

@@ -131,7 +131,7 @@
"linux": {
"icon": "./build/icon.icns"
},
"mac": {
"mac": {
"icon": "./build/icon.icns"
},
"win": {

View File

@@ -684,7 +684,7 @@ class App extends Component {
let key = 0;
mainContent.push((
<div key={'rvd_' + key++}
style={{height: '34%'}}>
style={{height: '25%'}}>
<ReleaseVersionDisplay disabled={this.state.DownloadActive || this.state.ExtractActive || this.state.MountsBusy}
downloadClicked={this.handleReleaseDownload}
downloadDisabled={!downloadEnabled}

View File

@@ -8,19 +8,57 @@ import Button from '../UI/Button/Button';
import UpgradeIcon from '../UpgradeIcon/UpgradeIcon';
export default CSSModules((props) => {
let optionsDisplay = null;
let optionsDisplay = [];
let key = 0;
if (props.releaseExtracting) {
optionsDisplay = <Text align='center'
row={13}
rowSpan={7}
colSpan={'remain'}
text={'Activating <' + props.installedVersion + '>'}/>
optionsDisplay.push((
<Text col={dimensions => (dimensions.columns / 3) * 2}
colSpan={'remain'}
key={key++}
rowSpan={4}
text={'Activating'}
textAlign={'left'}
type={'Heading2'}/>
));
optionsDisplay.push((
<Text col={dimensions => (dimensions.columns / 3) * 2}
colSpan={'remain'}
key={key++}
row={5}
rowSpan={7}
text={props.installedVersion}
textAlign={'left'}/>
));
} else if (props.downloadDisabled) {
optionsDisplay.push((
<Text col={dimensions => (dimensions.columns / 3) * 2}
colSpan={'remain'}
key={key++}
rowSpan={4}
text={'Installed'}
textAlign={'left'}
type={'Heading2'}/>
));
optionsDisplay.push((
<Text col={dimensions => (dimensions.columns / 3) * 2}
colSpan={'remain'}
key={key++}
row={5}
rowSpan={7}
text={props.installedVersion}
textAlign={'left'}/>
));
} else {
optionsDisplay = <Button clicked={props.downloadClicked}
colSpan={20}
disabled={props.downloadDisabled}
row={13}
rowSpan={7}>Install</Button>;
optionsDisplay.push((
<Button clicked={props.downloadClicked}
col={dimensions => (dimensions.columns / 3) * 2}
colSpan={20}
key={key++}
disabled={props.downloadDisabled}
row={5}
rowSpan={7}>Install</Button>
));
}
return (
@@ -56,18 +94,6 @@ export default CSSModules((props) => {
row={5}
rowSpan={7}
selected={props.version}/>
<Text col={dimensions => (dimensions.columns / 3) * 2}
colSpan={'remain'}
rowSpan={4}
text={'Installed'}
textAlign={'left'}
type={'Heading2'}/>
<Text col={dimensions => (dimensions.columns / 3) * 2}
colSpan={'remain'}
row={5}
rowSpan={7}
text={props.installedVersion}
textAlign={'left'}/>
{optionsDisplay}
</Grid>
);