feat: First-Start Create Admin Modal 1.01

This commit is contained in:
OpenVelo Agent
2026-07-21 15:32:48 +00:00
parent 5499e30f95
commit 8ef5bc7049
12 changed files with 661 additions and 198 deletions
@@ -31,7 +31,16 @@ export class BootstrapService {
() => this.payload()?.passwordPolicy ?? DEFAULT_POLICY,
);
private loadPromise: Promise<BootstrapPayload | null> | null = null;
async load(): Promise<BootstrapPayload | null> {
if (!this.loadPromise) {
this.loadPromise = this._load();
}
return this.loadPromise;
}
private async _load(): Promise<BootstrapPayload | null> {
try {
const res = await fetch('/api/v1/bootstrap', { credentials: 'include' });
const data = (await res.json()) as BootstrapPayload;
@@ -45,6 +54,13 @@ export class BootstrapService {
}
}
ready(): Promise<BootstrapPayload | null> {
if (!this.loadPromise) {
this.loadPromise = this._load();
}
return this.loadPromise;
}
markInitialized(): void {
this.initialized.set(true);
}