Migrate GUI to another repository
This commit is contained in:
committed by
Brendan Le Glaunec
parent
5d0c21c5d9
commit
961d34d05a
@@ -1,17 +0,0 @@
|
|||||||
# dependencies
|
|
||||||
/node_modules
|
|
||||||
|
|
||||||
# build
|
|
||||||
/build
|
|
||||||
|
|
||||||
# bucklescript
|
|
||||||
/lib
|
|
||||||
/types
|
|
||||||
.merlin
|
|
||||||
|
|
||||||
# misc
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Cameradar GUI
|
|
||||||
|
|
||||||
## WIP
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "reason-scripts",
|
|
||||||
"sources": [
|
|
||||||
"src"
|
|
||||||
],
|
|
||||||
"bs-dependencies": [
|
|
||||||
"reason-react",
|
|
||||||
"bs-jest"
|
|
||||||
],
|
|
||||||
"reason": {
|
|
||||||
"react-jsx": 2
|
|
||||||
},
|
|
||||||
"bsc-flags": [
|
|
||||||
"-bs-super-errors"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
// This is the entry point of the electron app
|
|
||||||
// It manages the overall state of the native app (menus, windows, ...)
|
|
||||||
// TODO: launch cameradar process
|
|
||||||
|
|
||||||
const { app, BrowserWindow } = require('electron');
|
|
||||||
const path = require('path');
|
|
||||||
const url = require('url');
|
|
||||||
|
|
||||||
let mainWindow;
|
|
||||||
|
|
||||||
// This method will be called when Electron has finished
|
|
||||||
// initialization and is ready to create browser windows.
|
|
||||||
// Some APIs can only be used after this event occurs.
|
|
||||||
app.on('ready', () => {
|
|
||||||
// create the browser window.
|
|
||||||
mainWindow = new BrowserWindow({ width: 800, height: 600 });
|
|
||||||
|
|
||||||
// and load the index.html of the app.
|
|
||||||
mainWindow.loadURL(
|
|
||||||
url.format({
|
|
||||||
pathname: `${__dirname}/../build/index.html`,
|
|
||||||
protocol: 'file:',
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
// Open the DevTools.
|
|
||||||
mainWindow.webContents.openDevTools({
|
|
||||||
mode: 'bottom',
|
|
||||||
});
|
|
||||||
|
|
||||||
mainWindow.on('closed', () => {
|
|
||||||
mainWindow = null;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "gui",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"private": true,
|
|
||||||
"main": "electron_app/index.js",
|
|
||||||
"homepage": ".",
|
|
||||||
"dependencies": {
|
|
||||||
"react": "^16.0.0",
|
|
||||||
"react-dom": "^16.0.0",
|
|
||||||
"reason-scripts": "0.6.11"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"start": "react-scripts start",
|
|
||||||
"build": "react-scripts build",
|
|
||||||
"electron": "electron ."
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"bs-jest": "^0.2.0",
|
|
||||||
"electron": "^1.7.9",
|
|
||||||
"electron-packager": "^9.1.0",
|
|
||||||
"reason-react": "^0.2.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB |
@@ -1,15 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
|
||||||
<title>Cameradar</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="index"></div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
font-family: sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mainWindow {
|
|
||||||
margin-top: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
width: 50vw;
|
|
||||||
display: block;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
open Utils;
|
|
||||||
|
|
||||||
requireCSS "./MainWindow.css";
|
|
||||||
|
|
||||||
let logo = requireAssetURI "./images/logo.png";
|
|
||||||
|
|
||||||
let component = ReasonReact.statelessComponent "MainPage";
|
|
||||||
|
|
||||||
let make _children => {
|
|
||||||
...component,
|
|
||||||
render: fun _self =>
|
|
||||||
<div className="mainWindow">
|
|
||||||
<h1 className="title"> (textEl "Coming soon !") </h1>
|
|
||||||
<img className="logo" src=logo />
|
|
||||||
</div>
|
|
||||||
};
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/* require css file for side effect only */
|
|
||||||
external requireCSS : string => unit = "require" [@@bs.val];
|
|
||||||
|
|
||||||
/* require an asset (eg. an image) and return exported string value (image URI) */
|
|
||||||
external requireAssetURI : string => string = "require" [@@bs.val];
|
|
||||||
|
|
||||||
let textEl str => ReasonReact.stringToElement str;
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 220 KiB |
@@ -1 +0,0 @@
|
|||||||
ReactDOMRe.renderToElementWithId <MainWindow /> "index";
|
|
||||||
-7364
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user