π Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.
TypeScript aielectronesrgangigapixelgigapixel-imagesimageimage-upscalingtopazupscaleupscalerimageupscayl
Removed redundant variables
Nayam Amarshe1b947d82c164
diff --git a/common/sanitize-path.ts b/common/sanitize-path.tsindex 73cf1f1..6f9fd18 100644--- a/common/sanitize-path.ts+++ b/common/sanitize-path.ts@@ -17,7 +17,6 @@ export function sanitizePath(filePath: string) {// Combine the protocol prefix with the encoded file path to create the final file URLconst fileUrl = encodedFilePath;- console.log("π => fileUrl:", fileUrl);// Return the final Electron file URLreturn fileUrl;diff --git a/electron/utils/config-variables.ts b/electron/utils/config-variables.tsindex 7fbef85..6a2f3d9 100644--- a/electron/utils/config-variables.ts+++ b/electron/utils/config-variables.ts@@ -22,56 +22,38 @@ export function setSavedBatchUpscaylFolderPath(logit("π Updating Folder Path: ", savedBatchUpscaylFolderPath);}+/**+ * The saved custom models folder path so that we can load the list of custom models from that folder on startup.+ */export let savedCustomModelsPath: string | undefined = undefined;export function setSavedCustomModelsPath(value: string | undefined): void {savedCustomModelsPath = value;logit("π Updating Custom Models Folder Path: ", savedCustomModelsPath);}-export let savedOutputPath: string | undefined = undefined;-export function setSavedOutputPath(value: string | undefined): void {- savedOutputPath = value;- logit("π Updating Output Folder Path: ", savedOutputPath);-}--export let rememberOutputFolder = false;-export function setRememberOutputFolder(value: boolean): void {- rememberOutputFolder = value;- logit("πΎ Updating Remember Output Folder: ", rememberOutputFolder);-}-+/**+ * The stopped variable to stop the batch upscayl process.+ */export let stopped = false;++/**+ * The child processes array to store the spawned upscayl processes.+ */export let childProcesses: {process: ChildProcessWithoutNullStreams;kill: () => boolean;}[] = [];-export let noImageProcessing: boolean = false;-export function setNoImageProcessing(value: boolean): void {- noImageProcessing = value;- logit("πΌοΈ Updating No Image Processing: ", noImageProcessing);-}-+/**+ * The turn off notifications variable, so that we can load this value on startup.+ */export let turnOffNotifications: boolean = false;export function setTurnOffNotifications(value: boolean): void {turnOffNotifications = value;logit("π Updating Turn Off Notifications: ", turnOffNotifications);}-// export let customWidth: string | null = null;-// export function setCustomWidth(value: string | null): void {-// customWidth = value;-// logit("π Updating Custom Width: ", customWidth);-// }--// export let useCustomWidth: boolean = false;-// export function setUseCustomWidth(value: boolean): void {-// useCustomWidth = value;-// logit("π Updating Use Custom Width: ", useCustomWidth);-// }-// SETTERS-export function setStopped(value: boolean): void {stopped = value;logit("π Updating Stopped: ", stopped);@@ -126,31 +108,6 @@ export function fetchLocalStorage(): void {setSavedCustomModelsPath(value);}});- // GET LAST CUSTOM MODELS FOLDER PATH TO LOCAL STORAGE- mainWindow.webContents- .executeJavaScript('localStorage.getItem("savedOutputPath");', true)- .then((savedOutputPath: string | null) => {- if (savedOutputPath && savedOutputPath.length > 0) {- setSavedOutputPath(savedOutputPath);- }- });- // GET LAST SAVE OUTPUT FOLDER (BOOLEAN) TO LOCAL STORAGE- mainWindow.webContents- .executeJavaScript('localStorage.getItem("rememberOutputFolder");', true)- .then((lastSaveOutputFolder: boolean | null) => {- if (lastSaveOutputFolder !== null) {- setRememberOutputFolder(lastSaveOutputFolder);- }- });-- // GET PROCESS IMAGE (BOOLEAN) FROM LOCAL STORAGE- mainWindow.webContents- .executeJavaScript('localStorage.getItem("noImageProcessing");', true)- .then((lastSaved: string | null) => {- if (lastSaved !== null) {- setNoImageProcessing(lastSaved === "true");- }- });// GET TURN OFF NOTIFICATIONS (BOOLEAN) FROM LOCAL STORAGEmainWindow.webContents@@ -160,22 +117,4 @@ export function fetchLocalStorage(): void {setTurnOffNotifications(lastSaved === "true");}});-- // // GET CUSTOM WIDTH (STRING) FROM LOCAL STORAGE- // mainWindow.webContents- // .executeJavaScript('localStorage.getItem("customWidth");', true)- // .then((lastSaved: string | null) => {- // if (lastSaved !== null) {- // setCustomWidth(lastSaved);- // }- // });-- // // GET USE CUSTOM WIDTH (BOOLEAN) FROM LOCAL STORAGE- // mainWindow.webContents- // .executeJavaScript('localStorage.getItem("useCustomWidth");', true)- // .then((lastSaved: string | null) => {- // if (lastSaved !== null) {- // setUseCustomWidth(lastSaved === "true");- // }- // });}diff --git a/renderer/components/icons/Logo.tsx b/renderer/components/icons/Logo.tsxindex e63e03a..59da531 100644--- a/renderer/components/icons/Logo.tsx+++ b/renderer/components/icons/Logo.tsx@@ -155,8 +155,8 @@ const Logo = ({ ...rest }) => {y2="245.417"gradientUnits="userSpaceOnUse">- <stop stop-color="#87BDFF" />- <stop offset="0.970833" stop-color="#4791CE" />+ <stop stopColor="#87BDFF" />+ <stop offset="0.970833" stopColor="#4791CE" /></linearGradient><clipPath id="clip0_1263_67"><rect width="256" height="256" fill="white" />