aboutsummaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorPriyansh <[email protected]>2020-12-22 18:39:20 +0530
committerPriyansh <[email protected]>2020-12-22 18:39:20 +0530
commitfb873ec2c3cb71cd478e6d48b424ddbba67cab0a (patch)
tree29e763f84d54d24152a212ec19cdfad2d56235b5 /main.js
parent6593dc005ae8d8f94e7c6644e3af4026e57cd2bf (diff)
downloadstyx-fb873ec2c3cb71cd478e6d48b424ddbba67cab0a.tar.xz
styx-fb873ec2c3cb71cd478e6d48b424ddbba67cab0a.zip
App rewrite using typescript
Diffstat (limited to 'main.js')
-rw-r--r--main.js55
1 files changed, 0 insertions, 55 deletions
diff --git a/main.js b/main.js
deleted file mode 100644
index 4700629..0000000
--- a/main.js
+++ /dev/null
@@ -1,55 +0,0 @@
-const { app, BrowserWindow } = require("electron");
-const path = require("path");
-const url = require("url");
-let win;
-
-function createWindow() {
- // Create the browser window.
- win = new BrowserWindow({
- minWidth: 800,
- minHeight: 600,
- width: 800,
- height: 600,
- webPreferences: {
- nodeIntegration: true,
- },
- });
-
- // and load the index.html of the app.
- win.loadURL(
- url.format({
- pathname: path.join(__dirname, "app/app.html"),
- protocol: "file:",
- slashes: true,
- })
- );
-
- // Open the DevTools.
- // win.webContents.openDevTools()
-
- // Emitted when the window is closed.
- win.on("closed", () => {
- // Dereference the window object, usually you would store windows
- // in an array if your app supports multi windows, this is the time
- // when you should delete the corresponding element.
- win = null;
- });
-
- win.once("ready-to-show", () => {
- win.show();
- });
-}
-
-app.on("ready", createWindow);
-
-app.on("window-all-closed", () => {
- if (process.platform !== "darwin") {
- app.quit();
- }
-});
-
-app.on("activate", () => {
- if (win === null) {
- createWindow();
- }
-});