mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
admin: added "system" theme option, check user pref
This commit is contained in:
@@ -4,12 +4,15 @@ import { cors } from "hono/cors";
|
||||
import { Module } from "modules/Module";
|
||||
|
||||
const serverMethods = ["GET", "POST", "PATCH", "PUT", "DELETE"];
|
||||
const appThemes = ["dark", "light", "system"] as const;
|
||||
export type AppTheme = (typeof appThemes)[number];
|
||||
|
||||
export const serverConfigSchema = Type.Object(
|
||||
{
|
||||
admin: Type.Object(
|
||||
{
|
||||
basepath: Type.Optional(Type.String({ default: "", pattern: "^(/.+)?$" })),
|
||||
color_scheme: Type.Optional(StringEnum(["dark", "light"], { default: "light" })),
|
||||
color_scheme: Type.Optional(StringEnum(["dark", "light", "system"])),
|
||||
logo_return_path: Type.Optional(
|
||||
Type.String({
|
||||
default: "/",
|
||||
|
||||
Reference in New Issue
Block a user