mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 20:37:21 +00:00
removed admin config from server, theme is now client side, fixed module manager migrations
This commit is contained in:
@@ -4,24 +4,9 @@ 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", "system"])),
|
||||
logo_return_path: Type.Optional(
|
||||
Type.String({
|
||||
default: "/",
|
||||
description: "Path to return to after *clicking* the logo",
|
||||
}),
|
||||
),
|
||||
},
|
||||
{ default: {}, additionalProperties: false },
|
||||
),
|
||||
cors: Type.Object(
|
||||
{
|
||||
origin: Type.String({ default: "*" }),
|
||||
@@ -43,12 +28,6 @@ export const serverConfigSchema = Type.Object(
|
||||
|
||||
export type AppServerConfig = Static<typeof serverConfigSchema>;
|
||||
|
||||
/*declare global {
|
||||
interface Request {
|
||||
cf: IncomingRequestCfProperties;
|
||||
}
|
||||
}*/
|
||||
|
||||
export class AppServer extends Module<typeof serverConfigSchema> {
|
||||
//private admin_html?: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user