1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-12-18 10:26:04 +01:00
upscayl/renderer/atoms/userSettingsAtom.ts

66 lines
1.6 KiB
TypeScript
Raw Normal View History

2023-09-09 13:03:16 +02:00
import { atom } from "jotai";
2023-04-09 07:16:15 +02:00
import { atomWithStorage } from "jotai/utils";
export const customModelsPathAtom = atomWithStorage<string | null>(
"customModelsPath",
2024-02-08 15:57:35 +01:00
null,
2023-04-09 07:16:15 +02:00
);
2024-04-09 20:11:24 +02:00
2024-04-21 19:27:16 +02:00
export const scaleAtom = atomWithStorage<string>("scale", "4");
2024-04-09 20:11:24 +02:00
2023-09-09 13:03:16 +02:00
export const batchModeAtom = atom<boolean>(false);
2024-04-09 20:11:24 +02:00
/**
* The path to the last folder the user saved an image to.
* Reset to "" if rememberOutputFolder is false.
*/
2024-04-09 20:11:24 +02:00
export const savedOutputPathAtom = atomWithStorage<string | null>(
"savedOutputPath",
2024-02-14 07:32:52 +01:00
null,
);
2024-04-09 20:11:24 +02:00
2023-11-10 12:41:35 +01:00
export const progressAtom = atom<string>("");
2023-04-20 20:34:49 +02:00
export const rememberOutputFolderAtom = atomWithStorage<boolean>(
"rememberOutputFolder",
2024-02-08 15:57:35 +01:00
false,
2023-04-20 20:34:49 +02:00
);
2023-09-03 11:16:48 +02:00
export const dontShowCloudModalAtom = atomWithStorage<boolean>(
"dontShowCloudModal",
2024-02-08 15:57:35 +01:00
false,
2023-09-03 11:16:48 +02:00
);
2023-09-18 20:30:43 +02:00
export const noImageProcessingAtom = atomWithStorage<boolean>(
"noImageProcessing",
2024-02-08 15:57:35 +01:00
false,
2023-09-18 20:30:43 +02:00
);
2023-11-22 16:57:44 +01:00
export const compressionAtom = atomWithStorage<number>("compression", 0);
export const overwriteAtom = atomWithStorage("overwrite", false);
2024-01-16 08:33:43 +01:00
export const turnOffNotificationsAtom = atomWithStorage(
"turnOffNotifications",
2024-02-08 15:57:35 +01:00
false,
2024-01-16 08:33:43 +01:00
);
2024-01-23 09:44:32 +01:00
export const viewTypeAtom = atomWithStorage<"slider" | "lens">(
"viewType",
2024-04-01 11:04:56 +02:00
"slider",
2024-01-23 09:44:32 +01:00
);
export const lensSizeAtom = atomWithStorage<number>("lensSize", 100);
2024-02-08 15:57:35 +01:00
export const customWidthAtom = atomWithStorage<number>("customWidth", 0);
2024-02-08 15:57:35 +01:00
export const useCustomWidthAtom = atomWithStorage<boolean>(
"useCustomWidth",
false,
);
2024-04-17 18:18:45 +02:00
export const tileSizeAtom = atomWithStorage<number | null>("tileSize", null);
2024-04-17 18:18:45 +02:00
// CLIENT SIDE ONLY
export const showSidebarAtom = atomWithStorage("showSidebar", true);