From 58b75a69cf61c76c7d2a12987798cc9046980c99 Mon Sep 17 00:00:00 2001
From: "Timothy J. Warren"
Date: Tue, 3 Apr 2018 21:47:41 -0400
Subject: [PATCH] Starting on some file system stuff
---
public/css/app.css | 11 ++++++++++-
public/index.html | 1 -
public/js/customElements.js | 4 ++--
src/App.js | 5 +++--
src/electron/events.js | 5 +++++
src/electron/starter.js | 1 +
src/views/HomeView.js | 34 +++++++++++++++-------------------
src/views/OopsView.js | 5 ++++-
8 files changed, 40 insertions(+), 26 deletions(-)
create mode 100644 src/electron/events.js
diff --git a/public/css/app.css b/public/css/app.css
index 362fb4d..9d26e62 100644
--- a/public/css/app.css
+++ b/public/css/app.css
@@ -9,8 +9,17 @@
width: auto;
}
+.container {
+ padding: 0;
+ margin: 0;
+}
+
.full-height {
- height: 99vmin;
+ height: calc(100% - 60px);
+}
+
+.row {
+ margin: inherit;
}
/*! Elements */
diff --git a/public/index.html b/public/index.html
index 970c8b6..b522e76 100644
--- a/public/index.html
+++ b/public/index.html
@@ -5,7 +5,6 @@
-
Inferno App
diff --git a/public/js/customElements.js b/public/js/customElements.js
index ab287ea..68a9ec8 100644
--- a/public/js/customElements.js
+++ b/public/js/customElements.js
@@ -1,5 +1,5 @@
-class BSContainer extends HTMLElement {}
+/* class BSContainer extends HTMLElement {}
class FilmExifElement extends HTMLElement {}
customElements.define('bs-container', BSContainer);
-customElements.define('film-exif', FilmExifElement);
+customElements.define('film-exif', FilmExifElement); */
diff --git a/src/App.js b/src/App.js
index e5896d6..08c59d8 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,5 +1,6 @@
import { BrowserRouter, Link, NavLink } from 'inferno-router';
import {
+ Container,
Nav,
Navbar,
NavbarBrand,
@@ -9,7 +10,7 @@ import { Routes } from './Routes';
export const App = () => (
-
+
Film Exif
-
+
);
diff --git a/src/electron/events.js b/src/electron/events.js
new file mode 100644
index 0000000..17c21dd
--- /dev/null
+++ b/src/electron/events.js
@@ -0,0 +1,5 @@
+const { app, dialog } = require('electron');
+
+app.on('foo', () => {});
+
+console.log(dialog);
diff --git a/src/electron/starter.js b/src/electron/starter.js
index d70616d..055ae2c 100644
--- a/src/electron/starter.js
+++ b/src/electron/starter.js
@@ -68,3 +68,4 @@ app.on('activate', () => {
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.
+require('./events');
diff --git a/src/views/HomeView.js b/src/views/HomeView.js
index f410b4d..2034c93 100644
--- a/src/views/HomeView.js
+++ b/src/views/HomeView.js
@@ -1,18 +1,26 @@
-import QueryString from 'query-string';
import {
- Button,
Container,
- Form,
- FormGroup,
- Input,
Jumbotron,
- Label,
Row,
} from '../components/Bootstrap';
+function handleDrop (e) {
+ e.preventDefault();
+ e.stopPropagation();
+
+ for (const f of e.dataTransfer.files) {
+ console.log('Dragged files', f.path);
+ }
+}
+
+function handleDragOver (e) {
+ e.preventDefault();
+ e.stopPropagation();
+}
+
export const HomeView = (props) => {
return (
-
+
@@ -24,19 +32,7 @@ export const HomeView = (props) => {
To get started, edit src/App.js
and save to reload.
-
-
-
- {
- JSON.stringify(QueryString.parse(window.location.search), undefined, 2)
- }
);
};
diff --git a/src/views/OopsView.js b/src/views/OopsView.js
index e811747..f7a6b11 100644
--- a/src/views/OopsView.js
+++ b/src/views/OopsView.js
@@ -2,9 +2,12 @@ import { Alert, Row } from '../components/Bootstrap';
export const OopsView = (props) => (
-
+
Oops!
+
Looks like there was a problem.
+ (╥﹏╥)
+ (╯°□°)╯︵ ┻━┻
);