Merge branch 'release/0.8' into refactor/data-api-entity-prefix

This commit is contained in:
dswbx
2025-02-18 10:22:15 +01:00
committed by GitHub
20 changed files with 166 additions and 78 deletions

View File

@@ -7,6 +7,7 @@ import { html } from "hono/html";
import { Fragment } from "hono/jsx";
import { Controller } from "modules/Controller";
import * as SystemPermissions from "modules/permissions";
import type { AppTheme } from "modules/server/AppServer";
const htmlBkndContextReplace = "<!-- BKND_CONTEXT -->";
@@ -246,7 +247,7 @@ export class AdminController extends Controller {
}
}
const style = (theme: "light" | "dark" = "light") => {
const style = (theme: AppTheme) => {
const base = {
margin: 0,
padding: 0,
@@ -271,6 +272,6 @@ const style = (theme: "light" | "dark" = "light") => {
return {
...base,
...styles[theme]
...styles[theme === "light" ? "light" : "dark"]
};
};

View File

@@ -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: "/",