Minor tweaks
This commit is contained in:
parent
7021ca7559
commit
0031d4964f
@ -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",
|
||||
|
55
src/App.js
55
src/App.js
@ -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,29 +7,37 @@ import { Container, Row } from './components/Bootstrap/Grid';
|
||||
|
||||
const App = () => (
|
||||
<BrowserRouter>
|
||||
<Jumbotron>
|
||||
<Container className="App">
|
||||
<Row>
|
||||
<header className="App-header">
|
||||
<h1>Welcome to Inferno</h1>
|
||||
</header>
|
||||
</Row>
|
||||
<Row>
|
||||
<p className="App-intro">
|
||||
To get started, edit <code>src/App.js</code> and save to reload.
|
||||
</p>
|
||||
</Row>
|
||||
<Row>
|
||||
<Form>
|
||||
<FormGroup>
|
||||
<Label htmlFor="brand">Brand</Label>
|
||||
<Input type="text" id="brand" name="brand" />
|
||||
</FormGroup>
|
||||
<Button color="primary" type="submit">Save</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
</Container>
|
||||
</Jumbotron>
|
||||
<div>
|
||||
<Jumbotron>
|
||||
<Container className="App">
|
||||
<Row>
|
||||
<header className="App-header">
|
||||
<h1>Welcome to Inferno</h1>
|
||||
</header>
|
||||
</Row>
|
||||
<Row>
|
||||
<p className="App-intro">
|
||||
To get started, edit <code>src/App.js</code> and save to reload.
|
||||
</p>
|
||||
</Row>
|
||||
<Row>
|
||||
<Form>
|
||||
<FormGroup>
|
||||
<Label htmlFor="brand">Brand</Label>
|
||||
<Input type="text" id="brand" name="brand" />
|
||||
</FormGroup>
|
||||
<Button color="primary" type="submit">Save</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
</Container>
|
||||
</Jumbotron>
|
||||
<br />
|
||||
<Jumbotron>
|
||||
<pre>{
|
||||
JSON.stringify(QueryString.parse(window.location.search), undefined, 2)
|
||||
}</pre>
|
||||
</Jumbotron>
|
||||
</div>
|
||||
</BrowserRouter>
|
||||
);
|
||||
|
||||
|
@ -2,4 +2,4 @@ import Jumbotron from 'inferno-bootstrap/dist/Jumbotron';
|
||||
|
||||
export {
|
||||
Jumbotron,
|
||||
}
|
||||
};
|
||||
|
@ -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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user