large purgatory improvements

This commit is contained in:
KingKDot
2026-05-22 10:12:40 -05:00
parent ce5095ad61
commit eb75f1a49f
7 changed files with 430 additions and 33 deletions
+5
View File
@@ -58,6 +58,7 @@ export interface Config {
};
enrollment: {
requireApproval: boolean;
autoApproveUnlessSuspicious: boolean;
};
appearance: {
customCSS: string;
@@ -142,6 +143,7 @@ const DEFAULT_CONFIG: Config = {
},
enrollment: {
requireApproval: true,
autoApproveUnlessSuspicious: false,
},
appearance: {
customCSS: "",
@@ -510,6 +512,8 @@ export function loadConfig(): Config {
process.env.OVERLORD_ENROLLMENT_REQUIRE_APPROVAL !== undefined
? String(process.env.OVERLORD_ENROLLMENT_REQUIRE_APPROVAL).toLowerCase() === "true"
: (fileConfig.enrollment?.requireApproval ?? DEFAULT_CONFIG.enrollment.requireApproval),
autoApproveUnlessSuspicious:
fileConfig.enrollment?.autoApproveUnlessSuspicious ?? DEFAULT_CONFIG.enrollment.autoApproveUnlessSuspicious,
},
appearance: {
customCSS: fileConfig.appearance?.customCSS || DEFAULT_CONFIG.appearance.customCSS,
@@ -693,6 +697,7 @@ export async function updateEnrollmentConfig(
...current.enrollment,
...updates,
requireApproval: updates.requireApproval !== undefined ? Boolean(updates.requireApproval) : current.enrollment.requireApproval,
autoApproveUnlessSuspicious: updates.autoApproveUnlessSuspicious !== undefined ? Boolean(updates.autoApproveUnlessSuspicious) : current.enrollment.autoApproveUnlessSuspicious,
};
configCache = {