mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-11-12 22:29:53 -06:00
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import * as v from "valibot";
|
|
import * as PersistedState from "~/modules/persisted-state/persisted-state";
|
|
|
|
export const devToolbarPersisted = PersistedState.define({
|
|
key: "dev-toolbar",
|
|
storage: "local",
|
|
schema: v.object({ isMinimized: v.boolean() }),
|
|
default: { isMinimized: false },
|
|
});
|
|
|
|
/** Whether running a scenario logs in as its user, or only opens its page as whoever you are. */
|
|
export const scenarioLogInPersisted = PersistedState.define({
|
|
key: "dev-scenario-log-in",
|
|
storage: "local",
|
|
schema: v.boolean(),
|
|
default: true,
|
|
});
|
|
|
|
/** What the scenario list was last filtered by. */
|
|
export const scenarioFilterPersisted = PersistedState.define({
|
|
key: "dev-scenario-filter",
|
|
storage: "local",
|
|
schema: v.string(),
|
|
default: "",
|
|
});
|
|
|
|
/** The parameters each scenario was last run with, keyed by scenario id. */
|
|
export const scenarioParamsPersisted = PersistedState.defineMap({
|
|
keyPrefix: "dev-scenario-params__",
|
|
storage: "local",
|
|
schema: v.record(v.string(), v.union([v.string(), v.number()])),
|
|
default: {},
|
|
});
|
|
|
|
/** Whether grey stand-ins fill the ad slots, for checking the layout with ads while Fuse is off. */
|
|
export const simulateAdsPersisted = PersistedState.define({
|
|
key: "dev-simulate-ads",
|
|
storage: "local",
|
|
schema: v.boolean(),
|
|
default: false,
|
|
});
|