mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
Merge branch 'release/0.8' into refactor/data-api-entity-prefix
This commit is contained in:
@@ -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"]
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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