tutu/src/settings/stores.ts

18 lines
323 B
TypeScript
Raw Normal View History

2024-07-14 20:28:44 +08:00
import { persistentMap } from "@nanostores/persistent";
type Settings = {
2024-08-05 15:33:00 +08:00
onGoingOAuth2Process?: string;
prefetchTootsDisabled?: boolean;
2024-09-26 17:23:40 +08:00
language?: string;
region?: string;
2024-08-05 15:33:00 +08:00
};
2024-07-14 20:28:44 +08:00
2024-08-05 15:33:00 +08:00
export const $settings = persistentMap<Settings>(
"settings::",
{},
{
encode: JSON.stringify,
decode: JSON.parse,
},
);