Skip to content

Commit

Permalink
Merge pull request #9 from Lukewh/update-build-pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukewh authored Jun 7, 2022
2 parents 7f61ce7 + 6131c1b commit 1a1a0ae
Show file tree
Hide file tree
Showing 4 changed files with 4,819 additions and 632 deletions.
Binary file added build/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 15 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// main.js

// Modules to control application life and create native browser window
const { app, BrowserWindow, desktopCapturer, ipcMain } = require("electron");
const {
app,
BrowserWindow,
desktopCapturer,
ipcMain,
shell,
} = require("electron");
const path = require("path");

const createWindow = () => {
Expand All @@ -11,7 +17,8 @@ const createWindow = () => {
width: 1024,
height: 768,
title: "Gather | A better way to meet.",
logo: "./gather-logo.svg",
logo: `${__dirname}/gather-logo.svg`,
icon: `${__dirname}/gather-logo.svg`,
webPreferences: {
preload: path.join(__dirname, "preload.js"),
},
Expand All @@ -38,6 +45,12 @@ const createWindow = () => {
// Open the DevTools.
//mainWindow.webContents.openDevTools();

// Deal with external links
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
shell.openExternal(url);
return { action: "deny" };
});

ipcMain.handle("TOGGLE_DEV_TOOLS", async (event, opts) => {
if (!devtoolsOpen) {
mainWindow.webContents.openDevTools();
Expand Down
Loading

0 comments on commit 1a1a0ae

Please sign in to comment.