Add base web UI

This commit is contained in:
2025-03-18 19:14:46 +01:00
parent abc75786f7
commit dbe1ec22e0
36 changed files with 2575 additions and 248 deletions

View File

@@ -0,0 +1,38 @@
import { APIClient } from "./ApiClient";
export interface ServerConfig {
auth_disabled: boolean;
oidc_provider_name: string;
constraints: ServerConstraints;
}
export interface ServerConstraints {}
export interface LenConstraint {
min: number;
max: number;
}
let config: ServerConfig | null = null;
export class ServerApi {
/**
* Get server configuration
*/
static async LoadConfig(): Promise<void> {
config = (
await APIClient.exec({
uri: "/server/config",
method: "GET",
})
).data;
}
/**
* Get cached configuration
*/
static get Config(): ServerConfig {
if (config === null) throw new Error("Missing configuration!");
return config;
}
}