mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-23 23:21:05 +01:00
temporary fix (messy)
This commit is contained in:
parent
eb7995524f
commit
5f8704480b
@ -5,10 +5,7 @@ const { getPlatform } = require("./getPlatform");
|
||||
|
||||
const IS_PROD = process.env.NODE_ENV === "production";
|
||||
|
||||
const binariesPath =
|
||||
IS_PROD && isPackaged // the path to a bundled electron app.
|
||||
? path.join(rootPath, "./Contents", "./Resources", "./bin")
|
||||
: path.join(rootPath, "./resources", getPlatform(), "./bin");
|
||||
const binariesPath = path.join("./resources", getPlatform(), "./bin");
|
||||
|
||||
const execPath = path.resolve(path.join(binariesPath, "./upscayl"));
|
||||
const modelsPath = path.resolve(path.join(binariesPath, "./models"));
|
||||
|
9
main/commands.js
Normal file
9
main/commands.js
Normal file
@ -0,0 +1,9 @@
|
||||
const commands = {
|
||||
SELECT_FILE: "Select a File",
|
||||
SELECT_FOLDER: "Select a Folder",
|
||||
UPSCAYL: "Upscale the Image",
|
||||
UPSCAYL_DONE: "Upscaling Done",
|
||||
UPSCAYL_PROGRESS: "Send Progress from Main to Renderer",
|
||||
};
|
||||
|
||||
module.exports = commands;
|
@ -19,7 +19,7 @@ const {
|
||||
} = require("electron");
|
||||
const isDev = require("electron-is-dev");
|
||||
const prepareNext = require("electron-next");
|
||||
const commands = require("../constants/commands");
|
||||
const commands = require("./commands");
|
||||
const sharp = require("sharp");
|
||||
|
||||
// Prepare the renderer once the app is ready
|
||||
|
0
main/models.js
Normal file
0
main/models.js
Normal file
7
next.config.js
Normal file
7
next.config.js
Normal file
@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
experimental: {
|
||||
images: {
|
||||
unoptimized: true
|
||||
}
|
||||
}
|
||||
}
|
14
package.json
14
package.json
@ -26,16 +26,11 @@
|
||||
"appId": "com.tgs963.upscayl",
|
||||
"asar": true,
|
||||
"extraFiles": [
|
||||
{
|
||||
"from": "resources/linux/bin",
|
||||
"to": "Resources/bin",
|
||||
"filter": [
|
||||
"**/*"
|
||||
]
|
||||
}
|
||||
"constants",
|
||||
"resources"
|
||||
],
|
||||
"linux": {
|
||||
"publish":[
|
||||
"publish": [
|
||||
"github"
|
||||
],
|
||||
"target": [
|
||||
@ -44,6 +39,9 @@
|
||||
"rpm",
|
||||
"flatpak",
|
||||
"snap"
|
||||
],
|
||||
"asarUnpack": [
|
||||
"**/node_modules/sharp/**"
|
||||
]
|
||||
},
|
||||
"snap": {
|
||||
|
@ -1,10 +1,14 @@
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
import commands from "../../constants/commands";
|
||||
import commands from "../../main/commands";
|
||||
import {
|
||||
ReactCompareSlider,
|
||||
ReactCompareSliderImage,
|
||||
} from "react-compare-slider";
|
||||
|
||||
import Animated from '../public/loading.svg'
|
||||
import Image from 'next/image'
|
||||
|
||||
|
||||
const Home = () => {
|
||||
const [imagePath, SetImagePath] = useState("");
|
||||
const [upscaledImagePath, setUpscaledImagePath] = useState("");
|
||||
@ -190,7 +194,7 @@ const Home = () => {
|
||||
{progress.length > 0 && (
|
||||
<div className="absolute flex h-full w-full flex-col items-center justify-center bg-black/50 backdrop-blur-lg">
|
||||
<div className="flex flex-col items-center gap-2">
|
||||
<img src="/loading.svg" className="w-10" alt="Loading" />
|
||||
<Image src={Animated} />
|
||||
<p className="font-bold text-neutral-50">{progress}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user