adds list search
This commit is contained in:
@@ -5,7 +5,7 @@ import { Language, type Settings } from "../settings";
|
||||
const SettingsCreateSchema = z.object({
|
||||
unit: z.enum(["metric", "imperial"]).optional(),
|
||||
language: z.enum(Object.values(Language) as [Language, ...Language[]]).optional(),
|
||||
bio: z.string().optional(),
|
||||
bio: z.string().optional().nullable(),
|
||||
mapFocus: z.enum(["trails", "location"]).optional(),
|
||||
location: z.object({
|
||||
name: z.string(),
|
||||
@@ -14,14 +14,14 @@ const SettingsCreateSchema = z.object({
|
||||
}).optional(),
|
||||
category: z.string().optional(),
|
||||
tilesets: z.array(z.object({ name: z.string(), url: z.string().url() })).optional(),
|
||||
terrain: z.object({ terrain: z.string().url(), hillshading: z.string().url() }).optional(),
|
||||
terrain: z.object({ terrain: z.string().url(), hillshading: z.string().url() }).optional().nullable(),
|
||||
user: z.string().optional(),
|
||||
privacy: z.object({
|
||||
account: z.enum(["public", "private"]),
|
||||
trails: z.enum(["public", "private"]),
|
||||
lists: z.enum(["public", "private"])
|
||||
}).optional(),
|
||||
notifications: z.record(z.enum(Object.values(NotificationType) as [string, ...string[]]), z.object({ web: z.boolean(), email: z.boolean() })).optional()
|
||||
}).optional().nullable(),
|
||||
notifications: z.record(z.enum(Object.values(NotificationType) as [string, ...string[]]), z.object({ web: z.boolean(), email: z.boolean() })).optional().nullable()
|
||||
|
||||
}) satisfies ZodType<Settings>
|
||||
ZodType<Partial<Comment>>
|
||||
|
||||
@@ -14,18 +14,18 @@ export enum Language {
|
||||
}
|
||||
|
||||
class Settings {
|
||||
id?: string;
|
||||
id?: string | null;
|
||||
unit?: "metric" | "imperial";
|
||||
language?: Language;
|
||||
bio?: string;
|
||||
bio?: string | null;
|
||||
mapFocus?: "trails" | "location";
|
||||
location?: { name: string, lat: number, lon: number };
|
||||
category?: string;
|
||||
tilesets?: { name: string, url: string }[]
|
||||
terrain?: { terrain: string, hillshading: string };
|
||||
tilesets?: ({ name: string, url: string }[]) | null
|
||||
terrain?: { terrain: string, hillshading: string } | null;
|
||||
user?: string;
|
||||
privacy?: { account: "public" | "private", trails: "public" | "private", lists: "public" | "private" }
|
||||
notifications?: Record<NotificationType, { web: boolean, email: boolean }>
|
||||
privacy?: { account: "public" | "private", trails: "public" | "private", lists: "public" | "private" } | null
|
||||
notifications?: Record<NotificationType, { web: boolean, email: boolean }> | null
|
||||
|
||||
constructor(
|
||||
unit: "metric" | "imperial",
|
||||
|
||||
Reference in New Issue
Block a user