Skip to content

Commit

Permalink
Electron Storage working, Config Validation works, still some work to do
Browse files Browse the repository at this point in the history
  • Loading branch information
UnchartedBull committed Jul 12, 2019
1 parent be4cbad commit 043af84
Show file tree
Hide file tree
Showing 17 changed files with 459 additions and 150 deletions.
10 changes: 0 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const {
} = require("electron");
const url = require('url')
const path = require('path')
const ipcMain = require('electron').ipcMain

const args = process.argv.slice(1);
const dev = args.some(val => val === '--serve');
Expand All @@ -14,9 +13,6 @@ const big = args.some(val => val === '--big-screen')
let window;

function createWindow() {

setupIPC();

if (!big) {
window = new BrowserWindow({
width: dev ? 1000 : 1000,
Expand Down Expand Up @@ -60,12 +56,6 @@ function createWindow() {
});
}

function setupIPC() {
ipcMain.on("config", (event, arg) => {
console.log("Received config request");
event.returnValue = "test123";
})
}

app.on('ready', createWindow)

Expand Down
180 changes: 168 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"ajv": "^6.10.1",
"angular-svg-round-progressbar": "^3.0.1",
"rxjs": "~6.4.0",
"tslib": "^1.9.0",
Expand All @@ -42,10 +43,12 @@
"@angular/cli": "~8.0.0",
"@angular/compiler-cli": "^8.1.1",
"@angular/language-service": "~8.0.0",
"@types/ajv": "^1.0.0",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"electron": "^5.0.6",
"electron-reload": "^1.4.0",
"electron-store": "^4.0.0",
"npm-run-all": "^4.1.5",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
Expand Down
16 changes: 12 additions & 4 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<div *ngIf="configService.config" class="container">
<app-job-status></app-job-status>
<app-printer-status></app-printer-status>
<app-layer-progress></app-layer-progress>
<app-bottom-bar></app-bottom-bar>
<div *ngIf="configService.valid">
<app-job-status></app-job-status>
<app-printer-status></app-printer-status>
<app-layer-progress></app-layer-progress>
<app-bottom-bar></app-bottom-bar>
</div>
<div *ngIf="!configService.valid">
<app-invalid-config></app-invalid-config>
</div>
</div>
<div *ngIf="!configService.config">
<app-no-config></app-no-config>
</div>
Loading

0 comments on commit 043af84

Please sign in to comment.