From e88100e80252ab035ae374655855d169a5bb4cb9 Mon Sep 17 00:00:00 2001
From: Nayam Amarshe <25067102+NayamAmarshe@users.noreply.github.com>
Date: Thu, 1 Sep 2022 20:28:11 +0530
Subject: [PATCH] Fixed UI
---
main/index.js | 80 ++++++++++++-------------
renderer/components/LeftPaneSteps.jsx | 15 ++---
renderer/components/RightPaneInfo.jsx | 11 ++--
renderer/pages/index.jsx | 8 +--
renderer/styles/globals.css | 19 ++++--
resources/linux/bin/upscayl-realesrgan | Bin
resources/linux/bin/upscayl-realsr | Bin
7 files changed, 72 insertions(+), 61 deletions(-)
mode change 100644 => 100755 resources/linux/bin/upscayl-realesrgan
mode change 100644 => 100755 resources/linux/bin/upscayl-realsr
diff --git a/main/index.js b/main/index.js
index be17413..6510a36 100644
--- a/main/index.js
+++ b/main/index.js
@@ -125,51 +125,51 @@ ipcMain.on(commands.UPSCAYL, async (event, payload) => {
// UPSCALE
console.log("PRODUCTION? :", isDev);
console.log("EXEC: ", execPath);
- console.log("MODEL: ", modelsPath + "/" + model)
+ console.log("MODEL: ", modelsPath + "/" + model);
if (fs.existsSync(outFile)) {
mainWindow.webContents.send(commands.UPSCAYL_DONE, outFile);
} else {
- let upscayl = model.includes("realesrgan") ?
- spawn(
- execPath + '-realesrgan',
- [
- "-i",
- inputDir + "/" + fullfileName,
- "-o",
- outFile,
- "-s",
- scale === 2 ? 4 : scale,
- "-m",
- modelsPath,
- "-n",
- model,
- ],
- {
- cwd: null,
- detached: false,
- }
- )
- :
- spawn(
- execPath + '-realsr',
- [
- "-i",
- inputDir + "/" + fullfileName,
- "-o",
- outFile,
- "-s",
- scale === 2 ? 4 : scale,
- "-m",
- modelsPath+ "/" + model,
- ],
- {
- cwd: null,
- detached: false,
- }
- )
- ;
+ let upscayl = model.includes("realesrgan")
+ ? spawn(
+ execPath + "-realesrgan",
+ [
+ "-i",
+ inputDir + "/" + fullfileName,
+ "-o",
+ outFile,
+ "-s",
+ scale === 2 ? 4 : scale,
+ "-m",
+ modelsPath,
+ "-n",
+ model,
+ ],
+ {
+ cwd: null,
+ detached: false,
+ }
+ )
+ : spawn(
+ execPath + "-realsr",
+ [
+ "-i",
+ inputDir + "/" + fullfileName,
+ "-o",
+ outFile,
+ "-s",
+ 4,
+ "-x",
+ "-m",
+ modelsPath + "/" + model,
+ ],
+ {
+ cwd: null,
+ detached: false,
+ }
+ );
let failed = false;
+
upscayl.stderr.on("data", (stderr) => {
console.log(stderr.toString());
stderr = stderr.toString();
diff --git a/renderer/components/LeftPaneSteps.jsx b/renderer/components/LeftPaneSteps.jsx
index ba65b00..7be3652 100644
--- a/renderer/components/LeftPaneSteps.jsx
+++ b/renderer/components/LeftPaneSteps.jsx
@@ -2,9 +2,9 @@ import React from "react";
function LeftPaneSteps(props) {
return (
-
+
{/* STEP 1 */}
-
+
+
{/* STEP 2 */}
-
+
Step 2
Select Upscaling Type
@@ -63,7 +64,7 @@ function LeftPaneSteps(props) {
*/}
{/* STEP 3 */}
-
+
Step 3
Defaults to Image's path
@@ -77,7 +78,7 @@ function LeftPaneSteps(props) {
{/* STEP 4 */}
-
+
Step 4