mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-27 17:00:52 +01:00
Font changes and permission changes
This commit is contained in:
parent
7c08bb5e62
commit
86372ea72a
@ -61,7 +61,9 @@ app.on("ready", async () => {
|
||||
return { action: "deny" };
|
||||
});
|
||||
|
||||
mainWindow.once("ready-to-show", () => { mainWindow.show(); })
|
||||
mainWindow.once("ready-to-show", () => {
|
||||
mainWindow.show();
|
||||
});
|
||||
|
||||
if (!isDev) {
|
||||
autoUpdater.checkForUpdates();
|
||||
@ -117,18 +119,15 @@ ipcMain.on(commands.UPSCAYL, async (event, payload) => {
|
||||
: payload.imagePath.split("/").slice(-1)[0];
|
||||
const fileName = parse(fullfileName).name;
|
||||
const fileExt = parse(fullfileName).ext;
|
||||
const outFile = outputDir + "/" + fileName + "_upscayled_" + scale + "x_" + model + fileExt;
|
||||
const outFile =
|
||||
outputDir + "/" + fileName + "_upscayled_" + scale + "x_" + model + fileExt;
|
||||
|
||||
// UPSCALE
|
||||
console.log("PRODUCTION? :", isDev);
|
||||
console.log("EXEC: ", execPath);
|
||||
if (fs.existsSync(outFile)) {
|
||||
mainWindow.webContents.send(
|
||||
commands.UPSCAYL_DONE,
|
||||
outFile
|
||||
);
|
||||
}
|
||||
else {
|
||||
mainWindow.webContents.send(commands.UPSCAYL_DONE, outFile);
|
||||
} else {
|
||||
let upscayl = spawn(
|
||||
execPath,
|
||||
[
|
||||
@ -148,6 +147,7 @@ ipcMain.on(commands.UPSCAYL, async (event, payload) => {
|
||||
detached: false,
|
||||
}
|
||||
);
|
||||
|
||||
let failed = false;
|
||||
upscayl.stderr.on("data", (stderr) => {
|
||||
console.log(stderr.toString());
|
||||
@ -157,18 +157,17 @@ ipcMain.on(commands.UPSCAYL, async (event, payload) => {
|
||||
}
|
||||
mainWindow.webContents.send(commands.UPSCAYL_PROGRESS, stderr.toString());
|
||||
});
|
||||
|
||||
upscayl.on("close", (code) => {
|
||||
if (failed !== true) {
|
||||
console.log("Done upscaling");
|
||||
mainWindow.webContents.send(
|
||||
commands.UPSCAYL_DONE,
|
||||
outFile
|
||||
);
|
||||
mainWindow.webContents.send(commands.UPSCAYL_DONE, outFile);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// ! AUTO UPDATE STUFF
|
||||
autoUpdater.on("update-available", (_event, releaseNotes, releaseName) => {
|
||||
const dialogOpts = {
|
||||
type: "info",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "upscayl",
|
||||
"private": true,
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"productName": "Upscayl",
|
||||
"homepage": "https://github.com/TGS963/upscayl",
|
||||
"contributors": [
|
||||
|
@ -101,7 +101,7 @@ const Home = () => {
|
||||
SetImagePath(filePath);
|
||||
var dirname = filePath.match(/(.*)[\/\\]/)[1] || "";
|
||||
SetOutputPath(dirname);
|
||||
window.electron.invoke(commands.SET_FILE, {original: filePath});
|
||||
window.electron.invoke(commands.SET_FILE, { original: filePath });
|
||||
}
|
||||
};
|
||||
|
||||
@ -173,14 +173,14 @@ const Home = () => {
|
||||
<div className="mt-0">
|
||||
<p className="mb-2 font-medium text-neutral-100">Step 1</p>
|
||||
<button
|
||||
className="rounded-lg bg-rose-400 hover:bg-rose-300 transition-colors p-3 font-semibold"
|
||||
className="rounded-lg bg-rose-400 p-3 transition-colors hover:bg-rose-300"
|
||||
onClick={selectImageHandler}
|
||||
>
|
||||
Select Image
|
||||
</button>
|
||||
</div>
|
||||
{/* STEP 2 */}
|
||||
<div className="mt-5 animate-step-in">
|
||||
<div className="animate-step-in mt-5">
|
||||
<p className="font-medium text-neutral-100">Step 2</p>
|
||||
<p className="mb-2 text-sm text-neutral-400">
|
||||
Select Upscaling Type
|
||||
@ -188,7 +188,7 @@ const Home = () => {
|
||||
<select
|
||||
name="select-model"
|
||||
onDrop={(e) => handleDrop(e)}
|
||||
className="rounded-lg bg-slate-300 hover:bg-slate-200 p-3"
|
||||
className="rounded-lg bg-slate-300 p-3 hover:bg-slate-200"
|
||||
onChange={handleModelChange}
|
||||
>
|
||||
<option value="realesrgan-x4plus">General Photo</option>
|
||||
@ -229,13 +229,13 @@ const Home = () => {
|
||||
</div> */}
|
||||
|
||||
{/* STEP 3 */}
|
||||
<div className="mt-5 animate-step-in">
|
||||
<div className="animate-step-in mt-5">
|
||||
<p className="font-medium text-neutral-100">Step 3</p>
|
||||
<p className="mb-2 text-sm text-neutral-400">
|
||||
Defaults to Image's path
|
||||
</p>
|
||||
<button
|
||||
className="rounded-lg bg-teal-400 hover:bg-teal-300 transition-colors p-3 mt-1 font-semibold"
|
||||
className="mt-1 rounded-lg bg-teal-400 p-3 transition-colors hover:bg-teal-300"
|
||||
onClick={outputHandler}
|
||||
>
|
||||
Set Output Folder
|
||||
@ -243,10 +243,10 @@ const Home = () => {
|
||||
</div>
|
||||
|
||||
{/* STEP 4 */}
|
||||
<div className="mt-5 animate-step-in">
|
||||
<div className="animate-step-in mt-5">
|
||||
<p className="mb-2 font-medium text-neutral-100">Step 4</p>
|
||||
<button
|
||||
className="rounded-lg bg-sky-400 hover:bg-sky-300 transition-colors p-3 font-semibold"
|
||||
className="rounded-lg bg-sky-400 p-3 transition-colors hover:bg-sky-300"
|
||||
onClick={upscaylHandler}
|
||||
disabled={progress.length > 0}
|
||||
>
|
||||
|
0
resources/mac/bin/upscayl
Normal file → Executable file
0
resources/mac/bin/upscayl
Normal file → Executable file
Loading…
Reference in New Issue
Block a user