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