Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev committed Jan 15, 2025
1 parent e1c2c0b commit bd4733a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { copyFileSync } = require("fs");
const options = {
platform: "node",
bundle: true,
target: 'node20',
target: "node20",
external: ["electron"],
define: {
"process.env.NODE_ENV": `"${process.argv[2] === "--dev" ? "development" : "production"}"`,
Expand Down
9 changes: 1 addition & 8 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,13 @@ function createWindow(): BrowserWindow {
}

electronLocalShortcut.register("CommandOrControl+Shift+X", (): void => {
window.ipcRenderer.send("ssh:disconnect");
setTimeout(() => {
mainWindow.reload();
mainWindow.webContents.send("assetsPath", path.join(app.getAppPath(), "src/assets"));
}, 30);
mainWindow.reload();
});

win.once("ready-to-show", (): void => {
win.show();
win.focus();

mainWindow.webContents.send("assetsPath", path.join(app.getAppPath(), "src/assets"));

if (isDev) {
win.webContents.openDevTools();
}
Expand Down Expand Up @@ -428,7 +422,6 @@ ipcMain.on("main:is-always-on-top", (): void => {

ipcMain.on("main:get-app-version", (): void => {
mainWindow.webContents.send("main:app-version", { version: app.getVersion() });
mainWindow.webContents.send("assetsPath", path.join(app.getAppPath(), "src/assets"));
});

ipcMain.on("main:show", (): void => {
Expand Down

0 comments on commit bd4733a

Please sign in to comment.