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

View File

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

View File

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

View File

@ -7,6 +7,9 @@ const BrowserWindow = electron.BrowserWindow;
const path = require('path'); const path = require('path');
const url = require('url'); 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 // 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. // be closed automatically when the JavaScript object is garbage collected.
let mainWindow; let mainWindow;
@ -14,8 +17,10 @@ let mainWindow;
const createWindow = () => { const createWindow = () => {
// Create the browser window. // Create the browser window.
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
height: 600, webPreferences: {
width: 800, contextIsolation: true,
nodeIntegration: false,
},
}); });
// load the index.html of the app. // load the index.html of the app.
@ -26,7 +31,9 @@ const createWindow = () => {
}); });
mainWindow.loadURL(startUrl); mainWindow.loadURL(startUrl);
// Open the DevTools. // Open the DevTools.
mainWindow.webContents.openDevTools(); mainWindow.webContents.openDevTools({
mode: 'bottom',
});
// Emitted when the window is closed. // Emitted when the window is closed.
mainWindow.on('closed', () => { mainWindow.on('closed', () => {