- complete tokenized theme preset system and admin style guide visibility - refine dashboard layout/scroll behavior and shared async/request UI states - add user nav-visibility settings across API, migration, and frontend stores - harden security headers/CSP handling and related test coverage - enforce CI repository hygiene + frontend contract/theme/build quality gates - update docs/env references and make migration smoke test head-aware
20 lines
601 B
TypeScript
20 lines
601 B
TypeScript
import { setCsrfTokenProvider } from "@/lib/api/client";
|
|
import { useAuthStore } from "@/stores/auth";
|
|
import { useThemeStore } from "@/stores/theme";
|
|
import { useUserSettingsStore } from "@/stores/user_settings";
|
|
|
|
export async function bootstrapAppProviders(): Promise<void> {
|
|
const theme = useThemeStore();
|
|
theme.initialize();
|
|
|
|
const auth = useAuthStore();
|
|
setCsrfTokenProvider(() => auth.csrfToken);
|
|
await auth.bootstrapSession();
|
|
|
|
const userSettings = useUserSettingsStore();
|
|
if (auth.isAuthenticated) {
|
|
await userSettings.bootstrap();
|
|
} else {
|
|
userSettings.reset();
|
|
}
|
|
}
|