diff --git a/main/commands.js b/main/commands.js
index 57e884e..05b0693 100644
--- a/main/commands.js
+++ b/main/commands.js
@@ -11,6 +11,7 @@ const commands = {
FOLDER_UPSCAYL_DONE: "Folder upscaling successful",
FOLDER_UPSCAYL_PROGRESS:
"Send Folder Upscaling Progress from Main to Renderer",
+ OPEN_FOLDER: "Open Folder",
};
module.exports = commands;
diff --git a/main/index.js b/main/index.js
index 0c3616f..b8a9f99 100644
--- a/main/index.js
+++ b/main/index.js
@@ -342,6 +342,11 @@ ipcMain.on(commands.FOLDER_UPSCAYL, async (event, payload) => {
});
});
+ipcMain.on(commands.OPEN_FOLDER, async (event, payload) => {
+ console.log(payload);
+ shell.openPath(payload);
+});
+
//------------------------Auto-Update Code-----------------------------//
// ! AUTO UPDATE STUFF
autoUpdater.on("update-available", (_event, releaseNotes, releaseName) => {
diff --git a/renderer/pages/index.jsx b/renderer/pages/index.jsx
index fbbdd0b..8d460c4 100644
--- a/renderer/pages/index.jsx
+++ b/renderer/pages/index.jsx
@@ -133,6 +133,9 @@ const Home = () => {
e.preventDefault();
console.log("drag over");
};
+ const openFolderHandler = (e) => {
+ window.electron.send(commands.OPEN_FOLDER, upscaledBatchFolderPath);
+ };
const allowedFileTypes = ["png", "jpg", "jpeg", "webp"];
@@ -270,8 +273,9 @@ const Home = () => {
{imagePath.length === 0 && batchFolderPath.length === 0 ? (
+ Selected folder: {batchFolderPath} +
) + ) : !batchMode ? ( +- Finished Upscaling Folder! -
+ <> ++ Finished Upscaling Folder! +
+ + > )}