Layout changes
This commit is contained in:
18
electron.js
18
electron.js
@@ -37,7 +37,7 @@ function createWindow() {
|
|||||||
loadUiSettings();
|
loadUiSettings();
|
||||||
|
|
||||||
// Create the browser window.
|
// 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({
|
mainWindow = new BrowserWindow({
|
||||||
width: 428 + (os.platform() === 'win32' ? 0 : 120),
|
width: 428 + (os.platform() === 'win32' ? 0 : 120),
|
||||||
height: height,
|
height: height,
|
||||||
@@ -181,6 +181,13 @@ if (!instanceLock) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const clearManualMountDetection = (storageType) => {
|
||||||
|
if (manualMountDetection[storageType]) {
|
||||||
|
clearInterval(manualMountDetection[storageType]);
|
||||||
|
delete manualMountDetection[storageType];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const loadUiSettings = () => {
|
const loadUiSettings = () => {
|
||||||
const settingFile = path.join(helpers.resolvePath(Constants.DATA_LOCATIONS[os.platform()]), 'ui.json');
|
const settingFile = path.join(helpers.resolvePath(Constants.DATA_LOCATIONS[os.platform()]), 'ui.json');
|
||||||
try {
|
try {
|
||||||
@@ -199,9 +206,7 @@ const monitorMount = (sender, storageType, dataDirectory, version, pid, location
|
|||||||
.then(result => {
|
.then(result => {
|
||||||
if (result[storageType].PID !== pid) {
|
if (result[storageType].PID !== pid) {
|
||||||
if (result[storageType].PID === -1) {
|
if (result[storageType].PID === -1) {
|
||||||
clearTimeout(manualMountDetection[storageType]);
|
clearManualMountDetection(storageType);
|
||||||
delete manualMountDetection[storageType];
|
|
||||||
|
|
||||||
sender.send(Constants.IPC_Unmount_Drive_Reply, {
|
sender.send(Constants.IPC_Unmount_Drive_Reply, {
|
||||||
data: {
|
data: {
|
||||||
Expected: expectedUnmount[storageType],
|
Expected: expectedUnmount[storageType],
|
||||||
@@ -674,10 +679,7 @@ ipcMain.on(Constants.IPC_Shutdown, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on(Constants.IPC_Unmount_Drive, (event, data) => {
|
ipcMain.on(Constants.IPC_Unmount_Drive, (event, data) => {
|
||||||
if (manualMountDetection[data.StorageType]) {
|
clearManualMountDetection(data.StorageType);
|
||||||
clearInterval(manualMountDetection[data.StorageType]);
|
|
||||||
delete manualMountDetection[data.StorageType];
|
|
||||||
}
|
|
||||||
|
|
||||||
const dataDirectory = helpers.resolvePath(data.Directory);
|
const dataDirectory = helpers.resolvePath(data.Directory);
|
||||||
expectedUnmount[data.StorageType] = true;
|
expectedUnmount[data.StorageType] = true;
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
"linux": {
|
"linux": {
|
||||||
"icon": "./build/icon.icns"
|
"icon": "./build/icon.icns"
|
||||||
},
|
},
|
||||||
"mac": {
|
"mac": {
|
||||||
"icon": "./build/icon.icns"
|
"icon": "./build/icon.icns"
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
|
|||||||
@@ -684,7 +684,7 @@ class App extends Component {
|
|||||||
let key = 0;
|
let key = 0;
|
||||||
mainContent.push((
|
mainContent.push((
|
||||||
<div key={'rvd_' + key++}
|
<div key={'rvd_' + key++}
|
||||||
style={{height: '34%'}}>
|
style={{height: '25%'}}>
|
||||||
<ReleaseVersionDisplay disabled={this.state.DownloadActive || this.state.ExtractActive || this.state.MountsBusy}
|
<ReleaseVersionDisplay disabled={this.state.DownloadActive || this.state.ExtractActive || this.state.MountsBusy}
|
||||||
downloadClicked={this.handleReleaseDownload}
|
downloadClicked={this.handleReleaseDownload}
|
||||||
downloadDisabled={!downloadEnabled}
|
downloadDisabled={!downloadEnabled}
|
||||||
|
|||||||
@@ -8,19 +8,57 @@ import Button from '../UI/Button/Button';
|
|||||||
import UpgradeIcon from '../UpgradeIcon/UpgradeIcon';
|
import UpgradeIcon from '../UpgradeIcon/UpgradeIcon';
|
||||||
|
|
||||||
export default CSSModules((props) => {
|
export default CSSModules((props) => {
|
||||||
let optionsDisplay = null;
|
let optionsDisplay = [];
|
||||||
|
let key = 0;
|
||||||
if (props.releaseExtracting) {
|
if (props.releaseExtracting) {
|
||||||
optionsDisplay = <Text align='center'
|
optionsDisplay.push((
|
||||||
row={13}
|
<Text col={dimensions => (dimensions.columns / 3) * 2}
|
||||||
rowSpan={7}
|
colSpan={'remain'}
|
||||||
colSpan={'remain'}
|
key={key++}
|
||||||
text={'Activating <' + props.installedVersion + '>'}/>
|
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 {
|
} else {
|
||||||
optionsDisplay = <Button clicked={props.downloadClicked}
|
optionsDisplay.push((
|
||||||
colSpan={20}
|
<Button clicked={props.downloadClicked}
|
||||||
disabled={props.downloadDisabled}
|
col={dimensions => (dimensions.columns / 3) * 2}
|
||||||
row={13}
|
colSpan={20}
|
||||||
rowSpan={7}>Install</Button>;
|
key={key++}
|
||||||
|
disabled={props.downloadDisabled}
|
||||||
|
row={5}
|
||||||
|
rowSpan={7}>Install</Button>
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -56,18 +94,6 @@ export default CSSModules((props) => {
|
|||||||
row={5}
|
row={5}
|
||||||
rowSpan={7}
|
rowSpan={7}
|
||||||
selected={props.version}/>
|
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}
|
{optionsDisplay}
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user