mirror of
https://github.com/upscayl/upscayl.git
synced 2025-02-20 20:51:49 +01:00
parent
42ef87842e
commit
a03d70a938
@ -1,3 +1,4 @@
|
||||
import { atom } from "jotai";
|
||||
import { atomWithStorage } from "jotai/utils";
|
||||
|
||||
export const customModelsPathAtom = atomWithStorage<string | null>(
|
||||
@ -7,7 +8,7 @@ export const customModelsPathAtom = atomWithStorage<string | null>(
|
||||
|
||||
export const scaleAtom = atomWithStorage<"2" | "3" | "4">("scale", "4");
|
||||
|
||||
export const batchModeAtom = atomWithStorage<boolean>("batchMode", false);
|
||||
export const batchModeAtom = atom<boolean>(false);
|
||||
|
||||
export const rememberOutputFolderAtom = atomWithStorage<boolean>(
|
||||
"rememberOutputFolder",
|
||||
|
@ -29,7 +29,7 @@ export function ImageFormatSelect({
|
||||
{/* PNG */}
|
||||
<button
|
||||
className={`btn-primary btn ${
|
||||
saveImageAs === "png" && "btn-accent"
|
||||
saveImageAs === "png" && "btn-accent ring-2 ring-primary"
|
||||
}`}
|
||||
onClick={() => setExportType("png")}>
|
||||
PNG
|
||||
@ -37,7 +37,7 @@ export function ImageFormatSelect({
|
||||
{/* JPG */}
|
||||
<button
|
||||
className={`btn-primary btn ${
|
||||
saveImageAs === "jpg" && "btn-accent"
|
||||
saveImageAs === "jpg" && "btn-accent !ring-2 !ring-primary"
|
||||
}`}
|
||||
onClick={() => setExportType("jpg")}>
|
||||
JPG
|
||||
|
@ -164,7 +164,7 @@ function LeftPaneImageSteps({
|
||||
{/* STEP 2 */}
|
||||
<div className="animate-step-in">
|
||||
<p className="step-heading">Step 2</p>
|
||||
<p className="mb-2 text-sm">Select Upscayling Type</p>
|
||||
<p className="mb-2 text-sm">Select Model</p>
|
||||
|
||||
<Select
|
||||
options={modelOptions}
|
||||
|
@ -102,6 +102,11 @@ const Home = () => {
|
||||
logit(`🐞 BACKEND REPORTED: `, data);
|
||||
});
|
||||
|
||||
window.electron.on(commands.UPSCAYL_ERROR, (_, data: string) => {
|
||||
alert(data);
|
||||
resetImagePaths();
|
||||
});
|
||||
|
||||
// UPSCAYL PROGRESS
|
||||
window.electron.on(commands.UPSCAYL_PROGRESS, (_, data: string) => {
|
||||
if (data.length > 0 && data.length < 10) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user