feat: list logos from the api instead of hardcoding it

This commit is contained in:
2026-02-21 22:05:26 +01:00
parent 43c91b3c54
commit 81987ac8f1
4 changed files with 32 additions and 55 deletions

View File

@@ -1,60 +1,12 @@
import { z } from "zod";
// TODO: might be better to load these dynamically lol
export const LOGOS = [
"bereal",
"bitcoin",
"buymeacoffee",
"diaspora",
"discord",
"dropbox",
"ello",
"facebook",
"flickr",
"github",
"googlemaps",
"googlemeet",
"googlemessages",
"imessage",
"instagram",
"kik",
"line",
"linkedin",
"litecoin",
"mastodon",
"medium",
"messenger",
"monero",
"onlyfans",
"patreon",
"paypal",
"peertube",
"pinterest",
"reddit",
"session",
"signal",
"snapchat",
"spotify",
"substack",
"telegram",
"threema",
"twitch",
"venmo",
"viber",
"wechat",
"whatsapp",
"x",
"youtube",
"zoom",
] as const;
export const IMAGE_FORMATS = ["png", "jpeg", "webp"] as const;
export type ImageFormat = (typeof IMAGE_FORMATS)[number];
export const settingsSchema = z.object({
format: z.enum(IMAGE_FORMATS).default("png"),
logo: z.enum(LOGOS).optional(),
logo: z.string().optional(),
content: z.string().min(1, "Required"),
});