1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-02-17 11:18:36 +01:00

Fix refactor

This commit is contained in:
Nayam Amarshe 2023-09-10 23:30:49 +05:30
parent c4f0576091
commit f69e06521c
9 changed files with 9 additions and 20 deletions

View File

@ -1,5 +1,5 @@
import fs from "fs"; import fs from "fs";
import { modelsPath } from "../binaries"; import { modelsPath } from "../utils/get-resource-paths";
import COMMAND from "../constants/commands"; import COMMAND from "../constants/commands";
import { import {
customModelsFolderPath, customModelsFolderPath,

View File

@ -32,9 +32,9 @@ import {
} from "./utils/config-variables"; } from "./utils/config-variables";
import { createMainWindow, getMainWindow } from "./main-window"; import { createMainWindow, getMainWindow } from "./main-window";
import electronIsDev from "electron-is-dev"; import electronIsDev from "electron-is-dev";
import { getPlatform } from "./get-device-specs"; import { getPlatform } from "./utils/get-device-specs";
import { join } from "path"; import { join } from "path";
import { execPath, modelsPath } from "./binaries"; import { execPath, modelsPath } from "./utils/get-resource-paths";
// INITIALIZATION // INITIALIZATION
log.initialize({ preload: true }); log.initialize({ preload: true });

View File

@ -1,17 +1,6 @@
import { BrowserWindow, shell } from "electron"; import { BrowserWindow } from "electron";
import { getPlatform } from "./get-device-specs"; import { getPlatform } from "./utils/get-device-specs";
import { join } from "path"; import { join } from "path";
import {
setCustomModelsFolderPath,
setFolderPath,
setImagePath,
setOutputFolderPath,
setOverwrite,
setQuality,
setSaveOutputFolder,
} from "./utils/config-variables";
import COMMAND from "./constants/commands";
import electronIsDev from "electron-is-dev";
let mainWindow: BrowserWindow | null; let mainWindow: BrowserWindow | null;

View File

@ -1,5 +1,5 @@
import { ipcRenderer, contextBridge } from "electron"; import { ipcRenderer, contextBridge } from "electron";
import { getPlatform } from "./get-device-specs"; import { getPlatform } from "./utils/get-device-specs";
// 'ipcRenderer' will be available in index.js with the method 'window.electron' // 'ipcRenderer' will be available in index.js with the method 'window.electron'
contextBridge.exposeInMainWorld("electron", { contextBridge.exposeInMainWorld("electron", {

View File

@ -1,4 +1,4 @@
import { getPlatform } from "../get-device-specs"; import { getPlatform } from "./get-device-specs";
const slash: string = getPlatform() === "win" ? "\\" : "/"; const slash: string = getPlatform() === "win" ? "\\" : "/";
export const getSingleImageArguments = ( export const getSingleImageArguments = (

View File

@ -1,4 +1,4 @@
import { getPlatform } from "../get-device-specs"; import { getPlatform } from "./get-device-specs";
const slash: string = getPlatform() === "win" ? "\\" : "/"; const slash: string = getPlatform() === "win" ? "\\" : "/";
export default slash; export default slash;

View File

@ -1,5 +1,5 @@
import { spawn } from "child_process"; import { spawn } from "child_process";
import { execPath } from "../binaries"; import { execPath } from "./get-resource-paths";
export const spawnUpscayl = ( export const spawnUpscayl = (
binaryName: string, binaryName: string,