mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-28 01:10:52 +01:00
Fixed storage bug
This commit is contained in:
parent
a9b75d6843
commit
d4b776ea23
@ -36,6 +36,13 @@ function escapeRegExp(string) {
|
|||||||
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
|
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Path variables for file and folder selection
|
||||||
|
let imagePath: string | undefined = undefined;
|
||||||
|
let folderPath: string | undefined = undefined;
|
||||||
|
let customModelsFolderPath: string | undefined = undefined;
|
||||||
|
let outputFolderPath: string | undefined = undefined;
|
||||||
|
let saveOutputFolder = false;
|
||||||
|
|
||||||
// Prepare the renderer once the app is ready
|
// Prepare the renderer once the app is ready
|
||||||
let mainWindow: BrowserWindow;
|
let mainWindow: BrowserWindow;
|
||||||
app.on("ready", async () => {
|
app.on("ready", async () => {
|
||||||
@ -84,7 +91,7 @@ app.on("ready", async () => {
|
|||||||
autoUpdater.checkForUpdates();
|
autoUpdater.checkForUpdates();
|
||||||
}
|
}
|
||||||
|
|
||||||
// SAVE LAST IMAGE PATH TO LOCAL STORAGE
|
// GET LAST IMAGE PATH TO LOCAL STORAGE
|
||||||
mainWindow.webContents
|
mainWindow.webContents
|
||||||
.executeJavaScript('localStorage.getItem("lastImagePath");', true)
|
.executeJavaScript('localStorage.getItem("lastImagePath");', true)
|
||||||
.then((lastImagePath: string | null) => {
|
.then((lastImagePath: string | null) => {
|
||||||
@ -93,7 +100,7 @@ app.on("ready", async () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// SAVE LAST FOLDER PATH TO LOCAL STORAGE
|
// GET LAST FOLDER PATH TO LOCAL STORAGE
|
||||||
mainWindow.webContents
|
mainWindow.webContents
|
||||||
.executeJavaScript('localStorage.getItem("lastFolderPath");', true)
|
.executeJavaScript('localStorage.getItem("lastFolderPath");', true)
|
||||||
.then((lastFolderPath: string | null) => {
|
.then((lastFolderPath: string | null) => {
|
||||||
@ -102,7 +109,7 @@ app.on("ready", async () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// SAVE LAST CUSTOM MODELS FOLDER PATH TO LOCAL STORAGE
|
// GET LAST CUSTOM MODELS FOLDER PATH TO LOCAL STORAGE
|
||||||
mainWindow.webContents
|
mainWindow.webContents
|
||||||
.executeJavaScript(
|
.executeJavaScript(
|
||||||
'localStorage.getItem("lastCustomModelsFolderPath");',
|
'localStorage.getItem("lastCustomModelsFolderPath");',
|
||||||
@ -114,7 +121,7 @@ app.on("ready", async () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// SAVE LAST CUSTOM MODELS FOLDER PATH TO LOCAL STORAGE
|
// GET LAST CUSTOM MODELS FOLDER PATH TO LOCAL STORAGE
|
||||||
mainWindow.webContents
|
mainWindow.webContents
|
||||||
.executeJavaScript('localStorage.getItem("lastOutputFolderPath");', true)
|
.executeJavaScript('localStorage.getItem("lastOutputFolderPath");', true)
|
||||||
.then((lastOutputFolderPath: string | null) => {
|
.then((lastOutputFolderPath: string | null) => {
|
||||||
@ -122,6 +129,15 @@ app.on("ready", async () => {
|
|||||||
outputFolderPath = lastOutputFolderPath;
|
outputFolderPath = lastOutputFolderPath;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// GET LAST SAVE OUTPUT FOLDER (BOOLEAN) TO LOCAL STORAGE
|
||||||
|
mainWindow.webContents
|
||||||
|
.executeJavaScript('localStorage.getItem("rememberOutputFolder");', true)
|
||||||
|
.then((lastSaveOutputFolder: boolean | null) => {
|
||||||
|
if (lastSaveOutputFolder !== null) {
|
||||||
|
saveOutputFolder = lastSaveOutputFolder;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Quit the app once all windows are closed
|
// Quit the app once all windows are closed
|
||||||
@ -134,12 +150,6 @@ const logit = (...args: any) => {
|
|||||||
mainWindow.webContents.send(commands.LOG, args.join(" "));
|
mainWindow.webContents.send(commands.LOG, args.join(" "));
|
||||||
};
|
};
|
||||||
|
|
||||||
// Path variables for file and folder selection
|
|
||||||
let imagePath: string | undefined = undefined;
|
|
||||||
let folderPath: string | undefined = undefined;
|
|
||||||
let customModelsFolderPath: string | undefined = undefined;
|
|
||||||
let outputFolderPath: string | undefined = undefined;
|
|
||||||
|
|
||||||
// Default models
|
// Default models
|
||||||
const defaultModels = [
|
const defaultModels = [
|
||||||
"realesrgan-x4plus",
|
"realesrgan-x4plus",
|
||||||
@ -163,19 +173,7 @@ ipcMain.handle(commands.SELECT_FILE, async () => {
|
|||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
logit("Selected File Path: ", filePaths[0]);
|
logit("Selected File Path: ", filePaths[0]);
|
||||||
const platform = getPlatform();
|
imagePath = filePaths[0];
|
||||||
imagePath =
|
|
||||||
platform === "win"
|
|
||||||
? filePaths[0].replace(new RegExp(escapeRegExp("\\"), "g"), "\\\\")
|
|
||||||
: filePaths[0];
|
|
||||||
mainWindow.webContents
|
|
||||||
.executeJavaScript(
|
|
||||||
`localStorage.setItem("lastImagePath", "${imagePath}");`,
|
|
||||||
true
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
logit(`Saved Last Image Path (${imagePath}) to Local Storage`);
|
|
||||||
});
|
|
||||||
|
|
||||||
let isValid = false;
|
let isValid = false;
|
||||||
// READ SELECTED FILES
|
// READ SELECTED FILES
|
||||||
@ -221,25 +219,7 @@ ipcMain.handle(commands.SELECT_FOLDER, async (event, message) => {
|
|||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
logit("Selected Folder Path: ", folderPaths[0]);
|
logit("Selected Folder Path: ", folderPaths[0]);
|
||||||
const platform = getPlatform();
|
folderPath = folderPaths[0];
|
||||||
folderPath =
|
|
||||||
platform === "win"
|
|
||||||
? folderPaths[0].replace(new RegExp(escapeRegExp("\\"), "g"), "\\\\")
|
|
||||||
: folderPaths[0];
|
|
||||||
mainWindow.webContents
|
|
||||||
.executeJavaScript('localStorage.getItem("rememberOutputFolder");', true)
|
|
||||||
.then((result) => {
|
|
||||||
if (result === "false") return;
|
|
||||||
mainWindow.webContents
|
|
||||||
.executeJavaScript(
|
|
||||||
`localStorage.setItem("lastFolderPath", "${folderPath}");`,
|
|
||||||
true
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
logit(`Saved Last Folder Path (${folderPath}) to Local Storage`);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return folderPaths[0];
|
return folderPaths[0];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -343,6 +323,21 @@ ipcMain.on(commands.DOUBLE_UPSCAYL, async (event, payload) => {
|
|||||||
const saveImageAs = payload.saveImageAs as string;
|
const saveImageAs = payload.saveImageAs as string;
|
||||||
const scale = payload.scale as string;
|
const scale = payload.scale as string;
|
||||||
|
|
||||||
|
// SAVE OUTPUT FOLDER TO LOCAL STORAGE
|
||||||
|
mainWindow.webContents
|
||||||
|
.executeJavaScript('localStorage.getItem("rememberOutputFolder");', true)
|
||||||
|
.then((result) => {
|
||||||
|
if (result === "false") return;
|
||||||
|
mainWindow.webContents
|
||||||
|
.executeJavaScript(
|
||||||
|
`localStorage.setItem("lastFolderPath", "${folderPath}");`,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
logit(`Saved Last Folder Path (${folderPath}) to Local Storage`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
const isDefaultModel = defaultModels.includes(model);
|
const isDefaultModel = defaultModels.includes(model);
|
||||||
|
|
||||||
// COPY IMAGE TO TMP FOLDER
|
// COPY IMAGE TO TMP FOLDER
|
||||||
|
@ -10,7 +10,6 @@ interface IProps {
|
|||||||
selectImageHandler: () => Promise<void>;
|
selectImageHandler: () => Promise<void>;
|
||||||
selectFolderHandler: () => Promise<void>;
|
selectFolderHandler: () => Promise<void>;
|
||||||
handleModelChange: (e: any) => void;
|
handleModelChange: (e: any) => void;
|
||||||
handleDrop: (e: any) => void;
|
|
||||||
outputHandler: () => Promise<void>;
|
outputHandler: () => Promise<void>;
|
||||||
upscaylHandler: () => Promise<void>;
|
upscaylHandler: () => Promise<void>;
|
||||||
batchMode: boolean;
|
batchMode: boolean;
|
||||||
@ -19,13 +18,8 @@ interface IProps {
|
|||||||
outputPath: string;
|
outputPath: string;
|
||||||
doubleUpscayl: boolean;
|
doubleUpscayl: boolean;
|
||||||
setDoubleUpscayl: React.Dispatch<React.SetStateAction<boolean>>;
|
setDoubleUpscayl: React.Dispatch<React.SetStateAction<boolean>>;
|
||||||
model: string;
|
|
||||||
setModel: React.Dispatch<React.SetStateAction<string>>;
|
setModel: React.Dispatch<React.SetStateAction<string>>;
|
||||||
isVideo: boolean;
|
|
||||||
setIsVideo: React.Dispatch<React.SetStateAction<boolean>>;
|
|
||||||
saveImageAs: string;
|
|
||||||
setSaveImageAs: React.Dispatch<React.SetStateAction<string>>;
|
setSaveImageAs: React.Dispatch<React.SetStateAction<string>>;
|
||||||
gpuId: string;
|
|
||||||
setGpuId: React.Dispatch<React.SetStateAction<string>>;
|
setGpuId: React.Dispatch<React.SetStateAction<string>>;
|
||||||
dimensions: {
|
dimensions: {
|
||||||
width: number | null;
|
width: number | null;
|
||||||
@ -38,7 +32,6 @@ function LeftPaneImageSteps({
|
|||||||
selectImageHandler,
|
selectImageHandler,
|
||||||
selectFolderHandler,
|
selectFolderHandler,
|
||||||
handleModelChange,
|
handleModelChange,
|
||||||
handleDrop,
|
|
||||||
outputHandler,
|
outputHandler,
|
||||||
upscaylHandler,
|
upscaylHandler,
|
||||||
batchMode,
|
batchMode,
|
||||||
@ -47,13 +40,8 @@ function LeftPaneImageSteps({
|
|||||||
outputPath,
|
outputPath,
|
||||||
doubleUpscayl,
|
doubleUpscayl,
|
||||||
setDoubleUpscayl,
|
setDoubleUpscayl,
|
||||||
model,
|
|
||||||
setModel,
|
setModel,
|
||||||
isVideo,
|
|
||||||
setIsVideo,
|
|
||||||
gpuId,
|
|
||||||
setGpuId,
|
setGpuId,
|
||||||
saveImageAs,
|
|
||||||
setSaveImageAs,
|
setSaveImageAs,
|
||||||
dimensions,
|
dimensions,
|
||||||
}: IProps) {
|
}: IProps) {
|
||||||
@ -84,7 +72,7 @@ function LeftPaneImageSteps({
|
|||||||
} else {
|
} else {
|
||||||
const currentlySavedModel = JSON.parse(
|
const currentlySavedModel = JSON.parse(
|
||||||
localStorage.getItem("model")
|
localStorage.getItem("model")
|
||||||
) as (typeof modelOptions)[0];
|
) as typeof modelOptions[0];
|
||||||
setCurrentModel(currentlySavedModel);
|
setCurrentModel(currentlySavedModel);
|
||||||
setModel(currentlySavedModel.value);
|
setModel(currentlySavedModel.value);
|
||||||
}
|
}
|
||||||
|
@ -2,19 +2,11 @@ import React, { useEffect, useState } from "react";
|
|||||||
import { themeChange } from "theme-change";
|
import { themeChange } from "theme-change";
|
||||||
import commands from "../../electron/commands";
|
import commands from "../../electron/commands";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import {
|
import { customModelsPathAtom, scaleAtom } from "../atoms/userSettingsAtom";
|
||||||
customModelsPathAtom,
|
|
||||||
rememberOutputFolderAtom,
|
|
||||||
scaleAtom,
|
|
||||||
} from "../atoms/userSettingsAtom";
|
|
||||||
import { modelsListAtom } from "../atoms/modelsListAtom";
|
import { modelsListAtom } from "../atoms/modelsListAtom";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
batchMode: boolean;
|
batchMode: boolean;
|
||||||
setBatchMode: React.Dispatch<React.SetStateAction<boolean>>;
|
|
||||||
rememberOutputFolder: boolean;
|
|
||||||
setRememberOutputFolder: React.Dispatch<React.SetStateAction<boolean>>;
|
|
||||||
imagePath: string;
|
|
||||||
setModel: React.Dispatch<React.SetStateAction<string>>;
|
setModel: React.Dispatch<React.SetStateAction<string>>;
|
||||||
saveImageAs: string;
|
saveImageAs: string;
|
||||||
setSaveImageAs: React.Dispatch<React.SetStateAction<string>>;
|
setSaveImageAs: React.Dispatch<React.SetStateAction<string>>;
|
||||||
@ -25,8 +17,6 @@ interface IProps {
|
|||||||
|
|
||||||
function SettingsTab({
|
function SettingsTab({
|
||||||
batchMode,
|
batchMode,
|
||||||
setBatchMode,
|
|
||||||
imagePath,
|
|
||||||
setModel,
|
setModel,
|
||||||
gpuId,
|
gpuId,
|
||||||
setGpuId,
|
setGpuId,
|
||||||
@ -50,9 +40,7 @@ function SettingsTab({
|
|||||||
|
|
||||||
const [scale, setScale] = useAtom(scaleAtom);
|
const [scale, setScale] = useAtom(scaleAtom);
|
||||||
|
|
||||||
const [rememberOutputFolder, setRememberOutputFolder] = useAtom(
|
const [rememberOutputFolder, setRememberOutputFolder] = useState(false);
|
||||||
rememberOutputFolderAtom
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
themeChange(false);
|
themeChange(false);
|
||||||
@ -71,7 +59,7 @@ function SettingsTab({
|
|||||||
} else {
|
} else {
|
||||||
const currentlySavedModel = JSON.parse(
|
const currentlySavedModel = JSON.parse(
|
||||||
localStorage.getItem("model")
|
localStorage.getItem("model")
|
||||||
) as (typeof modelOptions)[0];
|
) as typeof modelOptions[0];
|
||||||
setCurrentModel(currentlySavedModel);
|
setCurrentModel(currentlySavedModel);
|
||||||
setModel(currentlySavedModel.value);
|
setModel(currentlySavedModel.value);
|
||||||
}
|
}
|
||||||
@ -82,6 +70,22 @@ function SettingsTab({
|
|||||||
const currentlySavedGpuId = localStorage.getItem("gpuId");
|
const currentlySavedGpuId = localStorage.getItem("gpuId");
|
||||||
setGpuId(currentlySavedGpuId);
|
setGpuId(currentlySavedGpuId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!localStorage.getItem("rememberOutputFolder")) {
|
||||||
|
localStorage.setItem("rememberOutputFolder", "false");
|
||||||
|
} else {
|
||||||
|
const currentlySavedRememberOutputFolder = localStorage.getItem(
|
||||||
|
"rememberOutputFolder"
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
"🚀 => file: SettingsTab.tsx:80 => currentlySavedRememberOutputFolder:",
|
||||||
|
currentlySavedRememberOutputFolder
|
||||||
|
);
|
||||||
|
|
||||||
|
setRememberOutputFolder(
|
||||||
|
currentlySavedRememberOutputFolder === "true" ? true : false
|
||||||
|
);
|
||||||
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -161,9 +165,19 @@ function SettingsTab({
|
|||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
className="toggle-primary toggle"
|
className="toggle-primary toggle"
|
||||||
defaultChecked={rememberOutputFolder}
|
checked={rememberOutputFolder}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setRememberOutputFolder((oldValue) => !oldValue);
|
setRememberOutputFolder((oldValue) => {
|
||||||
|
if (oldValue === true) {
|
||||||
|
localStorage.removeItem("lastOutputFolderPath");
|
||||||
|
}
|
||||||
|
|
||||||
|
return !oldValue;
|
||||||
|
});
|
||||||
|
localStorage.setItem(
|
||||||
|
"rememberOutputFolder",
|
||||||
|
JSON.stringify(!rememberOutputFolder)
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,7 +15,6 @@ import { modelsListAtom } from "../atoms/modelsListAtom";
|
|||||||
import {
|
import {
|
||||||
batchModeAtom,
|
batchModeAtom,
|
||||||
customModelsPathAtom,
|
customModelsPathAtom,
|
||||||
rememberOutputFolderAtom,
|
|
||||||
scaleAtom,
|
scaleAtom,
|
||||||
} from "../atoms/userSettingsAtom";
|
} from "../atoms/userSettingsAtom";
|
||||||
|
|
||||||
@ -30,9 +29,6 @@ const Home = () => {
|
|||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [version, setVersion] = useState("");
|
const [version, setVersion] = useState("");
|
||||||
const [batchMode, setBatchMode] = useAtom(batchModeAtom);
|
const [batchMode, setBatchMode] = useAtom(batchModeAtom);
|
||||||
const [rememberOutputFolder, setRememberOutputFolder] = useAtom(
|
|
||||||
rememberOutputFolderAtom
|
|
||||||
);
|
|
||||||
const [batchFolderPath, setBatchFolderPath] = useState("");
|
const [batchFolderPath, setBatchFolderPath] = useState("");
|
||||||
const [upscaledBatchFolderPath, setUpscaledBatchFolderPath] = useState("");
|
const [upscaledBatchFolderPath, setUpscaledBatchFolderPath] = useState("");
|
||||||
const [doubleUpscayl, setDoubleUpscayl] = useState(false);
|
const [doubleUpscayl, setDoubleUpscayl] = useState(false);
|
||||||
@ -203,6 +199,18 @@ const Home = () => {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const rememberOutputFolder = localStorage.getItem("rememberOutputFolder");
|
||||||
|
const lastOutputFolderPath = localStorage.getItem("lastOutputFolderPath");
|
||||||
|
|
||||||
|
if (rememberOutputFolder === "true") {
|
||||||
|
setOutputPath(lastOutputFolderPath);
|
||||||
|
} else {
|
||||||
|
setOutputPath("");
|
||||||
|
localStorage.removeItem("lastOutputFolderPath");
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setProgress("");
|
setProgress("");
|
||||||
}, [batchMode]);
|
}, [batchMode]);
|
||||||
@ -370,7 +378,6 @@ const Home = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dirname = filePath.match(/(.*)[\/\\]/)[1] || "";
|
var dirname = filePath.match(/(.*)[\/\\]/)[1] || "";
|
||||||
console.log("🚀 => handleDrop => dirname", dirname);
|
|
||||||
setOutputPath(dirname);
|
setOutputPath(dirname);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -399,6 +406,10 @@ const Home = () => {
|
|||||||
var path = await window.electron.invoke(commands.SELECT_FOLDER);
|
var path = await window.electron.invoke(commands.SELECT_FOLDER);
|
||||||
if (path !== null) {
|
if (path !== null) {
|
||||||
setOutputPath(path);
|
setOutputPath(path);
|
||||||
|
const rememberOutputFolder = localStorage.getItem("rememberOutputFolder");
|
||||||
|
if (rememberOutputFolder) {
|
||||||
|
localStorage.setItem("lastOutputFolderPath", path);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log("Getting output path from input file");
|
console.log("Getting output path from input file");
|
||||||
}
|
}
|
||||||
@ -517,7 +528,6 @@ const Home = () => {
|
|||||||
selectImageHandler={selectImageHandler}
|
selectImageHandler={selectImageHandler}
|
||||||
selectFolderHandler={selectFolderHandler}
|
selectFolderHandler={selectFolderHandler}
|
||||||
handleModelChange={handleModelChange}
|
handleModelChange={handleModelChange}
|
||||||
handleDrop={handleDrop}
|
|
||||||
outputHandler={outputHandler}
|
outputHandler={outputHandler}
|
||||||
upscaylHandler={upscaylHandler}
|
upscaylHandler={upscaylHandler}
|
||||||
batchMode={batchMode}
|
batchMode={batchMode}
|
||||||
@ -526,13 +536,8 @@ const Home = () => {
|
|||||||
outputPath={outputPath}
|
outputPath={outputPath}
|
||||||
doubleUpscayl={doubleUpscayl}
|
doubleUpscayl={doubleUpscayl}
|
||||||
setDoubleUpscayl={setDoubleUpscayl}
|
setDoubleUpscayl={setDoubleUpscayl}
|
||||||
model={model}
|
|
||||||
setModel={setModel}
|
setModel={setModel}
|
||||||
isVideo={isVideo}
|
|
||||||
setIsVideo={setIsVideo}
|
|
||||||
gpuId={gpuId}
|
|
||||||
setGpuId={setGpuId}
|
setGpuId={setGpuId}
|
||||||
saveImageAs={saveImageAs}
|
|
||||||
setSaveImageAs={setSaveImageAs}
|
setSaveImageAs={setSaveImageAs}
|
||||||
dimensions={dimensions}
|
dimensions={dimensions}
|
||||||
/>
|
/>
|
||||||
@ -541,10 +546,6 @@ const Home = () => {
|
|||||||
{selectedTab === 1 && (
|
{selectedTab === 1 && (
|
||||||
<SettingsTab
|
<SettingsTab
|
||||||
batchMode={batchMode}
|
batchMode={batchMode}
|
||||||
setBatchMode={setBatchMode}
|
|
||||||
rememberOutputFolder={rememberOutputFolder}
|
|
||||||
setRememberOutputFolder={setRememberOutputFolder}
|
|
||||||
imagePath={imagePath}
|
|
||||||
setModel={setModel}
|
setModel={setModel}
|
||||||
gpuId={gpuId}
|
gpuId={gpuId}
|
||||||
setGpuId={setGpuId}
|
setGpuId={setGpuId}
|
||||||
@ -564,8 +565,7 @@ const Home = () => {
|
|||||||
onDragOver={(e) => handleDragOver(e)}
|
onDragOver={(e) => handleDragOver(e)}
|
||||||
onDragEnter={(e) => handleDragEnter(e)}
|
onDragEnter={(e) => handleDragEnter(e)}
|
||||||
onDragLeave={(e) => handleDragLeave(e)}
|
onDragLeave={(e) => handleDragLeave(e)}
|
||||||
onPaste={(e) => handlePaste(e)}
|
onPaste={(e) => handlePaste(e)}>
|
||||||
>
|
|
||||||
{progress.length > 0 &&
|
{progress.length > 0 &&
|
||||||
upscaledImagePath.length === 0 &&
|
upscaledImagePath.length === 0 &&
|
||||||
upscaledBatchFolderPath.length === 0 &&
|
upscaledBatchFolderPath.length === 0 &&
|
||||||
@ -642,8 +642,7 @@ const Home = () => {
|
|||||||
</p>
|
</p>
|
||||||
<button
|
<button
|
||||||
className="bg-gradient-blue rounded-lg p-3 font-medium text-white/90 transition-colors"
|
className="bg-gradient-blue rounded-lg p-3 font-medium text-white/90 transition-colors"
|
||||||
onClick={openFolderHandler}
|
onClick={openFolderHandler}>
|
||||||
>
|
|
||||||
Open Upscayled Folder
|
Open Upscayled Folder
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user