Lots of new stuff

This commit is contained in:
Timothy Warren 2018-04-03 14:13:16 -04:00
parent bd8996fba1
commit 177c966935
18 changed files with 236 additions and 83 deletions

View File

@ -3,26 +3,15 @@
# top-most EditorConfig file # top-most EditorConfig file
root = true root = true
# Unix-style newlines with a newline ending every file # Global settings
[*]
end_of_line = lf
insert_final_newline = true
# Matches multiple files with brace expansion notation
# Set default charset
[*] [*]
charset = utf-8 charset = utf-8
end_of_line = lf
# Tab indentation (no size specified) indent_size = 2
[*]
indent_style = tab indent_style = tab
indent_size = 4 insert_final_newline = true
# Indentation override for all JS under lib directory # If i ever MUST use a yaml file
[*.js] [*.yml, *.yaml]
indent_size = 2 indent_size = 2
# Matches the exact files either package.json or .travis.yml
[*.yml]
indent_style = space indent_style = space
indent_size = 2

View File

@ -17,6 +17,7 @@
"bootstrap": "4", "bootstrap": "4",
"electron": "^1.8.4", "electron": "^1.8.4",
"electron-builder": "^20.8.1", "electron-builder": "^20.8.1",
"electron-react-devtools": "^0.5.3",
"eslint": "^4.19.1", "eslint": "^4.19.1",
"eslint-config-happiness": "^10.2.1", "eslint-config-happiness": "^10.2.1",
"eslint-plugin-import": "^2.9.0", "eslint-plugin-import": "^2.9.0",

View File

@ -1,3 +1,24 @@
/** /**
* Custom styles for electron app * Custom styles for electron app
*/ */
/*! Classes */
.abs-center {
height: auto;
margin: auto;
width: auto;
}
.full-height {
height: 100%;
}
/*! Elements */
html, body {
height: 100vh;
}
/*! Ids */
#app {
height: 100vh;
}

View File

@ -10,7 +10,8 @@
<title>Inferno App</title> <title>Inferno App</title>
</head> </head>
<body> <body>
<div id="app"></div> <film-exif id="app"></film-exif>
<script src="%PUBLIC_URL%/js/customElements.js"></script>
<noscript> <noscript>
You need to enable JavaScript to run this app. You need to enable JavaScript to run this app.
</noscript> </noscript>

View File

@ -0,0 +1,3 @@
class FilmExifElement extends HTMLElement {}
customElements.define('film-exif', FilmExifElement);

View File

@ -1,60 +1,8 @@
import { BrowserRouter } from 'inferno-router'; import { BrowserRouter } from 'inferno-router';
import QueryString from 'query-string'; import { Routes } from './Routes';
import { Jumbotron } from './components/Bootstrap'; export const App = () => (
import {
Button,
Form,
FormGroup,
Input,
Label,
Select
} from './components/Bootstrap/Form';
import { Container, Row } from './components/Bootstrap/Grid';
const App = () => (
<BrowserRouter> <BrowserRouter>
<div> <Routes />
<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>
<FormGroup>
<label htmlFor="filmFormat">Film Format</label>
<select className="custom-select" id="filmFormat" name="filmFormat">
<option value="110">110</option>
<option value="120">120</option>
<option value="127">127</option>
<option value="135">135</option>
</select>
</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> </BrowserRouter>
); );
export default App;

10
src/Routes.js Normal file
View File

@ -0,0 +1,10 @@
import { Route, Switch } from 'inferno-router';
import * as V from './views';
export const Routes = (props) => (
<Switch>
<Route component={V.OopsView} />
<Route exact path='/' component={V.HomeView} />
</Switch>
);

View File

@ -31,9 +31,10 @@ const createWindow = () => {
}); });
mainWindow.loadURL(startUrl); mainWindow.loadURL(startUrl);
// Open the DevTools. // Open the DevTools.
mainWindow.webContents.openDevTools({ require('electron-react-devtools').install();
/* mainWindow.webContents.openDevTools({
mode: 'bottom', mode: 'bottom',
}); });*/
// Emitted when the window is closed. // Emitted when the window is closed.
mainWindow.on('closed', () => { mainWindow.on('closed', () => {

View File

@ -1,4 +1,4 @@
import App from './App'; import { App } from './App';
import { render } from 'inferno'; import { render } from 'inferno';
render(<App />, document.getElementById('app')); render(<App />, document.getElementById('app'));

View File

@ -1,3 +0,0 @@
export const CameraList = () => {
return <div />;
};

View File

@ -0,0 +1,3 @@
export const CameraListView = () => {
return <div />;
};

View File

@ -1 +1 @@
export * from './CameraList'; export * from './CameraListView';

View File

@ -0,0 +1,11 @@
import { Component } from 'inferno';
import {
Form,
FormFeedback,
FormGroup
} from '../../components/Bootstrap'
export class FilmAddView extends Component {
}

1
src/views/Film/index.js Normal file
View File

@ -0,0 +1 @@
export * from './FilmAddView';

51
src/views/HomeView.js Normal file
View File

@ -0,0 +1,51 @@
import QueryString from 'query-string';
import {
Button,
Container,
Form,
FormGroup,
Input,
Jumbotron,
Label,
Row,
} from '../components/Bootstrap';
export const HomeView = (props) => {
return (
<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 tag='label' for="brand">Brand</Label>
<Input type="text" id="brand" name="brand" />
</FormGroup>
<FormGroup>
<Label tag='label' for="filmFormat">Film Format</Label>
<select className="custom-select" id="filmFormat" name="filmFormat">
<option value="110">110</option>
<option value="120">120</option>
<option value="127">127</option>
<option value="135">135</option>
</select>
</FormGroup>
<Button color="primary" type="submit">Save</Button>
</Form>
</Row>
</Container>
<pre>{
JSON.stringify(QueryString.parse(window.location.search), undefined, 2)
}</pre>
</Jumbotron>
)
}

19
src/views/OopsView.js Normal file
View File

@ -0,0 +1,19 @@
import {
Alert,
Container,
Row
} from '../components/Bootstrap';
export const OopsView = (props) => (
<Container className="full-height" tag="section">
<Row
className="align-items-center full-height justify-content-center"
tag="section"
>
<Alert className="abs-center" color="danger" tag="main">
<h1>Oops!</h1>
<p>Looks like there was a problem.</p>
</Alert>
</Row>
</Container>
);

View File

@ -1 +1,4 @@
export * from './Camera'; export * from './Camera';
export * from './Film';
export * from './HomeView';
export * from './OopsView';

100
yarn.lock
View File

@ -1626,6 +1626,10 @@ chokidar@^2.0.0, chokidar@^2.0.2:
optionalDependencies: optionalDependencies:
fsevents "^1.1.2" fsevents "^1.1.2"
chownr@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181"
chromium-pickle-js@^0.2.0: chromium-pickle-js@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz#04a106672c18b085ab774d983dfa3ea138f22205" resolved "https://registry.yarnpkg.com/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz#04a106672c18b085ab774d983dfa3ea138f22205"
@ -2140,7 +2144,7 @@ date-now@^0.1.4:
version "0.1.4" version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
debug@2.6.9, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: debug@2.6.9, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9:
version "2.6.9" version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
dependencies: dependencies:
@ -2579,6 +2583,10 @@ electron-publish@20.8.1:
lazy-val "^1.0.3" lazy-val "^1.0.3"
mime "^2.2.0" mime "^2.2.0"
electron-react-devtools@^0.5.3:
version "0.5.3"
resolved "https://registry.npmjs.org/electron-react-devtools/-/electron-react-devtools-0.5.3.tgz#c74edb1245dc1cfe1380b93016cd4eb588ed00b7"
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30, electron-to-chromium@^1.3.41: electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30, electron-to-chromium@^1.3.41:
version "1.3.41" version "1.3.41"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.41.tgz#7e33643e00cd85edfd17e04194f6d00e73737235" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.41.tgz#7e33643e00cd85edfd17e04194f6d00e73737235"
@ -3459,6 +3467,12 @@ fs-extra@^4.0.1:
jsonfile "^4.0.0" jsonfile "^4.0.0"
universalify "^0.1.0" universalify "^0.1.0"
fs-minipass@^1.2.5:
version "1.2.5"
resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
dependencies:
minipass "^2.2.1"
fs.realpath@^1.0.0: fs.realpath@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
@ -3959,7 +3973,7 @@ https-browserify@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@^0.4.19, iconv-lite@~0.4.13: iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@^0.4.19, iconv-lite@^0.4.4, iconv-lite@~0.4.13:
version "0.4.19" version "0.4.19"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
@ -3977,6 +3991,12 @@ ieee754@^1.1.4:
version "1.1.11" version "1.1.11"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455"
ignore-walk@^3.0.1:
version "3.0.1"
resolved "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8"
dependencies:
minimatch "^3.0.4"
ignore@^3.3.3, ignore@^3.3.6: ignore@^3.3.3, ignore@^3.3.6:
version "3.3.7" version "3.3.7"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"
@ -5423,6 +5443,19 @@ minimist@~0.0.1:
version "0.0.10" version "0.0.10"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
minipass@^2.2.1, minipass@^2.2.4:
version "2.2.4"
resolved "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz#03c824d84551ec38a8d1bb5bc350a5a30a354a40"
dependencies:
safe-buffer "^5.1.1"
yallist "^3.0.0"
minizlib@^1.1.0:
version "1.1.0"
resolved "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb"
dependencies:
minipass "^2.2.1"
mixin-deep@^1.2.0: mixin-deep@^1.2.0:
version "1.3.1" version "1.3.1"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
@ -5436,7 +5469,7 @@ mkdirp@0.5.0:
dependencies: dependencies:
minimist "0.0.8" minimist "0.0.8"
mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
version "0.5.1" version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies: dependencies:
@ -5469,6 +5502,10 @@ nan@^2.3.0:
version "2.10.0" version "2.10.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"
nan@~2.9.2:
version "2.9.2"
resolved "https://registry.npmjs.org/nan/-/nan-2.9.2.tgz#f564d75f5f8f36a6d9456cca7a6c4fe488ab7866"
nanomatch@^1.2.9: nanomatch@^1.2.9:
version "1.2.9" version "1.2.9"
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2"
@ -5496,6 +5533,14 @@ ncname@1.0.x:
dependencies: dependencies:
xml-char-classes "^1.0.0" xml-char-classes "^1.0.0"
needle@^2.2.0:
version "2.2.0"
resolved "https://registry.npmjs.org/needle/-/needle-2.2.0.tgz#f14efc69cee1024b72c8b21c7bdf94a731dc12fa"
dependencies:
debug "^2.1.2"
iconv-lite "^0.4.4"
sax "^1.2.4"
negotiator@0.6.1: negotiator@0.6.1:
version "0.6.1" version "0.6.1"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
@ -5601,6 +5646,21 @@ node-pre-gyp@^0.6.39:
tar "^2.2.1" tar "^2.2.1"
tar-pack "^3.4.0" tar-pack "^3.4.0"
node-pre-gyp@~0.9.0:
version "0.9.0"
resolved "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.9.0.tgz#bdd4c3afac9b1b1ebff0a9ff3362859eb6781bb8"
dependencies:
detect-libc "^1.0.2"
mkdirp "^0.5.1"
needle "^2.2.0"
nopt "^4.0.1"
npm-packlist "^1.1.6"
npmlog "^4.0.2"
rc "^1.1.7"
rimraf "^2.6.1"
semver "^5.3.0"
tar "^4"
nopt@^4.0.1: nopt@^4.0.1:
version "4.0.1" version "4.0.1"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
@ -5636,6 +5696,17 @@ normalize-url@^1.4.0:
query-string "^4.1.0" query-string "^4.1.0"
sort-keys "^1.0.0" sort-keys "^1.0.0"
npm-bundled@^1.0.1:
version "1.0.3"
resolved "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308"
npm-packlist@^1.1.6:
version "1.1.10"
resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a"
dependencies:
ignore-walk "^3.0.1"
npm-bundled "^1.0.1"
npm-run-path@^2.0.0: npm-run-path@^2.0.0:
version "2.0.2" version "2.0.2"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
@ -7374,6 +7445,13 @@ sprintf-js@~1.0.2:
version "1.0.3" version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
sqlite3@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/sqlite3/-/sqlite3-4.0.0.tgz#cc0e093ab51873f50d9dfc4126fcbef15d486570"
dependencies:
nan "~2.9.2"
node-pre-gyp "~0.9.0"
sshpk@^1.7.0: sshpk@^1.7.0:
version "1.14.1" version "1.14.1"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb"
@ -7650,6 +7728,18 @@ tar@^2.2.1:
fstream "^1.0.2" fstream "^1.0.2"
inherits "2" inherits "2"
tar@^4:
version "4.4.1"
resolved "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz#b25d5a8470c976fd7a9a8a350f42c59e9fa81749"
dependencies:
chownr "^1.0.1"
fs-minipass "^1.2.5"
minipass "^2.2.4"
minizlib "^1.1.0"
mkdirp "^0.5.0"
safe-buffer "^5.1.1"
yallist "^3.0.2"
temp-file@^3.1.1: temp-file@^3.1.1:
version "3.1.1" version "3.1.1"
resolved "https://registry.yarnpkg.com/temp-file/-/temp-file-3.1.1.tgz#8823649aa4e8a6e419eb71b601a2e4d472b0f24f" resolved "https://registry.yarnpkg.com/temp-file/-/temp-file-3.1.1.tgz#8823649aa4e8a6e419eb71b601a2e4d472b0f24f"
@ -8339,6 +8429,10 @@ yallist@^2.1.2:
version "2.1.2" version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
yallist@^3.0.0, yallist@^3.0.2:
version "3.0.2"
resolved "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9"
yargs-parser@^4.2.0: yargs-parser@^4.2.0:
version "4.2.1" version "4.2.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c"