Minor tweaks

This commit is contained in:
Timothy Warren 2018-03-30 23:05:59 -04:00
parent 7021ca7559
commit 0031d4964f
4 changed files with 47 additions and 28 deletions

View File

@ -10,7 +10,9 @@
"plugin:inferno/recommended",
"eslint-config-happiness"
],
"globals": {},
"globals": {
"location": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
@ -47,6 +49,7 @@
"no-nested-ternary": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-restricted-globals": "off",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",

View File

@ -1,4 +1,5 @@
import { BrowserRouter } from 'inferno-router';
import QueryString from 'query-string';
import { Jumbotron } from './components/Bootstrap';
import { Button, Form, FormGroup, Input, Label } from './components/Bootstrap/Form';
@ -6,6 +7,7 @@ import { Container, Row } from './components/Bootstrap/Grid';
const App = () => (
<BrowserRouter>
<div>
<Jumbotron>
<Container className="App">
<Row>
@ -29,6 +31,13 @@ const App = () => (
</Row>
</Container>
</Jumbotron>
<br />
<Jumbotron>
<pre>{
JSON.stringify(QueryString.parse(window.location.search), undefined, 2)
}</pre>
</Jumbotron>
</div>
</BrowserRouter>
);

View File

@ -2,4 +2,4 @@ import Jumbotron from 'inferno-bootstrap/dist/Jumbotron';
export {
Jumbotron,
}
};

View File

@ -7,6 +7,9 @@ const BrowserWindow = electron.BrowserWindow;
const path = require('path');
const url = require('url');
// eslint-disable-next-line
global.eval = () => {};
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
@ -14,8 +17,10 @@ let mainWindow;
const createWindow = () => {
// Create the browser window.
mainWindow = new BrowserWindow({
height: 600,
width: 800,
webPreferences: {
contextIsolation: true,
nodeIntegration: false,
},
});
// load the index.html of the app.
@ -26,7 +31,9 @@ const createWindow = () => {
});
mainWindow.loadURL(startUrl);
// Open the DevTools.
mainWindow.webContents.openDevTools();
mainWindow.webContents.openDevTools({
mode: 'bottom',
});
// Emitted when the window is closed.
mainWindow.on('closed', () => {