feat: clock fonts and glass and tinted clock styles
images / check (push) Successful in 27s
images / image (push) Successful in 28s

This commit is contained in:
2026-11-18 16:56:46 +01:00
parent 4a4401ddb0
commit 7798432de6
14 changed files with 932 additions and 25 deletions
+5
View File
@@ -5,6 +5,7 @@ import { z } from "zod"
import { db } from "@/db"
import { card, link, settings, wallpaper } from "@/db/schema"
import { auth, requireUser, signUpEnabled, ssoName } from "@/lib/auth"
import { CLOCK_FONTS, CLOCK_STYLES } from "@/lib/clock"
import { ENGINES, parseSuggestions } from "@/lib/search"
const httpUrl = z.url({ protocol: /^https?$/ }).max(2000)
@@ -74,6 +75,8 @@ export const getDashboard = createServerFn({ method: "GET" }).handler(
title: s?.title ?? "Dahoam",
searchEngine: s?.searchEngine ?? "duckduckgo",
wallpaperUrl: s?.wallpaperUrl ?? null,
clockFont: s?.clockFont ?? "serif",
clockStyle: s?.clockStyle ?? "solid",
searxngUrl: process.env.SEARXNG_URL || null,
}
}
@@ -187,6 +190,8 @@ export const saveSettings = createServerFn({ method: "POST" })
wallpaperUrl: z
.union([httpUrl, z.string().regex(/^\/api\/wallpaper\?v=\d+$/)])
.nullable(),
clockFont: z.enum(CLOCK_FONTS),
clockStyle: z.enum(CLOCK_STYLES),
})
.partial()
.refine((patch) => Object.keys(patch).length > 0)