mirror of
https://github.com/upscayl/upscayl.git
synced 2024-12-18 10:26:04 +01:00
introduced 500ms delay in showing output image and fixed binary paths
This commit is contained in:
parent
07aa4a7519
commit
77347feb74
@ -12,7 +12,8 @@ import { app } from "electron";
|
|||||||
const appRootDir = app.getAppPath();
|
const appRootDir = app.getAppPath();
|
||||||
|
|
||||||
const binariesPath = isDev
|
const binariesPath = isDev
|
||||||
? join(appRootDir, "resources", getPlatform()!, getArch()!, "bin")
|
? getPlatform() === 'mac' ? join(appRootDir, "resources", getPlatform()!, getArch()!, "bin") :
|
||||||
|
join(appRootDir, "resources", getPlatform()!, "bin")
|
||||||
: join(dirname(appRootDir), "bin");
|
: join(dirname(appRootDir), "bin");
|
||||||
|
|
||||||
const execPath = (execName) =>
|
const execPath = (execName) =>
|
||||||
|
96
package-lock.json
generated
96
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "upscayl",
|
"name": "upscayl",
|
||||||
"version": "2.7.5",
|
"version": "2.8.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "upscayl",
|
"name": "upscayl",
|
||||||
"version": "2.7.5",
|
"version": "2.8.0",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"daisyui": "^3.3.1",
|
"daisyui": "^3.3.1",
|
||||||
@ -25,7 +25,6 @@
|
|||||||
"theme-change": "^2.5.0"
|
"theme-change": "^2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron/notarize": "^2.1.0",
|
|
||||||
"@types/electron": "^1.6.10",
|
"@types/electron": "^1.6.10",
|
||||||
"@types/node": "^18.15.12",
|
"@types/node": "^18.15.12",
|
||||||
"@types/react": "^18.0.37",
|
"@types/react": "^18.0.37",
|
||||||
@ -515,56 +514,6 @@
|
|||||||
"global-agent": "^3.0.0"
|
"global-agent": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/notarize": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"debug": "^4.1.1",
|
|
||||||
"fs-extra": "^9.0.1",
|
|
||||||
"promise-retry": "^2.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@electron/notarize/node_modules/fs-extra": {
|
|
||||||
"version": "9.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
|
|
||||||
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"at-least-node": "^1.0.0",
|
|
||||||
"graceful-fs": "^4.2.0",
|
|
||||||
"jsonfile": "^6.0.1",
|
|
||||||
"universalify": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@electron/notarize/node_modules/jsonfile": {
|
|
||||||
"version": "6.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
|
||||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"universalify": "^2.0.0"
|
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"graceful-fs": "^4.1.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@electron/notarize/node_modules/universalify": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@electron/osx-sign": {
|
"node_modules/@electron/osx-sign": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.0.4.tgz",
|
||||||
@ -8541,47 +8490,6 @@
|
|||||||
"sumchecker": "^3.0.1"
|
"sumchecker": "^3.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@electron/notarize": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"debug": "^4.1.1",
|
|
||||||
"fs-extra": "^9.0.1",
|
|
||||||
"promise-retry": "^2.0.1"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"fs-extra": {
|
|
||||||
"version": "9.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
|
|
||||||
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"at-least-node": "^1.0.0",
|
|
||||||
"graceful-fs": "^4.2.0",
|
|
||||||
"jsonfile": "^6.0.1",
|
|
||||||
"universalify": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"jsonfile": {
|
|
||||||
"version": "6.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
|
||||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"graceful-fs": "^4.1.6",
|
|
||||||
"universalify": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"universalify": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@electron/osx-sign": {
|
"@electron/osx-sign": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.0.4.tgz",
|
||||||
|
@ -24,12 +24,8 @@ import { UpscaylCloudModal } from "../components/UpscaylCloudModal";
|
|||||||
const Home = () => {
|
const Home = () => {
|
||||||
// STATES
|
// STATES
|
||||||
const [os, setOs] = useState<"linux" | "mac" | "win" | undefined>(undefined);
|
const [os, setOs] = useState<"linux" | "mac" | "win" | undefined>(undefined);
|
||||||
const [imagePath, SetImagePath] = useState(
|
const [imagePath, SetImagePath] = useState("");
|
||||||
"/Users/macbook-air/Downloads/wp9454111_upscayl_4x_realesrgan-x4plus.png"
|
const [upscaledImagePath, setUpscaledImagePath] = useState("");
|
||||||
);
|
|
||||||
const [upscaledImagePath, setUpscaledImagePath] = useState(
|
|
||||||
"/Users/macbook-air/Downloads/wp9454111_upscayl_4x_realesrgan-x4plus.png"
|
|
||||||
);
|
|
||||||
const [outputPath, setOutputPath] = useState("");
|
const [outputPath, setOutputPath] = useState("");
|
||||||
const [scaleFactor] = useState(4);
|
const [scaleFactor] = useState(4);
|
||||||
const [progress, setProgress] = useState("");
|
const [progress, setProgress] = useState("");
|
||||||
@ -141,7 +137,7 @@ const Home = () => {
|
|||||||
// UPSCAYL DONE
|
// UPSCAYL DONE
|
||||||
window.electron.on(commands.UPSCAYL_DONE, (_, data: string) => {
|
window.electron.on(commands.UPSCAYL_DONE, (_, data: string) => {
|
||||||
setProgress("");
|
setProgress("");
|
||||||
setUpscaledImagePath(data);
|
setTimeout(() => setUpscaledImagePath(data), 500);
|
||||||
logit("upscaledImagePath: ", data);
|
logit("upscaledImagePath: ", data);
|
||||||
logit(`💯 UPSCAYL_DONE: `, data);
|
logit(`💯 UPSCAYL_DONE: `, data);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user